12014-09-13  Babak Shafiei  <bshafiei@apple.com>
2
3        Merge r173595
4
5    2014-09-12  Tim Horton  <timothy_horton@apple.com>
6
7            Swiping back from a Twitter image to Twitter flashes to the wrong position
8            https://bugs.webkit.org/show_bug.cgi?id=136798
9            <rdar://problem/18324338>
10
11            Reviewed by Darin Adler and Sam Weinig.
12
13            * UIProcess/mac/ViewGestureController.h:
14            * UIProcess/mac/ViewGestureControllerMac.mm:
15            (WebKit::ViewGestureController::ViewGestureController):
16            (WebKit::ViewGestureController::didFinishLoadForMainFrame):
17            (WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
18            Add a 250ms repeating timer that we start in didFinishLoadForMainFrame
19            if we are for some reason still loading, and in didSameDocumentNavigationForMainFrame
20            unconditionally, to match behavior of the old swipe implementation.
21
22            Also, do the active gesture check in both of those places so that we don't
23            start the timer if we're in the middle of a live swipe or have already torn
24            down the snapshot (removeSwipeSnapshotAfterRepaint does this as well, so
25            this isn't really a behavior change).
26
27            (WebKit::ViewGestureController::activeLoadMonitoringTimerFired):
28            Every time the timer fires, check if we're still loading; if not,
29            tear down the swipe snapshot (after repainting).
30
31            (WebKit::ViewGestureController::removeSwipeSnapshotAfterRepaint):
32            Stop the active load monitoring timer.
33
342014-09-12  Lucas Forschler  <lforschler@apple.com>
35
36        Merge r173573
37
38    2014-09-12  Tim Horton  <timothy_horton@apple.com>
39
40            Flash of page scrolled to wrong origin before restoring scroll position after swiping back to CNN front page from an article
41            https://bugs.webkit.org/show_bug.cgi?id=136788
42            <rdar://problem/18314597>
43
44            Reviewed by Sam Weinig.
45
46            * UIProcess/mac/ViewGestureControllerMac.mm:
47            (WebKit::ViewGestureController::didHitRenderTreeSizeThreshold):
48            (WebKit::ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame):
49            Always wait until didFinishLoadForMainFrame or didSameDocumentNavigationForMainFrame
50            before removing the snapshot, because otherwise we don't know if the scroll
51            position has been restored yet.
52
53            We should revisit this at some point, because it should be possible to
54            determine if the scroll position has been restored appropriately, but for
55            now it is safest to restore the antique behavior.
56
572014-08-29  Lucas Forschler  <lforschler@apple.com>
58
59        Merge r173121
60
61    2014-08-29  Alexey Proskuryakov  <ap@apple.com>
62
63            Crashes in IPC code under VisitedLinkProvider::pendingVisitedLinksTimerFired
64            https://bugs.webkit.org/show_bug.cgi?id=136384
65            rdar://problem/16991213
66
67            Reviewed by Sam Weinig.
68
69            VisitedLinkProvider process tracking relied on a combination of WebPageProxy process
70            lifecycle notifications and checking process state. As evidenced by multiple FIXMEs,
71            these are not yet as reliable as they should be.
72
73            Changed to unregister a process when it closes, not when it no longer has any pages
74            using the particular VisitedLinkProvider or WebUserContentControllerProxy. This
75            is a deoptimization that should not matter in practice.
76
77            * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
78            (WebKit::WebUserContentControllerProxy::~WebUserContentControllerProxy):
79            (WebKit::WebUserContentControllerProxy::removeProcess):
80            (WebKit::WebUserContentControllerProxy::addUserScript):
81            (WebKit::WebUserContentControllerProxy::removeAllUserScripts):
82            (WebKit::WebUserContentControllerProxy::addUserStyleSheet):
83            (WebKit::WebUserContentControllerProxy::removeAllUserStyleSheets):
84            (WebKit::WebUserContentControllerProxy::addUserScriptMessageHandler):
85            (WebKit::WebUserContentControllerProxy::removeUserMessageHandlerForName):
86            * UIProcess/UserContent/WebUserContentControllerProxy.h:
87            * UIProcess/VisitedLinkProvider.cpp:
88            (WebKit::VisitedLinkProvider::~VisitedLinkProvider):
89            (WebKit::VisitedLinkProvider::removeProcess):
90            (WebKit::VisitedLinkProvider::removeAll):
91            (WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired):
92            (WebKit::VisitedLinkProvider::resizeTable):
93            * UIProcess/VisitedLinkProvider.h:
94            * UIProcess/WebPageProxy.cpp:
95            (WebKit::WebPageProxy::WebPageProxy):
96            (WebKit::WebPageProxy::close):
97            (WebKit::WebPageProxy::processDidFinishLaunching):
98            (WebKit::WebPageProxy::resetStateAfterProcessExited):
99            * UIProcess/WebProcessProxy.cpp:
100            (WebKit::WebProcessProxy::disconnect):
101            (WebKit::WebProcessProxy::addVisitedLinkProvider):
102            (WebKit::WebProcessProxy::addWebUserContentControllerProxy):
103            (WebKit::WebProcessProxy::didDestroyVisitedLinkProvider):
104            (WebKit::WebProcessProxy::didDestroyWebUserContentControllerProxy):
105            * UIProcess/WebProcessProxy.h:
106
1072014-08-29  Lucas Forschler  <lforschler@apple.com>
108
109        Merge r173118
110
111    2014-08-29  Alexey Proskuryakov  <ap@apple.com>
112
113            WebPageProxy::close() is a no-op for terminated processes
114            https://bugs.webkit.org/show_bug.cgi?id=136378
115            Related to <rdar://problem/16991213> and to <rdar://problem/17095600>
116
117            Reviewed by Brady Eidson.
118
119            Also fixes issues that got uncovered after making close() work.
120
121            * UIProcess/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::invalidate): Don't
122            close the page, because it makes no sense, and causes an assertion now. Previosly,
123            this was OK because the page was invalid already, and close() was a no-op.
124
125            * UIProcess/WebPageProxy.cpp:
126            (WebKit::WebPageProxy::~WebPageProxy): Added some assertions to catch invalidation
127            issues earlier.
128            (WebKit::WebPageProxy::reattachToWebProcess): Make it an invariant that a page's
129            process always has a message receiver for it, until close() removes it.
130            (WebKit::WebPageProxy::close): Make this function work for all open pages, whether
131            they have a page or not.
132            (WebKit::WebPageProxy::processDidFinishLaunching): Added an asserion that process
133            agrees about its state.
134            (WebKit::WebPageProxy::resetStateAfterProcessExited): Don't remove a message receiver,
135            we now only do this in reattach or close.
136
1372014-08-28  Lucas Forschler  <lforschler@apple.com>
138
139        Merge r173093
140
141    2014-08-28  Tim Horton  <timothy_horton@apple.com>
142
143            _setDidMoveSwipeSnapshotCallback's block should only be called if the snapshot is going to move
144            https://bugs.webkit.org/show_bug.cgi?id=136354
145            <rdar://problem/18167791>
146
147            Reviewed by Simon Fraser.
148
149            * UIProcess/API/Cocoa/WKViewPrivate.h:
150            Update the comment to note the new behavior.
151
152            * UIProcess/mac/ViewGestureControllerMac.mm:
153            (WebKit::ViewGestureController::beginSwipeGesture):
154            Don't call the block until the snapshot is actually moving (if the snapshot
155            never moves because it's behind the live view, don't call the block at all).
156
1572014-08-28  Lucas Forschler  <lforschler@apple.com>
158
159        Merge r173092
160
161    2014-08-28  Tim Horton  <timothy_horton@apple.com>
162
163            Occasional thread-safety-related crashes on the ServicesController queue
164            https://bugs.webkit.org/show_bug.cgi?id=136356
165            <rdar://problem/18045685>
166
167            Reviewed by Dan Bernstein.
168
169            * UIProcess/mac/ServicesController.mm:
170            (WebKit::hasCompatibleServicesForItems):
171            Added. Check directly with NSSharingService if we have any services for the given items.
172            We should eventually check Viewer and Editor services separately so the Web process can
173            be smarter about when it shows the overlay, but for now this maintains the existing behavior.
174
175            (WebKit::ServicesController::refreshExistingServices):
176            Make use of hasCompatibleServicesForItems instead of having NSSharingServicePicker construct NSMenus.
177
1782014-08-28  Lucas Forschler  <lforschler@apple.com>
179
180        Merge r172989
181
182    2014-08-26  Joseph Pecoraro  <pecoraro@apple.com>
183
184            FileReader cannot read files selected with <input type="file"> in iOS 8
185            https://bugs.webkit.org/show_bug.cgi?id=136117
186
187            Reviewed by Alexey Proskuryakov.
188
189            * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
190            Correct an overzealous deny that was accidentally denying all
191            com.apple.app-sandbox.read extensions instead of just the ones
192            in Application bundles it was trying to deny.
193
1942014-08-28  Lucas Forschler  <lforschler@apple.com>
195
196        Merge r171782
197
198    2014-07-29  Enrica Casucci  <enrica@apple.com>
199
200            REGRESSION [WebKit2 iOS]: Cannot add shortcut to user dictionary from non editable content.
201            https://bugs.webkit.org/show_bug.cgi?id=135392
202            <rdar://problem/17760073>
203
204            Reviewed by Benjamin Poulain.
205
206            Adding a shortcut to the user dictionary needs to be available in non editable content too.
207
208            * UIProcess/ios/WKContentViewInteraction.mm:
209            (-[WKContentView _addShortcut:]):
210
2112014-08-28  Lucas Forschler  <lforschler@apple.com>
212
213        Merge r173078
214
215    2014-08-28  Tim Horton  <timothy_horton@apple.com>
216
217            WebKit2 doesn't support viewer services that accept image attachments
218            https://bugs.webkit.org/show_bug.cgi?id=136349
219            <rdar://problem/18164606>
220
221            Reviewed by Brady Eidson.
222
223            * Shared/WebProcessCreationParameters.cpp:
224            (WebKit::WebProcessCreationParameters::encode):
225            (WebKit::WebProcessCreationParameters::decode):
226            Encode the already-existing parameter.
227
2282014-08-28  Lucas Forschler  <lforschler@apple.com>
229
230        Merge r173040
231
232    2014-08-27  Tim Horton  <timothy_horton@apple.com>
233
234            WebKit2 swipe gesture should report the position of the snapshot to the client
235            https://bugs.webkit.org/show_bug.cgi?id=136308
236            rdar://problem/18105827
237
238            Reviewed by Simon Fraser.
239
240            * UIProcess/API/Cocoa/WKViewPrivate.h:
241            * UIProcess/API/mac/WKView.mm:
242            (-[WKView _setDidMoveSwipeSnapshotCallback:]):
243            Add _setDidMoveSwipeSnapshotCallback, and plumb it to ViewGestureController.
244            Callers provide a block which is called whenever ViewGestureController moves the
245            swipe *snapshot* layer around.
246
247            * UIProcess/PageClient.h:
248            * UIProcess/WebPageProxy.h:
249            * UIProcess/mac/PageClientImpl.h:
250            * UIProcess/mac/PageClientImpl.mm:
251            (WebKit::PageClientImpl::boundsOfLayerInLayerBackedWindowCoordinates):
252            * UIProcess/mac/WebPageProxyMac.mm:
253            (WebKit::WebPageProxy::boundsOfLayerInLayerBackedWindowCoordinates):
254            Expose a Mac-only way to get the bounds of a given CALayer in window coordinates,
255            respecting transforms. This only works for layer-backed windows because
256            it uses CA in order to do the mapping respecting transforms.
257
258            * UIProcess/mac/ViewGestureController.h:
259            * UIProcess/mac/ViewGestureControllerMac.mm:
260            (WebKit::ViewGestureController::ViewGestureController):
261            (WebKit::ViewGestureController::~ViewGestureController):
262            (WebKit::ViewGestureController::setDidMoveSwipeSnapshotCallback):
263            Do the Block_copy and Block_release dance to keep our copy of the callback block.
264
265            (WebKit::ViewGestureController::beginSwipeGesture):
266            (WebKit::ViewGestureController::handleSwipeGesture):
267            (WebKit::ViewGestureController::didMoveSwipeSnapshotLayer):
268            When the swipe snapshot layer moves around, call the block.
269
2702014-08-28  Lucas Forschler  <lforschler@apple.com>
271
272        Merge r173029
273
274    2014-08-27  Tim Horton  <timothy_horton@apple.com>
275
276            Occasional crashes in commitTransientZoom's transaction completion block
277            https://bugs.webkit.org/show_bug.cgi?id=136309
278            <rdar://problem/17215064>
279
280            Reviewed by Dan Bernstein.
281
282            * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
283            (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
284            Hold a reference to zoomLayer and the WebPage. It's possible that either
285            of these things could have gone away by the time the transaction is committed.
286
2872014-08-28  Lucas Forschler  <lforschler@apple.com>
288
289        Merge r172939
290
291    2014-08-25  Brady Eidson  <beidson@apple.com>
292
293            Don't crash when the DataDetectors framework is unavailable.
294            <rdar://problem/18106066> and https://bugs.webkit.org/show_bug.cgi?id=136234
295
296            Reviewed by Tim Horton.
297
298            * WebProcess/WebPage/mac/ServicesOverlayController.mm:
299            (WebKit::ServicesOverlayController::buildPhoneNumberHighlights): Bail if DD.framework didn’t soft link.
300            (WebKit::ServicesOverlayController::buildSelectionHighlight): Ditto.
301
3022014-08-26  Dana Burkart  <dburkart@apple.com>
303
304        Merge r172988. <rdar://problem/17923694>
305
306    2014-08-26  Tim Horton  <timothy_horton@apple.com>
307    
308            Crashes in ViewGestureController::beginSwipeGesture when swiping in rapid succession
309            https://bugs.webkit.org/show_bug.cgi?id=136271
310            <rdar://problem/17923694>
311    
312            Reviewed by Simon Fraser.
313    
314            It was possible to get into trackSwipeGesture while another swipe was still
315            occurring, because the guard against this happening depended on m_pendingSwipeReason
316            never being set while a swipe was occurring. However, if the very first scroll event
317            had sufficient magnitude, we would still set m_pendingSwipeReason to InsufficientMagnitude,
318            and then *never clear it*, leading to a path around the guard against multiple live swipes.
319            This in turn allowed stale layers in m_liveSwipeLayers, which lead to the crash.
320    
321            * UIProcess/mac/ViewGestureControllerMac.mm:
322            (WebKit::ViewGestureController::handleScrollWheelEvent):
323            Don't unset m_pendingSwipeReason before calling trackSwipeGesture;
324            trackSwipeGesture will do it itself.
325    
326            Don't set m_pendingSwipeReason to InsufficientMagnitude
327            if the event actually *has* sufficient magnitude to start a swipe.
328    
329            (WebKit::ViewGestureController::trackSwipeGesture):
330            Assert that we don't have an active gesture while starting a swipe.
331    
332            Reset m_pendingSwipeReason, because the swipe is no longer pending!
333    
3342014-08-26  Dana Burkart  <dburkart@apple.com>
335
336        Merge r172966. <rdar://problem/18107826>
337
338    2014-08-26  Tim Horton  <timothy_horton@apple.com>
339    
340            REGRESSION (r172771): Amazon product page becomes unresponsive after swiping back to it
341            https://bugs.webkit.org/show_bug.cgi?id=136260
342            <rdar://problem/18107826>
343    
344            Reviewed by Dan Bernstein.
345    
346            Previously, when a swipe ended up performing a same-document navigation,
347            we would never get didFinishLoadForMainFrame nor didFirstVisuallyNonEmptyLayoutForMainFrame
348            nor would we even get didHitRenderTreeSizeThreshold in all cases, so we would never
349            remove the swipe snapshot. Previous implementations removed the snapshot on
350            didSameDocumentNavigation for the main frame if the navigation type was Replace or Pop,
351            so we will match that behavior.
352    
353            Also, reinstate the watchdog that starts at swipe-end which would have prevented
354            this bug from forever breaking the view it was associated with.
355    
356            Also, defend against removing the snapshot before the swipe has finished (before
357            we have even caused the navigation that we're watching for the effects of).
358    
359            * UIProcess/API/mac/WKView.mm:
360            (-[WKView _didSameDocumentNavigationForMainFrame:]):
361            * UIProcess/API/mac/WKViewInternal.h:
362            * UIProcess/PageClient.h:
363            * UIProcess/WebPageProxy.cpp:
364            (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
365            * UIProcess/ios/PageClientImplIOS.h:
366            * UIProcess/ios/PageClientImplIOS.mm:
367            (WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame):
368            * UIProcess/mac/PageClientImpl.h:
369            * UIProcess/mac/PageClientImpl.mm:
370            (WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame):
371            Plumb main-frame same-document navigation notification from WebPageProxy
372            to ViewGestureControllerMac via PageClient and WKView.
373    
374            * UIProcess/mac/ViewGestureController.h:
375            * UIProcess/mac/ViewGestureControllerMac.mm:
376            (WebKit::ViewGestureController::ViewGestureController):
377            (WebKit::ViewGestureController::beginSwipeGesture):
378            (WebKit::ViewGestureController::endSwipeGesture):
379            Keep track of whether a swipe is currently occurring. We can't use
380            activeGestureType for this because the swipe currently remains the "active"
381            gesture until the snapshot is removed.
382    
383            Reintroduce the old swipeWatchdogTimer (and rename the shorter timer that starts
384            when we get a visually non-empty layout) so that we will always remove the
385            snapshot after 5 seconds, even if we haven't committed the load.
386            This could lead to flashing back to the old content if we fail to get a single
387            byte for 5 seconds, but that is a rare case and should eventually get additional
388            special treatment (dropping the tiles until we do get content, or some such).
389    
390            (WebKit::ViewGestureController::didHitRenderTreeSizeThreshold):
391            If a swipe is still in progress, we haven't done our navigation and thus
392            don't care about render tree size changes.
393    
394            (WebKit::ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame):
395            If a swipe is still in progress, we haven't done our navigation and thus
396            don't care about layouts.
397    
398            Stop the 5 second overall watchdog if we start the 3 second after-visuallyNonEmptyLayout
399            watchdog. This means that the snapshot could stay up for a maximum of 8 seconds
400            for a very, very slow load.
401    
402            (WebKit::ViewGestureController::didFinishLoadForMainFrame):
403            If a swipe is still in progress, we haven't done our navigation and thus
404            don't care about loads that complete.
405    
406            (WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
407            Remove the swipe snapshot after painting if we do replaceState or popState.
408    
409            (WebKit::ViewGestureController::removeSwipeSnapshotAfterRepaint):
410            If a swipe is still in progress, we shouldn't remove the snapshot yet.
411    
4122014-08-19  Dana Burkart  <dburkart@apple.com>
413
414        Merge r172643. <rdar://problem/18032571>
415
416    2014-08-15  Enrica Casucci  <enrica@apple.com>
417    
418            [Services with UI] Selections are incorrect when selecting three lines.
419            https://bugs.webkit.org/show_bug.cgi?id=135989
420            <rdar://problem/18032571>
421    
422            Reviewed by Tim Horton.
423    
424            The stitching algorithm did not handle correctly the case of selections
425            over three lines if the middle line is composed of only one rectangle.
426    
427            * WebProcess/WebPage/mac/ServicesOverlayController.mm:
428            (WebKit::stitchRects):
429    
4302014-08-19  Dana Burkart  <dburkart@apple.com>
431
432        Merge r172639. <rdar://problem/17957716>
433
434    2014-08-15  Tim Horton  <timothy_horton@apple.com>
435    
436            Service overlays stay fixed when <iframe> scrolls
437            https://bugs.webkit.org/show_bug.cgi?id=135959
438            <rdar://problem/17957716>
439    
440            Reviewed by Enrica Casucci.
441    
442            * WebProcess/WebPage/mac/ServicesOverlayController.mm:
443            (WebKit::ServicesOverlayController::highlightsAreEquivalent):
444            Tiny correctness fix; highlights can only be equivalent if their
445            types are equivalent as well.
446    
4472014-08-19  Dana Burkart  <dburkart@apple.com>
448
449        Merge r172636. <rdar://problem/17957716>
450
451    2014-08-15  Tim Horton  <timothy_horton@apple.com>
452    
453            Service overlays stay fixed when <iframe> scrolls
454            https://bugs.webkit.org/show_bug.cgi?id=135959
455            <rdar://problem/17957716>
456    
457            Reviewed by Enrica Casucci.
458    
459            * WebProcess/WebPage/PageOverlay.cpp:
460            (WebKit::PageOverlay::didScrollFrame):
461            * WebProcess/WebPage/PageOverlay.h:
462            (WebKit::PageOverlay::Client::didScrollFrame):
463            * WebProcess/WebPage/PageOverlayController.cpp:
464            (WebKit::PageOverlayController::didScrollFrame):
465            Push didScrollFrame down to the overlays.
466    
467            * WebProcess/WebPage/ServicesOverlayController.h:
468            * WebProcess/WebPage/mac/ServicesOverlayController.mm:
469            (WebKit::ServicesOverlayController::Highlight::createForSelection):
470            Hold on to the selection's Range so we can use it to compare Highlights later.
471    
472            (WebKit::ServicesOverlayController::Highlight::Highlight):
473            (WebKit::ServicesOverlayController::Highlight::setDDHighlight):
474            Factor the code to set up and paint the highlight out, so that we can
475            set a new DDHighlightRef on a Highlight and the layer moves/reshapes/repaints.
476    
477            (WebKit::ServicesOverlayController::buildPhoneNumberHighlights):
478            (WebKit::ServicesOverlayController::buildSelectionHighlight):
479            (WebKit::ServicesOverlayController::replaceHighlightsOfTypePreservingEquivalentHighlights):
480            Factor replaceHighlightsOfTypePreservingEquivalentHighlights out
481            so that we can use it for buildSelectionHighlight as well.
482    
483            Steal the DDHighlightRef from the new Highlight when re-using an old one
484            so that the newly computed rects are used instead of the old ones.
485    
486            (WebKit::ServicesOverlayController::highlightsAreEquivalent):
487            We will always have a Range now, so we can always check equivalence using it.
488    
489            (WebKit::ServicesOverlayController::didScrollFrame):
490            Rebuild all highlights upon subframe scroll, as they might have moved.
491            We could optimize this in the future, but for now it's cheap enough
492            and rare enough that it doesn't matter.
493    
4942014-08-19  Dana Burkart  <dburkart@apple.com>
495
496        Merge r172635. <rdar://problem/18006149>
497
498    2014-08-15  Tim Horton  <timothy_horton@apple.com>
499    
500            REGRESSION (WebKit2 Gestures): White flash when swiping back to cnn.com's homepage from an article
501            https://bugs.webkit.org/show_bug.cgi?id=135951
502            <rdar://problem/18006149>
503    
504            Reviewed by Simon Fraser.
505    
506            Wait for (the first visually non-empty layout AND the render tree size threshold to be hit),
507            OR didFinishLoadForFrame, whichever comes first. Once we've done the first visually non-empty layout,
508            we'll start the watchdog and tear down the snapshot in three seconds no matter what.
509            Also, force a repaint so we can asynchronously wait for the Web Process to paint and return to us
510            before removing the snapshot, which improves our chances that something is actually on the screen.
511    
512            * UIProcess/API/mac/WKView.mm:
513            (-[WKView _didFirstVisuallyNonEmptyLayoutForMainFrame]):
514            (-[WKView _didFinishLoadForMainFrame]):
515            (-[WKView _removeNavigationGestureSnapshot]):
516            * UIProcess/API/mac/WKViewInternal.h:
517            * UIProcess/PageClient.h:
518            * UIProcess/WebPageProxy.cpp:
519            (WebKit::WebPageProxy::didFinishLoadForFrame):
520            (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
521            (WebKit::WebPageProxy::removeNavigationGestureSnapshot):
522            * UIProcess/WebPageProxy.h:
523            * UIProcess/ios/PageClientImplIOS.h:
524            * UIProcess/ios/PageClientImplIOS.mm:
525            (WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):
526            (WebKit::PageClientImpl::didFinishLoadForMainFrame):
527            * UIProcess/mac/PageClientImpl.h:
528            * UIProcess/mac/PageClientImpl.mm:
529            (WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):
530            (WebKit::PageClientImpl::didFinishLoadForMainFrame):
531            (WebKit::PageClientImpl::removeNavigationGestureSnapshot):
532            Plumb didFirstVisuallyNonEmptyLayoutForMainFrame and didFinishLoadForMainFrame
533            through to ViewGestureController from WebPageProxy via the PageClient, etc.
534    
535            Ditto for removeNavigationGestureSnapshot, though it is called from a
536            VoidCallback in ViewGestureController instead of from WebFrameLoaderClient and friends.
537    
538            * UIProcess/mac/ViewGestureController.h:
539            * UIProcess/mac/ViewGestureControllerMac.mm:
540            (WebKit::ViewGestureController::ViewGestureController):
541            (WebKit::ViewGestureController::endSwipeGesture):
542            When finishing a swipe, we want to wait for both the first visually non-empty layout
543            and the render tree size threshold being hit.
544    
545            (WebKit::ViewGestureController::didHitRenderTreeSizeThreshold):
546            (WebKit::ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame):
547            When both of these things have happened, remove the swipe snapshot (after forcing a repaint).
548            For didFirstVisuallyNonEmptyLayoutForMainFrame, we will also start a watchdog
549            ensuring that we remove the snapshot in three seconds.
550    
551            (WebKit::ViewGestureController::didFinishLoadForMainFrame):
552            When didFinishLoadForMainFrame happens, remove the swipe snapshot (after forcing a repaint).
553    
554            (WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired):
555            If the watchdog timer fires, remove the swipe snapshot (after forcing a repaint).
556    
557            (WebKit::ViewGestureController::removeSwipeSnapshotAfterRepaint):
558            Force a repaint and wait for the async callback before removing the snapshot.
559            It is safe to hold on to the WebPageProxy here because it will always
560            call all of its callbacks before it is destroyed.
561            Avoid enqueuing multiple force-repaints.
562    
563            (WebKit::ViewGestureController::removeSwipeSnapshot):
564    
5652014-08-19  Dana Burkart  <dburkart@apple.com>
566
567        Merge r172596
568
569    2014-08-14  Enrica Casucci  <enrica@apple.com>
570
571            [Services with UI] Selection services don't work inside <iframes>.
572            https://bugs.webkit.org/show_bug.cgi?id=135941
573            <rdar://problem/17957690>
574
575            Reviewed by Tim Horton.
576
577            Need to map the selection rectangles using the correct FrameView.
578            When handling the click, we must use the selection from the focused frame.
579
580            * WebProcess/WebPage/mac/ServicesOverlayController.mm:
581            (WebKit::ServicesOverlayController::buildSelectionHighlight):
582            (WebKit::ServicesOverlayController::handleClick):
583
5842014-08-19  Dana Burkart  <dburkart@apple.com>
585
586        Merge r172502
587
588    2014-08-12  Pratik Solanki  <psolanki@apple.com>
589
590            Cached file backed resources don't make it to the Web Process when NETWORK_CFDATA_ARRAY_CALLBACK is enabled
591            https://bugs.webkit.org/show_bug.cgi?id=135727
592            <rdar://problem/17947880>
593
594            Reviewed by Darin Adler.
595
596            tryGetShareableHandleFromSharedBuffer() assumed that we have a file backed resource only if
597            we had a CFDataRef (platformData()) in SharedBuffer. This is wrong when we use the data
598            array callbacks since the file backed buffer could be in the data array. Instead of relying
599            on hasPlatformData(), explicitly ask the SharedBuffer to give us a CFDataRef if it has one
600            so that SharedBuffer can take care of the data array case.
601
602            * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
603            (WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer):
604
6052014-08-18  Dana Burkart  <dburkart@apple.com>
606
607        Merge r172680
608
609    2014-08-15  Alexey Proskuryakov  <ap@apple.com>
610
611            REGRESSION (r172660): WebKit2.TerminateTwice asserts
612            https://bugs.webkit.org/show_bug.cgi?id=136012
613
614            * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::terminateProcess):
615            Added bug number to a fixme.
616
6172014-08-18  Dana Burkart  <dburkart@apple.com>
618
619        Merge r172660
620
621    2014-08-15  Alexey Proskuryakov  <ap@apple.com>
622
623            Improve page to process relationship tracking
624            https://bugs.webkit.org/show_bug.cgi?id=135996
625            <rdar://problem/16991213>
626
627            Reviewed by Sam Weinig.
628
629            * UIProcess/VisitedLinkProvider.cpp:
630            (WebKit::VisitedLinkProvider::removeAll):
631            (WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired):
632            (WebKit::VisitedLinkProvider::sendTable):
633            Added assertions for m_processes only having valid entries.
634
635            * UIProcess/WebPageProxy.cpp:
636            (WebKit::WebPageProxy::reattachToWebProcess): When attaching to a new process,
637            tell the old process that the page is not longer associated with it, avoiding
638            a potential stale pointer.
639            If re-attached to an existing process, make sure that we perform all the same
640            registrations as after having launched a new process. This substantially improves
641            the behavior when the number of open tabs is over process limit.
642            (WebKit::WebPageProxy::reattachToWebProcessWithItem): Added ASSERT(!isValid())
643            to avoid confusion. All other calls to reattachToWebProcess() have this as a
644            runtime check, but reattachToWebProcessWithItem() is only called for valid pages.
645            (WebKit::WebPageProxy::terminateProcess): Added an assertion with a FIXME for
646            something that will need to be fixed another day.
647
648            * UIProcess/WebPageProxy.h: Removed an unimplemented function.
649
650            * UIProcess/WebProcessProxy.cpp:
651            (WebKit::WebProcessProxy::addExistingWebPage): Added assertions for page map sanity.
652            (WebKit::WebProcessProxy::removeWebPage): Added a check for page state being Terminated
653            already. This avoids an assertion failure that happened under the new call to
654            removeWebPage() in reattachToWebProcess(), as we are now calling it for terminated
655            processes that are not in WebContext::m_processes any more.
656            (WebKit::WebProcessProxy::didFinishLaunching): Added an assertion that page agrees
657            about using this process.
658
6592014-08-13  Lucas Forschler  <lforschler@apple.com>
660
661        Merge r172546
662
663    2014-08-13  Enrica Casucci  <enrica@apple.com>
664
665            [Services with UI] Use a longer delay duration for editable content.
666            https://bugs.webkit.org/show_bug.cgi?id=135918
667            <rdar://problem/17998929>
668
669            Reviewed by Tim Horton.
670
671            Use a 1 second delay for selections in editable content.
672
673            * WebProcess/WebPage/mac/ServicesOverlayController.mm:
674            (WebKit::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
675
6762014-08-13  Lucas Forschler  <lforschler@apple.com>
677
678        Merge r172539
679
680    2014-08-13  Joseph Pecoraro  <pecoraro@apple.com>
681
682            Opening Web Inspector causes a large amount of sandbox violations
683            https://bugs.webkit.org/show_bug.cgi?id=135908
684
685            Reviewed by Timothy Hatcher.
686
687            * WebProcess/com.apple.WebProcess.sb.in:
688            Permit the WebContent process to create file read extensions for the
689            system WebInspectorUI.framework which the Network process can already
690            read anyways.
691
6922014-08-13  Lucas Forschler  <lforschler@apple.com>
693
694        Merge r172528
695
696    2014-08-13  Tim Horton  <timothy_horton@apple.com>
697
698            Avoid making new active service overlay highlights while the mouse is down
699            https://bugs.webkit.org/show_bug.cgi?id=135872
700            <rdar://problem/17982341>
701
702            Reviewed by Enrica Casucci.
703
704            * WebProcess/WebPage/ServicesOverlayController.h:
705            * WebProcess/WebPage/mac/ServicesOverlayController.mm:
706            (WebKit::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
707            (WebKit::ServicesOverlayController::mouseEvent):
708            If the mouse is pressed or it's been less than 200ms since the mouse went up,
709            don't allow the highlight to change. We apply the mouse-is-pressed rule to telephone
710            number highlights as well, unlike the rest of the hysteresis logic.
711
7122014-08-13  Lucas Forschler  <lforschler@apple.com>
713
714        Merge r172526
715
716    2014-08-13  Timothy Hatcher  <timothy@apple.com>
717
718            Web Inspector: Workaround a NSWindow change to the title bar.
719            https://bugs.webkit.org/show_bug.cgi?id=135880
720
721            Reviewed by Joseph Pecoraro.
722
723            * UIProcess/mac/WebInspectorProxyMac.mm:
724            (WebKit::WebInspectorProxy::createInspectorWindow): Set titlebarAppearsTransparent on 10.10.
725            Only call border thickness APIs on 10.9 and earlier.
726            (WebKit::WebInspectorProxy::platformCreateInspectorPage): Only call setDrawsBackground: on 10.9 and earlier.
727            (WebKit::WebInspectorProxy::platformSetToolbarHeight): Only call setContentBorderThickness: on 10.9 and earlier.
728
7292014-08-13  Lucas Forschler  <lforschler@apple.com>
730
731        Merge r172512
732
733    2014-08-12  Tim Horton  <timothy_horton@apple.com>
734
735            Document-relative page overlays drop some mouse events with non-zero top content inset
736            https://bugs.webkit.org/show_bug.cgi?id=135871
737            <rdar://problem/17982275>
738
739            Reviewed by Beth Dakin.
740
741            * WebProcess/WebPage/PageOverlay.cpp:
742            (WebKit::PageOverlay::mouseEvent):
743            Convert the mouse position into document-relative coordinates; the bounds()
744            already are! This way, we can actually compare them without being wrong sometimes.
745
7462014-08-13  Lucas Forschler  <lforschler@apple.com>
747
748        Merge r172501
749
750    2014-08-12  Tim Horton  <timothy_horton@apple.com>
751
752            Small region (~1px tall) where you get the selection button instead of the phone number overlay
753            https://bugs.webkit.org/show_bug.cgi?id=135852
754            <rdar://problem/17992795>
755
756            Reviewed by Enrica Casucci.
757
758            * WebProcess/WebPage/ServicesOverlayController.h:
759            * WebProcess/WebPage/mac/ServicesOverlayController.mm:
760            (WebKit::ServicesOverlayController::findTelephoneNumberHighlightContainingSelectionHighlight):
761            (WebKit::ServicesOverlayController::determineActiveHighlight):
762            If our new active highlight is a selection highlight that is completely contained
763            by one of the phone number highlights, we'll make the phone number highlight active
764            even if it's not hovered. This fixes the case where the selection highlight
765            (a subset of a telephone number) is slightly taller than the telephone number
766            highlight, and can be hovered without hovering the phone number highlight.
767
7682014-08-13  Lucas Forschler  <lforschler@apple.com>
769
770        Merge r172500
771
772    2014-08-12  Alexey Proskuryakov  <ap@apple.com>
773
774            REGRESSION: WebContent process has a sandbox extension for the entirety of user's temp directory
775            https://bugs.webkit.org/show_bug.cgi?id=135853
776            <rdar://problem/17986556>
777
778            Reviewed by Oliver hunt.
779
780            Move extensions recently added for iOS benefit under PLATFORM(IOS). Removed some
781            dead code while at it (child processes don't need actual paths, they only need
782            sandbox extensions in most cases).
783
784            * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
785            (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
786            * Shared/Network/NetworkProcessCreationParameters.cpp:
787            (WebKit::NetworkProcessCreationParameters::encode):
788            (WebKit::NetworkProcessCreationParameters::decode):
789            * Shared/Network/NetworkProcessCreationParameters.h:
790            * Shared/WebProcessCreationParameters.cpp:
791            (WebKit::WebProcessCreationParameters::encode):
792            (WebKit::WebProcessCreationParameters::decode):
793            * Shared/WebProcessCreationParameters.h:
794            * UIProcess/WebContext.cpp:
795            (WebKit::WebContext::ensureNetworkProcess):
796            (WebKit::WebContext::createNewWebProcess):
797            (WebKit::WebContext::openGLCacheDirectory): Deleted.
798            (WebKit::WebContext::networkingHSTSDatabasePath): Deleted.
799            * UIProcess/WebContext.h:
800            * UIProcess/efl/WebContextEfl.cpp:
801            (WebKit::WebContext::containerTemporaryDirectory): Deleted.
802            (WebKit::WebContext::platformDefaultNetworkingHSTSDatabasePath): Deleted.
803            * UIProcess/gtk/WebContextGtk.cpp:
804            (WebKit::WebContext::containerTemporaryDirectory): Deleted.
805            (WebKit::WebContext::platformDefaultNetworkingHSTSDatabasePath): Deleted.
806            * UIProcess/mac/WebContextMac.mm:
807            (WebKit::WebContext::openGLCacheDirectory):
808            (WebKit::WebContext::parentBundleDirectory):
809            (WebKit::WebContext::networkingHSTSDatabasePath):
810            (WebKit::WebContext::platformDefaultOpenGLCacheDirectory): Deleted.
811            (WebKit::WebContext::platformDefaultNetworkingHSTSDatabasePath): Deleted.
812            * WebProcess/cocoa/WebProcessCocoa.mm:
813            (WebKit::WebProcess::platformInitializeWebProcess):
814
8152014-08-13  Lucas Forschler  <lforschler@apple.com>
816
817        Merge r172498
818
819    2014-08-12  Tim Horton  <timothy_horton@apple.com>
820
821            REGRESSION (r172424): Extra menu header in combined telephone number menu when no phone paired
822            https://bugs.webkit.org/show_bug.cgi?id=135854
823            <rdar://problem/17996339>
824
825            Reviewed by Enrica Casucci.
826
827            * UIProcess/mac/WebContextMenuProxyMac.mm:
828            (WebKit::WebContextMenuProxyMac::setupServicesMenu):
829            Get all the menu items ahead of time, and only add the shared header
830            if there are any telephone number menu items.
831
8322014-08-13  Lucas Forschler  <lforschler@apple.com>
833
834        Merge r172497
835
836    2014-08-12  Enrica Casucci  <enrica@apple.com>
837
838            Crash at com.apple.WebKit.WebContent at com.apple.WebKit: WebKit::expandForGap
839            https://bugs.webkit.org/show_bug.cgi?id=135859
840            <rdar://problem/17994679>
841
842            Reviewed by Tim Horton.
843
844            expandForGap made the assumption that the selection rects were always three.
845            This was not true even before http://trac.webkit.org/changeset/172395 but
846            was more likely to happen after that change.
847
848            * WebProcess/WebPage/mac/ServicesOverlayController.mm:
849            (WebKit::expandForGap):
850
8512014-08-13  Lucas Forschler  <lforschler@apple.com>
852
853        Merge r172484
854
855    2014-08-12  Tim Horton  <timothy_horton@apple.com>
856
857            Don't show the combined menu if there are no services available
858            https://bugs.webkit.org/show_bug.cgi?id=135846
859            <rdar://problem/17582099>
860
861            Reviewed by Enrica Casucci.
862
863            * WebProcess/WebPage/ServicesOverlayController.h:
864            Add a FIXME.
865
866            * WebProcess/WebPage/mac/ServicesOverlayController.mm:
867            (WebKit::ServicesOverlayController::determineActiveHighlight):
868            Don't allow a selection Highlight to become active if there is no
869            service available to handle it. Previously we showed the combined menu
870            with just phone numbers in it if any were detected.
871
8722014-08-13  Lucas Forschler  <lforschler@apple.com>
873
874        Merge r172483
875
876    2014-08-12  Tim Horton  <timothy_horton@apple.com>
877
878            Add a fade transition to services highlights
879            https://bugs.webkit.org/show_bug.cgi?id=135829
880            <rdar://problem/17935736>
881
882            Reviewed by Enrica Casucci.
883
884            Add a smooth fade to highlight installation and uninstallation.
885            To do so, we make each highlight paint into its own small layer.
886
887            * WebProcess/WebPage/PageOverlay.cpp:
888            (WebKit::PageOverlay::layer):
889            * WebProcess/WebPage/PageOverlay.h:
890            * WebProcess/WebPage/PageOverlayController.cpp:
891            (WebKit::PageOverlayController::layerForOverlay):
892            * WebProcess/WebPage/PageOverlayController.h:
893            Expose the GraphicsLayer on PageOverlay.
894
895            * WebProcess/WebPage/ServicesOverlayController.h:
896            (WebKit::ServicesOverlayController::Highlight::layer):
897            (WebKit::ServicesOverlayController::activeHighlight):
898            (WebKit::ServicesOverlayController::webPage):
899            (WebKit::ServicesOverlayController::Highlight::Highlight): Deleted.
900
901            * WebProcess/WebPage/mac/ServicesOverlayController.mm:
902            (WebKit::ServicesOverlayController::Highlight::createForSelection):
903            (WebKit::ServicesOverlayController::Highlight::createForTelephoneNumber):
904            (WebKit::ServicesOverlayController::Highlight::Highlight):
905            Highlights now own a GraphicsLayer, which are later installed
906            as sublayers of the ServicesOverlayController's PageOverlay layer.
907            These layers are sized and positioned according to the DDHighlight's bounds.
908
909            (WebKit::ServicesOverlayController::Highlight::~Highlight):
910            (WebKit::ServicesOverlayController::Highlight::invalidate):
911            ServicesOverlayController will invalidate any remaining highlights
912            when it is torn down, so they can clear their backpointers.
913
914            (WebKit::ServicesOverlayController::Highlight::notifyFlushRequired):
915            Forward flush notifications to the DrawingArea.
916
917            (WebKit::ServicesOverlayController::Highlight::paintContents):
918            Paint the DDHighlight into the layer. Translation is done by the layer position,
919            so we zero the bounds origin when painting.
920
921            (WebKit::ServicesOverlayController::Highlight::deviceScaleFactor):
922            Forward the deviceScaleFactor so that things are painted at the right scale.
923
924            (WebKit::ServicesOverlayController::Highlight::fadeIn):
925            (WebKit::ServicesOverlayController::Highlight::fadeOut):
926            Apply a fade animation to the layer.
927
928            (WebKit::ServicesOverlayController::Highlight::didFinishFadeOutAnimation):
929            When the fade completes, unparent the layer, unless it has become active again.
930
931            (WebKit::ServicesOverlayController::ServicesOverlayController):
932            (WebKit::ServicesOverlayController::~ServicesOverlayController):
933            Invalidate all highlights, so they can clear their backpointers.
934
935            (WebKit::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
936            Make remainingTimeUntilHighlightShouldBeShown act upon a particular highlight
937            instead of always the active highlight.
938
939            (WebKit::ServicesOverlayController::determineActiveHighlightTimerFired): Rename.
940
941            (WebKit::ServicesOverlayController::drawRect):
942            drawRect is no longer called and will no longer do anything; all of the
943            painting is done in sublayers.
944
945            (WebKit::ServicesOverlayController::buildPhoneNumberHighlights):
946            Ensure that phone number Highlights stay stable even while the selection
947            changes, by comparing the underlying Ranges and keeping around old Highlights
948            that match the new ones. This enables us to e.g. fade in while changing
949            the selection within a phone number.
950
951            (WebKit::ServicesOverlayController::buildSelectionHighlight):
952            (WebKit::ServicesOverlayController::didRebuildPotentialHighlights):
953            (WebKit::ServicesOverlayController::createOverlayIfNeeded):
954            Don't call setNeedsDisplay; the overlay doesn't have backing store.
955            Instead, call determineActiveHighlight, which will install/uninstall
956            highlights as necessary.
957
958            (WebKit::ServicesOverlayController::determineActiveHighlight):
959            Apply fade in/fade out to the overlays.
960            Keep track of which highlight we're going to activate, until the hysteresis
961            delay is up, then actually make it active/parent it/fade it in.
962            We now will have no active highlight between the fade out of the previous one
963            and the fade in of the new one (during the hysteresis delay).
964
965            (WebKit::ServicesOverlayController::mouseEvent):
966            The overlay now will not become active until the delay is up, so we don't
967            need to check it again here.
968
969            (WebKit::ServicesOverlayController::handleClick):
970            (WebKit::ServicesOverlayController::didCreateHighlight):
971            (WebKit::ServicesOverlayController::willDestroyHighlight):
972            (WebKit::ServicesOverlayController::repaintHighlightTimerFired): Deleted.
973            (WebKit::ServicesOverlayController::drawHighlight): Deleted.
974
9752014-08-13  Lucas Forschler  <lforschler@apple.com>
976
977        Merge r172395
978
979    2014-08-08  Enrica Casucci  <enrica@apple.com>
980
981            [Services with UI] Action menu arrow hit testing is sometimes wrong.
982            https://bugs.webkit.org/show_bug.cgi?id=135776
983            <rdar://problem/17837670>
984
985            Reviewed by Brady Eidson.
986
987            There was a problem in the algorithm that stitches together the selection rectangles
988            to be given to Data Detectors API.
989            This change adds a new function that stiches together all the rects contributing to the
990            first line, all the rects contributing to the last line and all the ones in the middle.
991            This way we can have a maximum of 3 non overlapping rectangles.
992
993            * WebProcess/WebPage/mac/ServicesOverlayController.mm:
994            (WebKit::stitchRects):
995            (WebKit::compactRectsWithGapRects):
996
9972014-08-13  Lucas Forschler  <lforschler@apple.com>
998
999        Merge r172383
1000
1001    2014-08-10  Tim Horton  <timothy_horton@apple.com>
1002
1003            Yelp phone number highlights often disappear
1004            https://bugs.webkit.org/show_bug.cgi?id=135789
1005            <rdar://problem/17971057>
1006
1007            Reviewed by Brady Eidson.
1008
1009            Since selectedTelephoneNumberRangesChanged doesn't provide an associated
1010            Frame, an incoming selectedTelephoneNumberRangesChanged from a subframe
1011            would overwrite ServicesOverlayController's cached (and potentially active)
1012            telephone number highlights.
1013
1014            This happens a lot on Yelp, because they have many subframes which are
1015            doing layout on a regular basis.
1016
1017            * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1018            (WebKit::WebEditorClient::selectedTelephoneNumberRangesChanged):
1019            * WebProcess/WebCoreSupport/WebEditorClient.h:
1020            Adjust to the new (lack of) arguments.
1021
1022            * WebProcess/WebPage/ServicesOverlayController.h:
1023            * WebProcess/WebPage/mac/ServicesOverlayController.mm:
1024            (WebKit::ServicesOverlayController::selectedTelephoneNumberRangesChanged):
1025            Adjust logging; we can revisit it later.
1026
1027            (WebKit::ServicesOverlayController::buildPhoneNumberHighlights):
1028            When building phone number highlights, walk the Frame tree and retrieve
1029            them from all of the Editors.
1030
1031            (WebKit::ServicesOverlayController::didRebuildPotentialHighlights):
1032            (WebKit::ServicesOverlayController::telephoneNumberRangesForFocusedFrame):
1033            (WebKit::ServicesOverlayController::determineActiveHighlight):
1034            (WebKit::ServicesOverlayController::handleClick):
1035            Retrieve the detected telephone number ranges from the focused frame
1036            when combining telephone numbers with selection services.
1037            This ensures that we don't show combined phone number highlights from other frames.
1038
10392014-08-13  Lucas Forschler  <lforschler@apple.com>
1040
1041        Merge r172382
1042
1043    2014-08-10  Tim Horton  <timothy_horton@apple.com>
1044
1045            Refactor ServiceOverlayController in preparation for fading between highlights
1046            https://bugs.webkit.org/show_bug.cgi?id=135787
1047            <rdar://problem/17935736>
1048
1049            Reviewed by Brady Eidson.
1050
1051            Rework ServicesOverlayController so that we always keep a set of generic
1052            "potential highlights", which are refcounted Highlight objects and
1053            wrap a DDHighlightRef, as well as a type (Selection or TelephoneNumber),
1054            Range (only used in the case of TelephoneNumber), and potentially more
1055            things in the future (like, say, fade state!).
1056
1057            We eagerly update the list of potential highlights when the selection or set
1058            of detected telephone numbers changes, and use this information to install
1059            or uninstall the page overlay as needed.
1060
1061            When we need to recompute the "active" highlight from this set (for example,
1062            we need to handle a mouse event or paint the highlight), we look through
1063            the set of potential highlights and decide. This moves the "active" highlight
1064            decision logic into one small and confined place.
1065
1066            * WebProcess/WebPage/ServicesOverlayController.h:
1067            (WebKit::ServicesOverlayController::Highlight):
1068            Add the new aforementioned refcounted Highlight class.
1069            Rename m_lastHoveredHighlightChangeTime to m_lastActiveHighlightChangeTime.
1070            Make m_webPage a reference.
1071            The rest is just added/removed/adjusted functions for the refactoring.
1072
1073            (WebKit::TelephoneNumberData::TelephoneNumberData): Deleted.
1074            * WebProcess/WebPage/mac/ServicesOverlayController.mm:
1075            (WebKit::ServicesOverlayController::Highlight::createForSelection):
1076            (WebKit::ServicesOverlayController::Highlight::createForTelephoneNumber):
1077            Create Highlights for the two different highlight types.
1078
1079            (WebKit::ServicesOverlayController::ServicesOverlayController):
1080            (WebKit::ServicesOverlayController::willMoveToWebPage):
1081            Our WebPage pointer is always valid because it owns us; don't clear it.
1082            We need to keep it around so that we can uninstall the overlay and
1083            install it again later, anyway.
1084
1085            (WebKit::ServicesOverlayController::selectionRectsDidChange):
1086            (WebKit::ServicesOverlayController::selectedTelephoneNumberRangesChanged):
1087            When selection rects or detected telephone numbers change, rebuild potential highlights.
1088            This will have the side-effect of installing the overlay if needed.
1089
1090            (WebKit::ServicesOverlayController::mouseIsOverHighlight):
1091            Make this function take a Highlight instead of a DDHighlightRef.
1092
1093            (WebKit::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
1094            Make this function take a Highlight instead of a DDHighlightRef.
1095
1096            (WebKit::ServicesOverlayController::drawHighlight):
1097            Make this function take a Highlight instead of a DDHighlightRef.
1098            There's no reason to do the translation separately from the layer blit,
1099            also allowing us to avoid the StateSaver.
1100
1101            (WebKit::ServicesOverlayController::drawRect):
1102            drawRect now always paints the active highlight, instead of duplicating
1103            logic about which highlight should be active.
1104            Also, it will update the active highlight before painting.
1105            We no longer need to re-determine whether the active highlight's phone
1106            number range is still a valid phone number range, because we rebuild
1107            the potential highlights whenever the set of phone number ranges changes.
1108
1109            (WebKit::ServicesOverlayController::clearActiveHighlight):
1110            Mostly an adoption of new names.
1111
1112            (WebKit::ServicesOverlayController::removeAllPotentialHighlightsOfType):
1113            Run through the list of potential highlights and remove any of the given type.
1114            The two highlight building functions use this helper to clear the old ones before building.
1115
1116            (WebKit::ServicesOverlayController::buildPhoneNumberHighlights):
1117            (WebKit::ServicesOverlayController::buildSelectionHighlight):
1118            Rebuild the list of potential highlights, replacing all highlights of
1119            the given type with new ones.
1120
1121            (WebKit::ServicesOverlayController::hasRelevantSelectionServices):
1122            Factor out the code that decides whether our current selection is
1123            viable for servicing based on whether we have plain-text and/or rich-text services.
1124
1125            (WebKit::ServicesOverlayController::didRebuildPotentialHighlights):
1126            When rebuilding potential highlights, if we have no potential highlights at all,
1127            uninstall the page overlay; we don't need mouse tracking and don't need to
1128            paint anything. This improves memory use and compositing performance significantly,
1129            where previously we were leaving the overlay up forever after creating it.
1130
1131            If we have either detected telephone numbers or relevant selection services,
1132            create and install the overlay if it doesn't already exist.
1133
1134            (WebKit::ServicesOverlayController::createOverlayIfNeeded):
1135            This just moved from elsehwere, except that it now uses FadeMode::DoNotFade.
1136            It doesn't make sense to fade on install/uninstall (which happens even before hover)
1137            but not on changing the active highlight; fading will be re-addressed in the next patch.
1138
1139            (WebKit::ServicesOverlayController::highlightsAreEquivalent):
1140            Determine whether two highlights are equivalent. While we may have
1141            created a new Highlight at rebuild time, if two telephone number
1142            highlights have equivalent ranges, there's no need to 'transition' to the new one.
1143
1144            (WebKit::ServicesOverlayController::determineActiveHighlight):
1145            Run through the list of services, and try to find one that is hovered.
1146            We prefer telephone number highlights to selection highlights, and
1147            we will never make a selection highlight active if it is both
1148            not serviceable and there are no telephone numbers to show in the combined menu.
1149            This is the centralized location for determination of which highlight
1150            should be considered active. If the active highlight changed, update
1151            the time since last change and cancel the mouse-down tracking.
1152
1153            (WebKit::ServicesOverlayController::mouseEvent):
1154            Adjust some comments to be more explanatory.
1155            A bunch of code moved out of here and into determineActiveHighlight.
1156
1157            (WebKit::ServicesOverlayController::handleClick):
1158            Adjust to take a reference and use Highlight instead of DDHighlightRef.
1159
11602014-08-12  Matthew Hanson  <matthew_hanson@apple.com>
1161
1162        Rollout 172395. <rdar://problem/17837670>
1163
11642014-08-12  Lucas Forschler  <lforschler@apple.com>
1165
1166        Merge r172379
1167
1168    2014-08-10  Timothy Hatcher  <timothy@apple.com>
1169
1170            Web Inspector: new glyphs are visible on OS X 10.9 builds
1171            https://bugs.webkit.org/show_bug.cgi?id=135743
1172
1173            Reviewed by Joseph Pecoraro.
1174
1175            * UIProcess/mac/WebInspectorProxyMac.mm:
1176            (WebKit::WebInspectorProxy::createInspectorWindow): Use 10100 instead of 1090 for the version.
1177
11782014-08-12  Lucas Forschler  <lforschler@apple.com>
1179
1180        Merge r172424
1181
1182    2014-08-11  Enrica Casucci  <enrica@apple.com>
1183
1184            Improve look and feel of combined service menu..
1185            https://bugs.webkit.org/show_bug.cgi?id=135824
1186            <rdar://problem/17936880>
1187
1188            Reviewed by Tim Horton.
1189
1190            When showing the combined menu, list the phone numbers first,
1191            grouped under a common header, followed by the entries relative
1192            to the services.
1193
1194            * Platform/mac/MenuUtilities.h:
1195            * Platform/mac/MenuUtilities.mm:
1196            (WebKit::menuItemTitleForTelephoneNumberGroup):
1197            (WebKit::menuItemForTelephoneNumber):
1198            * UIProcess/mac/WebContextMenuProxyMac.mm:
1199            (WebKit::WebContextMenuProxyMac::setupServicesMenu):
1200
12012014-08-12  Lucas Forschler  <lforschler@apple.com>
1202
1203        Merge r172406
1204
1205    2014-08-11  Joseph Pecoraro  <pecoraro@apple.com>
1206
1207            Add Private WKPreferences API for developer extras (show inspector)
1208            https://bugs.webkit.org/show_bug.cgi?id=135811
1209
1210            Reviewed by Timothy Hatcher.
1211
1212            * UIProcess/API/Cocoa/WKPreferences.mm:
1213            (-[WKPreferences _developerExtrasEnabled]):
1214            (-[WKPreferences _setDeveloperExtrasEnabled:]):
1215            * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1216
12172014-08-12  Lucas Forschler  <lforschler@apple.com>
1218
1219        Merge r172395
1220
1221    2014-08-08  Enrica Casucci  <enrica@apple.com>
1222
1223            [Services with UI] Action menu arrow hit testing is sometimes wrong.
1224            https://bugs.webkit.org/show_bug.cgi?id=135776
1225            <rdar://problem/17837670>
1226
1227            Reviewed by Brady Eidson.
1228
1229            There was a problem in the algorithm that stitches together the selection rectangles
1230            to be given to Data Detectors API.
1231            This change adds a new function that stiches together all the rects contributing to the
1232            first line, all the rects contributing to the last line and all the ones in the middle.
1233            This way we can have a maximum of 3 non overlapping rectangles.
1234
1235            * WebProcess/WebPage/mac/ServicesOverlayController.mm:
1236            (WebKit::stitchRects):
1237            (WebKit::compactRectsWithGapRects):
1238
12392014-08-12  Lucas Forschler  <lforschler@apple.com>
1240
1241        Merge r172374
1242
1243    2014-08-09  Tim Horton  <timothy_horton@apple.com>
1244
1245            REGRESSION (r172301): Combined phone number highlight doesn't appear if rich content is selected and we have no rich content services
1246            https://bugs.webkit.org/show_bug.cgi?id=135785
1247            <rdar://problem/17969843>
1248
1249            Reviewed by Brady Eidson.
1250
1251            * WebProcess/WebPage/mac/ServicesOverlayController.mm:
1252            (WebKit::ServicesOverlayController::drawSelectionHighlight):
1253            We can't early return in the rich-content-but-no-rich-services case
1254            if we have telephone numbers in the selection, because we want to offer
1255            them up in the combined menu.
1256
1257            * UIProcess/mac/WebContextMenuProxyMac.mm:
1258            If we end up with no menu, because there were no services available,
1259            make a fresh one that we can fill with combined telephone number items.
1260
12612014-08-12  Lucas Forschler  <lforschler@apple.com>
1262
1263        Merge r172369
1264
1265    2014-08-08  Tim Horton  <timothy_horton@apple.com>
1266
1267            Build fix for 32-bit.
1268
1269            * UIProcess/mac/ServicesController.mm:
1270            (WebKit::ServicesController::ServicesController):
1271            Don't dynamically refresh services in 32-bit apps. It's not possible
1272            to write a 32-bit app with the Modern API, so this doesn't matter.
1273
12742014-08-12  Lucas Forschler  <lforschler@apple.com>
1275
1276        Merge r172366
1277
1278    2014-08-08  Tim Horton  <timothy_horton@apple.com>
1279
1280            [mac] Dynamically update serviceability when the set of services changes
1281            https://bugs.webkit.org/show_bug.cgi?id=135738
1282            <rdar://problem/17533459>
1283
1284            Reviewed by Brady Eidson.
1285
1286            * UIProcess/WebContext.cpp:
1287            (WebKit::WebContext::createNewWebProcess):
1288            Adopt the new universal refreshExistingServices.
1289
1290            (WebKit::WebContext::refreshExistingServices): Deleted.
1291            * UIProcess/WebContext.h:
1292            Remove WebContext::refreshExistingServices; there's no need for it.
1293
1294            * UIProcess/mac/ServicesController.h:
1295            * UIProcess/mac/ServicesController.mm:
1296            Fix the build with only public headers by including NSSharingService.h itself.
1297            Place the NSSharingServicePicker (Details) category outside the #ifdef.
1298            Forward-declare and possibly import NSExtension SPI.
1299
1300            (WebKit::ServicesController::ServicesController):
1301            Register a callback to be notified whenever the set of services changes.
1302            When this occurs, call refreshExistingServices. We let refreshExistingServices
1303            coalesce updates because these notifications can come in small batches.
1304
1305            (WebKit::ServicesController::refreshExistingServices):
1306            Dispatch changes in service availability to all processes in all contexts.
1307
1308            * UIProcess/mac/WebContextMenuProxyMac.mm:
1309            (WebKit::WebContextMenuProxyMac::setupServicesMenu):
1310            Adjust the referenced rdar:// and call ServicesController::refreshExistingServices
1311            instead of the now-removed WebContext:: variant. We can't remove this
1312            yet because our services state can still be stale because NSServiceSharingPicker
1313            can still sometimes lie about the current service state immediately after a change occurs;
1314            once that is fixed, we should get rid of this as well as the refresh in Web Process creation.
1315
13162014-08-12  Lucas Forschler  <lforschler@apple.com>
1317
1318        Merge r172364
1319
1320    2014-08-08  Timothy Horton  <timothy_horton@apple.com>
1321
1322            Clients that request the selection services menu after WebKit2 will get one with different metrics than otherwise
1323            https://bugs.webkit.org/show_bug.cgi?id=135765
1324            <rdar://problem/17962180>
1325
1326            Reviewed by Brady Eidson.
1327
1328            * UIProcess/mac/WebContextMenuProxyMac.mm:
1329            (WebKit::WebContextMenuProxyMac::setupServicesMenu):
1330            The menu is cached between clients, but we make adjustments to it.
1331            We should copy it before adjusting.
1332
13332014-08-12  Lucas Forschler  <lforschler@apple.com>
1334
1335        Merge r172344
1336
1337    2014-08-08  Timothy Horton  <timothy_horton@apple.com>
1338
1339            Services overlay dropdown is often in the wrong place with zoomed pages or horizontal scrolling
1340            https://bugs.webkit.org/show_bug.cgi?id=135755
1341            <rdar://problem/17907752>
1342
1343            Reviewed by Brady Eidson.
1344
1345            * WebProcess/WebPage/mac/ServicesOverlayController.mm:
1346            (WebKit::ServicesOverlayController::establishHoveredTelephoneHighlight):
1347            (WebKit::ServicesOverlayController::maybeCreateSelectionHighlight):
1348            DDHighlightCreateWithRectsInVisibleRectWithStyleAndDirection adjusts the
1349            location of the button based on the visible rect, trying to keep the button visible.
1350
1351            We're handing it the wrong visible rect, though, not taking scrolling into account.
1352
1353            This leads to pages that scroll horizontally showing the button on the left
1354            even if there's space for it on the right, or sometimes not showing it at all.
1355
1356            Instead, provide the actual main FrameView visible rect; the same coordinate
1357            space that the highlight rects are provided in.
1358
13592014-08-12  Lucas Forschler  <lforschler@apple.com>
1360
1361        Merge r172343
1362
1363    2014-08-08  Timothy Horton  <timothy_horton@apple.com>
1364
1365            Additional items added to selection services menus are misaligned
1366            https://bugs.webkit.org/show_bug.cgi?id=135747
1367            <rdar://problem/17933167>
1368
1369            Reviewed by Brady Eidson.
1370
1371            * UIProcess/mac/WebContextMenuProxyMac.mm:
1372            (WebKit::WebContextMenuProxyMac::setupServicesMenu):
1373            Use NSSharingServicePickerStyleRollover for the rollover image services menu;
1374            use NSSharingServicePickerStyleTextSelection for the selection services menu.
1375
1376            Set NSMenu's showsStateColumn to YES for selection services menus, so that
1377            other items added to the menu line up correctly.
1378
1379            Remove an unncessary .get()
1380
13812014-08-12  Lucas Forschler  <lforschler@apple.com>
1382
1383        Merge r172235
1384
1385    2014-08-07  Gordon Sheridan  <gordon_sheridan@apple.com>
1386
1387            Clear the m_previousItem member of HistoryControllers when it matches the HistoryItem being removed.
1388            https://bugs.webkit.org/show_bug.cgi?id=135634
1389            <rdar://problem/17388461>
1390
1391            Reviewed by Brady Eidson.
1392
1393            * WebProcess/WebPage/WebBackForwardListProxy.cpp:
1394            (WebKit::WebBackForwardListProxy::removeItem):
1395            Call WebCore::Page::clearPreviousItemFromAllPages() for each item removed from
1396            the back/forward list to ensure the page URL is released from IconDatabase.
1397
13982014-08-07  Lucas Forschler  <lforschler@apple.com>
1399
1400        Merge r172322
1401
1402    2014-08-07  Tim Horton  <timothy_horton@apple.com>
1403
1404            [Services with UI] Action menu does not appear if selection includes both text and an image
1405            https://bugs.webkit.org/show_bug.cgi?id=135731
1406            <rdar://problem/17837491>
1407
1408            Reviewed by Dean Jackson.
1409
1410            * UIProcess/WebContext.cpp:
1411            (WebKit::WebContext::createNewWebProcess):
1412            Initialize hasRichContentServices with the cached value.
1413
14142014-08-07  Dana Burkart <dburkart@apple.com>
1415
1416        Merge r172307
1417
1418    2014-08-07  Timothy Horton  <timothy_horton@apple.com>
1419
1420            setCustomSwipeViews inside didChangeBackForwardList client callback is ignored
1421            https://bugs.webkit.org/show_bug.cgi?id=135633
1422            <rdar://problem/17926507>
1423
1424            Reviewed by Sam Weinig.
1425
1426            * UIProcess/PageClient.h:
1427            * UIProcess/WebPageProxy.cpp:
1428            (WebKit::WebPageProxy::didChangeBackForwardList):
1429            * UIProcess/ios/PageClientImplIOS.h:
1430            * UIProcess/ios/PageClientImplIOS.mm:
1431            (WebKit::PageClientImpl::clearCustomSwipeViews): Deleted.
1432            * UIProcess/mac/PageClientImpl.h:
1433            * UIProcess/mac/PageClientImpl.mm:
1434            (WebKit::PageClientImpl::clearCustomSwipeViews): Deleted.
1435            WebKit clears the set of custom swipe views at the end of WebPageProxy::didChangeBackForwardList,
1436            *after* calling into the client. This means that if the client wants to setCustomSwipeViews in
1437            didChangeBackForwardList, it won't be respected.
1438
1439            Since there's only one client of this SPI, let's just stop clearing the list of custom swipe
1440            views in WebKit and leave that totally up to the client.
1441
14422014-08-07  Dana Burkart <dburkart@apple.com>
1443
1444        Merge r172301
1445
1446    2014-08-07  Enrica Casucci  <enrica@apple.com>
1447
1448            [Services with UI] Action menu does not appear if selection includes both text and an image.
1449            https://bugs.webkit.org/show_bug.cgi?id=135731
1450            <rdar://problem/17837491>
1451
1452            Reviewed by Brady Eidson.
1453
1454            Adding a new setting to ServicesController to communicate to the WebProcess if
1455            there are services installed that can handle a combination of text and images.
1456            This way ServicesOverlayController can decide if it appropriate to show the hightlight
1457            based on the type of selection (text only or non text only). This information is retrieved
1458            when the selection rects are collected by SelectionGatherer and used by
1459            SelectionGatherer::Notifier to communicate the selection change.
1460
1461            * Shared/WebProcessCreationParameters.cpp:
1462            (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
1463            * Shared/WebProcessCreationParameters.h:
1464            * UIProcess/mac/ServicesController.h:
1465            (WebKit::ServicesController::hasRichContentServices):
1466            * UIProcess/mac/ServicesController.mm:
1467            (WebKit::ServicesController::ServicesController):
1468            (WebKit::ServicesController::refreshExistingServices):
1469            * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1470            (WebKit::WebEditorClient::selectionRectsDidChange):
1471            * WebProcess/WebCoreSupport/WebEditorClient.h:
1472            * WebProcess/WebPage/ServicesOverlayController.h:
1473            * WebProcess/WebPage/mac/ServicesOverlayController.mm:
1474            (WebKit::ServicesOverlayController::ServicesOverlayController):
1475            (WebKit::ServicesOverlayController::selectionRectsDidChange):
1476            (WebKit::ServicesOverlayController::drawSelectionHighlight):
1477            * WebProcess/WebProcess.cpp:
1478            (WebKit::WebProcess::WebProcess):
1479            (WebKit::WebProcess::initializeWebProcess):
1480            (WebKit::WebProcess::setEnabledServices):
1481            * WebProcess/WebProcess.h:
1482            (WebKit::WebProcess::hasRichContentServices):
1483            * WebProcess/WebProcess.messages.in:
1484
14852014-08-07  Dana Burkart <dburkart@apple.com>
1486
1487        Merge r172241
1488
1489    2014-08-07  Timothy Hatcher  <timothy@apple.com>
1490
1491            Web Inspector: Update glyphs to be more like Xcode 6
1492            https://bugs.webkit.org/show_bug.cgi?id=135705
1493
1494            Reviewed by Joseph Pecoraro.
1495
1496            * Resources/DockBottom.pdf: Added.
1497            * Resources/DockBottomLegacy.pdf: Copied from Source/WebKit/mac/Resources/Dock.pdf.
1498            * Resources/DockRight.pdf: Added.
1499            * Resources/DockRightLegacy.pdf: Copied from Source/WebKit2/Resources/DockRight.pdf.
1500            * UIProcess/mac/WebInspectorProxyMac.mm:
1501            (WebKit::WebInspectorProxy::createInspectorWindow): Use new images.
1502            * WebKit2.xcodeproj/project.pbxproj: Added new images.
1503
15042014-08-07  Dana Burkart <dburkart@apple.com>
1505
1506        Merge r172238
1507
1508    2014-08-07  Oliver Hunt  <oliver@apple.com>
1509
1510            WebContent needs access to HSTS database due to some networking still being performed in process
1511            https://bugs.webkit.org/show_bug.cgi?id=135711
1512            <rdar://17940220>
1513
1514            Reviewed by Alexey Proskuryakov.
1515
1516            Simple patch in the same theme as the equivalent network process
1517            extension.  Provide an extension that covers the WebContent specific
1518            HSTS file and consume it on launch.
1519
1520            * Shared/WebProcessCreationParameters.cpp:
1521            (WebKit::WebProcessCreationParameters::encode):
1522            (WebKit::WebProcessCreationParameters::decode):
1523            * Shared/WebProcessCreationParameters.h:
1524            * UIProcess/WebContext.cpp:
1525            (WebKit::WebContext::createNewWebProcess):
1526            * UIProcess/WebContext.h:
1527            * UIProcess/mac/WebContextMac.mm:
1528            (WebKit::WebContext::webContentHSTSDatabasePath):
1529            * WebProcess/cocoa/WebProcessCocoa.mm:
1530            (WebKit::WebProcess::platformInitializeWebProcess):
1531
15322014-08-07  Dana Burkart <dburkart@apple.com>
1533
1534        Merge r172191
1535
1536    2014-08-06  Andy Estes  <aestes@apple.com>
1537
1538            [iOS] Subresources referenced in converted QuickLook documents sometimes fail to load
1539            https://bugs.webkit.org/show_bug.cgi?id=135676
1540
1541            Reviewed by David Kilzer.
1542
1543            QuickLookHandle needs to stay alive in order for its NSURLProtocol to service subresource loads originating
1544            from the converted HTML document. Some of these loads happen dynamically after the main resource finishes
1545            loading, so we cannot tie the lifetime of the QuickLookHandle to that of the main resource's ResourceLoader.
1546            Instead, give ownership of the QuickLookHandle to DocumentLoader.
1547
1548            * WebProcess/Network/WebResourceLoader.cpp:
1549            (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo): Stored the created QuickLookHandle in DocumentLoader.
1550            (WebKit::WebResourceLoader::didReceiveData): Accessed DocumentLoader's QuickLookHandle.
1551            (WebKit::WebResourceLoader::didFinishResourceLoad): Ditto.
1552            (WebKit::WebResourceLoader::didFailResourceLoad): Ditto.
1553            (WebKit::WebResourceLoader::didReceiveResource): Ditto.
1554            * WebProcess/Network/WebResourceLoader.h: Removed m_quickLookHandle.
1555
15562014-08-07  Dana Burkart <dburkart@apple.com>
1557
1558        Merge r172200
1559
1560    2014-08-06  Tim Horton  <timothy_horton@apple.com>
1561
1562            Services overlay flashes a lot; should have some hysteresis before showing overlay
1563            https://bugs.webkit.org/show_bug.cgi?id=135683
1564            <rdar://problem/16878039>
1565
1566            Reviewed by Simon Fraser.
1567
1568            Don't show the highlight until it's been 200ms since the last change
1569            in selection or change in which highlight is hovered, whichever was more recent.
1570
1571            * WebProcess/WebPage/ServicesOverlayController.h:
1572            * WebProcess/WebPage/mac/ServicesOverlayController.mm:
1573            (WebKit::ServicesOverlayController::ServicesOverlayController):
1574            (WebKit::ServicesOverlayController::selectionRectsDidChange):
1575            Keep track of when the selection last changed.
1576
1577            (WebKit::ServicesOverlayController::drawTelephoneNumberHighlightIfVisible):
1578            Make establishHoveredTelephoneHighlight take a bool instead of Boolean.
1579
1580            (WebKit::ServicesOverlayController::mouseIsOverHighlight):
1581            Factor mouseIsOverHighlight out of establishHoveredTelephoneHighlight and drawHighlight.
1582
1583            (WebKit::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
1584            Return the amount of time until the highlight should be shown; this is
1585            the maximum of (the difference between the last selection change and the timeout)
1586            and (the difference between the last change in which highlight is hovered and the timeout).
1587
1588            Telephone number highlights are shown immediately, because they are already stable
1589            by virtue of being expanded to include the entire telephone number.
1590
1591            (WebKit::ServicesOverlayController::repaintHighlightTimerFired):
1592            (WebKit::ServicesOverlayController::drawHighlight):
1593            If the highlight shouldn't be shown yet (because we haven't hit the two timeouts),
1594            schedule a timer to repaint us around when we will hit the timeouts.
1595
1596            (WebKit::ServicesOverlayController::establishHoveredTelephoneHighlight):
1597            (WebKit::ServicesOverlayController::mouseEvent):
1598            Don't allow mouseUp to trigger the menu if we shouldn't be showing the overlay yet.
1599
16002014-08-07  Dana Burkart <dburkart@apple.com>
1601
1602        Merge r172193
1603
1604    2014-08-06  Brady Eidson and Jeffrey Pfau <beidson@apple.com>
1605
1606            IDB transactions never reset if the Web Process ends before cleaning up
1607            https://bugs.webkit.org/show_bug.cgi?id=135218
1608
1609            Reviewed by Darin Adler and David Kilzer.
1610
1611            * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
1612            (WebKit::DatabaseToWebProcessConnection::didReceiveMessage):
1613            (WebKit::DatabaseToWebProcessConnection::didReceiveSyncMessage): Added.
1614            (WebKit::DatabaseToWebProcessConnection::didClose):
1615            * DatabaseProcess/DatabaseToWebProcessConnection.h:
1616
1617            * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
1618            (WebKit::DatabaseProcessIDBConnection::resetTransactionSync): Added
1619                Wait until the reset is complete before sending the sync reply.
1620            (WebKit::DatabaseProcessIDBConnection::rollbackTransactionSync): Added.
1621                Ditto.
1622            * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
1623            * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
1624
1625            Keep track of all in progress transactions and make sure they’re cleaned up
1626            whenever a connection to a WebProcess is broken:
1627            * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
1628            (WebKit::UniqueIDBDatabase::unregisterConnection):
1629            (WebKit::UniqueIDBDatabase::didCompleteTransactionOperation):
1630            (WebKit::UniqueIDBDatabase::openBackingStoreTransaction):
1631            (WebKit::UniqueIDBDatabase::resetBackingStoreTransaction):
1632            (WebKit::UniqueIDBDatabase::didEstablishTransaction):
1633            (WebKit::UniqueIDBDatabase::didResetTransaction):
1634            (WebKit::UniqueIDBDatabase::resetAllTransactions):
1635            (WebKit::UniqueIDBDatabase::finalizeRollback):
1636            * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
1637
1638            * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
1639            (WebKit::UniqueIDBDatabaseBackingStoreSQLite::rollbackTransaction):
1640
1641            Add sync versions of reset/rollback:
1642            * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
1643            (WebKit::WebIDBServerConnection::resetTransactionSync):
1644            (WebKit::WebIDBServerConnection::rollbackTransactionSync):
1645            * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
1646
16472014-08-07  Dana Burkart <dburkart@apple.com>
1648
1649        Merge r172172
1650
1651    2014-08-06  Alexey Proskuryakov  <ap@apple.com>
1652
1653            REGRESSION (WebKit2): iOS Safari default encoding doesn't follow system language
1654            https://bugs.webkit.org/show_bug.cgi?id=135667
1655            <rdar://problem/17862892>
1656
1657            Reviewed by Anders Carlsson.
1658
1659            * Shared/WebPreferencesDefinitions.h: Compute the actual proper default, don't
1660            hardcode it to ISO-8859-1 hoping that someone else will correct it later.
1661
1662            * Shared/WebPreferencesStore.cpp: Added an include for WebPreferencesDefinitions.h
1663            macro expansion to compile.
1664
1665            * UIProcess/WebPreferences.cpp: (WebKit::WebPreferences::createWithLegacyDefaults):
1666            Added a FIXME.
1667
1668            * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface):
1669            We now use WKGetWebDefaultCFStringEncoding in WebCore, so it needs to be initialized.
1670
16712014-08-07  Dana Burkart  <dburkart@apple.com>
1672
1673        Merge r172035. <rdar://problem/17869353>
1674
1675    2014-08-04  Andy Estes  <aestes@apple.com>
1676
1677            [iOS] The raw bytes of an iWork document's PDF preview are displayed rather than the PDF itself
1678            https://bugs.webkit.org/show_bug.cgi?id=135596
1679
1680            Reviewed by David Kilzer.
1681
1682            * WebProcess/Network/WebResourceLoader.cpp:
1683            (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo): If the response will be handled by
1684            QuickLook, do not call ResourceLoader::didReceiveResponse. It will be called later by
1685            WebResourceLoaderQuickLookDelegate once converted data is received.
1686
16872014-08-05  Lucas Forschler  <lforschler@apple.com>
1688
1689        Merge r172104
1690
1691    2014-08-05  Tim Horton  <timothy_horton@apple.com>
1692
1693            REGRESSION (r164337): Pages are sometimes cut off/oriented incorrectly after using WKThumbnailView
1694            https://bugs.webkit.org/show_bug.cgi?id=135622
1695            <rdar://problem/17202556>
1696
1697            Reviewed by Dan Bernstein.
1698
1699            In some cases (when the page changed scroll offset while thumbnailed),
1700            when transitioning back to thumbnail scale = 1, we would get the math
1701            wrong and end up with a non-identity sublayerTransform on the DrawingArea.
1702
1703            Luckily, none of this code is necessary anymore, as the only client
1704            of WKThumbnailView only uses its snapshotting mode.
1705
1706            * Shared/ImageOptions.h:
1707            Remove SnapshotOptionsRespectDrawingAreaTransform; DrawingArea no longer
1708            has a rootLayerTransform().
1709
1710            * UIProcess/WebPageProxy.cpp:
1711            (WebKit::WebPageProxy::setThumbnailScale): Deleted.
1712            * UIProcess/WebPageProxy.h:
1713            * WebProcess/WebPage/WebPage.cpp:
1714            (WebKit::WebPage::WebPage):
1715            (WebKit::WebPage::scaledSnapshotWithOptions):
1716            (WebKit::WebPage::snapshotAtSize):
1717
1718            (WebKit::WebPage::setThumbnailScale): Deleted.
1719            * WebProcess/WebPage/WebPage.h:
1720            * WebProcess/WebPage/WebPage.messages.in:
1721            Remove setThumbnailScale and SnapshotOptionsRespectDrawingAreaTransform.
1722
1723            * WebProcess/WebPage/WebPage.cpp:
1724            (WebKit::WebPage::didCommitLoad):
1725            Revert this to its state before r164337, as we no longer have "thumbnail scale".
1726
1727            * UIProcess/API/Cocoa/_WKThumbnailView.h:
1728            * UIProcess/API/Cocoa/_WKThumbnailView.mm:
1729            (-[_WKThumbnailView initWithFrame:fromWKView:]):
1730            (-[_WKThumbnailView _viewWasUnparented]):
1731            (-[_WKThumbnailView _viewWasParented]):
1732            (-[_WKThumbnailView _requestSnapshotIfNeeded]):
1733            (-[_WKThumbnailView setScale:]):
1734            Clean up code assuming _shouldApplyThumbnailScale = NO, _usesSnapshot = YES.
1735
1736            (-[_WKThumbnailView setUsesSnapshot:]):
1737            (-[_WKThumbnailView usesSnapshot]):
1738            Always return YES from usesSnapshot; we only support snapshotting WKThumbnailViews.
1739            Ignore setUsesSnapshot.
1740
1741            * UIProcess/API/mac/WKView.mm:
1742            (-[WKView _setThumbnailView:]):
1743            (-[WKView _updateThumbnailViewLayer]):
1744            Stop checking usesSnapshot; it's always true.
1745
1746            * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1747            * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1748            (WebKit::TiledCoreAnimationDrawingArea::setRootLayerTransform): Deleted.
1749            * WebProcess/WebPage/DrawingArea.cpp:
1750            (WebKit::DrawingArea::rootLayerTransform): Deleted.
1751            * WebProcess/WebPage/DrawingArea.h:
1752            (WebKit::DrawingArea::setRootLayerTransform): Deleted.
1753            Remove rootLayerTransform() and setRootLayerTransform().
1754
17552014-08-05  Lucas Forschler  <lforschler@apple.com>
1756
1757        Merge r172034
1758
1759    2014-08-05  Alexey Proskuryakov  <ap@apple.com>
1760
1761            Build fix.
1762
1763            * UIProcess/WebContext.h:
1764
17652014-08-05  Lucas Forschler  <lforschler@apple.com>
1766
1767        Merge r172031
1768
1769    2014-08-05  Oliver Hunt  <oliver@apple.com>
1770
1771            SSO expects to be able to walk parent application's bundle
1772            https://bugs.webkit.org/show_bug.cgi?id=135581
1773            <rdar://problem/17864079>
1774
1775            Reviewed by Alexey Proskuryakov.
1776
1777            SSO expects to be able to walk the parent application's
1778            bundle looking for Info plists. To allow this to actually
1779            work we provide an extension from the ui process that
1780            covers the bundle directory, and then in the profile
1781            restrict access to the ability to read directories and
1782            files named Info.plist.
1783
1784            * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1785            (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
1786            * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
1787            * Shared/Network/NetworkProcessCreationParameters.cpp:
1788            (WebKit::NetworkProcessCreationParameters::encode):
1789            (WebKit::NetworkProcessCreationParameters::decode):
1790            * Shared/Network/NetworkProcessCreationParameters.h:
1791            * UIProcess/WebContext.cpp:
1792            (WebKit::WebContext::ensureNetworkProcess):
1793            (WebKit::WebContext::parentBundleDirectory):
1794            * UIProcess/WebContext.h:
1795            * UIProcess/mac/WebContextMac.mm:
1796            (WebKit::WebContext::parentBundleDirectory):
1797
17982014-08-05  Lucas Forschler  <lforschler@apple.com>
1799
1800        Merge r172016
1801
1802    2014-08-04  Benjamin Poulain  <bpoulain@apple.com>
1803
1804            Check for null frame when processing geolocation authorization request
1805            https://bugs.webkit.org/show_bug.cgi?id=135577
1806            <rdar://problem/17896295>
1807
1808            Reviewed by Geoffrey Garen.
1809
1810            I could have put the null check in GeolocationController instead of the WebKit layer,
1811            but that would be a little weird as GeolocationController knows nothing about how
1812            the WebKit layer decides what to do with requests.
1813
1814            * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
1815            (WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation):
1816
18172014-08-05  Lucas Forschler  <lforschler@apple.com>
1818
1819        Merge r171973
1820
1821    2014-08-02  Jeremy Jones  <jeremyj@apple.com>
1822
1823            Support both window and view based video fullscreen.
1824            https://bugs.webkit.org/show_bug.cgi?id=135525
1825
1826            Reviewed by Simon Fraser.
1827
1828            Parenting in the view instead of the window gives the fullscreen implementation more latitude 
1829            in how it implements the animation.
1830
1831            * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
1832            (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): Use view instead of window.
1833            * WebProcess/ios/WebVideoFullscreenManager.mm:
1834            (WebKit::clientRectForNode): Use client rect instead of screen rect.
1835            (WebKit::WebVideoFullscreenManager::enterFullscreenForNode): ditto
1836            (WebKit::WebVideoFullscreenManager::exitFullscreenForNode): ditto
1837            (WebKit::screenRectForNode): Deleted.
1838
18392014-08-05  Lucas Forschler  <lforschler@apple.com>
1840
1841        Merge r171959
1842
1843    2014-08-01  Joseph Pecoraro  <pecoraro@apple.com>
1844
1845            [iOS WK2] Add extension read permission to network sandbox profile
1846            <rdar://problem/17671574>
1847
1848            Reviewed by Alexey Proskuryakov and Oliver Hunt.
1849
1850            * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
1851
18522014-08-05  Lucas Forschler  <lforschler@apple.com>
1853
1854        Merge r171943
1855
1856    2014-08-01  Oliver Hunt  <oliver@apple.com>
1857
1858            Various frameworks may want to use the container temp directory, so our current restrictions are too tight
1859            https://bugs.webkit.org/show_bug.cgi?id=135518
1860            <rdar://17869279>
1861
1862            Reviewed by Anders Carlsson.
1863
1864            We don't (and can't) have complete knowledge of what different frameworks
1865            will want to use the container temporary directory for, and so our
1866            current attempt to heavily restrict access is simply too tight.
1867
1868            This patch recognises this by simply giving read-write access to the
1869            entire NSTemporary() directory (e.g. $container/tmp in the general case),
1870            rather than the single sub directory we wishfully thought that we would
1871            be able to get away with.
1872
1873            * Shared/WebProcessCreationParameters.cpp:
1874            (WebKit::WebProcessCreationParameters::encode):
1875            (WebKit::WebProcessCreationParameters::decode):
1876            * Shared/WebProcessCreationParameters.h:
1877            * UIProcess/WebContext.cpp:
1878            (WebKit::WebContext::createNewWebProcess):
1879            (WebKit::WebContext::mediaCacheDirectory): Deleted.
1880            * UIProcess/WebContext.h:
1881            * UIProcess/efl/WebContextEfl.cpp:
1882            (WebKit::WebContext::containerTemporaryDirectory):
1883            (WebKit::WebContext::platformMediaCacheDirectory): Deleted.
1884            * UIProcess/gtk/WebContextGtk.cpp:
1885            (WebKit::WebContext::containerTemporaryDirectory):
1886            (WebKit::WebContext::platformMediaCacheDirectory): Deleted.
1887            * UIProcess/mac/WebContextMac.mm:
1888            (WebKit::WebContext::containerTemporaryDirectory):
1889            (WebKit::WebContext::platformMediaCacheDirectory): Deleted.
1890            * WebProcess/cocoa/WebProcessCocoa.mm:
1891            (WebKit::WebProcess::platformInitializeWebProcess):
1892
18932014-08-05  Lucas Forschler  <lforschler@apple.com>
1894
1895        Merge r171928
1896
1897    2014-08-01  Dan Bernstein  <mitz@apple.com>
1898
1899            <rdar://problem/17862013> REGRESSION (r169357): Disabling "allow plug-ins" doesn't stick on quit/relaunch
1900            https://bugs.webkit.org/show_bug.cgi?id=135511
1901
1902            Reviewed by Alexey Proskuryakov.
1903
1904            Since the values map in the preferences store doesn’t include values that are equal to the
1905            defaults, we need to update it when a new default is registered.
1906
1907            * UIProcess/WebPreferences.cpp:
1908            (WebKit::WebPreferences::createWithLegacyDefaults): Changed to use new member functions
1909            for registering defaults.
1910            (WebKit::WebPreferences::registerDefaultBoolValueForKey): Added. Sets an override default
1911            in the store, and sets the user default, if there is one, on top of it.
1912            (WebKit::WebPreferences::registerDefaultUInt32ValueForKey): Ditto.
1913            * UIProcess/WebPreferences.h: Declared new member functions for getting the user default
1914            value for a key.
1915
1916            * UIProcess/efl/WebPreferencesEfl.cpp:
1917            (WebKit::WebPreferences::platformGetStringUserValueForKey): Added an implementation that
1918            returns false, because the EFL port doesn’t support persistent user defaults.
1919            (WebKit::WebPreferences::platformGetBoolUserValueForKey): Ditto.
1920            (WebKit::WebPreferences::platformGetUInt32UserValueForKey): Ditto.
1921            (WebKit::WebPreferences::platformGetDoubleUserValueForKey): Ditto.
1922
1923            * UIProcess/gtk/WebPreferencesGtk.cpp:
1924            (WebKit::WebPreferences::platformGetStringUserValueForKey): Ditto for the GTK port.
1925            (WebKit::WebPreferences::platformGetBoolUserValueForKey): Ditto.
1926            (WebKit::WebPreferences::platformGetUInt32UserValueForKey): Ditto.
1927            (WebKit::WebPreferences::platformGetDoubleUserValueForKey): Ditto.
1928
1929            * UIProcess/mac/WebPreferencesMac.mm:
1930            (WebKit::WebPreferences::platformGetStringUserValueForKey): Added. Replaces
1931            setStringValueIfInUserDefaults, on which it is based.
1932            (WebKit::WebPreferences::platformGetBoolUserValueForKey): Similarly for booleans.
1933            (WebKit::WebPreferences::platformGetUInt32UserValueForKey): Similarly for integers.
1934            (WebKit::WebPreferences::platformGetDoubleUserValueForKey): Similarly for doubles.
1935            (WebKit::WebPreferences::platformInitializeStore): Changed to use the above functions.
1936
19372014-08-05  Lucas Forschler  <lforschler@apple.com>
1938
1939        Merge r171920
1940
1941    2014-08-01  Brent Fulgham  <bfulgham@apple.com>
1942
1943            [Mac] Fullscreen mode for some applications shows only a black screen.
1944            https://bugs.webkit.org/show_bug.cgi?id=135493
1945            <rdar://problem/17628212>
1946
1947            Reviewed by Jer Noble.
1948
1949            In some applications, the window hosting the WKView is an InProcess layer hosting mode.
1950            The fullscreen window created by the WKFullScreenWindowController defaults to an
1951            OutOfProcess mode.
1952
1953            When this kind of mismatch is encountered, the WK2 layer in the UI process is supposed
1954            to send a message back to the WebProcess indicating that the layer hosting mode of the
1955            containing window is different, so that the WebProcess can adjust its logic accordingly.
1956            Unfortunately, the notification that this had happened was not getting sent to the
1957            WebProcess due to an optimization in window state change logic (see Bug 135509 for
1958            details).
1959
1960            The fix is to check layer hosting mode state when a WKView is added to a window, and
1961            notify the WebProcess when it needs to change state to match.
1962
1963
1964            * UIProcess/API/mac/WKView.mm:
1965            (-[WKView viewDidMoveToWindow]): When moving to a new window, always call
1966            'layerHostingModeDidChange' to pick up any changes in the layer hosting mode.
1967
19682014-08-05  Lucas Forschler  <lforschler@apple.com>
1969
1970        Merge r171891
1971
1972    2014-07-31  Beth Dakin  <bdakin@apple.com>
1973
1974            Hit-testing broken in WebKit 1 views with AppKit's contentInsets
1975            https://bugs.webkit.org/show_bug.cgi?id=135434
1976            -and corresponding-
1977            <rdar://problem/17850323>
1978
1979            Reviewed by Benjamin Poulain.
1980
1981            Re-named functions.
1982            * WebProcess/Plugins/PDF/PDFPlugin.mm:
1983            (WebKit::PDFPlugin::convertFromScrollbarToContainingView):
1984            (WebKit::PDFPlugin::convertFromContainingViewToScrollbar):
1985
19862014-08-05  Lucas Forschler  <lforschler@apple.com>
1987
1988        Merge r171887
1989
1990    2014-07-31  Oliver Hunt  <oliver@apple.com>
1991
1992            Various SSO services need the networking process to be able to spoof its bundle id
1993            https://bugs.webkit.org/show_bug.cgi?id=135468
1994            <rdar://problem/17864139>
1995
1996            Reviewed by Alexey Proskuryakov.
1997
1998            Just add the entitlement required to allow the sandbox to let this happen.
1999
2000            * Configurations/Network-iOS.entitlements:
2001
20022014-07-30  Lucas Forschler  <lforschler@apple.com>
2003
2004        Merge r171829
2005
2006    2014-07-30  Enrica Casucci  <enrica@apple.com>
2007
2008            REGRESSION (WK2 iOS): Inline editing for Chinese and Japanese keyboards does not work in Safari.
2009            https://bugs.webkit.org/show_bug.cgi?id=135449
2010            <rdar://problem/17824833>
2011
2012            Reviewed by Benjamin Poulain.
2013
2014            The WebProcess sends the notification that the gesture modified the phrase boundary,
2015            but the flag was not being converted properly, therefore we failed to notify
2016            the text input system that a change had occurred.
2017
2018            * UIProcess/ios/WKContentViewInteraction.mm:
2019            (toUIWKSelectionFlags):
2020
20212014-07-30  Lucas Forschler  <lforschler@apple.com>
2022
2023        Merge r171749
2024
2025    2014-07-29  Brady Eidson  <beidson@apple.com>
2026
2027            Make WKOriginDataManager actually operate on IndexedDatabases.
2028            https://bugs.webkit.org/show_bug.cgi?id=135346
2029
2030            Reviewed by Sam Weinig (and David Kilzer and Alex Christensen)
2031
2032            * DatabaseProcess/DatabaseProcess.cpp:
2033            (WebKit::DatabaseProcess::DatabaseProcess):
2034            (WebKit::DatabaseProcess::getIndexedDatabaseOrigins): 
2035            (WebKit::DatabaseProcess::doGetIndexedDatabaseOrigins):
2036            (WebKit::removeAllDatabasesForOriginPath): Utility to delete all database files for the given origin path
2037                that have been modified between the given dates.
2038            (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesForOrigin):
2039            (WebKit::DatabaseProcess::doDeleteIndexedDatabaseEntriesForOrigin):
2040            (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesModifiedBetweenDates):
2041            (WebKit::DatabaseProcess::doDeleteIndexedDatabaseEntriesModifiedBetweenDates):
2042            (WebKit::DatabaseProcess::deleteAllIndexedDatabaseEntries):
2043            (WebKit::DatabaseProcess::doDeleteAllIndexedDatabaseEntries):
2044            * DatabaseProcess/DatabaseProcess.h:
2045
2046            * Shared/WebCrossThreadCopier.cpp:
2047            (WebCore::SecurityOriginData>::copy):
2048            * Shared/WebCrossThreadCopier.h:
2049
2050            * UIProcess/WebOriginDataManagerProxy.cpp:
2051            (WebKit::WebOriginDataManagerProxy::getOrigins):
2052            (WebKit::WebOriginDataManagerProxy::didGetOrigins):
2053            (WebKit::WebOriginDataManagerProxy::deleteEntriesForOrigin):
2054            (WebKit::WebOriginDataManagerProxy::deleteEntriesModifiedBetweenDates):
2055            (WebKit::WebOriginDataManagerProxy::deleteAllEntries):
2056
2057            * WebProcess/OriginData/WebOriginDataManager.cpp:
2058            (WebKit::WebOriginDataManager::getOrigins): Pipe IDB requests through to the DatabaseProcess.
2059            (WebKit::WebOriginDataManager::deleteEntriesForOrigin): Ditto.
2060            (WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates): Ditto.
2061            (WebKit::WebOriginDataManager::deleteAllEntries): Ditto.
2062
20632014-07-29  Lucas Forschler  <lforschler@apple.com>
2064
2065        Merge r171748
2066
2067    2014-07-29  Commit Queue  <commit-queue@webkit.org>
2068
2069            Unreviewed, rolling out r171704.
2070            https://bugs.webkit.org/show_bug.cgi?id=135389
2071
2072            Broke two IndexedDB tests (Requested by ap on #webkit).
2073
2074            Reverted changeset:
2075
2076            "IDB transactions never reset if the Web Process ends before
2077            cleaning up"
2078            https://bugs.webkit.org/show_bug.cgi?id=135218
2079            http://trac.webkit.org/changeset/171704
2080
20812014-07-29  Lucas Forschler  <lforschler@apple.com>
2082
2083        Merge r171709
2084
2085    2014-07-28  Benjamin Poulain  <bpoulain@apple.com>
2086
2087            [iOS WK2] WKWebView sometime tries to change the size of a null DrawingAreaProxy
2088            https://bugs.webkit.org/show_bug.cgi?id=135368
2089            <rdar://problem/16988887>
2090
2091            Reviewed by Simon Fraser.
2092
2093            We should never assume DrawingAreaProxy exists in the API invoked by the clients
2094            of WKWebView. There are at least two cases where the DrawingAreaProxy is null:
2095            -In some path on initialization.
2096            -After a crash.
2097
2098            * UIProcess/API/Cocoa/WKWebView.mm:
2099            (-[WKWebView _frameOrBoundsChanged]):
2100            (-[WKWebView _beginAnimatedResizeWithUpdates:]):
2101            We can safely null check and skip setting the size. If the call was skipped,
2102            the size is set on DrawingAreaProxy initialization by querying the current
2103            size through the page client.
2104
21052014-07-29  Lucas Forschler  <lforschler@apple.com>
2106
2107        Merge r171706
2108
2109    2014-07-28  Roger Fong  <roger_fong@apple.com>
2110
2111            Disable tagged strings for the plugin process.
2112            https://bugs.webkit.org/show_bug.cgi?id=135354
2113            <rdar://problem/17295639>.
2114
2115            Patch by Alexey Proskuryakov and Roger Fong.
2116
2117            Reviewed by Anders Carlsson.
2118
2119            * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
2120            * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2121            (WebKit::connectToReExecService):
2122
21232014-07-29  Lucas Forschler  <lforschler@apple.com>
2124
2125        Merge r171704
2126
2127    2014-07-25  Jeffrey Pfau  <jpfau@apple.com>
2128
2129            IDB transactions never reset if the Web Process ends before cleaning up
2130            https://bugs.webkit.org/show_bug.cgi?id=135218
2131
2132            Reviewed by Darin Adler.
2133
2134            * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
2135            (WebKit::DatabaseToWebProcessConnection::didClose):
2136            * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
2137            (WebKit::UniqueIDBDatabase::unregisterConnection):
2138            (WebKit::UniqueIDBDatabase::didCompleteTransactionOperation):
2139            (WebKit::UniqueIDBDatabase::openBackingStoreTransaction):
2140            (WebKit::UniqueIDBDatabase::resetBackingStoreTransaction):
2141            (WebKit::UniqueIDBDatabase::didEstablishTransaction):
2142            (WebKit::UniqueIDBDatabase::didResetTransaction):
2143            (WebKit::UniqueIDBDatabase::resetAllTransactions):
2144            (WebKit::UniqueIDBDatabase::finalizeRollback):
2145            (WebKit::UniqueIDBDatabase::absoluteDatabaseDirectory):
2146            * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
2147            * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
2148            (WebKit::UniqueIDBDatabaseBackingStoreSQLite::rollbackTransaction):
2149
21502014-07-27  Matthew Hanson  <matthew_hanson@apple.com>
2151
2152        Merge r171663. <rdar://problem/17818308>
2153
2154    2014-07-27  Gavin Barraclough  <baraclough@apple.com>
2155    
2156            Don't rely on reading applicationState from within DidEnterBackground/WillEnterForeground
2157            https://bugs.webkit.org/show_bug.cgi?id=135329
2158            rdar://problem/17818308
2159    
2160            Reviewed by Sam Weinig.
2161    
2162            API may not be stable.
2163    
2164            * UIProcess/ios/PageClientImplIOS.mm:
2165            (WebKit::PageClientImpl::isViewVisible):
2166                - changed to use -[WKContentView isBackground]
2167            * UIProcess/ios/ProcessAssertionIOS.mm:
2168            (-[WKProcessAssertionBackgroundTaskManager init]):
2169                - split notification handlers
2170            (-[WKProcessAssertionBackgroundTaskManager _applicationWillEnterForeground:]):
2171            (-[WKProcessAssertionBackgroundTaskManager _applicationDidEnterBackground:]):
2172            (-[WKProcessAssertionBackgroundTaskManager _applicationDidEnterBackgroundOrWillEnterForeground:]): Deleted.
2173                - Assume application is background is after DidEnterBackground, and not after WillEnterForeground
2174            * UIProcess/ios/WKContentView.h:
2175                - added isBackground.
2176            * UIProcess/ios/WKContentView.mm:
2177            (-[WKContentView initWithFrame:context:configuration:webView:]):
2178                - check applicationState at init.
2179            (-[WKContentView isBackground]):
2180                - accessor
2181            (-[WKContentView _applicationDidEnterBackground:]):
2182            (-[WKContentView _applicationWillEnterForeground:]):
2183                - update isBackground
2184    
21852014-07-27  Matthew Hanson  <matthew_hanson@apple.com>
2186
2187        Merge r171651. <rdar://problem/17682120>
2188
2189    2014-07-26  Enrica Casucci  <enrica@apple.com>
2190    
2191            [WebKit2 iOS]Add support for caret movement for the 3rd party keyboard protocol.
2192            https://bugs.webkit.org/show_bug.cgi?id=135325
2193            <rdar://problem/17682120>
2194    
2195            Reviewed by Sam Weinig.
2196    
2197            WKContentView now implements moveByOffset to support the
2198            protocol for 3rd party keyboards.
2199    
2200            * UIProcess/WebPageProxy.h:
2201            * UIProcess/ios/WKContentViewInteraction.mm:
2202            (-[WKContentView moveByOffset:]):
2203            * UIProcess/ios/WebPageProxyIOS.mm:
2204            (WebKit::WebPageProxy::moveSelectionByOffset):
2205            * WebProcess/WebPage/WebPage.h:
2206            * WebProcess/WebPage/WebPage.messages.in:
2207            * WebProcess/WebPage/ios/WebPageIOS.mm:
2208            (WebKit::WebPage::moveSelectionByOffset):
2209    
22102014-07-27  Matthew Hanson  <matthew_hanson@apple.com>
2211
2212        Merge r171647. <rdar://problem/17315168>
2213
2214    2014-07-26  Timothy Horton  <timothy_horton@apple.com>
2215    
2216            Crash in Web Content Process under ~PDFDocument under clearTouchEventListeners at topDocument()
2217            https://bugs.webkit.org/show_bug.cgi?id=135319
2218            <rdar://problem/17315168>
2219    
2220            Reviewed by Darin Adler and Antti Koivisto.
2221    
2222            * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2223            (WebKit::WebFrameLoaderClient::committedLoad):
2224            Allow data through to WebCore for frames with custom content providers;
2225            the only custom content provider currently implemented is main frame PDF
2226            on iOS, which will end up creating a PDFDocument in WebCore, which drops all
2227            data on the floor immediately, so this won't result in WebCore doing anything
2228            with the data, but makes sure that more of the normal document lifecycle is maintained.
2229    
2230            In the future, we might want to consider ensuring that all custom content providers
2231            end up creating a SinkDocument or something similarly generic to ensure that
2232            WebCore doesn't try to do anything with their data, but for now, the only client is covered.
2233    
22342014-07-27  Matthew Hanson  <matthew_hanson@apple.com>
2235
2236        Merge r171635. <rdar://problem/17782407>
2237
2238    2014-07-25  Jeremy Jones  <jeremyj@apple.com>
2239    
2240            Parent fullscreen from window instead of view
2241            https://bugs.webkit.org/show_bug.cgi?id=135310
2242    
2243            Reviewed by Jer Noble.
2244    
2245            Parenting in the view causes an incorrect animation to fullscreen, and can cause 
2246            fullscreen to only expand to the size of the view instead of the whole window.
2247    
2248            * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2249            (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): pass view's window.
2250            * WebProcess/ios/WebVideoFullscreenManager.mm: screenRect instead of clientRect
2251            (WebKit::screenRectForNode): was clientRectForNode
2252            (WebKit::WebVideoFullscreenManager::enterFullscreenForNode): use screenRectForNode
2253            (WebKit::WebVideoFullscreenManager::exitFullscreenForNode): ditto
2254            (WebKit::clientRectForNode): Deleted.
2255    
22562014-07-27  Matthew Hanson  <matthew_hanson@apple.com>
2257
2258        Merge r171626. <rdar://problem/17730536>
2259
2260    2014-07-24  Anders Carlsson  <andersca@apple.com>
2261    
2262            WKNavigation's properties are either always nil or don't behave as documented
2263            https://bugs.webkit.org/show_bug.cgi?id=135267
2264            <rdar://problem/17730536>
2265    
2266            Reviewed by Andreas Kling.
2267    
2268            Remove the properties from WKNavigation and introduce -[WKNavigation _request] as SPI for now.
2269    
2270            * Shared/API/Cocoa/WebKitPrivate.h:
2271            * UIProcess/API/Cocoa/WKNavigation.h:
2272            * UIProcess/API/Cocoa/WKNavigation.mm:
2273            (-[WKNavigation _request]):
2274            (-[WKNavigation initialRequest]): Deleted.
2275            (-[WKNavigation request]): Deleted.
2276            (-[WKNavigation setRequest:]): Deleted.
2277            (-[WKNavigation response]): Deleted.
2278            (-[WKNavigation error]): Deleted.
2279            * UIProcess/API/Cocoa/WKNavigationInternal.h:
2280            * UIProcess/API/Cocoa/WKNavigationPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigationInternal.h.
2281            * UIProcess/Cocoa/NavigationState.mm:
2282            (WebKit::NavigationState::createLoadRequestNavigation):
2283            * WebKit2.xcodeproj/project.pbxproj:
2284    
22852014-07-25  Matthew Hanson  <matthew_hanson@apple.com>
2286
2287        Merge r171622. <rdar://problem/15917314>
2288
2289    2014-07-25  Brady Eidson  <beidson@apple.com>
2290
2291            Clean up WKOriginDataManager and get it messaging to the DatabaseProcess
2292            https://bugs.webkit.org/show_bug.cgi?id=135035
2293
2294            Reviewed by Sam Weinig.
2295
2296            * DatabaseProcess/DatabaseProcess.cpp:
2297            (WebKit::DatabaseProcess::DatabaseProcess): Instantiate the WebOriginDataManager, installing its message handler.
2298            (WebKit::DatabaseProcess::didReceiveMessage): Try the message receiver map, which will try the WebOriginDataManager.
2299            * DatabaseProcess/DatabaseProcess.h:
2300            * DatabaseProcess/DatabaseProcess.messages.in:
2301
2302            * UIProcess/API/C/WKOriginDataManager.cpp:
2303            (WKOriginDataManagerDeleteEntriesForOrigin): Updated to also take a callback.
2304            (WKOriginDataManagerDeleteEntriesModifiedBetweenDates): Added.
2305            (WKOriginDataManagerDeleteAllEntries): Updated to also take a callback.
2306            (WKOriginDataManagerStartObservingChanges): Deleted.
2307            (WKOriginDataManagerStopObservingChanges): Deleted.
2308            (WKOriginDataManagerSetChangeClient): Deleted.
2309            * UIProcess/API/C/WKOriginDataManager.h:
2310
2311            * UIProcess/Databases/DatabaseProcessProxy.cpp:
2312            (WebKit::DatabaseProcessProxy::didReceiveMessage): Send messages to the WebOriginDataManagerProxy supplement if appropriate.
2313            * UIProcess/Databases/DatabaseProcessProxy.h:
2314            * UIProcess/Databases/DatabaseProcessProxy.messages.in:
2315
2316            * UIProcess/WebContext.cpp:
2317            (WebKit::WebContext::WebContext): Instantiate the WebOriginDataManagerProxy supplement.
2318            * UIProcess/WebContext.h:
2319            (WebKit::WebContext::sendToDatabaseProcessRelaunchingIfNecessary):
2320
2321            * UIProcess/WebOriginDataManagerProxy.cpp:
2322            (WebKit::WebOriginDataManagerProxy::contextDestroyed):
2323            (WebKit::WebOriginDataManagerProxy::processDidClose):
2324            (WebKit::WebOriginDataManagerProxy::getOrigins):
2325            (WebKit::WebOriginDataManagerProxy::deleteEntriesForOrigin): Setup a callback with the message.
2326            (WebKit::WebOriginDataManagerProxy::deleteEntriesModifiedBetweenDates): Added
2327            (WebKit::WebOriginDataManagerProxy::didDeleteEntries): Call the callback.
2328            (WebKit::WebOriginDataManagerProxy::deleteAllEntries): Setup a callback with the message.
2329            (WebKit::WebOriginDataManagerProxy::didDeleteAllEntries): Call the callback.
2330            (WebKit::WebOriginDataManagerProxy::startObservingChanges): Deleted.
2331            (WebKit::WebOriginDataManagerProxy::stopObservingChanges): Deleted.
2332            (WebKit::WebOriginDataManagerProxy::setChangeClient): Deleted.
2333            (WebKit::WebOriginDataManagerProxy::didChange): Deleted.
2334            * UIProcess/WebOriginDataManagerProxy.h:
2335            * UIProcess/WebOriginDataManagerProxy.messages.in:
2336
2337            * UIProcess/WebOriginDataManagerProxyChangeClient.cpp: Removed.
2338            * UIProcess/WebOriginDataManagerProxyChangeClient.h: Removed.
2339
2340            * WebKit2.xcodeproj/project.pbxproj:
2341
2342            * WebProcess/OriginData/WebOriginDataManager.cpp:
2343            (WebKit::WebOriginDataManager::deleteEntriesForOrigin): Send the callback reply.
2344            (WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates): Added.
2345            (WebKit::WebOriginDataManager::deleteAllEntries): Send the callback reply.
2346            (WebKit::WebOriginDataManager::startObservingChanges): Deleted.
2347            (WebKit::WebOriginDataManager::stopObservingChanges): Deleted.
2348            * WebProcess/OriginData/WebOriginDataManager.h:
2349            * WebProcess/OriginData/WebOriginDataManager.messages.in:
2350
23512014-07-25  Matthew Hanson  <matthew_hanson@apple.com>
2352
2353        Merge r171629. <rdar://problem/17654369>
2354
2355    2014-07-25  Oliver Hunt  <oliver@apple.com>
2356
2357            Creating incorrect sandbox extension for hsts plist due to missing /
2358            https://bugs.webkit.org/show_bug.cgi?id=135309
2359
2360            Reviewed by Sam Weinig.
2361
2362            So it turns out that you do actually need /'s in paths...
2363            Now we actually create the correct extension.
2364
2365            * UIProcess/mac/WebContextMac.mm:
2366            (WebKit::WebContext::platformDefaultNetworkingHSTSDatabasePath):
2367
23682014-07-25  Dean Jackson  <dino@apple.com>
2369
2370        Revert back to the Safari behavior from Mavericks and Mountain Lion
2371        on this branch.
2372        <rdar://problem/17800530>
2373
2374        Follow-up comment from Dan Bernstein.
2375
2376        * Shared/WebPreferencesDefinitions.h: Make sure this only applies to Mavericks and Mountain Lion.
2377
23782014-07-25  Dean Jackson  <dino@apple.com>
2379
2380        Revert back to the Safari behavior from Mavericks and Mountain Lion
2381        on this branch.
2382        <rdar://problem/17800530>
2383
2384        Reviewed by Ricky Mondello.
2385
2386        * Shared/WebPreferencesDefinitions.h: Set WebGL preference default to off.
2387
23882014-07-24  Lucas Forschler  <lforschler@apple.com>
2389
2390        Merge r171471
2391
2392    2014-07-23  Timothy Horton  <timothy_horton@apple.com>
2393
2394            REGRESSION (r171239): Much more time spent taking snapshots during the PLT
2395            https://bugs.webkit.org/show_bug.cgi?id=135177
2396            <rdar://problem/17764847>
2397
2398            Reviewed by Dan Bernstein.
2399
2400            * UIProcess/WebPageProxy.cpp:
2401            (WebKit::WebPageProxy::willChangeCurrentHistoryItemForMainFrame):
2402            (WebKit::WebPageProxy::willChangeCurrentHistoryItem): Deleted.
2403            * UIProcess/WebPageProxy.h:
2404            * UIProcess/WebPageProxy.messages.in:
2405            * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2406            (WebKit::WebFrameLoaderClient::willChangeCurrentHistoryItem):
2407            * WebProcess/WebPage/WebPage.cpp:
2408            (WebKit::WebPage::willChangeCurrentHistoryItemForMainFrame):
2409            (WebKit::WebPage::willChangeCurrentHistoryItem): Deleted.
2410            * WebProcess/WebPage/WebPage.h:
2411            Rename WillChangeCurrentHistoryItem to WillChangeCurrentHistoryItemForMainFrame.
2412            Only send it when the current history item for the main frame changes.
2413
24142014-07-24  Lucas Forschler  <lforschler@apple.com>
2415
2416        Merge r171203
2417
2418    2014-07-17  Enrica Casucci  <enrica@apple.com>
2419
2420            [REGRESSION WK2]The menu bar does not show up when tapping on the caret.
2421            https://bugs.webkit.org/show_bug.cgi?id=135023
2422            <rdar://problem/17617282>
2423
2424            Reviewed by Benjamin Poulain and Ryosuke Niwa.
2425
2426            WKContentView needs to implement hasContent to correctly show
2427            the appropriate menu bar content. The patch adds this information
2428            to the EditorState.
2429
2430            * Shared/EditorState.cpp:
2431            (WebKit::EditorState::encode):
2432            (WebKit::EditorState::decode):
2433            * Shared/EditorState.h:
2434            (WebKit::EditorState::EditorState):
2435            * UIProcess/ios/WKContentViewInteraction.mm:
2436            (-[WKContentView hasContent]):
2437            * WebProcess/WebPage/WebPage.cpp:
2438            (WebKit::WebPage::editorState):
2439
24402014-07-24  Lucas Forschler  <lforschler@apple.com>
2441
2442        Merge r171576
2443
2444    2014-07-24  Benjamin Poulain  <bpoulain@apple.com>
2445
2446            [iOS][WK2] Do not try to hit test a null mainFrameRenderView on dynamicViewportSizeUpdate()
2447            https://bugs.webkit.org/show_bug.cgi?id=135277
2448            <rdar://problem/17804891>
2449
2450            Reviewed by Tim Horton.
2451
2452            * WebProcess/WebPage/ios/WebPageIOS.mm:
2453            (WebKit::WebPage::dynamicViewportSizeUpdate):
2454            There is no guarantee that the main frame have its root view when performing a dynamicViewportSizeUpdate(),
2455            we should not attempt to use the layer without null checking it first.
2456
2457            The odd part for me is <rdar://problem/17804891> is a little too frequent. In the vast majority of cases,
2458            there is a RenderView, it seems actually pretty hard not to have one on dynamicViewportSizeUpdate().
2459
2460            Skipping hit testing is safe because it is a completely optional part of this algorithm.
2461            When the hit test is not done, the new position is computed based on the relative position prior to
2462            the size change.
2463
24642014-07-24  Lucas Forschler  <lforschler@apple.com>
2465
2466        Merge r171570
2467
2468    2014-07-24  Tim Horton  <timothy_horton@apple.com>
2469
2470            Sometimes WKWebView is blank after resuming the app, until you scroll
2471            https://bugs.webkit.org/show_bug.cgi?id=135275
2472            <rdar://problem/17803170>
2473
2474            Reviewed by Benjamin Poulain.
2475
2476            * UIProcess/WebPageProxy.cpp:
2477            (WebKit::WebPageProxy::dispatchViewStateChange):
2478            If the UI process is waiting for a didUpdateViewState, we need to *always*
2479            get a reply from the Web Process, so dispatchViewStateChange should *always*
2480            send SetViewState even if nothing changed (so that we get the reply).
2481
24822014-07-24  Lucas Forschler  <lforschler@apple.com>
2483
2484        Merge r171560
2485
2486    2014-07-24  Simon Fraser  <simon.fraser@apple.com>
2487
2488            [iOS WK2] Header bar on nytimes articles lands in the wrong place after rubberbanding
2489            https://bugs.webkit.org/show_bug.cgi?id=135221
2490            <rdar://problem/17542454>
2491
2492            Reviewed by Benjamin Poulain.
2493
2494            The call to didCommitLayerTree() can cause one or two visible rect updates,
2495            via changes to the UIScrollView contentSize and contentOffset. As a result, we
2496            would notify the scrolling tree about a viewport change, but using the old
2497            scrolling tree rather than the new one, so we could move layers around for
2498            nodes which are about to be removed from the tree.
2499
2500            However, we also have to ensure that programmatic scrolls are applied after
2501            didCommitLayerTree() has updated the view size, so have RemoteScrollingCoordinatorProxy
2502            store data about programmatic scrolls and return them to the caller, which
2503            can apply them after didCommitLayerTree().
2504
2505            * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp: Store a pointer to a RequestedScrollInfo
2506            for the duration of the tree update, so that we can store requested scroll info in it.
2507            (WebKit::RemoteScrollingCoordinatorProxy::RemoteScrollingCoordinatorProxy):
2508            (WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree):
2509            (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeRequestsScroll):
2510            * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
2511            * UIProcess/WebPageProxy.cpp:
2512            (WebKit::WebPageProxy::didCommitLayerTree): Give Mac a stub implementation.
2513            * UIProcess/WebPageProxy.h: Group some editing-related functions together.
2514            (WebKit::WebPageProxy::editorState):
2515            (WebKit::WebPageProxy::canDelete):
2516            (WebKit::WebPageProxy::hasSelectedRange):
2517            (WebKit::WebPageProxy::isContentEditable):
2518            (WebKit::WebPageProxy::maintainsInactiveSelection):
2519            * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2520            (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree): Ordering change: update
2521            the layer tree, then call didCommitLayerTree(), then do the viewport update, followed
2522            by any programmatic scroll.
2523
25242014-07-24  Lucas Forschler  <lforschler@apple.com>
2525
2526        Merge r171540
2527
2528    2014-07-24  Dan Bernstein  <mitz@apple.com>
2529
2530            WebKit2 part of <rdar://problem/17766348> [Cocoa] WebCore::ProtectionSpace doesn’t preserve all NSURLProtectionSpace properties, such as the distinguishedNames array
2531            https://bugs.webkit.org/show_bug.cgi?id=135229
2532
2533            Reviewed by Alexey Proskuryakov.
2534
2535            * Shared/Cocoa/WKNSURLProtectionSpace.mm: Changed to use ProtectionSpace::nsSpace.
2536
2537            * Shared/WebCoreArgumentCoders.cpp:
2538            (IPC::ArgumentCoder<ProtectionSpace>::encode): If encoding the space requires encoding the
2539            platform data, do that.
2540            (IPC::ArgumentCoder<ProtectionSpace>::decode): If platform data was encoded, decode it.
2541            * Shared/WebCoreArgumentCoders.h:
2542
2543            * Shared/mac/WebCoreArgumentCodersMac.mm:
2544            (IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData): Archive the NSURLProtectionSpace.
2545            (IPC::ArgumentCoder<ProtectionSpace>::decodePlatformData): Unarchive it.
2546
2547            * Shared/soup/WebCoreArgumentCodersSoup.cpp:
2548            (IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData): Added.
2549            (IPC::ArgumentCoder<ProtectionSpace>::decodePlatformData): Added.
2550
25512014-07-24  Lucas Forschler  <lforschler@apple.com>
2552
2553        Merge r171532
2554
2555    2014-07-24  Benjamin Poulain  <benjamin@webkit.org>
2556
2557            [WK2] Fixed/Sticky layers can get mispositioned when the layer tree commit change their position or size
2558            https://bugs.webkit.org/show_bug.cgi?id=135227
2559            <rdar://problem/17279500>
2560
2561            Reviewed by Simon Fraser.
2562
2563            In some cases, a fixed or sticky positioned layer would end up at its position corresponding to the WebProcess
2564            instead of sticking the to real viewport in the UIProcess.
2565
2566            The sequence of event is:
2567            1) A layer becomes fixed in some ScrollingTree transaction.
2568            2) Later, some change in the WebProcess causes a LayerTree update for that exact same layer, but no corresponding
2569               ScrollingTree update is made.
2570            3) In the UIProcess, the position of the fixed layer is changed due to the LayerTree update.
2571               But! There is no ScrollingTree change, updateScrollingTree() never sets fixedOrStickyLayerChanged to true,
2572               and the position is not corrected.
2573            -> The layer is now at the wrong position until the next VisibleContentRectUpdate.
2574
2575            Ideally, we should have fixedOrStickyLayerChanged track if either the position or size of a fixed layer changed
2576            in the layer tree. This is tricky since the layer tree does not keep track of the fixed nodes of the scrolling tree.
2577
2578            Since this complexity seems risky at this point, I went for something simpler but with more overhead:
2579            any time the scrolling tree contains either a fixed or sticky layer, viewportChangedViaDelegatedScrolling()
2580            is called to "fix" the position.
2581
2582            * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
2583            (WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree):
2584            (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
2585            * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
2586            (WebKit::RemoteScrollingCoordinatorProxy::hasFixedOrSticky):
2587            * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
2588            (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
2589            * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2590            (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
2591
25922014-07-24  Lucas Forschler  <lforschler@apple.com>
2593
2594        Merge r171519
2595
2596    2014-07-24  Oliver Hunt  <oliver@apple.com>
2597
2598            Need to explicitly support location services in webcontent profile
2599            https://bugs.webkit.org/show_bug.cgi?id=135251
2600            <rdar://17798346>
2601
2602            Reviewed by Dan Bernstein.
2603
2604            Switching to uikit-app means that we remove the implicit support
2605            for location services. This makes us explicitly opt-in.
2606
2607            * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2608
26092014-07-24  Lucas Forschler  <lforschler@apple.com>
2610
2611        Merge r171518
2612
2613    2014-07-24  Tim Horton  <timothy_horton@apple.com>
2614
2615            Crash at [WKContentView _applicationWillEnterForeground:] + 28
2616            <rdar://problem/17797103>
2617
2618            Reviewed by Sam Weinig.
2619
2620            * UIProcess/ios/WKContentView.mm:
2621            (-[WKContentView _applicationWillEnterForeground:]):
2622            Drawing area can be null; null check it!
2623            It's ok if we don't hide the content in this case, because if the drawing area is null,
2624            it doesn't have any layers in the tree anyway.
2625
26262014-07-24  Lucas Forschler  <lforschler@apple.com>
2627
2628        Merge r171485
2629
2630    2014-07-23  Dan Bernstein  <mitz@apple.com>
2631
2632            <rdar://problem/17782623> [iOS] Client-certificate authentication isn’t working with some certificates
2633            https://bugs.webkit.org/show_bug.cgi?id=135206
2634
2635            Reviewed by Anders Carlsson.
2636
2637            * Shared/cf/ArgumentCodersCF.cpp:
2638            (IPC::copyPersistentRef): Added this helper function. It differs from
2639            SecKeyCopyPersistentRef in that if multiple copies of the key exist in the keychain, it
2640            ensures that we get a reference to the copy that is in the keychain access group that the
2641            Networking process can use.
2642            (IPC::encode): Use copyPersistentRef.
2643
26442014-07-24  Lucas Forschler  <lforschler@apple.com>
2645
2646        Merge r171201
2647
2648    2014-07-17  Benjamin Poulain  <benjamin@webkit.org>
2649
2650            [iOS][WK2] Add SPI to do a dynamic viewport update without showing any content
2651            https://bugs.webkit.org/show_bug.cgi?id=135010
2652
2653            Reviewed by Darin Adler.
2654
2655            This patch add a new SPI, [WKWebView _resizeWhileHidingContentWithUpdates:] to perform all the work
2656            of a dynamic viewport size update, but instead of animating the old content, it is hidden.
2657
2658            The patch is built on top of the animated resize mechanism. Instead of having an animation driving
2659            the beginning and end, we let the content do that. The dynamic resize begins, it runs for as long as
2660            the WebProcess needs, and it ends when first layer tree commit with the new content is processed.
2661
2662            The attribute "_isAnimatingResize" is generalized to support two modes of resizing: animated and
2663            hiding content.
2664
2665            The attribute "_hasCommittedLoadForMainFrame" is rather silly. It is only needed because
2666            [WKWebView _resizeWhileHidingContentWithUpdates:] is intended to be called a lot before the page
2667            is initialized, and doing an animated resize would trash the WebProcess state.
2668            I wish I had a better solution, this is not great.
2669
2670            * UIProcess/API/Cocoa/WKWebView.mm:
2671            (-[WKWebView _processDidExit]):
2672            (-[WKWebView _didCommitLoadForMainFrame]):
2673            (-[WKWebView _didCommitLayerTree:]):
2674            This is the key to make this work properly. We want _resizeWhileHidingContentWithUpdates: to behave
2675            exactly like an animated resize to avoid bugs. So we went to the whole update mechanism using
2676            _resizeAnimationTransformAdjustments to accumulate the adjustments, now we need to restore a correct
2677            view state.
2678
2679            Calling [WKWebView _endAnimatedResize] will do exactly that, but we need to make sure we do not hit
2680            the synchronization path or we would be blocked there for a while, which is what we are trying to avoid.
2681
2682            After r171154, WebPageProxy keeps track of what stage of dynamic viewport update we are in. Since we are
2683            executing the layer tree update stage, with the right transaction ID, WebPageProxy already knows we have
2684            everything we need and does not use any synchronous messages.
2685
2686            (-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:nextValidLayerTreeTransactionID:]):
2687            (-[WKWebView _restorePageStateToExposedRect:scale:]):
2688            (-[WKWebView _restorePageStateToUnobscuredCenter:scale:]):
2689            (-[WKWebView _scrollToContentOffset:]):
2690            (-[WKWebView _frameOrBoundsChanged]):
2691            (-[WKWebView _updateVisibleContentRects]):
2692            (-[WKWebView _setMinimumLayoutSizeOverride:]):
2693            (-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]):
2694            (-[WKWebView _setInterfaceOrientationOverride:]):
2695            (-[WKWebView _setMaximumUnobscuredSizeOverride:]):
2696            (-[WKWebView _beginAnimatedResizeWithUpdates:]):
2697            (-[WKWebView _endAnimatedResize]):
2698            (-[WKWebView _resizeWhileHidingContentWithUpdates:]):
2699            * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2700
27012014-07-24  Lucas Forschler  <lforschler@apple.com>
2702
2703        Merge r171509
2704
2705    2014-07-23  Simon Fraser  <simon.fraser@apple.com>
2706
2707            [iOS WK2] Some help.apple.com pages not scrollable
2708            https://bugs.webkit.org/show_bug.cgi?id=135228
2709            <rdar://problem/17790792>
2710
2711            Reviewed by Benjamin Poulain.
2712
2713            On pages which size their document to the device size, the WKContentView size
2714            never changes after it's created. In this situation, we never set a bounds
2715            on the _rootContentView, so it remains zero-sized which breaks hit testing
2716            on all enclosed UIScrollViews for overflow:scroll.
2717
2718            Fix by making the _rootContentView and the _inspectorIndicationView use autosizing
2719            so they are always the size of their parent view, and remove the explicit setting
2720            of their bounds.
2721
2722            * UIProcess/ios/WKContentView.mm:
2723            (-[WKContentView initWithFrame:context:configuration:webView:]):
2724            (-[WKContentView setShowingInspectorIndication:]):
2725            (-[WKContentView _didCommitLayerTree:]):
2726
27272014-07-24  Lucas Forschler  <lforschler@apple.com>
2728
2729        Merge r171507
2730
2731    2014-07-23  Benjamin Poulain  <bpoulain@apple.com>
2732
2733            [iOS][WK2] r171124 is incorrect when the virtual keyboard is up
2734            https://bugs.webkit.org/show_bug.cgi?id=135187
2735
2736            Reviewed by Simon Fraser.
2737
2738            Unfortunately, restricting the input into the document rect does not work.
2739            When the keyboard is up, the keyboard bounds can overlap the WKWebView, and
2740            the valid range should account for that.
2741
2742            Instead of playing with the keyboard rect, we can limit the scroll position
2743            inside the valid range of UIScrollView. The keyboard always adjusts the UIScrollView
2744            range as needed to give access to the content. Using that range is a bit more permissive
2745            because the page could scroll to reveal content in the content inset defined by the client
2746            of the API (this could actually be quite useful for hybrid apps).
2747
2748            There was already a function to change the content offset in the valid scrollview
2749            range: changeContentOffsetBoundedInValidRange(), I extracted the range check
2750            to contentOffsetBoundedInValidRange() for the needs of -[WKWebView _scrollToContentOffset:].
2751
2752            So...contentOffsetBoundedInValidRange() is cool, but it is not in the right coordinate
2753            system. The scroll position we get from the WebProcess is in document coordinates, while
2754            contentOffsetBoundedInValidRange() works with the UIScrollView coordinates.
2755            To fix that, we scale the input position to get to the same scale as UIScrollView, then
2756            apply the insets with the weirdly named [WKWebView _adjustedContentOffset:].
2757
2758            * UIProcess/API/Cocoa/WKWebView.mm:
2759            (contentOffsetBoundedInValidRange):
2760            (changeContentOffsetBoundedInValidRange):
2761            (-[WKWebView _scrollToContentOffset:]):
2762
27632014-07-24  Lucas Forschler  <lforschler@apple.com>
2764
2765        Merge r171493
2766
2767    2014-07-23  Oliver Hunt  <oliver@apple.com>
2768
2769            Add a pseudo target to create sandbox override roots
2770            https://bugs.webkit.org/show_bug.cgi?id=135216
2771            <rdar://17785560>
2772
2773            Reviewed by Alexey Proskuryakov.
2774
2775            Just a duplicate of the standard ios sandbox target, targetting
2776            the profile overrides directory.  This means we can make roots
2777            that "Just Work".
2778
2779            * WebKit2.xcodeproj/project.pbxproj:
2780
27812014-07-23  Matthew Hanson  <matthew_hanson@apple.com>
2782
2783        Merged r171490.  <rdar://problem/17739108>
2784
2785    2014-07-23  Oliver Hunt  <oliver@apple.com>
2786
2787            Incorrect commit for sandbox profile
2788            https://bugs.webkit.org/show_bug.cgi?id=135214
2789            <rdar://17739108>
2790
2791            Reviewed by Anders Carlsson.
2792
2793            * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2794
27952014-07-23  Lucas Forschler  <lforschler@apple.com>
2796
2797        Merge r171384
2798
2799    2014-07-22  Oliver Hunt  <oliver@apple.com>
2800
2801            Reduce the size of the root WebContent sandbox profile
2802            https://bugs.webkit.org/show_bug.cgi?id=135182
2803            <rdar://problem/17739108>
2804
2805            Reviewed by Alexey Proskuryakov.
2806
2807            Switch from apple-ui-app to uikit-app as the root of the webcontent
2808            profile.
2809
2810            * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2811
28122014-07-23  Lucas Forschler  <lforschler@apple.com>
2813
2814        Merge r171370
2815
2816    2014-07-22  Enrica Casucci  <enrica@apple.com>
2817
2818            REGRESSION (WebKit2): Selection inside accelerated overflow:scroll doesn't track scrolling.
2819            https://bugs.webkit.org/show_bug.cgi?id=135180
2820            <rdar://problem/16721055>
2821
2822            Reviewed by Simon Fraser.
2823
2824            Adds notifications to the WKContentView to know when scrolling starts and ends
2825            in an overflow scroll. When scrolling starts, we hide the selection and we restore
2826            it when scrolling ends, though not before the selection information in the editor
2827            state has been updated.
2828            It also adds a new method to the EditorClient class to force the
2829            selection update when scrolling is completed.
2830
2831            * UIProcess/PageClient.h:
2832            * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
2833            * UIProcess/Scrolling/RemoteScrollingTree.cpp:
2834            (WebKit::RemoteScrollingTree::scrollingTreeNodeWillStartScroll):
2835            (WebKit::RemoteScrollingTree::scrollingTreeNodeDidEndScroll):
2836            * UIProcess/Scrolling/RemoteScrollingTree.h:
2837            * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
2838            * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
2839            (-[WKOverflowScrollViewDelegate scrollViewWillBeginDragging:]):
2840            (-[WKOverflowScrollViewDelegate scrollViewDidEndDragging:willDecelerate:]):
2841            (-[WKOverflowScrollViewDelegate scrollViewDidEndDecelerating:]):
2842            (WebKit::ScrollingTreeOverflowScrollingNodeIOS::overflowScrollWillStart):
2843            (WebKit::ScrollingTreeOverflowScrollingNodeIOS::overflowScrollDidEnd):
2844            * UIProcess/WebPageProxy.h:
2845            * UIProcess/ios/PageClientImplIOS.h:
2846            * UIProcess/ios/PageClientImplIOS.mm:
2847            (WebKit::PageClientImpl::overflowScrollWillStartScroll):
2848            (WebKit::PageClientImpl::overflowScrollDidEndScroll):
2849            * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
2850            (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeWillStartScroll):
2851            (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidEndScroll):
2852            * UIProcess/ios/WKContentViewInteraction.h:
2853            * UIProcess/ios/WKContentViewInteraction.mm:
2854            (-[WKContentView _overflowScrollingWillBegin]):
2855            (-[WKContentView _overflowScrollingDidEnd]):
2856            (-[WKContentView _updateChangedSelection]):
2857            * UIProcess/ios/WebPageProxyIOS.mm:
2858            (WebKit::WebPageProxy::overflowScrollWillStartScroll):
2859            (WebKit::WebPageProxy::overflowScrollDidEndScroll):
2860            * WebProcess/WebCoreSupport/WebEditorClient.h:
2861            * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2862            * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
2863            (WebKit::WebEditorClient::updateSelection):
2864
28652014-07-23  Lucas Forschler  <lforschler@apple.com>
2866
2867        Merge r171368
2868
2869    2014-07-22  Benjamin Poulain  <bpoulain@apple.com>
2870
2871            [iOS][WK2] WebPageProxy should not do anything when responding to an animated resize is the page is not in a valid state
2872            https://bugs.webkit.org/show_bug.cgi?id=135169
2873            <rdar://problem/17740149>
2874
2875            Reviewed by Tim Horton.
2876
2877            * UIProcess/ios/WebPageProxyIOS.mm:
2878            (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
2879            Neither m_dynamicViewportSizeUpdateWaitingForTarget nor m_dynamicViewportSizeUpdateWaitingForLayerTreeCommit should
2880            be modified if there is not WebProcess to respond to DynamicViewportSizeUpdate.
2881
2882            (WebKit::WebPageProxy::synchronizeDynamicViewportUpdate):
2883            We should not attempt to synchronize anything if the page was closed before the end of the dynamic viewport
2884            update.
2885
28862014-07-23  Lucas Forschler  <lforschler@apple.com>
2887
2888        Merge r171363
2889
2890    2014-07-22  Oliver Hunt  <oliver@apple.com>
2891
2892            Remove unused com.apple.webkit.* rules from profiles
2893            https://bugs.webkit.org/show_bug.cgi?id=135174
2894            <rdar://17755931>
2895
2896            Reviewed by Anders Carlsson.
2897
2898            We never send these rules so we should just remove use of them
2899            from the profiles.
2900
2901            * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2902            * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2903
29042014-07-23  Lucas Forschler  <lforschler@apple.com>
2905
2906        Merge r171373
2907
2908    2014-07-22  Jinwoo Song  <jinwoo7.song@samsung.com>
2909
2910            Unreviewed build fix on EFL port after r171356.
2911
2912            Implement a dummy platformMediaCacheDirectory() to avoid undefined reference error.
2913
2914            * UIProcess/efl/WebContextEfl.cpp:
2915            (WebKit::WebContext::platformMediaCacheDirectory):
2916
29172014-07-23  Lucas Forschler  <lforschler@apple.com>
2918
2919        Merge r171356
2920
2921    2014-07-22  Oliver Hunt  <oliver@apple.com>
2922
2923            Provide networking process with access to its HSTS db
2924            https://bugs.webkit.org/show_bug.cgi?id=135121
2925            <rdar://17654369>
2926
2927            Reviewed by Alexey Proskuryakov.
2928
2929            Add an extension parameter to pass the hsts database file.
2930            This requires us to create the Caches/com.apple.WebKit.Networking
2931            directory in the UI process, as the network sandbox
2932            does not allow it to create the containing directory.
2933
2934            * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2935            (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
2936            * Shared/Network/NetworkProcessCreationParameters.cpp:
2937            (WebKit::NetworkProcessCreationParameters::encode):
2938            (WebKit::NetworkProcessCreationParameters::decode):
2939            * Shared/Network/NetworkProcessCreationParameters.h:
2940            * UIProcess/WebContext.cpp:
2941            (WebKit::WebContext::ensureNetworkProcess):
2942            (WebKit::WebContext::networkingHSTSDatabasePath):
2943            * UIProcess/WebContext.h:
2944            * UIProcess/mac/WebContextMac.mm:
2945            (WebKit::WebContext::platformDefaultNetworkingHSTSDatabasePath):
2946
29472014-07-23  Lucas Forschler  <lforschler@apple.com>
2948
2949        Merge r171352
2950
2951    2014-07-22  Benjamin Poulain  <bpoulain@apple.com>
2952
2953            [iOS][WK2] UI helpers that zoom on an element ignore the viewport's allowsUserScaling
2954            https://bugs.webkit.org/show_bug.cgi?id=135140
2955            <rdar://problem/17754921>
2956
2957            Reviewed by Tim Horton.
2958
2959            UIScrollView makes a difference between min/max zoom and allowUserScaling. To express that,
2960            everything is set up on the LayerTransaction.
2961
2962            For zooming related helpers (find on page, double tap to zoom, etc), the min and max zoom
2963            should be the actual min/max for the current page state.
2964
2965            This patch split the two explicitely.
2966            For layer transactions, the values are taken from the viewport configuration directly.
2967            For everything else, we should use minimumPageScaleFactor/maximumPageScaleFactor. Those two methods
2968            have been updated to take into account allowsUserScaling.
2969
2970            * WebProcess/WebPage/WebPage.cpp:
2971            (WebKit::WebPage::willCommitLayerTree):
2972            * WebProcess/WebPage/ios/WebPageIOS.mm:
2973            (WebKit::WebPage::minimumPageScaleFactor):
2974            (WebKit::WebPage::maximumPageScaleFactor):
2975            (WebKit::WebPage::getAssistedNodeInformation):
2976
2977
29782014-07-23  Lucas Forschler  <lforschler@apple.com>
2979
2980        Merge r171345
2981
2982    2014-07-22  Jeremy Jones  <jeremyj@apple.com>
2983
2984            Don't create new UIWindow for video fullscreen.
2985            https://bugs.webkit.org/show_bug.cgi?id=135038
2986
2987            Reviewed by Darin Adler.
2988
2989            Use root UIView to parent fullscreen interface.
2990
2991            * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2992            (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): pass parent UIView
2993            * WebProcess/ios/WebVideoFullscreenManager.mm:
2994            (WebKit::screenRectForNode): Use client rect instead of screen rect.
2995
29962014-07-22 Dana Burkart <dburkart@apple.com>
2997    
2998        Merge r171336.
2999
3000    2014-07-21  Benjamin Poulain  <bpoulain@apple.com>
3001
3002            [iOS][WK2] Improve event throttling for Scroll Events
3003            https://bugs.webkit.org/show_bug.cgi?id=135082
3004            <rdar://problem/17445266>
3005
3006            Reviewed by Simon Fraser.
3007
3008            In the WebKit layer, we want a measure that is representative of the responsiveness.
3009
3010            In this patch, I use the total delay between a VisibleContentRectUpdate being dispatched
3011            by the UIProcess, and the time RemoteLayerTreeDrawingArea flushes the layer tree.
3012
3013            The value used for eventThrottlingDelay() is computed by averaging the new value with
3014            the old values with a 80/20 split, favoring the old data. Favoring historical data
3015            over the last timing avoid excessively throttling for a single slow frame.
3016
3017            The computation of m_estimatedMainThreadLatency can be improved in the future, this is
3018            a first cut keeping things simple.
3019
3020            With m_estimatedMainThreadLatency in our hands, we can compute our eventThrottlingDelay().
3021            If m_estimatedMainThreadLatency is smaller than a single frame timespan, we have a fast page
3022            and nothing is throttled.
3023
3024            If is it more than a frame, we throttle such that we can at least render two frames
3025            per event dispatch based on the historical data.
3026
3027            The exact values will need some tweaking, but this set ensures well written pages get
3028            60 events per seconds, while slow pages do not waste too much time on events.
3029
3030            * WebProcess/WebCoreSupport/WebChromeClient.h:
3031            * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
3032            (WebKit::WebChromeClient::eventThrottlingDelay):
3033            * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
3034            (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
3035            (WebKit::ViewUpdateDispatcher::dispatchVisibleContentRectUpdate):
3036            * WebProcess/WebPage/ViewUpdateDispatcher.h:
3037            * WebProcess/WebPage/WebPage.cpp:
3038            (WebKit::WebPage::WebPage):
3039            (WebKit::WebPage::didFlushLayerTreeAtTime):
3040            (WebKit::WebPage::didCommitLoad):
3041            * WebProcess/WebPage/WebPage.h:
3042            * WebProcess/WebPage/ios/WebPageIOS.mm:
3043            (WebKit::WebPage::eventThrottlingDelay):
3044            (WebKit::WebPage::updateVisibleContentRects):
3045            * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3046            (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
3047
30482014-07-22 Dana Burkart <dburkart@apple.com>
3049    
3050        Merge r171329.
3051
3052    2014-07-21  Simon Fraser  <simon.fraser@apple.com>
3053
3054            REGRESSION (r170361): In landscape with UI hidden, fixed position elements at top of screen are too low
3055            https://bugs.webkit.org/show_bug.cgi?id=135141
3056            <rdar://problem/17627525>
3057
3058            Reviewed by Benjamin Poulain.
3059            
3060            We can't use the WKWebView's UIScrollView contentInsets to determine the unobscured rect
3061            in MobileSafari, because contentInsets can't be changed dynamically while scrolling.
3062            To get around this, MobileSafari sets obscured insets instead (but also sets a fixed
3063            contentInset).
3064            
3065            So if the client calls _setObscuredInsets:, always use _obscuredInsets to compute the 
3066            content insets.
3067
3068            * UIProcess/API/Cocoa/WKWebView.mm:
3069            (-[WKWebView _computedContentInset]):
3070            (-[WKWebView _setObscuredInsets:]):
3071
30722014-07-22 Dana Burkart <dburkart@apple.com>
3073    
3074        Merge r171326.
3075
3076    2014-07-21  Oliver Hunt  <oliver@apple.com>
3077
3078            Remove global cookie workaround from sandbox profiles
3079            https://bugs.webkit.org/show_bug.cgi?id=135138
3080            <rdar://17513375>
3081
3082            Reviewed by Alexey Proskuryakov.
3083
3084            Remove the workaround needed for global cookie access, and silencing
3085            of the associated sandbox violation.
3086
3087            * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
3088            * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
3089            * UIProcess/mac/WebContextMac.mm:
3090            (WebKit::WebContext::platformDefaultCookieStorageDirectory):
3091
30922014-07-22 Dana Burkart <dburkart@apple.com>
3093    
3094        Merge r171322.
3095
3096    2014-07-21  Oliver Hunt  <oliver@apple.com>
3097
3098            Correct sandbox profiles to fix some excess privileges
3099            https://bugs.webkit.org/show_bug.cgi?id=135134
3100            <rdar://problem/17741886>
3101            <rdar://problem/17739080>
3102
3103            Reviewed by Alexey Proskuryakov.
3104
3105            This cleans up our sandbox profiles to fix a few issues - the profiles
3106            no longer allow us to issue file extension we have the ability to consume,
3107            and tightens some of the other file access rules.
3108
3109            This means we have to addd some rules to allow us to access things
3110            that we previously had access to due to lax file system restrictions.
3111
3112            Some of the features were fixable simply by using entitlements on the
3113            process rather than custom rules.
3114
3115            * Configurations/WebContent-iOS.entitlements:
3116            * Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb:
3117            * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
3118            * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
3119
31202014-07-22 Dana Burkart <dburkart@apple.com>
3121    
3122        Merge r171320.
3123
3124    2014-07-21  Simon Fraser  <simon.fraser@apple.com>
3125
3126            [iOS WK2] Turn off position:fixed behavior when the keyboard is up
3127            https://bugs.webkit.org/show_bug.cgi?id=132537
3128
3129            Reviewed by Benjamin Poulain.
3130            
3131            Make interaction with form elements inside position:fixed less terrible by re-laying out
3132            fixed elements relative to the document while we have an assisted node. This ensures
3133            that all parts of a position:fixed are accessible (e.g. inputs on the right side
3134            of a fixed-width top bar).
3135            
3136            * Shared/AssistedNodeInformation.cpp: Add a flag for being inside postion:fixed,
3137            and encode/decode it.
3138            (WebKit::AssistedNodeInformation::encode):
3139            (WebKit::AssistedNodeInformation::decode):
3140            * Shared/AssistedNodeInformation.h:
3141            (WebKit::AssistedNodeInformation::AssistedNodeInformation):
3142            * UIProcess/PageClient.h: Add isAssistingNode().
3143            * UIProcess/ios/PageClientImplIOS.h:
3144            * UIProcess/ios/PageClientImplIOS.mm:
3145            (WebKit::PageClientImpl::isAssistingNode):
3146            * UIProcess/ios/WebPageProxyIOS.mm:
3147            (WebKit::WebPageProxy::computeCustomFixedPositionRect): If we have an assisted
3148            node, just use the document rect as the custom fixed position rect.
3149            * WebProcess/WebPage/ios/WebPageIOS.mm:
3150            (WebKit::WebPage::getAssistedNodeInformation): Get the selection rect first,
3151            since we have to fix it up for position:fixed. If the element is inside fixed
3152            position in the main frame, re-set the fixed position rect to the document rect
3153            (which forces a layout), re-fetch elementRect, then set it back. This ensures
3154            that the UI process gets an elementRect which it can zoom to correctly.
3155
31562014-07-22 Dana Burkart <dburkart@apple.com>
3157    
3158        Merge r171317.
3159
3160    2014-07-21  Timothy Horton  <timothy_horton@apple.com>
3161
3162            Random crashes on the Web Thread due to Timers firing on the wrong thread in the UI process
3163            https://bugs.webkit.org/show_bug.cgi?id=135132
3164            <rdar://problem/17719832>
3165
3166            Reviewed by Simon Fraser.
3167
3168            * UIProcess/ProcessThrottler.cpp:
3169            (WebKit::ProcessThrottler::ProcessThrottler):
3170            (WebKit::ProcessThrottler::suspendTimerFired):
3171            * UIProcess/ProcessThrottler.h:
3172            * UIProcess/ios/ViewGestureControllerIOS.mm:
3173            (WebKit::ViewGestureController::ViewGestureController):
3174            (WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired):
3175            * UIProcess/mac/ViewGestureController.h:
3176            * UIProcess/mac/ViewGestureControllerMac.mm:
3177            (WebKit::ViewGestureController::ViewGestureController):
3178            (WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired):
3179            We can't use WebCore timers in the UI process because of coexistence concerns
3180            (they fire on the Web Thread if there is one!), so use RunLoop::Timer instead.
3181
31822014-07-22 Dana Burkart <dburkart@apple.com>
3183    
3184        Merge r171314.
3185
3186    2014-07-21  Andy Estes  <aestes@apple.com>
3187
3188            [iOS] Handle QuickLook ResourceLoaders in the web process
3189            https://bugs.webkit.org/show_bug.cgi?id=135113
3190
3191            Reviewed by David Kilzer.
3192
3193            The QuickLook framework registers a NSURLProtocol to handle loading subresources of the HTML documents it
3194            generates. In order for these loads to succeed, we need to start them in the same process in which QuickLook
3195            generated the main resource.
3196
3197            * WebProcess/Network/WebResourceLoadScheduler.cpp:
3198            (WebKit::WebResourceLoadScheduler::scheduleLoad):
3199
32002014-07-22 Dana Burkart <dburkart@apple.com>
3201    
3202        Merge r171303.
3203
3204    2014-07-21  Brady Eidson  <beidson@apple.com>
3205
3206            DatabaseProcess doesn't relaunch after crashing.
3207            <rdar://problem/17717343> and https://bugs.webkit.org/show_bug.cgi?id=135117
3208
3209            Reviewed by Alexey Proskuryakov.
3210
3211            * UIProcess/Databases/DatabaseProcessProxy.cpp:
3212            (WebKit::DatabaseProcessProxy::didClose): Tell the WebContext.
3213
3214            * UIProcess/WebContext.cpp:
3215            (WebKit::WebContext::databaseProcessCrashed): Notify supplements, then clear the DatabaseProcessProxy pointer.
3216            * UIProcess/WebContext.h:
3217
3218            * UIProcess/WebContextSupplement.h:
3219            (WebKit::WebContextSupplement::processDidClose): Added. No users right now, but the patch in bug 135035 will need this.
3220
32212014-07-22 Dana Burkart <dburkart@apple.com>
3222    
3223        Merge r171288.
3224
3225    2014-07-20  Jeremy Jones  <jeremyj@apple.com>
3226
3227            Disable ff/rw based on canPlayFastForward and canPlayFastRewind.
3228            https://bugs.webkit.org/show_bug.cgi?id=134894
3229
3230            Reviewed by Darin Adler.
3231
3232            Add setCanPlayFastReverse
3233
3234            * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in: ditto
3235            * WebProcess/ios/WebVideoFullscreenManager.h: ditto
3236            * WebProcess/ios/WebVideoFullscreenManager.mm: ditto
3237            (WebKit::WebVideoFullscreenManager::setCanPlayFastReverse): ditto
3238
32392014-07-22 Dana Burkart <dburkart@apple.com>
3240    
3241        Merge r171286.
3242
3243    2014-07-20  Jeremy Jones  <jeremyj@apple.com>
3244
3245            Decrease flicker when enter and exit fullscreen.
3246            https://bugs.webkit.org/show_bug.cgi?id=134919
3247
3248            Reviewed by Simon Fraser.
3249
3250            Change the sequence of tear down and use transparency to prevent flicker when entering and exiting fullscreen.
3251
3252            * UIProcess/ios/WebVideoFullscreenManagerProxy.mm: wait to remove layerHost until didCleanupFullscreen
3253            (WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen): removed from here
3254            (WebKit::WebVideoFullscreenManagerProxy::didCleanupFullscreen): added here
3255            * WebProcess/ios/WebVideoFullscreenManager.mm:
3256            (WebKit::WebVideoFullscreenManager::didSetupFullscreen): use transparent background during transition
3257
32582014-07-22 Dana Burkart <dburkart@apple.com>
3259    
3260        Merge r171280.
3261
3262    2014-07-20  Dan Bernstein  <mitz@apple.com>
3263
3264            <rdar://problem/17739804> REGRESSION (r171057): Crash in WebPage::getPositionInformation()
3265            https://bugs.webkit.org/show_bug.cgi?id=135099
3266
3267            Reviewed by David Kilzer.
3268
3269            * WebProcess/WebPage/ios/WebPageIOS.mm:
3270            (WebKit::WebPage::getPositionInformation): Added a null check.
3271
32722014-07-22 Dana Burkart <dburkart@apple.com>
3273    
3274        Merge r171257.
3275
3276    2014-07-18  Oliver Hunt  <oliver@apple.com>
3277
3278            We don't provide an extension to the temp file used for uploads
3279            https://bugs.webkit.org/show_bug.cgi?id=135079
3280
3281            Reviewed by Sam Weinig.
3282
3283            Make sure didChooseFilesForOpenPanelWithDisplayStringAndIcon vends
3284            extensions for the files passed to the content process.
3285
3286            * UIProcess/WebPageProxy.cpp:
3287            (WebKit::WebPageProxy::didChooseFilesForOpenPanelWithDisplayStringAndIcon):
3288
32892014-07-22 Dana Burkart <dburkart@apple.com>
3290    
3291        Merge r171256.
3292
3293    2014-07-18  Tim Horton  <timothy_horton@apple.com>
3294
3295            ASSERTion failures in ViewGestureController indicating that we're copying WebBackForwardList
3296            https://bugs.webkit.org/show_bug.cgi?id=135080
3297            <rdar://problem/17734714>
3298
3299            Reviewed by Sam Weinig.
3300
3301            * UIProcess/ios/ViewGestureControllerIOS.mm:
3302            (WebKit::ViewGestureController::beginSwipeGesture):
3303            (WebKit::ViewGestureController::canSwipeInDirection):
3304
33052014-07-22 Dana Burkart <dburkart@apple.com>
3306    
3307        Merge r171253.
3308
3309    2014-07-18  Yongjun Zhang  <yongjun_zhang@apple.com>
3310
3311            _WKActivatedElementInfo.title should fallback to innerText if the link doesn't have title attribute.
3312            https://bugs.webkit.org/show_bug.cgi?id=135077
3313
3314            When populate InteractionInformationAtPosition's title value, use a link element's innerText if it
3315            doesn't have title attribute.
3316
3317            Reviewed by Dan Bernstein.
3318
3319            * WebProcess/WebPage/ios/WebPageIOS.mm:
3320            (WebKit::WebPage::getPositionInformation):
3321
33222014-07-22 Dana Burkart <dburkart@apple.com>
3323    
3324        Merge r171252.
3325
3326    2014-07-18  Andy Estes  <aestes@apple.com>
3327
3328            [iOS] Tapping "Allow Website" on a restricted page does not bring up the keypad
3329            https://bugs.webkit.org/show_bug.cgi?id=135072
3330            <rdar://problem/17528188>
3331
3332            Reviewed by David Kilzer.
3333
3334            * Shared/WebCoreArgumentCoders.h: Declared an ArgumentCoder for WebCore::ContentFilter.
3335            * Shared/mac/WebCoreArgumentCodersMac.mm:
3336            (IPC::ArgumentCoder<ContentFilter>::encode): Encoded the ContentFilter using a NSKeyedArchiver.
3337            (IPC::ArgumentCoder<ContentFilter>::decode): Decoded the ContentFilter using a NSKeyedUnarchiver.
3338            * UIProcess/Cocoa/WebPageProxyCocoa.mm:
3339            (WebKit::WebPageProxy::contentFilterDidBlockLoadForFrame): Called WebFrameProxy::setContentFilterForBlockedLoad().
3340            * UIProcess/WebFrameProxy.cpp:
3341            (WebKit::WebFrameProxy::didStartProvisionalLoad): Reset m_contentFilterForBlockedLoad to nullptr.
3342            (WebKit::WebFrameProxy::contentFilterDidHandleNavigationAction): Called ContentFilter::handleUnblockRequestAndDispatchIfSuccessful().
3343            If the unblock is successful, reload the WebPageProxy.
3344            * UIProcess/WebFrameProxy.h:
3345            (WebKit::WebFrameProxy::setContentFilterForBlockedLoad):
3346            * UIProcess/WebPageProxy.cpp:
3347            (WebKit::WebPageProxy::decidePolicyForNavigationAction): Check if this is navigation represents an unblock
3348            request and ignore if so.
3349            * UIProcess/WebPageProxy.h:
3350            * UIProcess/WebPageProxy.messages.in: Defined ContentFilterDidBlockLoadForFrame.
3351            * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3352            (WebKit::WebFrameLoaderClient::contentFilterDidBlockLoad): Sent ContentFilterDidBlockLoadForFrame to the WebPageProxy.
3353            * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3354
33552014-07-22 Dana Burkart <dburkart@apple.com>
3356    
3357        Merge r171250.
3358
33592014-07-18  Simon Fraser  <simon.fraser@apple.com>
3360
3361        [iOS WK2] position:fixed in iframes with programmatic scroll could end up in the wrong place
3362        https://bugs.webkit.org/show_bug.cgi?id=135078
3363        <rdar://problem/17401823>
3364
3365        Reviewed by Tim Horton.
3366        
3367        Fix the logging of requested scroll position and frame scale factor.
3368
3369        * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
3370        (WebKit::RemoteScrollingTreeTextStream::dump):
3371
33722014-07-22 Dana Burkart <dburkart@apple.com>
3373    
3374        Merge r171239.
3375
3376    2014-07-18  Tim Horton  <timothy_horton@apple.com>
3377
3378            Take navigation snapshots whenever the current back-forward item is going to change
3379            https://bugs.webkit.org/show_bug.cgi?id=135058
3380            <rdar://problem/17464515>
3381
3382            Reviewed by Dan Bernstein.
3383
3384            Instead of trying to have the UI process figure out when to take navigation snapshots by itself,
3385            snapshot whenever the Web process says that the current back-forward item is going to change.
3386            This fixes snapshotting timing with pushState, and lets us bottleneck snapshotting down to
3387            just two places instead of 5.
3388
3389            * UIProcess/WebPageProxy.cpp:
3390            (WebKit::WebPageProxy::goForward):
3391            (WebKit::WebPageProxy::goBack):
3392            (WebKit::WebPageProxy::goToBackForwardItem):
3393            (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
3394            We no longer need to special-case taking navigation snapshots
3395            when the UI process changes the back forward item or upon
3396            didStartProvisionalLoadForFrame, because we'll always snapshot
3397            in willChangeCurrentHistoryItem in all of these cases.
3398
3399            * UIProcess/WebPageProxy.cpp:
3400            (WebKit::WebPageProxy::willChangeCurrentHistoryItem):
3401            * UIProcess/WebPageProxy.h:
3402            * UIProcess/WebPageProxy.messages.in:
3403            Add willChangeCurrentHistoryItem message, which comes from the Web process.
3404            When it arrives, take a navigation snapshot.
3405
3406            * UIProcess/ios/ViewGestureControllerIOS.mm:
3407            (WebKit::ViewGestureController::beginSwipeGesture):
3408            Take the pre-swipe navigation snapshot before telling WebPageProxy that we're doing a swipe,
3409            so that it doesn't bail from taking the snapshot because we have a snapshot up.
3410
3411            (WebKit::ViewGestureController::endSwipeGesture):
3412            We no longer need to explicitly disable snapshotting while navigating, because
3413            we will avoid taking the snapshot if there's a snapshot being displayed.
3414
3415            * UIProcess/mac/ViewGestureControllerMac.mm:
3416            (WebKit::ViewGestureController::~ViewGestureController):
3417            Remove the snapshot if it's still up when ViewGestureController is destroyed.
3418            The Mac version of ViewGestureController is destroyed on Web process crashes
3419            because it is a message receiver, so it is not guaranteed to have the same
3420            lifetime as the WebPageProxy and friends.
3421
3422            (WebKit::ViewGestureController::trackSwipeGesture):
3423            Make use of recordNavigationSnapshot.
3424
3425            (WebKit::ViewGestureController::endSwipeGesture):
3426            Ditto from the Mac version.
3427
3428            * UIProcess/mac/ViewSnapshotStore.h:
3429            (WebKit::ViewSnapshotStore::disableSnapshotting): Deleted.
3430            (WebKit::ViewSnapshotStore::enableSnapshotting): Deleted.
3431            * UIProcess/mac/ViewSnapshotStore.mm:
3432            (WebKit::ViewSnapshotStore::ViewSnapshotStore):
3433            (WebKit::ViewSnapshotStore::recordSnapshot):
3434            Remove the snapshot disabling mechanism and bail from snapshotting if we're
3435            showing a snapshot, as mentioned above.
3436
3437            * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3438            (WebKit::WebFrameLoaderClient::willChangeCurrentHistoryItem):
3439            * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3440            * WebProcess/WebPage/WebPage.cpp:
3441            (WebKit::WebPage::willChangeCurrentHistoryItem):
3442            * WebProcess/WebPage/WebPage.h:
3443            Proxy willChangeCurrentHistoryItem from HistoryController to the UI process.
3444
34452014-07-22 Dana Burkart <dburkart@apple.com>
3446    
3447        Merge r171225.
3448
3449    2014-07-18  Jon Honeycutt  <jhoneycutt@apple.com>
3450
3451            REGRESSION: Crash when typing into text field that clears itself on iOS
3452
3453            <https://bugs.webkit.org/show_bug.cgi?id=135044>
3454            <rdar://problem/17640443>
3455
3456            Reviewed by Darin Adler.
3457
3458            * WebProcess/WebPage/ios/WebPageIOS.mm:
3459            (WebKit::WebPage::requestAutocorrectionData):
3460            wordRangeFromPosition() returns null in some cases; null check range
3461            before dereferencing it. Moved some variable declarations around to
3462            better match our style.
3463
34642014-07-22 Dana Burkart <dburkart@apple.com>
3465    
3466        Merge r171219.
3467
3468    2014-07-18  Tim Horton  <timothy_horton@apple.com>
3469
3470            [WK2] Provide a mechanism to grab the back-forward list for gesture navigation purposes from another WKWebView
3471            https://bugs.webkit.org/show_bug.cgi?id=134999
3472            <rdar://problem/17238025>
3473
3474            Reviewed by Sam Weinig.
3475
3476            In some cases, clients may need to throw a WKWebView with no back-forward list over
3477            another WKWebView, and want to participate in gesture swipe as if they were actually
3478            the page being overlaid.
3479
3480            * UIProcess/API/Cocoa/WKWebView.mm:
3481            (-[WKWebView setAllowsBackForwardNavigationGestures:]):
3482            * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3483            (-[WKWebViewConfiguration copyWithZone:]):
3484            (-[WKWebViewConfiguration _alternateWebViewForNavigationGestures]):
3485            (-[WKWebViewConfiguration _setAlternateWebViewForNavigationGestures:]):
3486            * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
3487            Keep an "alternate" WKWebView "for navigation gestures", which ViewGestureController
3488            will use as the real source of back-forward items, and the destination of the swipe navigation.
3489            All swipe delegate callbacks will also fire from the alternate view, because it owns the items
3490            and will be doing the navigation.
3491
3492            * UIProcess/ios/ViewGestureControllerIOS.mm:
3493            (WebKit::ViewGestureController::setAlternateBackForwardListSourceView):
3494            (WebKit::ViewGestureController::beginSwipeGesture):
3495            Send navigationGestureDidBegin via the alternate view's WebPageProxy if it exists.
3496            Record a new snapshot on the current page, but copy it to the alternate view if necessary,
3497            so that when swiping forward from the alternate view, it will have the "right" snapshot.
3498            Get the target back forward item from the alternate view.
3499            Send navigationGestureWillEnd via the alternate view's WebPageProxy if it exists.
3500
3501            (WebKit::ViewGestureController::canSwipeInDirection):
3502            Determine if we can swipe in a direction by looking at the alternate view's back-forward list if necessary.
3503
3504            (WebKit::ViewGestureController::endSwipeGesture):
3505            Send navigationGestureDidEnd via the alternate view's WebPageProxy if it exists.
3506            Perform the navigation on the alternate view if necessary.
3507
3508            (WebKit::ViewGestureController::removeSwipeSnapshot):
3509            Send navigationGestureSnapshotWasRemoved via the alternate view's WebPageProxy if it exists.
3510
3511            * UIProcess/mac/ViewGestureController.h:
3512
35132014-07-22 Dana Burkart <dburkart@apple.com>
3514    
3515        Merge r171211.
3516
3517    2014-07-17  Alexey Proskuryakov  <ap@apple.com>
3518
3519            REGRESSION (r171167): LoaderClient processDidCrash call is made after load state changes
3520            https://bugs.webkit.org/show_bug.cgi?id=135032
3521            <rdar://problem/17716602>
3522
3523            Reviewed by Dan Bernstein.
3524
3525            * UIProcess/WebPageProxy.cpp:
3526            (WebKit::WebPageProxy::processDidCrash): Create a transaction, so that the nested
3527            transaction in resetStateAfterProcessExited() wouldn't be committed.
3528            (WebKit::WebPageProxy::resetStateAfterProcessExited): Don't use auto - it was hiding
3529            the most important fact that this is a stack object that can't be simply moved to
3530            a different function.
3531
35322014-07-22 Dana Burkart <dburkart@apple.com>
3533    
3534        Merge r171167.
3535
3536    2014-07-16  Alexey Proskuryakov  <ap@apple.com>
3537
3538            A test that hangs at cleanup stage confuses webkitpy hugely
3539            https://bugs.webkit.org/show_bug.cgi?id=122475
3540            <rdar://problem/17184354>
3541
3542            Reviewed by Anders Carlsson.
3543
3544            Reset m_pageLoadState when the process exits cleanly - otherwise messages from a
3545            new process for the same WebPageProxy would hit assertions.
3546
3547            * UIProcess/WebPageProxy.cpp:
3548            (WebKit::WebPageProxy::processDidCrash):
3549            (WebKit::WebPageProxy::resetStateAfterProcessExited):
3550
35512014-07-22 Dana Burkart <dburkart@apple.com>
3552    
3553        Merge r171197.
3554
3555    2014-07-17  Brent Fulgham  <bfulgham@apple.com>
3556
3557            [Mac] Full screen video not always animating in the correct Space
3558            https://bugs.webkit.org/show_bug.cgi?id=135020
3559            <rdar://problem/17542310>
3560
3561            Reviewed by Dean Jackson.
3562
3563           The fullscreen window can "remember" the Space it was part of the first time you enter fullscreen
3564           mode. Subsequent fullscreen transitions will always start from this Space, even if you move
3565           the WebKit-hosted application to a different Space.
3566
3567           We can help the display system know when we've moved to a new Space by calling NSWindow's
3568           'orderBack' method on the fullscreen window prior to starting the transition to fullscreen mode.
3569           This method call hooks the window into the current Space so everything works properly.
3570
3571            * UIProcess/mac/WKFullScreenWindowController.mm:
3572            (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]): Add the
3573            new fullscreen window to the current Space before starting transition to fullscreen.
3574
35752014-07-22 Dana Burkart <dburkart@apple.com>
3576    
3577        Merge r171195.
3578
3579    2014-07-17  Timothy Hatcher  <timothy@apple.com>
3580
3581            Make console.profile record to the Timeline.
3582
3583            https://bugs.webkit.org/show_bug.cgi?id=134643
3584
3585            Reviewed by Joseph Pecoraro.
3586
3587            * WebProcess/WebPage/WebInspector.cpp:
3588            (WebKit::WebInspector::setJavaScriptProfilingEnabled):
3589            (WebKit::WebInspector::startJavaScriptProfiling):
3590            (WebKit::WebInspector::stopJavaScriptProfiling):
3591
35922014-07-22 Dana Burkart <dburkart@apple.com>
3593    
3594        Merge r171194.
3595
3596    2014-07-17  Brady Eidson  <beidson@apple.com>
3597
3598            Crash in ServicesOverlayController::~ServicesOverlayController.
3599            <rdar://problem/17622172> and https://bugs.webkit.org/show_bug.cgi?id=135022
3600
3601            Reviewed by Tim Horton.
3602
3603            * WebProcess/WebPage/mac/ServicesOverlayController.mm:
3604            (WebKit::ServicesOverlayController::~ServicesOverlayController): Don’t need to uninstall the
3605                PageOverlay as it has already been destroyed by this point in WebPage::~WebPage.
3606
36072014-07-22 Dana Burkart <dburkart@apple.com>
3608    
3609        Merge r171191.
3610
3611    2014-07-17  Tim Horton  <timothy_horton@apple.com>
3612
3613            Sometimes purgeable (or empty!) tiles are shown on screen when resuming the app
3614            https://bugs.webkit.org/show_bug.cgi?id=135018
3615            <rdar://problem/17615038>
3616
3617            Reviewed by Simon Fraser.
3618
3619            * UIProcess/DrawingAreaProxy.h:
3620            (WebKit::DrawingAreaProxy::hideContentUntilNextUpdate):
3621            * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
3622            * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
3623            (WebKit::RemoteLayerTreeDrawingAreaProxy::hideContentUntilNextUpdate):
3624            * UIProcess/mac/RemoteLayerTreeHost.h:
3625            * UIProcess/mac/RemoteLayerTreeHost.mm:
3626            (WebKit::RemoteLayerTreeHost::detachRootLayer):
3627            Add a mechanism to "hide" drawing area content until the next commit,
3628            by detaching the root layer. RemoteLayerTreeHost will automatically reattach
3629            it at the next commit.
3630
3631            * UIProcess/WebPageProxy.cpp:
3632            (WebKit::WebPageProxy::viewStateDidChange):
3633            * UIProcess/WebPageProxy.h:
3634            Add a parameter to viewStateDidChange specifying whether dispatching the change
3635            to the Web process is deferrable or not. We will also automatically use "Immediate" if
3636            the view is coming in-window, like we did before.
3637
3638            * UIProcess/ios/WKContentView.mm:
3639            (-[WKContentView _applicationWillEnterForeground:]):
3640            Make use of the aforementioned new mechanisms to ensure that we immediately dispatch
3641            view state changes when coming into the foreground, and will have removed the root layer
3642            if a commit didn't come in while waitForDidUpdateViewState blocks.
3643
36442014-07-22 Dana Burkart <dburkart@apple.com>
3645    
3646        Merge r171365.
3647
3648    2014-07-22  Oliver Hunt  <oliver@apple.com>
3649
3650            Add accountsd access to network sandbox profile
3651            https://bugs.webkit.org/show_bug.cgi?id=135176
3652            <rdar://17656487>
3653
3654            Reviewed by Anders Carlsson.
3655
3656            This is available to the webcontent process already, but is also
3657            needed for the networking process.
3658
3659            * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
3660
36612014-07-18  Babak Shafiei  <bshafiei@apple.com>
3662
3663        Merge r171209.
3664
3665    2014-07-17  Benjamin Poulain  <bpoulain@apple.com>
3666
3667            [iOS][WK2] Fix the updateVisibleContentRects synchronization for load after r171154
3668            https://bugs.webkit.org/show_bug.cgi?id=135036
3669
3670            Reviewed by Dan Bernstein.
3671
3672            * WebProcess/WebPage/ios/WebPageIOS.mm:
3673            (WebKit::WebPage::updateVisibleContentRects):
3674            I forgot to update one of the condition after changing from lastTransaction to next transaction
3675            in r171154.
3676
36772014-07-17  Lucas Forschler  <lforschler@apple.com>
3678
3679        Rollout r171167. <rdar://problem/17716602>
3680
36812014-07-17  Dean Jackson  <dino@apple.com>
3682
3683        <rdar://problem/17675068> Disable some features on this branch.
3684
3685        Reviewed originally by Simon Fraser.
3686
3687        Disable:
3688        - CSS_EXCLUSIONS
3689        - CSS_GRID_LAYOUT
3690        - INPUT_TYPE_COLOR
3691        - INPUT_TYPE_COLOR_POPUP
3692        - CANVAS_PATH
3693        - CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED
3694        - INDIE_UI
3695        - SHARED_WORKERS
3696        - NAVIGATOR_HWCONCURRENCY
3697        - GAMEPAD
3698        - PICTURE_SIZES
3699        - CSS3_CONDITIONAL_RULES
3700        - WILL_REVEAL_EDGE_EVENTS
3701
3702        * Configurations/FeatureDefines.xcconfig:
3703
37042014-07-16  Brady Eidson  <beidson@apple.com>
3705
3706        Reintroduce the SPI _websiteDataURLForContainerWithURL: that was removed in r171160
3707        https://bugs.webkit.org/show_bug.cgi?id=134984
3708
3709        Reviewed by David Kilzer.
3710
3711        * UIProcess/API/Cocoa/WKProcessPool.mm:
3712        (+[WKProcessPool _websiteDataURLForContainerWithURL:]):
3713        * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
3714
37152014-07-16  Alexey Proskuryakov  <ap@apple.com>
3716
3717        A test that hangs at cleanup stage confuses webkitpy hugely
3718        https://bugs.webkit.org/show_bug.cgi?id=122475
3719        <rdar://problem/17184354>
3720
3721        Reviewed by Anders Carlsson.
3722
3723        Reset m_pageLoadState when the process exits cleanly - otherwise messages from a
3724        new process for the same WebPageProxy would hit assertions.
3725
3726        * UIProcess/WebPageProxy.cpp:
3727        (WebKit::WebPageProxy::processDidCrash):
3728        (WebKit::WebPageProxy::resetStateAfterProcessExited):
3729
37302014-07-16  David Kilzer  <ddkilzer@apple.com>
3731
3732        [iOS] Update order file paths for WebKit and WebKit2
3733        <http://webkit.org/b/134993>
3734        <rdar://problem/17557776>
3735
3736        Reviewed by Darin Adler.
3737
3738        * Configurations/Base.xcconfig: Add order file for iOS
3739        named WebKit.order.
3740
37412014-07-16  Brady Eidson  <beidson@apple.com>
3742
3743        Add WebSecurityOrigin "webSecurityOriginFromDatabaseIdentifier" SPI and change _websiteDataURLForContainerWithURL: SPI
3744        <rdar://problem/17454712> and https://bugs.webkit.org/show_bug.cgi?id=134984
3745
3746        Reviewed by Dan Bernstein.
3747
3748        Change _websiteDataURLForContainerWithURL: SPI to include an optional bundle identifier argument:
3749        * UIProcess/API/Cocoa/WKProcessPool.mm:
3750        (+[WKProcessPool _websiteDataURLForContainerWithURL:bundleIdentifierIfNotInContainer:]):
3751        (+[WKProcessPool _websiteDataURLForContainerWithURL:]): Deleted.
3752        * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
3753
3754        Add a big shiny comment in a few key places:
3755        * DatabaseProcess/DatabaseProcess.cpp:
3756        (WebKit::DatabaseProcess::initializeDatabaseProcess):
3757        * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
3758        (WebKit::UniqueIDBDatabase::UniqueIDBDatabase):
3759        * UIProcess/WebContext.cpp:
3760        (WebKit::WebContext::applyPlatformSpecificConfigurationDefaults):
3761        (WebKit::WebContext::ensureDatabaseProcess):
3762
37632014-07-16  Enrica Casucci  <enrica@apple.com>
3764
3765        REGRESSION (iOS WebKit2): Cannot scroll while dragging a selection.
3766        https://bugs.webkit.org/show_bug.cgi?id=134992
3767        <rdar://problem/17528020>
3768
3769        Reviewed by Benjamin Poulain.
3770
3771        This patch exposes the scroller and the visible content rect so that
3772        UIKit can implement autoscroll when dragging the selections.
3773        It also changes that way we do hit testing to allow hit test outside
3774        the clipping region and fixes the way we compute the selection rectangle
3775        for the block selection, ensuring that we consider also non text elements
3776        like images.
3777
3778        * UIProcess/ios/WKContentViewInteraction.mm:
3779        (-[WKContentView scroller]):
3780        (-[WKContentView visibleRect]):
3781        * WebProcess/WebPage/ios/WebPageIOS.mm:
3782        (WebKit::selectionBoxForRange):
3783        (WebKit::WebPage::rangeForWebSelectionAtPosition):
3784        (WebKit::WebPage::rangeForBlockAtPoint):
3785        (WebKit::WebPage::expandedRangeFromHandle):
3786        (WebKit::WebPage::contractedRangeFromHandle):
3787        (WebKit::WebPage::computeExpandAndShrinkThresholdsForHandle):
3788        (WebKit::WebPage::changeBlockSelection):
3789
37902014-07-16  Alexey Proskuryakov  <ap@apple.com>
3791
3792        <rdar://problem/17669097> REGRESSION (r170155): Sandbox violations using a wrong
3793        CFNetwork cache path in WebContent process
3794
3795        Rubber-stamped by Sam Weinig.
3796
3797        Before r170155, we incorrectly checked usesNetworkProcess(), which always returns
3798        false at this point in initialization sequence. But we did the right thing, as we
3799        always need to set the cache path, even when network process is used for most loading.
3800
3801        * WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::platformInitializeWebProcess):
3802
38032014-07-16  Timothy Horton  <timothy_horton@apple.com>
3804
3805        Dispatch top content inset changes immediately if synchronously waiting for view state changes
3806https://bugs.webkit.org/show_bug.cgi?id=134942
3807        <rdar://problem/17666800>
3808
3809        Reviewed by Simon Fraser.
3810
3811        * UIProcess/API/mac/WKView.mm:
3812        (-[WKView _dispatchSetTopContentInset]):
3813        (-[WKView _setTopContentInset:]):
3814        Move the check from _setTopContentInset: to _dispatchSetTopContentInset
3815        that ensures that we only send the message if the top content inset changed.
3816
38172014-07-16  Benjamin Poulain  <bpoulain@apple.com>
3818
3819        [iOS][WK2] Synchronize the dynamic viewport updates with their layer tree commit
3820        https://bugs.webkit.org/show_bug.cgi?id=134965
3821        Related to <rdar://problem/17082607>
3822
3823        Reviewed by Tim Horton.
3824
3825        Dynamic viewport update relies on the _resizeAnimationTransformAdjustments being applied
3826        to the page at the new size during the transition.
3827
3828        Because of the races between the LayerTree Commit and DynamicViewportSizeUpdate, the transform
3829        can be applied to the wrong set of tiles.
3830        This is mostly a problem for unresponsive WebProcess or when the synchronization is done
3831        immediately.
3832
3833        There is at least one more case that is not handled: if synchronizeDynamicViewportUpdate()
3834        completely fails to get the new page, the UIProcess is in a somewhat messy state.
3835        I will look into that separately than the layer tree synchronization.
3836
3837        * UIProcess/API/Cocoa/WKWebView.mm:
3838        (-[WKWebView _didCommitLayerTree:]):
3839        (-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:nextValidLayerTreeTransactionID:]):
3840        (-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:]): Deleted.
3841        * UIProcess/API/Cocoa/WKWebViewInternal.h:
3842        * UIProcess/PageClient.h:
3843        * UIProcess/WebPageProxy.cpp:
3844        (WebKit::WebPageProxy::WebPageProxy):
3845        (WebKit::WebPageProxy::resetState):
3846        * UIProcess/WebPageProxy.h:
3847        * UIProcess/ios/PageClientImplIOS.h:
3848        * UIProcess/ios/PageClientImplIOS.mm:
3849        (WebKit::PageClientImpl::dynamicViewportUpdateChangedTarget):
3850        * UIProcess/ios/WebPageProxyIOS.mm:
3851        (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
3852        (WebKit::WebPageProxy::synchronizeDynamicViewportUpdate):
3853        (WebKit::WebPageProxy::didCommitLayerTree):
3854        (WebKit::WebPageProxy::dynamicViewportUpdateChangedTarget):
3855        * WebProcess/WebPage/WebPage.cpp:
3856        (WebKit::WebPage::WebPage):
3857        (WebKit::WebPage::didCommitLoad):
3858        * WebProcess/WebPage/WebPage.h:
3859        * WebProcess/WebPage/WebPage.messages.in:
3860        * WebProcess/WebPage/ios/WebPageIOS.mm:
3861        (WebKit::WebPage::synchronizeDynamicViewportUpdate):
3862        (WebKit::WebPage::updateVisibleContentRects):
3863        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
3864        (WebKit::RemoteLayerTreeDrawingArea::nextTransactionID):
3865        (WebKit::RemoteLayerTreeDrawingArea::currentTransactionID): Deleted.
3866
38672014-07-16  Dan Bernstein  <mitz@apple.com>
3868
3869        REGRESSION (r170653): Web Content service’s Info.plist has wrong format
3870        https://bugs.webkit.org/show_bug.cgi?id=134973
3871
3872        Reviewed by Alexey Proskuryakov.
3873
3874        * WebKit2.xcodeproj/project.pbxproj: Updated the Add CFBundle Localization Info.plist Key
3875        script build phases to convert Info.plist back to binary format if the
3876        PLIST_FILE_OUTPUT_FORMAT build setting requires it.
3877
38782014-07-15  Benjamin Poulain  <bpoulain@apple.com>
3879
3880        Fix r171124
3881
3882        * UIProcess/API/Cocoa/WKWebView.mm:
3883        (-[WKWebView _scrollToContentOffset:]):
3884        On landing, I changed the min/max branches to shrunkTo/expandedTo, but the return value
3885        of those was ignored.
3886
38872014-07-15  Dan Bernstein  <mitz@apple.com>
3888
3889        WKWebView’s FormClient::willSubmitForm should use CompletionHandlerCallChecker
3890        https://bugs.webkit.org/show_bug.cgi?id=134951
3891
3892        Reviewed by Tim Horton.
3893
3894        * UIProcess/API/Cocoa/WKWebView.mm:
3895        (-[WKWebView _setFormDelegate:]):
3896
38972014-07-15  Benjamin Poulain  <benjamin@webkit.org>
3898
3899        [iOS][WK2] Scrolling request from the scrolling tree must be limited to offsets in the document
3900        https://bugs.webkit.org/show_bug.cgi?id=134952
3901        <rdar://problem/17647116>
3902
3903        Reviewed by Enrica Casucci.
3904
3905        When we received a scroll request, we were taking that offset directly to set the UIScrollView
3906        scroll position. This is a problem if a page request scrolling to an invalid position, we were
3907        still doing it.
3908
3909        This patch limits the position to be inside the document.
3910
3911        -- Why not limit the scroll offset in the WebProcess when we receive the scroll request? --
3912
3913        Some pages rely on the page scale factor changing instantly, because that is how it worked
3914        on WebKit1.
3915
3916        On WebKit2, the WebProcess cannot know the valid range because the obscured insets are changing
3917        dynamically, and the page scale factor can change in response to WebProcess events (the focus
3918        changing for example). To make the page works, the WebProcess does not restrict the scroll position.
3919
3920        In that architecture, the UIProcess has to sanitize the input, which was not done before this patch.
3921
3922        -- Why not use changeContentOffsetBoundedInValidRange()?
3923
3924        The scroll offset as seen by the page is relative to the unobscured rect. While the position used
3925        for history item is a visual position. All we need in this case is a position in the view.
3926
3927        * UIProcess/API/Cocoa/WKWebView.mm:
3928        (-[WKWebView _scrollToContentOffset:]):
3929        * UIProcess/WebPageProxy.h:
3930        * UIProcess/ios/WebPageProxyIOS.mm:
3931        (WebKit::WebPageProxy::resendLastVisibleContentRects):
3932
39332014-07-15  Timothy Horton  <timothy_horton@apple.com>
3934
3935        Dispatch top content inset changes immediately if synchronously waiting for view state changes
3936        https://bugs.webkit.org/show_bug.cgi?id=134942
3937        <rdar://problem/17666800>
3938
3939        Reviewed by Simon Fraser.
3940
3941        * UIProcess/API/mac/WKView.mm:
3942        (-[WKView endDeferringViewInWindowChanges]):
3943        (-[WKView endDeferringViewInWindowChangesSync]):
3944        (-[WKView _dispatchSetTopContentInset]):
3945        (-[WKView _setTopContentInset:]):
3946        Send top content inset changes immediately before sync-waiting for new tiles from the Web Process.
3947        This will ensure that the incoming contents have the right top content inset, and we don't
3948        flash between the wrong inset and the right one.
3949
39502014-07-15  Enrica Casucci  <enrica@apple.com>
3951
3952        REGRESSION(WK2 iOS): Safari hangs when switching focus from a field using the Tab key.
3953        https://bugs.webkit.org/show_bug.cgi?id=134934
3954        <rdar://problem/17224638>
3955
3956        Reviewed by Tim Horton.
3957
3958        * UIProcess/ios/WKContentViewInteraction.mm:
3959        
3960        Tab and back tab should be handled as special keys that have
3961        a command associated. The command specifies for each key the relevant
3962        action. This patch implements the commands property to create the association
3963        between key and command and the relevant actions that will execute the same
3964        code executed when the used taps on the < > buttons in the accessory bar.
3965        
3966        (-[WKContentView keyCommands]):
3967        (-[WKContentView _nextAccessoryTab:]):
3968        (-[WKContentView _prevAccessoryTab:]):
3969
39702014-07-15  Oliver Hunt  <oliver@apple.com>
3971
3972        More tidying of the webcontent sandbox profile
3973        https://bugs.webkit.org/show_bug.cgi?id=134938
3974
3975        Reviewed by Alexey Proskuryakov.
3976
3977        Remove some excessive abilities from the profile and make
3978        the required ones explicit.
3979
3980        * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
3981
39822014-07-14  Andreas Kling  <akling@apple.com>
3983
3984        [iOS] Don't progressively re-render tiles while pinch-zooming under memory pressure.
3985        <https://webkit.org/b/134915>
3986
3987        When we're under memory pressure, the last thing we want to be doing is
3988        creating gratuitous new IOSurfaces. Just wait for the gesture to end before
3989        rendering at the new scale.
3990
3991        Reviewed by Tim Horton.
3992
3993        * WebProcess/WebPage/ios/WebPageIOS.mm:
3994        (WebKit::WebPage::updateVisibleContentRects):
3995
39962014-07-14  Joseph Pecoraro  <pecoraro@apple.com>
3997
3998        [Cocoa] _WKRemoteObjectInterface leaks NSString ivar
3999        https://bugs.webkit.org/show_bug.cgi?id=134914
4000
4001        Reviewed by Simon Fraser.
4002
4003        Release our copied NSString in dealloc.
4004
4005        * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
4006        (-[_WKRemoteObjectInterface dealloc]):
4007
40082014-07-14  Dean Jackson  <dino@apple.com>
4009
4010        [PlugIns] Check for a non-null snapshot image before trying to decode it
4011        https://bugs.webkit.org/show_bug.cgi?id=134913
4012        <rdar://problem/17606033>
4013
4014        Reviewed by Tim Horton.
4015
4016        Changeset r169820 introduced a bug where we could examine the pixels of
4017        an image (looking for solid colors) before checking if the image actually
4018        existed.
4019
4020        I added a null check, and moved the code around a bit to avoid checking
4021        for existence three times.
4022
4023        * WebProcess/Plugins/PluginView.cpp:
4024        (WebKit::PluginView::pluginSnapshotTimerFired): Check that snapshotImage exists
4025        before trying to look at it.
4026
40272014-07-14  Anders Carlsson  <andersca@apple.com>
4028
4029        Fix 32-bit build.
4030
4031        * UIProcess/Cocoa/SessionStateCoding.mm:
4032        (WebKit::encodeSessionState):
4033
40342014-07-14  Anders Carlsson  <andersca@apple.com>
4035
4036        Use the legacy session coder for encoding/decoding session state
4037        https://bugs.webkit.org/show_bug.cgi?id=134910
4038
4039        Reviewed by Beth Dakin.
4040
4041        * UIProcess/Cocoa/SessionStateCoding.mm:
4042        (WebKit::encodeSessionState):
4043        (WebKit::decodeSessionState):
4044
40452014-07-14  Oliver Hunt  <oliver@apple.com>
4046
4047        Restrict network process to remote connections
4048        https://bugs.webkit.org/show_bug.cgi?id=134908
4049
4050        Reviewed by Geoffrey Garen.
4051
4052        Further restrict network client
4053
4054        * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
4055
40562014-07-14  Tim Horton  <timothy_horton@apple.com>
4057
4058        ASSERT(isMainThread()) under OneShotDisplayLinkHandler
4059        https://bugs.webkit.org/show_bug.cgi?id=134900
4060
4061        Reviewed by Simon Fraser.
4062
4063        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
4064        (-[OneShotDisplayLinkHandler displayLinkFired:]):
4065        isMainThread means the Web thread sometimes.
4066
40672014-07-14  Tim Horton  <timothy_horton@apple.com>
4068
4069        Fix the build.
4070
4071        * UIProcess/API/Cocoa/WKWebView.mm:
4072        (-[WKWebView _frameOrBoundsChanged]):
4073        (-[WKWebView _beginAnimatedResizeWithUpdates:]):
4074        * UIProcess/API/ios/WKViewIOS.mm:
4075        (-[WKView _frameOrBoundsChanged]):
4076
40772014-07-14  Carlos Alberto Lopez Perez  <clopez@igalia.com>
4078
4079        [UNIX] Log error description when failing to create shared memory file.
4080        https://bugs.webkit.org/show_bug.cgi?id=134892
4081
4082        Reviewed by Darin Adler.
4083
4084        * Platform/unix/SharedMemoryUnix.cpp:
4085        (WebKit::SharedMemory::create): Print the string describing the error number (errno).
4086
40872014-07-14  Benjamin Poulain  <benjamin@webkit.org>
4088
4089        [iOS][WK2] On rotation, RemoteLayerTreeDrawingArea renders one extra frame at the wrong orientation
4090        https://bugs.webkit.org/show_bug.cgi?id=134875
4091
4092        Reviewed by Tim Horton.
4093
4094        On animated resize, the size of the DrawingAreaProxy was changed before the layout parameters were
4095        changed. This in turn caused the WebProcess's DrawingArea to flush the layer tree while still
4096        at the wrong orientation.
4097
4098        This patch fixes the issue by making a special case for animated resize:
4099        -While starting animated resize, _frameOrBoundsChanged can be called several times in response to
4100         the API's client changing the WKWebView. In that case, we do not update the drawing area.
4101        -After the "updateBlock" is executed and the size have been changed, the dynamic viewport update
4102         is computed, the dynamicViewportSizeUpdate is sent to the WebProcess, followed by the message
4103         DrawingArea::updateGeometry(). Since both messages are asynchronous, they are received in that
4104         order, and the updateGeometry() is always done after the viewport configuration has been updated.
4105
4106        * UIProcess/API/Cocoa/WKWebView.mm:
4107        (-[WKWebView _frameOrBoundsChanged]):
4108        (-[WKWebView _beginAnimatedResizeWithUpdates:]):
4109        * UIProcess/ios/WKContentView.h:
4110        * UIProcess/ios/WKContentView.mm:
4111        (-[WKContentView setMinimumSize:]): Deleted.
4112
41132014-07-14  Benjamin Poulain  <bpoulain@apple.com>
4114
4115        [iOS][WK2] Fix withinEpsilon()
4116        https://bugs.webkit.org/show_bug.cgi?id=134798
4117
4118        Reviewed by Darin Adler.
4119
4120        Move the function back to WKWebView, it is no longer needed in WKContentView.
4121
4122        Use the real types as input to properly verify that the two inputs are within
4123        a small value of the 32bit floating point.
4124
4125        The epsilon we use is always on 32 bits float because we want to avoid doing work for changes
4126        that would not make any difference on float.
4127
4128        The source of those small changes comes from the fact UIProcess does a lot of processing
4129        on CGFloat, which are double on 64bits architecture, while the WebProcess use 32bits floating point
4130        for scale. When we are getting updates from the WebProcess, we should ignore any small differences
4131        caused by the computations done with less precision.
4132
4133        * UIProcess/API/Cocoa/WKWebView.mm:
4134        (withinEpsilon):
4135        * UIProcess/ios/WKContentViewInteraction.h:
4136        (withinEpsilon): Deleted.
4137
41382014-07-14  Bear Travis  <betravis@adobe.com>
4139
4140        [Feature Queries] Enable Feature Queries on Mac
4141        https://bugs.webkit.org/show_bug.cgi?id=134404
4142
4143        Reviewed by Antti Koivisto.
4144
4145        Enable Feature Queries on Mac and resume running the
4146        feature tests.
4147
4148        * Configurations/FeatureDefines.xcconfig: Turn on
4149        ENABLE_CSS3_CONDITIONAL_RULES.
4150
41512014-07-14  Anders Carlsson  <andersca@apple.com>
4152
4153        Make shouldKeepCurrentBackForwardListItemInList part of WKPageLoaderClientV5 to avoid breaking ABI
4154        https://bugs.webkit.org/show_bug.cgi?id=134889
4155
4156        Reviewed by Beth Dakin.
4157
4158        * UIProcess/API/C/WKPage.cpp:
4159        * UIProcess/API/C/WKPageLoaderClient.h:
4160
41612014-07-14  Dan Bernstein  <mitz@apple.com>
4162
4163        REGRESSION (r171045): Reproducible crash on navigation in PageClientImpl::willRecordNavigationSnapshot
4164        https://bugs.webkit.org/show_bug.cgi?id=134887
4165
4166        Reviewed by Tim Horton.
4167
4168        * UIProcess/mac/PageClientImpl.mm:
4169        (WebKit::PageClientImpl::navigationGestureDidBegin): nil-check m_webView. It can be nil when
4170        the client is using WKView directly.
4171        (WebKit::PageClientImpl::navigationGestureWillEnd): Ditto.
4172        (WebKit::PageClientImpl::navigationGestureDidEnd): Ditto.
4173        (WebKit::PageClientImpl::willRecordNavigationSnapshot): Ditto.
4174
41752014-07-14  Eric Carlson  <eric.carlson@apple.com>
4176
4177        [Mac] don't enable low power audio mode on external output devices
4178        https://bugs.webkit.org/show_bug.cgi?id=134877
4179
4180        Reviewed by Sam Weinig.
4181
4182        * PluginProcess/PluginProcess.h: Add an empty implementation of 
4183            AudioHardwareListener::audioOutputDeviceChanged.
4184
41852014-07-14  Tim Horton  <timothy_horton@apple.com>
4186
4187        [iOS] Throttle painting using a UI-process-side CADisplayLink
4188        https://bugs.webkit.org/show_bug.cgi?id=134879
4189        <rdar://problem/17641699>
4190
4191        Reviewed by Simon Fraser.
4192
4193        Just waiting for CA to commit is insufficient to actually throttle to 60fps,
4194        because nothing will block the main runloop from spinning.
4195
4196        Instead, listen to a CADisplayLink, and send didUpdate to the WebProcess
4197        the first time it fires after we commit. This is not a guarantee that
4198        our content is on the screen, but we don't have any way to make that guarantee yet.
4199
4200        This will throttle painting, rAF, etc. to the display refresh rate.
4201
4202        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
4203        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
4204        (-[OneShotDisplayLinkHandler initWithDrawingAreaProxy:]):
4205        (-[OneShotDisplayLinkHandler dealloc]):
4206        (-[OneShotDisplayLinkHandler displayLinkFired:]):
4207        (-[OneShotDisplayLinkHandler invalidate]):
4208        (-[OneShotDisplayLinkHandler schedule]):
4209        (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
4210        (WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy):
4211        (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
4212        (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
4213        (WebKit::RemoteLayerTreeDrawingAreaProxy::coreAnimationDidCommitLayers): Deleted.
4214
42152014-07-14  Dan Bernstein  <mitz@apple.com>
4216
4217        <rdar://problem/17657391> [iOS] Networking process writes persistent credentials to the keychain
4218        https://bugs.webkit.org/show_bug.cgi?id=134878
4219
4220        Reviewed by Sam Weinig.
4221
4222        Route CFNetwork’s calls to Security API through to the UI process.
4223
4224        * NetworkProcess/ios/NetworkProcessIOS.mm:
4225        (WebKit::NetworkProcess::platformInitializeNetworkProcess): Initialize SecItemShim.
4226
4227        * Shared/mac/SecItemShim.cpp:
4228        (WebKit::SecItemShim::initialize): On iOS, rather than using a shim library, supply
4229        CFNetwork with alternate functions to call.
4230
4231        * Shared/mac/SecItemShim.messages.in: Removed #if !PLATFORM(IOS).
4232        * UIProcess/mac/SecItemShimProxy.messages.in: Ditto.
4233
4234        * config.h: Define ENABLE_SEC_ITEM_SHIM to 1 on iOS as well.
4235
42362014-07-14  Dan Bernstein  <mitz@apple.com>
4237
4238        <rdar://problem/17398060> NetworkProcess sometimes hangs under copyDefaultCredentialForProtectionSpace
4239        https://bugs.webkit.org/show_bug.cgi?id=134666
4240
4241        Reviewed by Tim Horton.
4242
4243        A SecItem may have an attribute whose value is a SecAccessControlRef, which is not supported
4244        by ArgumentCodersCF. In debug builds, trying to encode a CFDictionary containing a value of
4245        unsupprted type causes an assertion to fail, but in release builds encoding succeeds, and
4246        only decoding fails, in this case silently, simply not delivering the
4247        SecItemShim::secItemResponse message.
4248
4249        The fix is to teach ArgumentCodersCF about SecAccessControlRef.
4250
4251        * Shared/cf/ArgumentCodersCF.cpp:
4252        (IPC::typeFromCFTypeRef): Check for the SecAccessControlRef type.
4253        (IPC::encode): Encode the SecAccessControl serialized into CFData.
4254        (IPC::decode): Deserialize a SecAccessControl from the decoded CFData.
4255        * Shared/cf/ArgumentCodersCF.h:
4256        * config.h: Defined HAVE_SEC_ACCESS_CONTROL.
4257
42582014-07-13  Dan Bernstein  <mitz@apple.com>
4259
4260        <rdar://problem/17295636> [Cocoa] Include element snapshot in _WKActivatedElementInfo
4261        https://bugs.webkit.org/show_bug.cgi?id=134872
4262
4263        Reviewed by Sam Weinig.
4264
4265        * Shared/InteractionInformationAtPosition.cpp:
4266        (WebKit::InteractionInformationAtPosition::encode): Encode the image if there is one.
4267        (WebKit::InteractionInformationAtPosition::decode): Decode the image if there is one.
4268        * Shared/InteractionInformationAtPosition.h: Added an image member to the struct.
4269
4270        * UIProcess/API/Cocoa/_WKActivatedElementInfo.h: Exposed the boundingRect property and added
4271        an image property.
4272        * UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:
4273        (-[_WKActivatedElementInfo _initWithType:URL:location:title:rect:image:]): Added an image
4274        parameter, which is stored in a new ivar.
4275        (-[_WKActivatedElementInfo image]): Added this getter, which converts the ShareableBitmap
4276        into a cached Cocoa image and returns it.
4277        * UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h: Added image parameter to the
4278        initializer, removed _boundingRect property declaration from here.
4279
4280        * UIProcess/ios/WKActionSheetAssistant.mm:
4281        (-[WKActionSheetAssistant showImageSheet]): Pass the image from the position information
4282        into the _WKActivatedElementInfo initializer.
4283        (-[WKActionSheetAssistant showLinkSheet]): Ditto.
4284
4285        * WebProcess/WebPage/WebPage.cpp:
4286        (WebKit::WebPage::snapshotNode): Added.
4287        * WebProcess/WebPage/WebPage.h:
4288
4289        * WebProcess/WebPage/ios/WebPageIOS.mm:
4290        (WebKit::WebPage::getPositionInformation): If the element is a link or an image, store a
4291        snapshot of it in the image member of the InteractionInformationAtPosition.
4292
42932014-07-13  Dan Bernstein  <mitz@apple.com>
4294
4295        [Cocoa] Clean up session state API a little
4296        https://bugs.webkit.org/show_bug.cgi?id=134871
4297
4298        Reviewed by Darin Adler.
4299
4300        * UIProcess/API/Cocoa/WKWebView.mm:
4301        (-[WKWebView _sessionState]):
4302        (-[WKWebView _restoreFromSessionState:]): Deleted.
4303        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
4304
43052014-07-13  Javier Fernandez  <jfernandez@igalia.com>
4306
4307        REGRESSION(r171045) [GTK] Build broken.
4308        https://bugs.webkit.org/show_bug.cgi?id=134867
4309
4310        Unreviewed GTK build fix after r171045.
4311
4312        * UIProcess/API/gtk/PageClientImpl.cpp:
4313        (WebKit::PageClientImpl::willRecordNavigationSnapshot):
4314        * UIProcess/API/gtk/PageClientImpl.h:
4315
43162014-07-13  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
4317
4318        Unreviewed, EFL build fix since r171045.
4319
4320        * UIProcess/CoordinatedGraphics/WebView.h:
4321
43222014-07-12  Dan Bernstein  <mitz@apple.com>
4323
4324        [Cocoa] Notify the client when a navigation snapshot is taken
4325        https://bugs.webkit.org/show_bug.cgi?id=134865
4326
4327        Reviewed by Sam Weinig.
4328
4329        * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new delegate method.
4330
4331        * UIProcess/Cocoa/NavigationState.h:
4332        * UIProcess/Cocoa/NavigationState.mm:
4333        (WebKit::NavigationState::setNavigationDelegate): Initialize new flag in
4334        m_navigationDelegateMethods.
4335        (WebKit::NavigationState::willRecordNavigationSnapshot): Added. Calls the new
4336        WKNavigationDelegate method.
4337
4338        * UIProcess/PageClient.h: Declared new client function.
4339
4340        * UIProcess/WebPageProxy.cpp:
4341        (WebKit::WebPageProxy::willRecordNavigationSnapshot): Added. Calls the new client function.
4342        * UIProcess/WebPageProxy.h:
4343
4344        * UIProcess/ios/PageClientImplIOS.h:
4345        * UIProcess/ios/PageClientImplIOS.mm:
4346        (WebKit::PageClientImpl::willRecordNavigationSnapshot): Override that calls
4347        NavigationState::willRecordNavigationSnapshot.
4348
4349        * UIProcess/mac/PageClientImpl.h:
4350        * UIProcess/mac/PageClientImpl.mm:
4351        (WebKit::PageClientImpl::willRecordNavigationSnapshot): Ditto.
4352
4353        * UIProcess/mac/ViewSnapshotStore.mm:
4354        (WebKit::ViewSnapshotStore::recordSnapshot): Added a call to
4355        WebPageProxy::willRecordNavigationSnapshot.
4356
43572014-07-12  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
4358
4359        Unreviewed, fix EFL build break since r171034.
4360
4361        * UIProcess/CoordinatedGraphics/WebView.h:
4362        * UIProcess/efl/WebContextEfl.cpp:
4363        (WebKit::WebContext::platformMediaCacheDirectory):
4364
43652014-07-12  Darin Adler  <darin@apple.com>
4366
4367        Try to fix 32-bit Mac build.
4368
4369        * UIProcess/mac/PageClientImpl.mm:
4370        (WebKit::PageClientImpl::navigationGestureDidBegin): Added WK_API_ENABLED conditional.
4371        (WebKit::PageClientImpl::navigationGestureWillEnd): Ditto.
4372        (WebKit::PageClientImpl::navigationGestureDidEnd): Ditto.
4373
43742014-07-12  Javier Fernandez  <jfernandez@igalia.com>
4375
4376        REGRESSION(r171034) [GTK] Build broken.
4377        https://bugs.webkit.org/show_bug.cgi?id=134861
4378
4379        Unreviewed GTK build fix.
4380
4381        * UIProcess/API/gtk/PageClientImpl.cpp:
4382        (WebKit::PageClientImpl::navigationGestureDidBegin):
4383        (WebKit::PageClientImpl::navigationGestureWillEnd):
4384        (WebKit::PageClientImpl::navigationGestureDidEnd):
4385        * UIProcess/API/gtk/PageClientImpl.h:
4386
43872014-07-12  Javier Fernandez  <jfernandez@igalia.com>
4388
4389        REGRESSION(r171024) [GTK] Build broken.
4390        https://bugs.webkit.org/show_bug.cgi?id=134859
4391
4392        Unreviewed GTK build fix.
4393
4394        * UIProcess/gtk/WebContextGtk.cpp:
4395        (WebKit::WebContext::platformMediaCacheDirectory):
4396
43972014-07-12  Dan Bernstein  <mitz@apple.com>
4398
4399        <rdar://problem/16020380> [Cocoa] Inform the client when back-forward navigation gestures begin and end
4400        https://bugs.webkit.org/show_bug.cgi?id=134853
4401
4402        Reviewed by Sam Weinig.
4403
4404        * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new WKNavigationDelegate
4405        methods.
4406
4407        * UIProcess/API/Cocoa/WKWebView.mm:
4408        (-[WKWebView _isShowingNavigationGestureSnapshot]): Added this getter.
4409
4410        * UIProcess/API/Cocoa/WKWebViewPrivate.h: Declared new property
4411        _isShowingNavigationGestureSnapshot.
4412
4413        * UIProcess/Cocoa/NavigationState.h:
4414        * UIProcess/Cocoa/NavigationState.mm:
4415        (WebKit::NavigationState::setNavigationDelegate): Initialize new flags in
4416        m_navigationDelegateMethods.
4417        (WebKit::NavigationState::navigationGestureDidBegin): Added. Calls the new
4418        WKNavigationDelegate method.
4419        (WebKit::NavigationState::navigationGestureWillEnd): Ditto.
4420        (WebKit::NavigationState::navigationGestureDidEnd): Ditto.
4421
4422        * UIProcess/PageClient.h: Declared new client functions.
4423
4424        * UIProcess/WebPageProxy.cpp:
4425        (WebKit::WebPageProxy::WebPageProxy): Initialize new member variable.
4426        (WebKit::WebPageProxy::navigationGestureDidBegin): Set m_isShowingNavigationGestureSnapshot
4427        and call the new client function.
4428        (WebKit::WebPageProxy::navigationGestureWillEnd): Call the new client function.
4429        (WebKit::WebPageProxy::navigationGestureDidEnd): Ditto.
4430        (WebKit::WebPageProxy::navigationGestureSnapshotWasRemoved): Clear
4431        m_isShowingNavigationGestureSnapshot.
4432        * UIProcess/WebPageProxy.h:
4433        (WebKit::WebPageProxy::isShowingNavigationGestureSnapshot): Added this getter.
4434
4435        * UIProcess/ios/PageClientImplIOS.h: Declared overrides of new client functions.
4436        * UIProcess/ios/PageClientImplIOS.mm:
4437        (WebKit::PageClientImpl::navigationGestureDidBegin): Override that calls the new
4438        NavigationState function.
4439        (WebKit::PageClientImpl::navigationGestureWillEnd): Ditto.
4440        (WebKit::PageClientImpl::navigationGestureDidEnd): Ditto.
4441
4442        * UIProcess/ios/ViewGestureControllerIOS.mm:
4443        (WebKit::ViewGestureController::beginSwipeGesture): Added calls to
4444        WebPageProxy::navigationGestureDidBegin and WebPageProxy::navigationGestureWillEnd.
4445        (WebKit::ViewGestureController::endSwipeGesture): Added calls to
4446        WebPageProxy::navigationGestureDidEnd.
4447        (WebKit::ViewGestureController::removeSwipeSnapshot): Added call to
4448        WebPageProxy::navigationGestureSnapshotWasRemoved.
4449
4450        * UIProcess/mac/PageClientImpl.h: Declared overrides of new client functions.
4451        * UIProcess/mac/PageClientImpl.mm:
4452        (WebKit::PageClientImpl::navigationGestureDidBegin): Override that calls the new
4453        NavigationState function.
4454        (WebKit::PageClientImpl::navigationGestureWillEnd): Ditto.
4455        (WebKit::PageClientImpl::navigationGestureDidEnd): Ditto.
4456
4457        * UIProcess/mac/ViewGestureControllerMac.mm:
4458        (WebKit::ViewGestureController::beginSwipeGesture): Added call to
4459        WebPageProxy::navigationGestureDidBegin.
4460        (WebKit::ViewGestureController::endSwipeGesture): Added calls to
4461        WebPageProxy::navigationGestureDidEnd.
4462        (WebKit::ViewGestureController::removeSwipeSnapshot): Added call to
4463        WebPageProxy::navigationGestureSnapshotWasRemoved.
4464
44652014-07-12  Oliver Hunt  <oliver@apple.com>
4466
4467        Fix typo in prior patch
4468        https://bugs.webkit.org/show_bug.cgi?id=134858
4469
4470        Reviewed by Sam Weinig.
4471
4472        Fix typo
4473
4474        * UIProcess/mac/WebContextMac.mm:
4475        (WebKit::WebContext::platformDefaultCookieStorageDirectory):
4476
44772014-07-12  Dan Bernstein  <mitz@apple.com>
4478
4479        [Cocoa] Client is not notified of same-document navigations
4480        https://bugs.webkit.org/show_bug.cgi?id=134855
4481
4482        Reviewed by Sam Weinig.
4483
4484        * UIProcess/API/APILoaderClient.h:
4485        (API::LoaderClient::didSameDocumentNavigationForFrame): Added navigationID parameter.
4486
4487        * UIProcess/API/C/WKPage.cpp:
4488        (WKPageSetPageLoaderClient): Ditto.
4489
4490        * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Added new enum and delegate method.
4491
4492        * UIProcess/Cocoa/NavigationState.h: Declare override of
4493        API::LoaderClient::didSameDocumentNavigationForFrame. Added flag in
4494        m_navigationDelegateMethods struct.
4495        * UIProcess/Cocoa/NavigationState.mm:
4496        (WebKit::NavigationState::setNavigationDelegate): Initialize new m_navigationDelegateMethods
4497        flag.
4498        (WebKit::toWKSameDocumentNavigationType): Added this helper to convert from internal to API
4499        values.
4500        (WebKit::NavigationState::LoaderClient::didSameDocumentNavigationForFrame): Override to call
4501        the delegate method, if implemented.
4502
4503        * UIProcess/WebPageProxy.cpp:
4504        (WebKit::WebPageProxy::didSameDocumentNavigationForFrame): Added navigationID parameter,
4505        which is forwarded to the client.
4506        * UIProcess/WebPageProxy.h: Added navigationID parameter.
4507        * UIProcess/WebPageProxy.messages.in: Ditto.
4508
4509        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
4510        (WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage): Send the navigation ID.
4511        (WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage): Ditto.
4512        (WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage): Ditto.
4513        (WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage): Ditto.
4514
45152014-07-12  Oliver Hunt  <oliver@apple.com>
4516
4517        Extend WebContent sandbox to allow some extra access for frameworks
4518        https://bugs.webkit.org/show_bug.cgi?id=134844
4519
4520        Reviewed by Sam Weinig.
4521
4522        Open up the webcontent sandbox a bit so that some external frameworks
4523        can work correctly.
4524
4525        * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
4526        * Shared/WebProcessCreationParameters.cpp:
4527        (WebKit::WebProcessCreationParameters::encode):
4528        (WebKit::WebProcessCreationParameters::decode):
4529        * Shared/WebProcessCreationParameters.h:
4530        * UIProcess/WebContext.cpp:
4531        (WebKit::WebContext::createNewWebProcess):
4532        (WebKit::WebContext::mediaCacheDirectory):
4533        * UIProcess/WebContext.h:
4534        * UIProcess/mac/WebContextMac.mm:
4535        (WebKit::WebContext::platformMediaCacheDirectory):
4536        * WebProcess/cocoa/WebProcessCocoa.mm:
4537        (WebKit::WebProcess::platformInitializeWebProcess):
4538
45392014-07-12  Oliver Hunt  <oliver@apple.com>
4540
4541        Temporary work around for <rdar://<rdar://problem/17513375>
4542        https://bugs.webkit.org/show_bug.cgi?id=134848
4543
4544        Reviewed by Sam Weinig.
4545
4546        Temporarily work around <rdar://<rdar://problem/17513375> by
4547        dropping the explicit cookie storage if it points out of the
4548        container.
4549
4550        * UIProcess/mac/WebContextMac.mm:
4551        (WebKit::WebContext::platformDefaultCookieStorageDirectory):
4552
45532014-07-11  Enrica Casucci  <enrica@apple.com>
4554
4555        Implement textStylingAtPosition in WK2.
4556        https://bugs.webkit.org/show_bug.cgi?id=134843
4557        <rdar://problem/17614981>
4558
4559        Reviewed by Benjamin Poulain.
4560
4561        Adding information about typing attributes to EditorState so
4562        that we can implement textStylingAtPosition.
4563
4564        * Shared/EditorState.cpp:
4565        (WebKit::EditorState::encode):
4566        (WebKit::EditorState::decode):
4567        * Shared/EditorState.h:
4568        (WebKit::EditorState::EditorState):
4569        * UIProcess/ios/WKContentViewInteraction.mm:
4570        (-[WKContentView textStylingAtPosition:inDirection:]):
4571        (-[WKContentView canPerformAction:withSender:]):
4572        (-[WKContentView toggleBoldface:]):
4573        (-[WKContentView toggleItalics:]):
4574        (-[WKContentView toggleUnderline:]):
4575        * WebProcess/WebPage/WebPage.cpp:
4576        (WebKit::WebPage::editorState):
4577
45782014-07-11  Oliver Hunt  <oliver@apple.com>
4579
4580        Tighten WebContent sandbox
4581        https://bugs.webkit.org/show_bug.cgi?id=134834
4582
4583        Reviewed by Sam Weinig.
4584
4585        Define a much tighter sandbox profile for the WebContent process
4586
4587        * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
4588
45892014-07-11  Antti Koivisto  <antti@apple.com>
4590
4591        REGRESSION (r170163?): Web content shifts revealing space equivalent to the find bar when clicking a link while a phrase is targeted via Cmd+F
4592        https://bugs.webkit.org/show_bug.cgi?id=134833
4593        <rdar://problem/17580021>
4594
4595        Reviewed by Zalan Bujtas.
4596        
4597        Some versions of OS X Safari can't handle the new unfreeze timing. Revert back to DidFirstLayout on Mac.
4598
4599        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
4600        (WebKit::WebFrameLoaderClient::dispatchDidLayout):
4601
46022014-07-11  Zalan Bujtas  <zalan@apple.com>
4603
4604        Subpixel layout: return integral results for offset*, client*, scroll* by default.
4605        https://bugs.webkit.org/show_bug.cgi?id=134651
4606
4607        Reviewed by Simon Fraser.
4608
4609        Revert to returning integral values for Element.offset* client* scroll* by default.
4610        Fractional values break number of sites(tight design) and JS frameworks(fail to handle fractional values).
4611
4612        Since snapped dimension depends on both the original point and the width/height of the box,
4613        we need to call RenderBoxModelObject::pixelSnapped*() helpers, instead of round().
4614
4615        Covered by existing tests
4616
4617        * Shared/WebPreferencesDefinitions.h:
4618        * UIProcess/API/C/WKPreferencesRefPrivate.h:
4619
46202014-07-10  Jinwoo Song  <jinwoo7.song@samsung.com>
4621
4622        Unreviewed EFL build fix after r170970.
4623
4624        * UIProcess/efl/WebContextEfl.cpp:
4625        (WebKit::WebContext::platformDefaultOpenGLCacheDirectory):
4626
46272014-07-10  Carlos Alberto Lopez Perez  <clopez@igalia.com>
4628
4629        REGRESSION(r170970) REGRESSION(r170974): [GTK] Build broken.
4630        https://bugs.webkit.org/show_bug.cgi?id=134825
4631
4632        Unreviewed GTK build fix.
4633
4634        * Shared/SessionState.h: Put ifdefs for ViewSnapshot on Mac port.
4635        * Shared/WebBackForwardListItem.h: Idem.
4636        * UIProcess/gtk/WebContextGtk.cpp:
4637        (WebKit::WebContext::platformDefaultOpenGLCacheDirectory): Implement skeleton.
4638
46392014-07-10  Benjamin Poulain  <bpoulain@apple.com>
4640
4641        [iOS][WK2] It should be safe to call WKContentViewInteraction's cleanupInteraction multiple times
4642        https://bugs.webkit.org/show_bug.cgi?id=134820
4643
4644        Reviewed by Andreas Kling.
4645
4646        If a view is destroyed just after a crash, "cleanupInteraction" is called twice: once on crash,
4647        once on dealloc.
4648
4649        The code handling _interactionViewsContainerView is using KVO to monitor transform changes. It is not safe
4650        to remove the observer if we are not already observing on that view.
4651
4652        To solve the problem, this patch makes the cleanup actually remove the view so that setup and cleanup
4653        are completely symmetrical. If cleanup is called twice, the second time would not enter the branch because
4654        the view is already nil.
4655
4656        * UIProcess/ios/WKContentViewInteraction.mm:
4657        (-[WKContentView setupInteraction]):
4658        (-[WKContentView cleanupInteraction]):
4659
46602014-07-10  Simon Fraser  <simon.fraser@apple.com>
4661
4662        [iOS WK2] Move WKInspectorHighlightView to its own file
4663        https://bugs.webkit.org/show_bug.cgi?id=134819
4664
4665        Reviewed by Joseph Pecoraro.
4666        
4667        WKInspectorHighlightView brought a lot of path/quad-related code into WKContentView.mm,
4668        so move it into its own file.
4669
4670        * UIProcess/WKInspectorHighlightView.h: Added.
4671        * UIProcess/WKInspectorHighlightView.mm: Added.
4672        (-[WKInspectorHighlightView dealloc]):
4673        (-[WKInspectorHighlightView _removeAllLayers]):
4674        (-[WKInspectorHighlightView _createLayers:]):
4675        (findIntersectionOnLineBetweenPoints):
4676        (quadIntersection):
4677        (layerPathWithHole):
4678        (layerPath):
4679        (-[WKInspectorHighlightView _layoutForNodeHighlight:]):
4680        (-[WKInspectorHighlightView _layoutForRectsHighlight:]):
4681        (-[WKInspectorHighlightView update:]):
4682        * UIProcess/ios/WKContentView.mm:
4683        (-[WKInspectorHighlightView initWithFrame:]): Deleted.
4684        (-[WKInspectorHighlightView dealloc]): Deleted.
4685        (-[WKInspectorHighlightView _removeAllLayers]): Deleted.
4686        (-[WKInspectorHighlightView _createLayers:]): Deleted.
4687        (findIntersectionOnLineBetweenPoints): Deleted.
4688        (quadIntersection): Deleted.
4689        (layerPathWithHole): Deleted.
4690        (layerPath): Deleted.
4691        (-[WKInspectorHighlightView _layoutForNodeHighlight:]): Deleted.
4692        (-[WKInspectorHighlightView _layoutForRectsHighlight:]): Deleted.
4693        (-[WKInspectorHighlightView update:]): Deleted.
4694        * WebKit2.xcodeproj/project.pbxproj:
4695
46962014-07-10  Tim Horton  <timothy_horton@apple.com>
4697
4698        REGRESSION (r170935): WKWebView is always transparent until the first layer tree commit
4699        https://bugs.webkit.org/show_bug.cgi?id=134818
4700        <rdar://problem/17632468>
4701
4702        Reviewed by Anders Carlsson.
4703
4704        * UIProcess/API/Cocoa/WKWebView.mm:
4705        (scrollViewBackgroundColor):
4706        r170935 made it so that we would initialize the scroll view background color to an
4707        invalid color until the first layer tree commit. We should go with white instead.
4708
47092014-07-10  Enrica Casucci  <enrica@apple.com>
4710
4711        Add a mechanism to notify the UIProcess when an editing command is done executing.
4712        https://bugs.webkit.org/show_bug.cgi?id=134807
4713
4714        Reviewed by Tim Horton.
4715
4716        Some editing commands have an effect on some parts of the system that
4717        run inside the UIProcess. A good example are the cursor movement commands
4718        that require an update of the autocorrection/autosuggestion machinery.
4719        This patch adds a way to reliably know when the command has been executed
4720        in the WebProcess. A previous attempt at solving this problem was added in
4721        r170858 and was partially reverted in r170948.
4722        The change also removes the selectionWillChange notification added in r170858.
4723
4724        * UIProcess/PageClient.h:
4725        * UIProcess/WebPageProxy.cpp:
4726        (WebKit::WebPageProxy::editorStateChanged):
4727        * UIProcess/WebPageProxy.h:
4728        * UIProcess/ios/PageClientImplIOS.h:
4729        * UIProcess/ios/PageClientImplIOS.mm:
4730        (WebKit::PageClientImpl::selectionWillChange): Deleted.
4731        * UIProcess/ios/WKContentViewInteraction.h:
4732        * UIProcess/ios/WKContentViewInteraction.mm:
4733        (-[WKContentView executeEditCommandWithCallback:]):
4734        (-[WKContentView _moveUp:withHistory:]):
4735        (-[WKContentView _moveDown:withHistory:]):
4736        (-[WKContentView _moveLeft:withHistory:]):
4737        (-[WKContentView _moveRight:withHistory:]):
4738        (-[WKContentView _moveToStartOfWord:withHistory:]):
4739        (-[WKContentView _moveToStartOfParagraph:withHistory:]):
4740        (-[WKContentView _moveToStartOfLine:withHistory:]):
4741        (-[WKContentView _moveToStartOfDocument:withHistory:]):
4742        (-[WKContentView _moveToEndOfWord:withHistory:]):
4743        (-[WKContentView _moveToEndOfParagraph:withHistory:]):
4744        (-[WKContentView _moveToEndOfLine:withHistory:]):
4745        (-[WKContentView _moveToEndOfDocument:withHistory:]):
4746        (-[WKContentView _selectionWillChange]): Deleted.
4747        * UIProcess/ios/WebPageProxyIOS.mm:
4748        (WebKit::WebPageProxy::executeEditCommand):
4749        (WebKit::WebPageProxy::notifySelectionWillChange): Deleted.
4750        * WebProcess/WebPage/WebPage.h:
4751        * WebProcess/WebPage/WebPage.messages.in:
4752        * WebProcess/WebPage/ios/WebPageIOS.mm:
4753        (WebKit::WebPage::executeEditCommandWithCallback):
4754
47552014-07-10  Joseph Pecoraro  <pecoraro@apple.com>
4756
4757        [Mac] NSWindow warning: adding an unknown subview opening detached Inspector
4758        https://bugs.webkit.org/show_bug.cgi?id=134813
4759
4760        Reviewed by Timothy Hatcher.
4761
4762        * UIProcess/mac/WebInspectorProxyMac.mm:
4763        (WebKit::WebInspectorProxy::createInspectorWindow):
4764        Use a selector that will avoid the warning message.
4765
47662014-07-10  Oliver Hunt  <oliver@apple.com>
4767
4768        Remove use of container relative restrictions in the network process sandbox
4769        https://bugs.webkit.org/show_bug.cgi?id=134816
4770
4771        Reviewed by Anders Carlsson.
4772
4773        As i'm tidying up the various sandboxes and that's meaning we
4774        need to reduce some file restrictions in the network process.
4775
4776        * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
4777
47782014-07-10  Pratik Solanki  <psolanki@apple.com>
4779
4780        Unreviewed iOS build fix after r170974. Define id if building a non ObjC file.
4781
4782        * UIProcess/mac/ViewSnapshotStore.h:
4783
47842014-07-10  Tim Horton  <timothy_horton@apple.com>
4785
4786        Store ViewSnapshots directly on the WebBackForwardListItem
4787        https://bugs.webkit.org/show_bug.cgi?id=134667
4788        <rdar://problem/17082639>
4789
4790        Reviewed by Dan Bernstein.
4791
4792        Make ViewSnapshot a refcounted class. Store it directly on the back-forward item
4793        instead of in a side map referenced by UUID. Switch to a very simple LRU eviction model for now.
4794        This fixes a ton of snapshot management bugs; for example, we would start throwing out snapshots
4795        in the page that was actively being interacted with *first* when evicting snapshots, instead of
4796        preferring older snapshots. Additionally, we would not throw away snapshots when back forward items
4797        became unreachable.
4798
4799        There is definitely room for improvement of the eviction mechanism, but this is closer to a time-tested implementation.
4800
4801        * Shared/SessionState.h:
4802        Keep a ViewSnapshot instead of a UUID on the BackForwardListItemState.
4803
4804        * Shared/WebBackForwardListItem.h:
4805        Fix some indented namespace contents.
4806
4807        (WebKit::WebBackForwardListItem::snapshot):
4808        (WebKit::WebBackForwardListItem::setSnapshot):
4809        (WebKit::WebBackForwardListItem::setSnapshotUUID): Deleted.
4810        (WebKit::WebBackForwardListItem::snapshotUUID): Deleted.
4811        Switch the snapshot getter/setter to operate on ViewSnapshots instead of UUIDs.
4812
4813        * UIProcess/API/Cocoa/WKWebView.mm:
4814        (-[WKWebView _takeViewSnapshot]):
4815        * UIProcess/API/Cocoa/WKWebViewInternal.h:
4816        * UIProcess/API/mac/WKView.mm:
4817        (-[WKView _takeViewSnapshot]):
4818        * UIProcess/API/mac/WKViewInternal.h:
4819        * UIProcess/PageClient.h:
4820        * UIProcess/WebPageProxy.cpp:
4821        (WebKit::WebPageProxy::takeViewSnapshot):
4822        * UIProcess/WebPageProxy.h:
4823        * UIProcess/ios/PageClientImplIOS.h:
4824        * UIProcess/ios/PageClientImplIOS.mm:
4825        (WebKit::PageClientImpl::takeViewSnapshot):
4826        * UIProcess/mac/PageClientImpl.h:
4827        * UIProcess/mac/PageClientImpl.mm:
4828        (WebKit::PageClientImpl::takeViewSnapshot):
4829        Adopt ViewSnapshot::create, return a PassRefPtr, and class-ify ViewSnapshot.
4830
4831        * UIProcess/ios/ViewGestureControllerIOS.mm:
4832        (WebKit::ViewGestureController::beginSwipeGesture):
4833        (WebKit::ViewGestureController::endSwipeGesture):
4834        * UIProcess/mac/ViewGestureController.h:
4835        * UIProcess/mac/ViewGestureControllerMac.mm:
4836        (WebKit::ViewGestureController::shouldUseSnapshotForSize):
4837        (WebKit::ViewGestureController::beginSwipeGesture):
4838        (WebKit::ViewGestureController::endSwipeGesture):
4839        Grab the ViewSnapshot directly from the WebBackForwardListItem, and adopt the new functions.
4840
4841        * UIProcess/ios/WebMemoryPressureHandlerIOS.mm:
4842        (WebKit::WebMemoryPressureHandler::WebMemoryPressureHandler):
4843        Rename discardSnapshots to discardSnapshotImages, because we're really only discarding
4844        the images; the render tree size/background color "snapshot" remains and is useful.
4845
4846        * UIProcess/mac/ViewSnapshotStore.h:
4847        (WebKit::ViewSnapshot::setRenderTreeSize):
4848        (WebKit::ViewSnapshot::renderTreeSize):
4849        (WebKit::ViewSnapshot::setBackgroundColor):
4850        (WebKit::ViewSnapshot::backgroundColor):
4851        (WebKit::ViewSnapshot::setDeviceScaleFactor):
4852        (WebKit::ViewSnapshot::deviceScaleFactor):
4853        (WebKit::ViewSnapshot::imageSizeInBytes):
4854        (WebKit::ViewSnapshot::surface):
4855        (WebKit::ViewSnapshot::size):
4856        (WebKit::ViewSnapshot::creationTime):
4857        Make ViewSnapshot a refcounted class.
4858        Add create functions which take an image (or slot ID), and relevant sizes.
4859        It is expected that a ViewSnapshot is created with an image, and it is only possible
4860        to remove that image, never to replace it. A new ViewSnapshot is required in that case.
4861        Add setters for things that ViewSnapshotStore sets on the snapshot after the PageClient
4862        retrieves it from the view. Add getters for things that the ViewGestureControllers need.
4863
4864        Remove removeSnapshotImage, getSnapshot, and the snapshot map.
4865
4866        * UIProcess/mac/ViewSnapshotStore.mm:
4867        (WebKit::ViewSnapshotStore::~ViewSnapshotStore):
4868        (WebKit::ViewSnapshotStore::didAddImageToSnapshot):
4869        (WebKit::ViewSnapshotStore::willRemoveImageFromSnapshot):
4870        Manage m_snapshotCacheSize and m_snapshotsWithImages via didAddImageToSnapshot and willRemoveImageFromSnapshot.
4871        willRemoveImageFromSnapshot will -always- be called before the ViewSnapshot is destroyed.
4872
4873        (WebKit::ViewSnapshotStore::pruneSnapshots):
4874        Switch to a simple LRU eviction model. As previously mentioned, it's possible to do better, but
4875        this is much less broken than the previous implementation.
4876
4877        (WebKit::ViewSnapshotStore::recordSnapshot):
4878        (WebKit::ViewSnapshotStore::discardSnapshotImages):
4879        (WebKit::ViewSnapshot::create):
4880        (WebKit::ViewSnapshot::ViewSnapshot):
4881        (WebKit::ViewSnapshot::~ViewSnapshot):
4882        (WebKit::ViewSnapshot::hasImage):
4883        (WebKit::ViewSnapshot::clearImage):
4884        (WebKit::ViewSnapshot::asLayerContents):
4885        If a surface is Empty when it comes back from being volatile, throw away the surface
4886        and notify the Store to remove it from m_snapshotCacheSize (via clearImage()).
4887
4888        (WebKit::ViewSnapshotStore::removeSnapshotImage): Deleted.
4889        (WebKit::ViewSnapshotStore::getSnapshot): Deleted.
4890        (WebKit::ViewSnapshotStore::discardSnapshots): Deleted.
4891
48922014-07-10  Beth Dakin  <bdakin@apple.com>
4893
4894        Need Setting/WKPreference that allows clients to prevent scrollbars from drawing 
4895        on a secondary thread
4896        https://bugs.webkit.org/show_bug.cgi?id=134778
4897        -and corresponding-
4898        <rdar://problem/17595333>
4899
4900        Reviewed by Tim Horton.
4901
4902        This is a requirement for some types of performance tests.
4903
4904        New pref.
4905        * Shared/WebPreferencesDefinitions.h:
4906
4907        PDFPlugin has to implement this new ScrollableArea virtual function to indicate 
4908        the Setting’s value.
4909        * WebProcess/Plugins/PDF/PDFPlugin.h:
4910        * WebProcess/Plugins/PDF/PDFPlugin.mm:
4911        (WebKit::PDFPlugin::forceUpdateScrollbarsOnMainThreadForPerformanceTesting):
4912
4913        New pref.
4914        * WebProcess/WebPage/WebPage.cpp:
4915        (WebKit::WebPage::updatePreferences):
4916
49172014-07-10  Tim Horton  <timothy_horton@apple.com>
4918
4919        [iOS] Frequent assertion failures when swiping back
4920
4921        Reviewed by Dan Bernstein.
4922
4923        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
4924        (WebKit::RemoteLayerTreeDrawingAreaProxy::dispatchAfterEnsuringDrawing):
4925        Don't create an unused VoidCallback. It will assert when destroyed without being called.
4926
49272014-07-10  Oliver Hunt  <oliver@apple.com>
4928
4929        Pass sandbox extension for GL cache over to webprocess
4930        https://bugs.webkit.org/show_bug.cgi?id=134806
4931
4932        Reviewed by Anders Carlsson.
4933
4934        Add additional WebProcess parameters to pass an extension
4935        that allows access to the opengl cache directory in the
4936        host application's container.
4937
4938        * Shared/WebProcessCreationParameters.cpp:
4939        (WebKit::WebProcessCreationParameters::encode):
4940        (WebKit::WebProcessCreationParameters::decode):
4941        * Shared/WebProcessCreationParameters.h:
4942        * UIProcess/WebContext.cpp:
4943        (WebKit::WebContext::createNewWebProcess):
4944        (WebKit::WebContext::openGLCacheDirectory):
4945        * UIProcess/WebContext.h:
4946        * UIProcess/mac/WebContextMac.mm:
4947        (WebKit::WebContext::platformDefaultOpenGLCacheDirectory):
4948        * WebProcess/cocoa/WebProcessCocoa.mm:
4949        (WebKit::WebProcess::platformInitializeWebProcess):
4950
49512014-07-10  Dan Bernstein  <mitz@apple.com>
4952
4953        iOS build fix.
4954
4955        * WebProcess/WebPage/ServicesOverlayController.h:
4956
49572014-07-09  Brady Eidson  <beidson@apple.com>
4958
4959        Phone number highlights should always be visible if the mouse hovers over.
4960        <rdar://problem/17527476> and https://bugs.webkit.org/show_bug.cgi?id=134784
4961
4962        Reviewed by Tim Horton.
4963
4964        This is a fairly extensive rewrite of ServicesOverlayController.
4965        It allows one selection highlight for the entire selection, and as many telephone number highlights as there are numbers.
4966        If a telephone number highlight is hovered over, it wins and is painted.
4967        If no telephone number highlight is hovered but the selection highlight is, then it is painted.
4968       
4969        The purposes of each method are self evident by their name, and the concepts are mostly the same as they used to be.
4970
4971        The exception is establishHoveredTelephoneHighlight which gets a more detailed explanation below.
4972        
4973        * Platform/Logging.h: Add a Services logging channel.
4974
4975        * WebProcess/WebPage/ServicesOverlayController.h:
4976        (WebKit::TelephoneNumberData::TelephoneNumberData):
4977
4978        * WebProcess/WebPage/mac/ServicesOverlayController.mm:
4979        (WebKit::ServicesOverlayController::ServicesOverlayController):
4980        (WebKit::ServicesOverlayController::selectionRectsDidChange):
4981        (WebKit::ServicesOverlayController::selectedTelephoneNumberRangesChanged):
4982        (WebKit::ServicesOverlayController::clearHighlightState):
4983        (WebKit::ServicesOverlayController::drawRect):
4984        (WebKit::ServicesOverlayController::drawSelectionHighlight):
4985        (WebKit::ServicesOverlayController::maybeDrawTelephoneNumberHighlight):
4986        (WebKit::ServicesOverlayController::drawHighlight):
4987        (WebKit::ServicesOverlayController::clearSelectionHighlight):
4988        (WebKit::ServicesOverlayController::clearHoveredTelephoneNumberHighlight):
4989        (WebKit::ServicesOverlayController::establishHoveredTelephoneHighlight): Starts walking the telephone number ranges and
4990            creating a highlight for each one that doesn’t already have a highlight. If that highlight is also being hovered by
4991            the mouse, then it is set as the hovered telephone number highlight and the method stops creating new highlights.
4992        (WebKit::ServicesOverlayController::maybeCreateSelectionHighlight):
4993        (WebKit::ServicesOverlayController::mouseEvent):
4994        (WebKit::ServicesOverlayController::handleClick):
4995        (WebKit::ServicesOverlayController::drawTelephoneNumberHighlight): Deleted.
4996        (WebKit::ServicesOverlayController::drawCurrentHighlight): Deleted.
4997
49982014-07-10  Timothy Horton  <timothy_horton@apple.com>
4999
5000        Assertions or crashes under _takeViewSnapshot when restoring windows
5001        https://bugs.webkit.org/show_bug.cgi?id=134792
5002
5003        Reviewed by Simon Fraser.
5004
5005        * UIProcess/API/mac/WKView.mm:
5006        (-[WKView _takeViewSnapshot]):
5007        Taking a window-server snapshot of a non-visible window tends to not succeed.
5008
50092014-07-09  Pratik Solanki  <psolanki@apple.com>
5010
5011        Buffer CSS and JS resources in network process before sending over to web process
5012        https://bugs.webkit.org/show_bug.cgi?id=134560
5013        <rdar://problem/16737186>
5014
5015        Reviewed by Antti Koivisto.
5016
5017        For CSS and JS resources, ask the network process to buffer the entire resource instead of
5018        sending it to web process in chunks since the web process can't do anything with a partial
5019        css or js file.
5020
5021        * NetworkProcess/NetworkResourceLoader.cpp:
5022        (WebKit::NetworkResourceLoader::NetworkResourceLoader):
5023        * Shared/Network/NetworkResourceLoadParameters.cpp:
5024        (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
5025        (WebKit::NetworkResourceLoadParameters::encode):
5026        (WebKit::NetworkResourceLoadParameters::decode):
5027        * Shared/Network/NetworkResourceLoadParameters.h:
5028        * WebProcess/Network/WebResourceLoadScheduler.cpp:
5029        (WebKit::WebResourceLoadScheduler::scheduleLoad):
5030
50312014-07-09  Benjamin Poulain  <bpoulain@apple.com>
5032
5033        [iOS][WK2] Disable text quantization while actively changing the page's scale factor
5034        https://bugs.webkit.org/show_bug.cgi?id=134781
5035
5036        Reviewed by Tim Horton and Myles C. Maxfield.
5037
5038        While zooming a page, text quantization causes glyphs to "move" in order to get to the closest
5039        boundary for the current scale factor.
5040
5041        We do not want this to happen while dynamically changing the scale factor because the effect
5042        is visible. To avoid this, we disable text quantization if the page's scale factor changes
5043        in response to a non-stable contentRect update.
5044
5045        * WebProcess/WebCoreSupport/WebChromeClient.h:
5046        * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
5047        (WebKit::WebChromeClient::hasStablePageScaleFactor):
5048        * WebProcess/WebPage/WebPage.cpp:
5049        (WebKit::WebPage::WebPage):
5050        * WebProcess/WebPage/WebPage.h:
5051        (WebKit::WebPage::hasStablePageScaleFactor):
5052        * WebProcess/WebPage/ios/WebPageIOS.mm:
5053        (WebKit::WebPage::updateVisibleContentRects):
5054
50552014-07-09  Joseph Pecoraro  <pecoraro@apple.com>
5056
5057        [iOS] Use UIAlertController API in WKFileUploadPanel instead of SPI
5058        https://bugs.webkit.org/show_bug.cgi?id=134777
5059
5060        Reviewed by Sam Weinig.
5061
5062        * UIProcess/ios/forms/WKFileUploadPanel.mm:
5063        (-[WKFileUploadPanel _showMediaSourceSelectionSheet]):
5064
50652014-07-09  Shivakumar JM  <shiva.jm@samsung.com>
5066
5067        [EFL][WK2] Add new Public API in ewk_download_job.h to get size of the data already downloaded.
5068        https://bugs.webkit.org/show_bug.cgi?id=134759
5069
5070        Reviewed by Gyuyoung Kim.
5071
5072        Add new API in ewk_download_job.h to get size of the data already downloaded.
5073
5074        * UIProcess/API/efl/ewk_download_job.cpp:
5075        (ewk_download_job_received_data_length_get):
5076        (EwkDownloadJob::receivedData):
5077        * UIProcess/API/efl/ewk_download_job.h:
5078        * UIProcess/API/efl/ewk_download_job_private.h:
5079        * UIProcess/API/efl/tests/test_ewk2_download_job.cpp:
5080        (EWK2DownloadJobTest::on_download_requested):
5081        (EWK2DownloadJobTest::on_download_finished):
5082
50832014-07-09  Enrica Casucci  <enrica@apple.com>
5084
5085        REGRESSION(r170858): Safari freezes upon making a search on a website (yelp.com).
5086        https://bugs.webkit.org/show_bug.cgi?id=134791
5087        <rdar://problem/17616971>
5088
5089        Reviewed by Benjamin Poulain.
5090
5091        After r170858 we notify the keyboard too often about
5092        the changed selection. This patch removes the notification
5093        until we find a better way to do it that doesn't cause
5094        deadlocks.
5095
5096        * UIProcess/ios/WKContentViewInteraction.mm:
5097        (-[WKContentView _selectionWillChange]):
5098        (-[WKContentView _selectionChanged]):
5099
51002014-07-09  Anders Carlsson  <andersca@apple.com>
5101
5102        Safari showing blank pages
5103        https://bugs.webkit.org/show_bug.cgi?id=134790
5104        <rdar://problem/17617166>
5105
5106        Reviewed by Simon Fraser.
5107
5108        * UIProcess/API/Cocoa/WKWebView.mm:
5109        (-[WKWebView initWithFrame:configuration:]):
5110        Make sure to add the content view to the scroll view.
5111
51122014-07-09  Anders Carlsson  <andersca@apple.com>
5113
5114        Closed web views should never create new web processes
5115        https://bugs.webkit.org/show_bug.cgi?id=134787
5116        <rdar://problem/16892526>
5117
5118        Reviewed by Simon Fraser.
5119
5120        * UIProcess/API/Cocoa/WKWebView.mm:
5121        (-[WKWebView loadHTMLString:baseURL:]):
5122        (-[WKWebView reload]):
5123        (-[WKWebView reloadFromOrigin]):
5124        Return nil if the returned navigation ID is 0.
5125
5126        * UIProcess/WebPageProxy.cpp:
5127        (WebKit::WebPageProxy::reattachToWebProcess):
5128        Assert that the page is not closed.
5129
5130        (WebKit::WebPageProxy::reattachToWebProcessWithItem):
5131        (WebKit::WebPageProxy::loadRequest):
5132        (WebKit::WebPageProxy::loadFile):
5133        (WebKit::WebPageProxy::loadData):
5134        (WebKit::WebPageProxy::loadHTMLString):
5135        (WebKit::WebPageProxy::loadAlternateHTMLString):
5136        (WebKit::WebPageProxy::loadPlainTextString):
5137        (WebKit::WebPageProxy::loadWebArchiveData):
5138        Add early returns if the page is closed.
5139
5140        * UIProcess/WebPageProxy.h:
5141
51422014-07-09  Anders Carlsson  <andersca@apple.com>
5143
5144        Support transparent WKWebViews
5145        https://bugs.webkit.org/show_bug.cgi?id=134779
5146        <rdar://problem/17351058>
5147
5148        Reviewed by Tim Horton.
5149
5150        * UIProcess/API/Cocoa/WKWebView.mm:
5151        (-[WKWebView initWithFrame:configuration:]):
5152        Call _updateScrollViewBackground instead of setting the background color.
5153
5154        (contentZoomScale):
5155        Use dot notation.
5156
5157        (scrollViewBackgroundColor):
5158        Helper function that returns the scroll view background color. 
5159        If the web view isn't opaque, we want the scroll view to be transparent.
5160
5161        (-[WKWebView _updateScrollViewBackground]):
5162        Call scrollViewBackgroundColor.
5163
5164        (-[WKWebView setOpaque:]):
5165        Call WebPageProxy::setDrawsBackground and update the scroll view background.
5166
5167        (-[WKWebView setBackgroundColor:]):
5168        Call setBackgroundColor on the content view.
5169
51702014-07-09  Andy Estes  <aestes@apple.com>
5171
5172        [iOS] WebKit can crash under QuickLookDocumentData::encode() when viewing a QuickLook preview
5173        https://bugs.webkit.org/show_bug.cgi?id=134780
5174
5175        Reviewed by Tim Horton.
5176
5177        Don't use CFDataCreateWithBytesNoCopy() when we can't guarantee the lifetime of the copied-from DataReference
5178        will match or exceed that of the CFDataRef. Copy the data instead.
5179
5180        * WebProcess/Network/WebResourceLoader.cpp:
5181        (WebKit::WebResourceLoader::didReceiveData):
5182
51832014-07-09  Pratik Solanki  <psolanki@apple.com>
5184
5185        Move resource buffering from SynchronousNetworkLoaderClient to NetworkResourceLoader
5186        https://bugs.webkit.org/show_bug.cgi?id=134732
5187
5188        Reviewed by Darin Adler.
5189
5190        Buffer the resource in NetworkResourceLoader instead of SynchronousNetworkLoaderClient. This
5191        is in preparation for bug 134560 where we will be supporting JS and CSS resource buffering
5192        that uses AsynchronousNetworkLoaderClient.
5193
5194        * NetworkProcess/NetworkResourceLoader.cpp:
5195        (WebKit::NetworkResourceLoader::NetworkResourceLoader):
5196        (WebKit::NetworkResourceLoader::didReceiveBuffer):
5197        (WebKit::NetworkResourceLoader::didFinishLoading):
5198        * NetworkProcess/NetworkResourceLoader.h:
5199        (WebKit::NetworkResourceLoader::bufferedData):
5200        * NetworkProcess/SynchronousNetworkLoaderClient.cpp:
5201        (WebKit::SynchronousNetworkLoaderClient::didReceiveBuffer):
5202        (WebKit::SynchronousNetworkLoaderClient::didFinishLoading):
5203        (WebKit::SynchronousNetworkLoaderClient::didFail):
5204        (WebKit::SynchronousNetworkLoaderClient::sendDelayedReply):
5205        * NetworkProcess/SynchronousNetworkLoaderClient.h:
5206
52072014-07-09  Benjamin Poulain  <bpoulain@apple.com>
5208
5209        [iOS][WK2] subviews of the unscaled view drift out during CA animations
5210        https://bugs.webkit.org/show_bug.cgi?id=134751
5211
5212        Reviewed by Enrica Casucci.
5213
5214        It is not possible to animate the WKContentView and the inverse view in such a way
5215        that the combined matrix remain the identity for every frame of the animation.
5216
5217        This patch solves the issue by moving the unscaled view as a sibling of WKContentView
5218        instead of a child so that we do not need to update two scales simultaneously.
5219
5220        * UIProcess/API/Cocoa/WKWebView.mm:
5221        (-[WKWebView initWithFrame:configuration:]):
5222        (-[WKWebView _processDidExit]):
5223        (-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:]):
5224        Set the z scale to 1 or no coordinate transform will work with this view.
5225
5226        (-[WKWebView _beginAnimatedResizeWithUpdates:]):
5227        (-[WKWebView _endAnimatedResize]):
5228        * UIProcess/ios/WKContentView.mm:
5229        (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
5230        * UIProcess/ios/WKContentViewInteraction.h:
5231        * UIProcess/ios/WKContentViewInteraction.mm:
5232        (-[WKContentView setupInteraction]):
5233        Since we need to observe changes inside the animation block, the code now use KVO to observe changes of scale.
5234
5235        (-[WKContentView cleanupInteraction]):
5236        (-[WKContentView unscaledView]):
5237        (-[WKContentView inverseScale]):
5238        (-[WKContentView observeValueForKeyPath:ofObject:change:context:]):
5239        We update the utility views as usual. The extra bits here are to deal with views coming in during an animation.
5240
5241        If a new utility view comes in during a scaling animation, we do not want to start a new animation with the same curve
5242        to end up at the right place. To avoid any issue, we just hide the view until the animation is finished.
5243
5244        (-[WKContentView hitTest:withEvent:]):
5245        (-[WKContentView _showTapHighlight]):
5246        (-[WKContentView _updateUnscaledView]): Deleted.
5247
52482014-07-09  Tim Horton  <timothy_horton@apple.com>
5249
5250        Use IOSurface ViewSnapshots everywhere on Mac, remove JPEG encoding path
5251        https://bugs.webkit.org/show_bug.cgi?id=134773
5252
5253        Reviewed by Anders Carlsson.
5254
5255        * UIProcess/API/mac/WKView.mm:
5256        (-[WKView _takeViewSnapshot]):
5257        * UIProcess/mac/ViewSnapshotStore.h:
5258        * UIProcess/mac/ViewSnapshotStore.mm:
5259        (WebKit::ViewSnapshotStore::ViewSnapshotStore):
5260        (WebKit::ViewSnapshotStore::~ViewSnapshotStore):
5261        (WebKit::ViewSnapshotStore::recordSnapshot):
5262        (WebKit::ViewSnapshot::clearImage):
5263        (WebKit::ViewSnapshot::asLayerContents):
5264        (WebKit::createIOSurfaceFromImage): Deleted.
5265        (WebKit::compressImageAsJPEG): Deleted.
5266        (WebKit::ViewSnapshotStore::reduceSnapshotMemoryCost): Deleted.
5267        (WebKit::ViewSnapshotStore::didCompressSnapshot): Deleted.
5268        Remove all ViewSnapshot(Store) code related to JPEG-encoded snapshots.
5269        Remove the "image" member on ViewSnapshot; Mac will always start out with an IOSurface instead.
5270        Adopt WebCore::IOSurface::createFromImage to make that happen.
5271        Add a comment noting that if a snapshot comes back empty, we should throw it away completely.
5272
52732014-07-09  Anders Carlsson  <andersca@apple.com>
5274
5275        RemoteLayerBackingStore::ensureBackingStore should ensure that the entire backing store gets redrawn
5276        https://bugs.webkit.org/show_bug.cgi?id=134772
5277
5278        Reviewed by Tim Horton.
5279
5280        * Shared/mac/RemoteLayerBackingStore.h:
5281        (WebKit::RemoteLayerBackingStore::Buffer::operator bool):
5282        * Shared/mac/RemoteLayerBackingStore.mm:
5283        (WebKit::RemoteLayerBackingStore::ensureBackingStore):
5284
52852014-07-09  KwangHyuk Kim  <hyuki.kim@samsung.com>
5286
5287        [EFL] Fix crash caused by invalid cursor image.
5288        https://bugs.webkit.org/show_bug.cgi?id=134663
5289
5290        Reviewed by Gyuyoung Kim.
5291
5292        Remove calling of updateCursor since the custom cursor image is invalid once a mouse is out of the webview.
5293
5294        * UIProcess/API/efl/EwkView.cpp:
5295        (EwkViewEventHandler<EVAS_CALLBACK_MOUSE_IN>::handleEvent):
5296
52972014-07-08  Tim Horton  <timothy_horton@apple.com>
5298
5299        Remove WebBackForwardListItems when their owning page goes away
5300        https://bugs.webkit.org/show_bug.cgi?id=134709
5301        <rdar://problem/17584645>
5302
5303        Reviewed by Dan Bernstein.
5304
5305        * Shared/WebBackForwardListItem.cpp:
5306        (WebKit::WebBackForwardListItem::create):
5307        (WebKit::WebBackForwardListItem::WebBackForwardListItem):
5308        * Shared/WebBackForwardListItem.h:
5309        (WebKit::WebBackForwardListItem::pageID):
5310        Add the associated PageID to the WebBackForwardListItem.
5311
5312        * UIProcess/WebBackForwardList.cpp:
5313        (WebKit::WebBackForwardList::restoreFromState):
5314        Push the current PageID onto the WebBackForwardListItem.
5315
5316        * UIProcess/WebProcessProxy.cpp:
5317        (WebKit::WebProcessProxy::removeWebPage):
5318        Remove all of the WebBackForwardListItems from m_backForwardListItemMap when
5319        the page they are associated with is removed.
5320
5321        (WebKit::WebProcessProxy::addBackForwardItem):
5322        Push the PageID from the WebProcess onto the WebBackForwardListItem.
5323
5324        * UIProcess/WebProcessProxy.h:
5325        * UIProcess/WebProcessProxy.messages.in:
5326        * WebProcess/WebPage/WebBackForwardListProxy.cpp:
5327        (WebKit::idToHistoryItemMap):
5328        (WebKit::historyItemToIDMap):
5329        (WebKit::updateBackForwardItem):
5330        (WebKit::WebBackForwardListProxy::addItemFromUIProcess):
5331        (WebKit::WK2NotifyHistoryItemChanged):
5332        (WebKit::WebBackForwardListProxy::idForItem):
5333        (WebKit::WebBackForwardListProxy::addItem):
5334        (WebKit::WebBackForwardListProxy::goToItem):
5335        (WebKit::WebBackForwardListProxy::close):
5336        * WebProcess/WebPage/WebBackForwardListProxy.h:
5337        * WebProcess/WebPage/WebPage.cpp:
5338        (WebKit::WebPage::restoreSession):
5339        Keep track of the PageID that back-forward items were created by.
5340        Pass the PageID along when registering WebBackForwardListItems.
5341
53422014-07-08  Tim Horton  <timothy_horton@apple.com>
5343
5344        [WK2] Expose a few drawing/compositing settings on WKPreferences(Private)
5345        https://bugs.webkit.org/show_bug.cgi?id=134645
5346
5347        Reviewed by Dan Bernstein.
5348
5349        * UIProcess/API/Cocoa/WKPreferences.mm:
5350        (-[WKPreferences _compositingBordersVisible]):
5351        (-[WKPreferences _setCompositingBordersVisible:]):
5352        (-[WKPreferences _compositingRepaintCountersVisible]):
5353        (-[WKPreferences _setCompositingRepaintCountersVisible:]):
5354        (-[WKPreferences _tiledScrollingIndicatorVisible]):
5355        (-[WKPreferences _setTiledScrollingIndicatorVisible:]):
5356        * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
5357        Expose layer borders, repaint counters, and the tiled scrolling indicator on WKPreferences, as SPI.
5358
53592014-07-08  Tim Horton  <timothy_horton@apple.com>
5360
5361        WKProcessPoolConfigurationPrivate's maximumProcessCount property has no effect
5362        https://bugs.webkit.org/show_bug.cgi?id=134711
5363
5364        Reviewed by Dan Bernstein.
5365
5366        * UIProcess/API/Cocoa/WKProcessPool.mm:
5367        (-[WKProcessPool _initWithConfiguration:]):
5368        Respect the maximumProcessCount.
5369        Currently the default limit is UINT_MAX; if maximumProcessCount = 0 (the default), we'll use that limit.
5370
53712014-07-08  Adrian Perez de Castro  <aperez@igalia.com>
5372
5373        [GTK] Move user style sheet API out of WebKitWebViewGroup
5374        https://bugs.webkit.org/show_bug.cgi?id=134551
5375
5376        Reviewed by Carlos Garcia Campos.
5377
5378        * PlatformGTK.cmake: Include the new source files in the build.
5379        * UIProcess/API/C/gtk/WKView.cpp:
5380        (WKViewCreate):
5381        Adapt to the additional webkitWebViewBaseCreateWebPage() parameter.
5382        * UIProcess/API/gtk/WebKitUserContent.cpp: Added.
5383        (toUserContentInjectedFrames):
5384        (toUserStyleLevel):
5385        (toStringVector):
5386        (_WebKitUserStyleSheet::_WebKitUserStyleSheet):
5387        (webkit_user_style_sheet_ref):
5388        (webkit_user_style_sheet_unref):
5389        (webkit_user_style_sheet_new):
5390        (webkitWebKitUserStyleSheetToUserStyleSheet):
5391        * UIProcess/API/gtk/WebKitUserContent.h: Added.
5392        * UIProcess/API/gtk/WebKitUserContentManager.cpp: Added.
5393        (_WebKitUserContentManagerPrivate::_WebKitUserContentManagerPrivate):
5394        (webkit_user_content_manager_class_init):
5395        (webkit_user_content_manager_new):
5396        (webkit_user_content_manager_add_style_sheet):
5397        (webkit_user_content_manager_remove_all_style_sheets):
5398        (webkitUserContentManagerGetUserContentControllerProxy):
5399        * UIProcess/API/gtk/WebKitUserContentManager.h: Added.
5400        * UIProcess/API/gtk/WebKitUserContentManagerPrivate.h: Added.
5401        * UIProcess/API/gtk/WebKitUserContentPrivate.h: Added.
5402        * UIProcess/API/gtk/WebKitWebContext.cpp:
5403        (webkitWebContextCreatePageForWebView): Add a new parameter to allow
5404        passing the WebKitUserContentManager that the web view will use.
5405        * UIProcess/API/gtk/WebKitWebContextPrivate.h: Ditto.
5406        * UIProcess/API/gtk/WebKitWebView.cpp:
5407        (webkitWebViewConstructed): Added handling of the
5408        "user-content-manager" property on construction.
5409        (webkitWebViewSetProperty): Added support for the
5410        "user-content-manager" property.
5411        (webkitWebViewGetProperty): Added support for the
5412        "user-content-manager" property.
5413        (webkit_web_view_class_init): Added the "user-content-manager"
5414        property definition to the WebKitWebView class.
5415        (webkit_web_view_new_with_related_view): Made related views share
5416        the same WebKitUserContentManager used by the view they are
5417        related to.
5418        (webkit_web_view_new_with_user_content_manager): Added.
5419        (webkit_web_view_get_user_content_manager): Added.
5420        * UIProcess/API/gtk/WebKitWebView.h: Add new API methods.
5421        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
5422        (webkitWebViewBaseCreate): Added a parameter to pass the user
5423        content manager.
5424        (webkitWebViewBaseCreateWebPage): Added a parameter to pass the user
5425        content manager.
5426        * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: Ditto.
5427        * UIProcess/API/gtk/WebKitWebViewGroup.cpp: Removed the bits related
5428        to user style sheet support from WebKitWebViewGroup.
5429        (webkit_web_view_group_set_settings):
5430        (toAPIArray): Deleted.
5431        (webkit_web_view_group_add_user_style_sheet): Deleted.
5432        (webkit_web_view_group_remove_all_user_style_sheets): Deleted.
5433        * UIProcess/API/gtk/WebKitWebViewGroup.h: Deleted the API methods
5434        for user style sheet handling.
5435        * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Added the new API
5436        functions and types, and removed the methods which are no longer
5437        available in WebKitWebViewGroup.
5438        * UIProcess/API/gtk/webkit2.h: Add the new headers.
5439        * UIProcess/UserContent/WebUserContentControllerProxy.cpp: Added
5440        methods to add and remove user style sheets, alike those used for
5441        user scripts.
5442        (WebKit::WebUserContentControllerProxy::addProcess):
5443        (WebKit::WebUserContentControllerProxy::addUserStyleSheet):
5444        (WebKit::WebUserContentControllerProxy::removeAllUserStyleSheets):
5445        * UIProcess/UserContent/WebUserContentControllerProxy.h: Ditto.
5446        * UIProcess/gtk/WebInspectorProxyGtk.cpp:
5447        (WebKit::WebInspectorProxy::platformCreateInspectorPage):
5448        Adapt to the additional webkitWebViewBaseCreateWebPage() parameter.
5449        * WebProcess/UserContent/WebUserContentController.cpp: Added methods
5450        to add and remove user style sheets, alike those used for user scripts.
5451        (WebKit::WebUserContentController::addUserStyleSheets):
5452        (WebKit::WebUserContentController::removeAllUserStyleSheets):
5453        * WebProcess/UserContent/WebUserContentController.h: Ditto.
5454        * WebProcess/UserContent/WebUserContentController.messages.in:
5455        Ditto.
5456
54572014-07-08  Zan Dobersek  <zdobersek@igalia.com>
5458
5459        [GTK] Guard uses of RedirectedXCompositeWindow in WebKitWebViewBase with PLATFORM(X11)
5460        https://bugs.webkit.org/show_bug.cgi?id=133871
5461
5462        Reviewed by Martin Robinson.
5463
5464        Guard uses of the RedirectedXCompositeWindow object in WebKitWebViewBase with the
5465        PLATFORM(X11) build guard. This is required to properly support building the GTK
5466        port only for the Wayland target.
5467
5468        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
5469        (webkitWebViewBaseConstructed):
5470        (webkitWebViewRenderAcceleratedCompositingResults):
5471        (resizeWebKitWebViewBaseFromAllocation):
5472        (webkitWebViewBaseUpdatePreferences):
5473        (webkitWebViewBaseCreateWebPage):
5474
54752014-07-07  Tim Horton  <timothy_horton@apple.com>
5476
5477        Turn on accelerated drawing for WebKit2 by default
5478        https://bugs.webkit.org/show_bug.cgi?id=134708
5479        <rdar://problem/17584642>
5480
5481        Reviewed by Simon Fraser.
5482
5483        * Shared/WebPreferencesDefinitions.h:
5484        Make Mac match iOS, in that accelerated drawing is on by default.
5485
54862014-07-07  Timothy Horton  <timothy_horton@apple.com>
5487
5488        Don't leak _WKRemoteObjectRegistry in WKBrowsingContextController
5489        https://bugs.webkit.org/show_bug.cgi?id=134703
5490
5491        Reviewed by Simon Fraser.
5492
5493        * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
5494        (-[WKBrowsingContextController _remoteObjectRegistry]):
5495        Adoption is important!!
5496
54972014-07-07  Simon Fraser  <simon.fraser@apple.com>
5498
5499        [UI-side compositing] Support reflections on custom layers like video
5500        https://bugs.webkit.org/show_bug.cgi?id=134701
5501
5502        Reviewed by Tim Horton.
5503        
5504        For video reflections, we have to support cloning of PlatformCALayerRemoteCustom
5505        in the web process. Do so by implementing PlatformCALayerRemoteCustom::clone(),
5506        which does the right gyrations to get AVPlayerLayers cloned, then makes a
5507        new PlatformCALayerRemoteCustom to wrap the new layer. This ends up getting
5508        its own context hosting ID, allowing the clone to show in the UI process.
5509        
5510        Attempt to do the same for WebGL, but turn it off because it breaks.
5511
5512        * Shared/mac/RemoteLayerBackingStore.mm:
5513        (WebKit::RemoteLayerBackingStore::drawInContext):
5514        * Shared/mac/RemoteLayerTreeTransaction.mm:
5515        (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::encode): Unconditionally encode/decode
5516        the hostingContextID. It will be 0 for most layers.
5517        (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::decode):
5518        (WebKit::RemoteLayerTreeTransaction::description):
5519        * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
5520        (WebKit::RemoteLayerTreeHost::createLayer):
5521        * UIProcess/mac/RemoteLayerTreeHost.mm:
5522        (WebKit::RemoteLayerTreeHost::createLayer):
5523        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
5524        (WebKit::PlatformCALayerRemote::create): Creation with a custom PlatformLayer* always
5525        creates a PlatformCALayerRemoteCustom.
5526        (WebKit::PlatformCALayerRemote::clone): Factor some code.
5527        (WebKit::PlatformCALayerRemote::updateClonedLayerProperties):
5528        (WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
5529        * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
5530        * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
5531        * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
5532        (WebKit::PlatformCALayerRemoteCustom::create):
5533        (WebKit::PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
5534        (WebKit::PlatformCALayerRemoteCustom::clone): Clone by making an instance of the 
5535        correct type of platform layer when possible, then wrapping a PlatformCALayerRemoteCustom
5536        around it.
5537        (WebKit::PlatformCALayerRemoteCustom::contents):
5538        (WebKit::PlatformCALayerRemoteCustom::setContents):
5539        * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
5540        (WebKit::RemoteLayerTreeContext::layerWasCreated):
5541        (WebKit::RemoteLayerTreeContext::layerWillBeDestroyed):
5542
55432014-07-07  Simon Fraser  <simon.fraser@apple.com>
5544
5545        [UI-side compositing] Crash when starting a filter transition on a reflected layer
5546        https://bugs.webkit.org/show_bug.cgi?id=134694
5547
5548        Reviewed by Tim Horton.
5549        
5550        When cloned layers had animations, we would fire two animationDidStart callbacks,
5551        but the second would pass an empty animationKey string to the web process, resulting
5552        in a crash.
5553        
5554        Fix by not blindly copying all layer properties when cloning PlatformCALayerRemotes,
5555        since the clone would include addedAnimations, and then get the same animations
5556        added on top by the caller.
5557        
5558        Also protect against an empty animation key in the animationDidStart callback.
5559
5560        * UIProcess/mac/RemoteLayerTreeHost.mm:
5561        (WebKit::RemoteLayerTreeHost::animationDidStart):
5562        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
5563        (WebKit::PlatformCALayerRemote::PlatformCALayerRemote):
5564        (WebKit::PlatformCALayerRemote::clone): Don't copy all the properties; copy
5565        them manually as PlatformCALayerMac does. Only copy the big things if they don't
5566        have their default values.
5567        (WebKit::PlatformCALayerRemote::copyFiltersFrom): Need an implementation of this
5568        for clone() to call.
5569
55702014-07-07  Tim Horton  <timothy_horton@apple.com>
5571
5572        Nearly everything in the UIProcess "leaks" when WKWebView is torn down
5573        https://bugs.webkit.org/show_bug.cgi?id=134699
5574        <rdar://problem/17581777>
5575
5576        Reviewed by Simon Fraser.
5577
5578        * UIProcess/API/Cocoa/WKWebView.mm:
5579        (-[WKWebView initWithFrame:configuration:]):
5580        Adoption is important!
5581
55822014-07-07  Enrica Casucci  <enrica@apple.com>
5583
5584        REGRESSION(iOS WK2): arrow keys movements don't work.
5585        https://bugs.webkit.org/show_bug.cgi?id=134561
5586        <rdar://problem/16827629>
5587
5588        Reviewed by Benjamin Poulain.
5589
5590        This change add the implementations for cursor movement selectors.
5591        It also provides a mechanism to ensure that every selection
5592        change in WebKit is reflected in UIKit so that it can update the 
5593        autocorrection data. This way we ensure that the autocorraction state
5594        is consistent even when selection changes are originated by JavaScript.
5595        WebPageProxy::editorStateChanged now notifies the page client when the
5596        selection is about to change as well as when it actually changed.
5597        
5598        * UIProcess/PageClient.h:
5599        * UIProcess/WebPageProxy.cpp:
5600        (WebKit::WebPageProxy::editorStateChanged):
5601        * UIProcess/WebPageProxy.h:
5602        * UIProcess/ios/PageClientImplIOS.h:
5603        * UIProcess/ios/PageClientImplIOS.mm:
5604        (WebKit::PageClientImpl::selectionWillChange):
5605        * UIProcess/ios/WKContentViewInteraction.h:
5606        * UIProcess/ios/WKContentViewInteraction.mm:
5607        (-[WKContentView cut:]): Removed incorrect calls to textWillChange and
5608        textDidChange.
5609        (-[WKContentView paste:]):
5610        (-[WKContentView _moveUp:withHistory:]):
5611        (-[WKContentView _moveDown:withHistory:]):
5612        (-[WKContentView _moveLeft:withHistory:]):
5613        (-[WKContentView _moveRight:withHistory:]):
5614        (-[WKContentView _moveToStartOfWord:withHistory:]):
5615        (-[WKContentView _moveToStartOfParagraph:withHistory:]):
5616        (-[WKContentView _moveToStartOfLine:withHistory:]):
5617        (-[WKContentView _moveToStartOfDocument:withHistory:]):
5618        (-[WKContentView _moveToEndOfWord:withHistory:]):
5619        (-[WKContentView _moveToEndOfParagraph:withHistory:]):
5620        (-[WKContentView _moveToEndOfLine:withHistory:]):
5621        (-[WKContentView _moveToEndOfDocument:withHistory:]):
5622        (-[WKContentView _selectionWillChange]):
5623        (-[WKContentView _selectionChanged]):
5624        * UIProcess/ios/WebPageProxyIOS.mm:
5625        (WebKit::WebPageProxy::notifySelectionWillChange):
5626
56272014-07-07  Anders Carlsson  <andersca@apple.com>
5628
5629        Add SPI for saving and restoring a WKWebView's _WKSessionState
5630        https://bugs.webkit.org/show_bug.cgi?id=134693
5631
5632        Reviewed by Dan Bernstein.
5633
5634        * UIProcess/API/C/WKPage.cpp:
5635        (WKPageRestoreFromSessionState):
5636        * UIProcess/API/Cocoa/WKWebView.mm:
5637        (-[WKWebView _sessionState]):
5638        (-[WKWebView _restoreFromSessionStateData:]):
5639        (-[WKWebView _restoreFromSessionState:]):
5640        (-[WKWebView _restoreSessionState:andNavigate:]):
5641        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
5642        * UIProcess/API/Cocoa/_WKSessionState.mm:
5643        (-[_WKSessionState _initWithSessionState:]):
5644        * UIProcess/API/Cocoa/_WKSessionStateInternal.h:
5645        * UIProcess/WebPageProxy.cpp:
5646        (WebKit::WebPageProxy::restoreFromSessionState):
5647        * UIProcess/WebPageProxy.h:
5648
56492014-07-07  Anders Carlsson  <andersca@apple.com>
5650
5651        Add a stubbed out _WKSessionState class
5652        https://bugs.webkit.org/show_bug.cgi?id=134690
5653
5654        Reviewed by Geoffrey Garen.
5655
5656        * UIProcess/API/Cocoa/_WKSessionState.h: Copied from Source/WebKit2/UIProcess/LegacySessionStateCoding.h.
5657        * UIProcess/API/Cocoa/_WKSessionState.mm: Copied from Source/WebKit2/UIProcess/LegacySessionStateCoding.h.
5658        (-[_WKSessionState initWithData:]):
5659        (-[_WKSessionState data]):
5660        * UIProcess/API/Cocoa/_WKSessionStateInternal.h: Copied from Source/WebKit2/UIProcess/LegacySessionStateCoding.h.
5661        * UIProcess/Cocoa/SessionStateCoding.h: Copied from Source/WebKit2/UIProcess/LegacySessionStateCoding.h.
5662        * UIProcess/Cocoa/SessionStateCoding.mm: Copied from Source/WebKit2/UIProcess/LegacySessionStateCoding.h.
5663        (WebKit::encodeSessionState):
5664        (WebKit::decodeSessionState):
5665        * UIProcess/LegacySessionStateCoding.h:
5666        * WebKit2.xcodeproj/project.pbxproj:
5667
56682014-07-07  Anders Carlsson  <andersca@apple.com>
5669
5670        Some of the WKPreferences (API) property getters read like questions
5671        https://bugs.webkit.org/show_bug.cgi?id=134678
5672        <rdar://problem/17576847>
5673
5674        Reviewed by Dan Bernstein.
5675
5676        * UIProcess/API/Cocoa/WKPreferences.h:
5677        * UIProcess/API/Cocoa/WKPreferences.mm:
5678        (-[WKPreferences javaScriptIsEnabled]):
5679        (-[WKPreferences javaIsEnabled]):
5680        (-[WKPreferences plugInsAreEnabled]):
5681        (-[WKPreferences isJavaScriptEnabled]): Deleted.
5682        (-[WKPreferences isJavaEnabled]): Deleted.
5683        (-[WKPreferences arePlugInsEnabled]): Deleted.
5684
56852014-07-07  Brady Eidson  <beidson@apple.com>
5686
5687        ServicesOverlayController menus show up in the wrong place.
5688        <rdar://problem/17130576> and https://bugs.webkit.org/show_bug.cgi?id=134684
5689
5690        Reviewed by Tim Horton.
5691
5692        * WebProcess/WebPage/mac/ServicesOverlayController.mm:
5693        (WebKit::ServicesOverlayController::selectedTelephoneNumberRangesChanged): Handle cases where
5694          the telephone number is in a subframe.
5695        (WebKit::ServicesOverlayController::handleClick): The click point is always in main frame document
5696          coordinates, so convert it to window coordinates using the main frame’s FrameView.
5697
56982014-07-07  Dan Bernstein  <mitz@apple.com>
5699
5700        [Cocoa] Assertion failure in NavigationState::LoaderClient::didStartProvisionalLoadForFrame (navigationID) when navigating through the page cache
5701        https://bugs.webkit.org/show_bug.cgi?id=134682
5702
5703        Reviewed by Tim Horton.
5704
5705        * UIProcess/Cocoa/NavigationState.mm:
5706        (WebKit::NavigationState::LoaderClient::didStartProvisionalLoadForFrame): Replaced the
5707        assertion with a FIXME.
5708        (WebKit::NavigationState::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
5709        Ditto.
5710        (WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame): Ditto.
5711        (WebKit::NavigationState::LoaderClient::didCommitLoadForFrame): Ditto.
5712        (WebKit::NavigationState::LoaderClient::didFinishDocumentLoadForFrame): Ditto.
5713        (WebKit::NavigationState::LoaderClient::didFinishLoadForFrame): Ditto.
5714        (WebKit::NavigationState::LoaderClient::didFailLoadWithErrorForFrame): Ditto.
5715
57162014-07-07  KwangHyuk Kim  <hyuki.kim@samsung.com>
5717
5718        [EFL] Fix cursor artifacts on naver map site.
5719        https://bugs.webkit.org/show_bug.cgi?id=134649
5720
5721        Reviewed by Gyuyoung Kim.
5722
5723        Old evas cursor and ecore x cursor are reset before new cursor is applied.
5724
5725        * UIProcess/API/efl/EwkView.cpp:
5726        (EwkView::updateCursor):
5727
57282014-07-06  Benjamin Poulain  <bpoulain@apple.com>
5729
5730        [iOS][WK2] The tap highlight ID is not invalidated when a long press ends
5731        https://bugs.webkit.org/show_bug.cgi?id=134660
5732
5733        Reviewed by Darin Adler.
5734
5735        * UIProcess/ios/WKContentViewInteraction.mm:
5736        (-[WKContentView _cancelInteraction]):
5737        (-[WKContentView _finishInteraction]):
5738        (cancelPotentialTapIfNecessary):
5739        I messed that up in r170600. I only accounted for the web process being too fast.
5740
5741        If the web process is too slow, _cancelInteraction or _finishInteraction happen before
5742        _didGetTapHighlightForRequest:, and we also need to nuke the tap highlight.
5743
57442014-07-06  Tim Horton  <timothy_horton@apple.com>
5745
5746        [WK2] Don't support dynamically enabling the RemoteLayerTree debug indicator
5747        https://bugs.webkit.org/show_bug.cgi?id=134644
5748
5749        Reviewed by Darin Adler.
5750
5751        * UIProcess/DrawingAreaProxy.h:
5752        (WebKit::DrawingAreaProxy::setShouldShowDebugIndicator): Deleted.
5753        * UIProcess/WebPageProxy.cpp:
5754        (WebKit::WebPageProxy::preferencesDidChange):
5755        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
5756        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
5757        (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
5758        (WebKit::RemoteLayerTreeDrawingAreaProxy::initializeDebugIndicator):
5759        (WebKit::RemoteLayerTreeDrawingAreaProxy::setShouldShowDebugIndicator): Deleted.
5760        The indicator depends on the live layer tree commits coming in, including layer creation,
5761        so it can't be turned on after the root layer is created. Even a refresh is insufficient
5762        to get it working; the debug indicator really needs to exist from the first commit.
5763        So, don't even attempt to dynamically enable the indicator; create it at
5764        RemoteLayerTreeDrawingAreaProxy construction time if the pref is enabled.
5765
57662014-07-06  Yoav Weiss  <yoav@yoav.ws>
5767
5768        Turn on img@sizes compile flag
5769        https://bugs.webkit.org/show_bug.cgi?id=134634
5770
5771        Reviewed by Benjamin Poulain.
5772
5773        * Configurations/FeatureDefines.xcconfig: Moved compile flag to alphabetical order.
5774
57752014-07-06  Brady Eidson  <beidson@apple.com>
5776
5777        Speculative fix for: NetworkProcess sometimes hangs under copyDefaultCredentialForProtectionSpace
5778        https://bugs.webkit.org/show_bug.cgi?id=134666
5779
5780        Reviewed by Tim Horton.
5781
5782        * Shared/mac/SecItemRequestData.cpp:
5783        (WebKit::SecItemRequestData::encode): Encode whether or not the query dictionary exists.
5784        (WebKit::SecItemRequestData::decode): Only fail when query dictionary fails to decode if we expect one. 
5785
5786        * UIProcess/mac/SecItemShimProxy.cpp:
5787        (WebKit::SecItemShimProxy::secItemRequest): If the request is of type Invalid, log an error message asking 
5788          for a bug, and respond with an "invalid parameter" error.
5789
57902014-07-06  Antti Koivisto  <antti@apple.com>
5791
5792        Don't throttle layer flushes when the main resource is a GIF
5793        https://bugs.webkit.org/show_bug.cgi?id=134650
5794
5795        Reviewed by Simon Fraser.
5796
5797        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
5798        (WebKit::RemoteLayerTreeDrawingArea::adjustLayerFlushThrottling):
5799
58002014-07-04  Rohit Kumar  <kumar.rohit@samsung.com>
5801
5802        [EFL][WK2]Fix build break in EFL WK2
5803        https://bugs.webkit.org/show_bug.cgi?id=134629
5804
5805        Unreviewed build fix.
5806
5807        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
5808        (WebKit::CoordinatedDrawingArea::scheduleCompositingLayerFlushImmediately):
5809        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
5810
58112014-07-04  Dan Bernstein  <mitz@apple.com>
5812
5813        [Cocoa] -[WKWebView _reload] is unused
5814        https://bugs.webkit.org/show_bug.cgi?id=134638
5815
5816        Reviewed by Sam Weinig.
5817
5818        * UIProcess/API/Cocoa/WKWebView.mm:
5819        (-[WKWebView _reload]): Deleted.
5820        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
5821
58222014-07-04  Tim Horton  <timothy_horton@apple.com>
5823
5824        [WK2] Take TopContentInset into account when sending dictionary lookup point to PluginView
5825        https://bugs.webkit.org/show_bug.cgi?id=134624
5826        <rdar://problem/17222041>
5827
5828        Reviewed by Sam Weinig.
5829
5830        * WebProcess/Plugins/PDF/PDFPlugin.mm:
5831        (WebKit::PDFPlugin::performDictionaryLookupAtLocation):
5832        Perform the same coordinate conversion we use for mouse events, which happens
5833        to take the top content inset into account.
5834
58352014-07-04  Philippe Normand  <pnormand@igalia.com>
5836
5837        Unreviewed, GTK WK2 build fix after r170787.
5838
5839        * WebProcess/WebPage/DrawingAreaImpl.cpp:
5840        (WebKit::DrawingAreaImpl::scheduleCompositingLayerFlushImmediately):
5841        * WebProcess/WebPage/DrawingAreaImpl.h:
5842
58432014-07-04  Zan Dobersek  <zdobersek@igalia.com>
5844
5845        Unreviewed. Reverting the bad changes introduced in r170795.
5846
5847        * Platform/IPC/ArgumentDecoder.cpp:
5848        (IPC::ArgumentDecoder::decode): Deleted.
5849        * Platform/IPC/ArgumentDecoder.h:
5850        * Platform/IPC/ArgumentEncoder.cpp:
5851        (IPC::ArgumentEncoder::encode): Deleted.
5852        * Platform/IPC/ArgumentEncoder.h:
5853
58542014-07-04  Zan Dobersek  <zdobersek@igalia.com>
5855
5856        Unreviewed. Fixing the build for ports on 64-bit Linux.
5857
5858        Add IPC encoding and decoding overloads for the long long type, needed
5859        after r170755 started encoding and decoding long long variables in
5860        FormDataElement.
5861
5862        * Platform/IPC/ArgumentDecoder.cpp:
5863        (IPC::ArgumentDecoder::decode):
5864        * Platform/IPC/ArgumentDecoder.h:
5865        * Platform/IPC/ArgumentEncoder.cpp:
5866        (IPC::ArgumentEncoder::encode):
5867        * Platform/IPC/ArgumentEncoder.h:
5868
58692014-07-04  Timothy Horton  <timothy_horton@apple.com>
5870
5871        [iOS][WK2] Black web view after un-suspending process
5872        https://bugs.webkit.org/show_bug.cgi?id=134623
5873        <rdar://problem/17513223>
5874
5875        Reviewed by Simon Fraser.
5876
5877        * UIProcess/WebPageProxy.cpp:
5878        (WebKit::WebPageProxy::viewStateDidChange):
5879        Add an argument to viewStateDidChange that allows callers (-[WKContentView _applicationWillEnterForeground:])
5880        to force us to wait for a synchronous reply from the Web process after performing a view state change.
5881
5882        (WebKit::WebPageProxy::dispatchViewStateChange):
5883        Move the has-been-in-window-and-now-is-newly-in-window check into dispatchViewStateChange.
5884        Adjust the logic surrounding going into/out of window by factoring out the IsInWindow-did-change check, for clarity.
5885
5886        * UIProcess/WebPageProxy.h:
5887        * UIProcess/ios/WKContentView.mm:
5888        (-[WKContentView _applicationWillEnterForeground:]):
5889        As previously mentioned, wait for a reply when foregrounding.
5890
5891        * WebProcess/WebPage/DrawingArea.h:
5892        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
5893        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
5894        (WebKit::RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlushImmediately):
5895        (WebKit::RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlush):
5896        (WebKit::RemoteLayerTreeDrawingArea::viewStateDidChange):
5897        Make sure to schedule a commit immediately if the UI process is waiting for a reply.
5898        Previously we assumed that a commit would be scheduled anyway because we would have to reparent the
5899        layer tree, but that doesn't happen in the suspension-without-unparenting case. Also, we want to skip
5900        all throttling in this case.
5901
5902        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
5903        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
5904        (WebKit::TiledCoreAnimationDrawingArea::scheduleCompositingLayerFlushImmediately):
5905
59062014-07-03  Gavin Barraclough  <baraclough@apple.com>
5907
5908        Should not take background task assertion for NetworkProcess
5909        https://bugs.webkit.org/show_bug.cgi?id=134622
5910
5911        Reviewed by Tim Horton.
5912
5913        When the WebContent wants to complete a task in the background we take a process assertion on the child process, and also need to prevent the UI process from suspending.
5914        However for the NetworkProcess we always just hold a process assertion, and don't want this to interfere with UIApp suspension.
5915
5916        * Platform/IPC/mac/ConnectionMac.mm:
5917        (IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog):
5918            - ProcessAssertion -> ProcessAndUIAssertion
5919        * UIProcess/ProcessAssertion.cpp:
5920        (WebKit::ProcessAssertion::ProcessAssertion):
5921            - assignment -> initializer list.
5922        (WebKit::ProcessAndUIAssertion::ProcessAndUIAssertion):
5923        (WebKit::ProcessAndUIAssertion::~ProcessAndUIAssertion):
5924        (WebKit::ProcessAndUIAssertion::setState):
5925            - added no-op implementation.
5926        (WebKit::ProcessAssertion::~ProcessAssertion): Deleted.
5927        * UIProcess/ProcessAssertion.h:
5928            - removed ~ProcessAssertion, added ProcessAndUIAssertion class.
5929        * UIProcess/ProcessThrottler.cpp:
5930        (WebKit::ProcessThrottler::didConnnectToProcess):
5931            - ProcessAssertion -> ProcessAndUIAssertion
5932        * UIProcess/ProcessThrottler.h:
5933            - ProcessAssertion -> ProcessAndUIAssertion
5934        * UIProcess/ios/ProcessAssertionIOS.mm:
5935        (WebKit::ProcessAssertion::ProcessAssertion):
5936            - assignment -> initializer list.
5937            - moved code to manage WKProcessAssertionBackgroundTaskManager
5938        (WebKit::ProcessAssertion::setState):
5939            - moved code to manage WKProcessAssertionBackgroundTaskManager
5940        (WebKit::ProcessAndUIAssertion::ProcessAndUIAssertion):
5941        (WebKit::ProcessAndUIAssertion::~ProcessAndUIAssertion):
5942        (WebKit::ProcessAndUIAssertion::setState):
5943            - moved code to manage WKProcessAssertionBackgroundTaskManager from ProcessAssertion.
5944        (WebKit::ProcessAssertion::~ProcessAssertion): Deleted.
5945            - delete - moved code to manage WKProcessAssertionBackgroundTaskManager
5946
59472014-07-03  Simon Fraser  <simon.fraser@apple.com>
5948
5949        Clean up Brady's mess on iOS.
5950
5951        * Platform/mac/StringUtilities.h:
5952        * Platform/mac/StringUtilities.mm:
5953
59542014-07-03  Simon Fraser  <simon.fraser@apple.com>
5955
5956        [iOS WK2] Compositing layers draw outside page bounds
5957        https://bugs.webkit.org/show_bug.cgi?id=134619
5958        <rdar://problem/16953222>
5959
5960        Reviewed by Benjamin Poulain.
5961        
5962        With the new rubber-banding behavior, we no longer have the root content layer clipping all
5963        the web layers, but this resulted in web layers which were moved outside the viewport by CSS
5964        transforms not being clipped.
5965        
5966        Fix by adding a clipping layer inside the scroll view, above _rootContentView. This layer
5967        normally has the same bounds as the content, but when rubber-banding or pinching,
5968        it takes the union of the content bounds and the rect used for fixed positioning.
5969        To make scrolling work as expected in this scenario, when it has non-zero offset, it
5970        has to compensate by setting its bounds origin.
5971
5972        The bounds of the clipping layer are updated on scrolling/zooming, and when the
5973        layer commit tells us that the content size changed.
5974
5975        * UIProcess/API/Cocoa/WKWebView.mm:
5976        (-[WKWebView _updateScrollViewBackground]):
5977        * UIProcess/ios/WKContentView.mm:
5978        (-[WKContentView initWithFrame:context:configuration:webView:]):
5979        (-[WKContentView updateFixedClippingView:]):
5980        (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
5981        (-[WKContentView _didCommitLayerTree:]):
5982
59832014-07-03  Brady Eidson  <beidson@apple.com>
5984
5985        When showing the selection menu, include menu options for all selected phone numbers.
5986        <rdar://problem/16983434>, <rdar://problem/16874568>, and https://bugs.webkit.org/show_bug.cgi?id=134613
5987
5988        Reviewed by Tim Horton.
5989
5990        Move some telephone number menu logic from WebKitSystemInterface here.
5991        Also provide utility to get just the one menu item relevant to a telephone number.
5992        * Platform/mac/MenuUtilities.h:
5993        * Platform/mac/MenuUtilities.mm: Added.
5994        (WebKit::menuItemForTelephoneNumber):
5995        (WebKit::menuItemsForTelephoneNumber):
5996
5997        * Platform/mac/StringUtilities.h:
5998        * Platform/mac/StringUtilities.mm:
5999        (WebKit::formattedPhoneNumberString): Return a localized formatted phone number.
6000
6001        Add a member to track the selected phone numbers:
6002        * Shared/ContextMenuContextData.h:
6003        (WebKit::ContextMenuContextData::ContextMenuContextData):
6004        (WebKit::ContextMenuContextData::selectedTelephoneNumbers):
6005
6006        * UIProcess/WebPageProxy.h:
6007        * UIProcess/WebPageProxy.messages.in:
6008
6009        * UIProcess/mac/WebContextMenuProxyMac.mm:
6010        (WebKit::WebContextMenuProxyMac::setupServicesMenu): Also add menu items for each phone number that is
6011          in the selection.
6012
6013        Switch away from a WKSI method, and remove a lot of unneeded forward declarations and soft linking:
6014        * UIProcess/mac/WebPageProxyMac.mm:
6015        (WebKit::WebPageProxy::showTelephoneNumberMenu):
6016        (WebKit::WebPageProxy::showSelectionServiceMenu):
6017
6018        * WebKit2.xcodeproj/project.pbxproj:
6019
6020        * WebProcess/WebPage/mac/ServicesOverlayController.mm:
6021        (WebKit::ServicesOverlayController::drawSelectionHighlight):
6022        (WebKit::ServicesOverlayController::handleClick): Pass the phone numbers along.
6023
6024        * WebProcess/WebPage/WebPage.h:
6025        * WebProcess/WebPage/mac/WebPageMac.mm:
6026        (WebKit::WebPage::handleSelectionServiceClick): Pass the phone numbers along.
6027
60282014-07-03  Gavin Barraclough  <baraclough@apple.com>
6029
6030        WKProcessAssertionBackgroundTaskManager should clear member if task expires
6031        https://bugs.webkit.org/show_bug.cgi?id=134618
6032
6033        Reviewed by Anders Carlson.
6034
6035        Failure to do so results in a warning, and could result in us erroneously completing a background task too soon.
6036
6037        * UIProcess/ios/ProcessAssertionIOS.mm:
6038        (-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]):
6039            - remove local variable, _backgroundTask = UIBackgroundTaskInvalid;
6040
60412014-07-03  Joseph Pecoraro  <pecoraro@apple.com>
6042
6043        Unreviewed iOS build fix for r170774.
6044
6045        Remove some unnecessary WTF::moves on iOS:
6046        error: static_assert failed "T is not an lvalue reference; move() is unnecessary."
6047
6048        * WebProcess/WebPage/EventDispatcher.cpp:
6049        (WebKit::EventDispatcher::getQueuedTouchEventsForPage):
6050        (WebKit::EventDispatcher::touchEvent):
6051
60522014-07-03  Anders Carlsson  <andersca@apple.com>
6053
6054        Try to fix the iOS build.
6055
6056        Add WebPageProxyCocoa.mm for code shared between iOS and OS X. Put the recent searches save/restore code there.
6057
6058        * UIProcess/Cocoa/WebPageProxyCocoa.mm: Added.
6059        (WebKit::autosaveKey):
6060        (WebKit::WebPageProxy::saveRecentSearches):
6061        (WebKit::WebPageProxy::loadRecentSearches):
6062        * UIProcess/mac/WebPageProxyMac.mm:
6063        * WebKit2.xcodeproj/project.pbxproj:
6064
60652014-07-03  Dan Bernstein  <mitz@apple.com>
6066
6067        <rdar://problem/16337741> The UI process needs to track the number of HTTP subresource loads in progress (or at least whether there are any)
6068        https://bugs.webkit.org/show_bug.cgi?id=134615
6069
6070        Reviewed by Anders Carlsson.
6071
6072        Added a _networkRequestsInProgress boolean property to WKWebView.
6073
6074        * UIProcess/API/Cocoa/WKBrowsingContextController.mm: Added no-op overrides of new
6075        PageLoadStateObserver member functions.
6076
6077        * UIProcess/API/Cocoa/WKWebView.mm:
6078        (-[WKWebView _networkRequestsInProgress]): New getter that gets this state from the
6079        PageLoadState.
6080        * UIProcess/API/Cocoa/WKWebViewPrivate.h: Declared new property.
6081
6082        * UIProcess/Cocoa/NavigationState.h:
6083        * UIProcess/Cocoa/NavigationState.mm:
6084        (WebKit::NavigationState::willChangeNetworkRequestsInProgress):: Override this new
6085        PageLoadState::Observer member function by sending the appropriate KVO change message to the
6086        WKWebView.
6087        (WebKit::NavigationState::didChangeNetworkRequestsInProgress): Ditto.
6088
6089        * UIProcess/PageLoadState.cpp:
6090        (WebKit::PageLoadState::commitChanges): Check for changes to networkRequestsInProgress
6091        and call the observers if needed.
6092        (WebKit::PageLoadState::reset): Reset networkRequestsInProgress in the uncommitted state.
6093        (WebKit::PageLoadState::setNetworkRequestsInProgress): Set networkRequestsInProgress in the
6094        uncommitted state.
6095        * UIProcess/PageLoadState.h:
6096        (WebKit::PageLoadState::networkRequestsInProgress): Added this getter.
6097        (WebKit::PageLoadState::Data::Data): Initialize new networkRequestsInProgress member.
6098
6099        * UIProcess/WebPageProxy.cpp:
6100        (WebKit::WebPageProxy::setNetworkRequestsInProgress): Added. Updates the PageLoadState.
6101        * UIProcess/WebPageProxy.h:
6102        * UIProcess/WebPageProxy.messages.in: Added SetNetworkRequestsInProgress message.
6103
6104        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
6105        (WebKit::WebFrameLoaderClient::assignIdentifierToInitialRequest): Call
6106        WebPage::addResourceRequest.
6107        (WebKit::WebFrameLoaderClient::dispatchDidFinishLoading): Call
6108        WebPage::removeResourceRequest.
6109        (WebKit::WebFrameLoaderClient::dispatchDidFailLoading): Ditto.
6110
6111        * WebProcess/WebPage/WebPage.cpp:
6112        (WebKit::WebPage::addResourceRequest): Added. If the new request is for an HTTP-family URL,
6113        add its identifier to the set of network resourece request identifiers. If the set was
6114        previously empty, send the WebPageProxy a message.
6115        (WebKit::WebPage::removeResourceRequest): Added. Remove the identifier from the set. If it
6116        becomes empty, send the WebPageProxy a message.
6117        * WebProcess/WebPage/WebPage.h:
6118
61192014-07-03  Anders Carlsson  <andersca@apple.com>
6120
6121        Remove two unused functions
6122        https://bugs.webkit.org/show_bug.cgi?id=134614
6123
6124        Reviewed by Andreas Kling.
6125
6126        * UIProcess/LegacySessionStateCoding.h:
6127        * UIProcess/mac/LegacySessionStateCoding.cpp:
6128        (WebKit::encodeLegacySessionHistoryEntryData): Deleted.
6129        (WebKit::decodeLegacySessionHistoryEntryData): Deleted.
6130
61312014-07-03  Daniel Bates  <dabates@apple.com>
6132
6133        Add WTF::move()
6134        https://bugs.webkit.org/show_bug.cgi?id=134500
6135
6136        Rubber-stamped by Anders Carlsson.
6137
6138        Substitute WTF::move() for std::move().
6139
6140        * DatabaseProcess/DatabaseProcess.cpp:
6141        * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
6142        * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
6143        * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
6144        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
6145        * Platform/IPC/ArgumentCoders.h:
6146        * Platform/IPC/ArgumentDecoder.cpp:
6147        * Platform/IPC/Connection.cpp:
6148        * Platform/IPC/Connection.h:
6149        [...]
6150
61512014-07-03  Benjamin Poulain  <bpoulain@apple.com>
6152
6153        [iOS][WK2] Fix small bugs of dynamicViewportSizeUpdate that were causing inaccuracies in the computed target
6154        https://bugs.webkit.org/show_bug.cgi?id=134582
6155
6156        Reviewed by Tim Horton.
6157
6158        This patch fixes two small bugs that were causing "jumpiness" on animated resize:
6159        1) The new scale was less accurate than the target scale, making the WebProcess force a worse scale on the content.
6160        2) The code putting back the rects in view was ignoring the obscured insets, constraining the scroll position more
6161           than it should be.
6162
6163        The first problem was cause by a series of rounding issues accumulating to the fact that "scale != targetScale"
6164        was almost never true.
6165
6166        The first issue is that the unobscured content size was stored in integer coordinates. Because of that, it was
6167        impossible to determine accurately how much content is in the view.
6168        The outcome was that visibleHorizontalFraction was very inaccurate compared to what the UIProcess computed.
6169
6170        Another issue affecting the scale is that scaleAfterViewportWidthChange was computing the widthToKeepInView
6171        on floating point. Since ARM64 does all those computations on doubles in the UIProcess, the value would be quite
6172        different from the received targetScale.
6173
6174        Finally, the code uses withinEpsilon() instead of a strict equality to reduce the effect of rounding errors.
6175
6176        For the second issue, the problem was that I was bounding the exposed rect to the page bounds. It is completely
6177        valid to have an exposed rect outside the page bounds, that area is just under the obscured insets.
6178
6179        On the other hand, the unobscured rect needs to be within the bounds as we do not want to rotate to a rubberbanding
6180        position. The fix is simply to put the right rect into bounds, and the horizontal/vertical adjustement applies on
6181        both rects.
6182
6183        * WebProcess/WebPage/ios/WebPageIOS.mm:
6184        (WebKit::scaleAfterViewportWidthChange):
6185        (WebKit::WebPage::dynamicViewportSizeUpdate):
6186        (WebKit::WebPage::updateVisibleContentRects):
6187
61882014-07-03  Anders Carlsson  <andersca@apple.com>
6189
6190        Fix build.
6191
6192        * UIProcess/mac/WebPageProxyMac.mm:
6193
61942014-07-03  Anders Carlsson  <andersca@apple.com>
6195
6196        Get rid of WebPageProxyCF.cpp
6197        https://bugs.webkit.org/show_bug.cgi?id=134609
6198
6199        Reviewed by Dan Bernstein.
6200
6201        * UIProcess/cf/WebPageProxyCF.cpp: Removed.
6202        * UIProcess/mac/WebPageProxyMac.mm:
6203        (WebKit::autosaveKey):
6204        (WebKit::WebPageProxy::saveRecentSearches):
6205        (WebKit::WebPageProxy::loadRecentSearches):
6206        * WebKit2.xcodeproj/project.pbxproj:
6207
62082014-07-03  Tim Horton  <timothy_horton@apple.com>
6209
6210        [WK2] Revise the flat find indicator secondary highlight shadows
6211        https://bugs.webkit.org/show_bug.cgi?id=134607
6212        <rdar://problem/17554828>
6213
6214        Reviewed by Brady Eidson.
6215
6216        * WebProcess/WebPage/FindController.cpp:
6217        (WebKit::FindController::drawRect):
6218        Bring back the secondary highlight shadow, with new constants.
6219
62202014-07-03  Tim Horton  <timothy_horton@apple.com>
6221
6222        [iOS][WK2] Sometimes the swipe snapshot stays up too long
6223        https://bugs.webkit.org/show_bug.cgi?id=134506
6224        <rdar://problem/17496803>
6225
6226        Reviewed by Simon Fraser.
6227
6228        Implement a transaction callback mechanism.
6229        The UI process can register a callback at any point, generally immediately after sending a message to the Web process.
6230        It will then send another message (in-order) with the callback ID to the Web process, which will put it into the next transaction
6231        (scheduling a new one if needed). When the transaction comes back to the UI process, the callbacks are performed.
6232        This ensures that the callback fires alongside a commit that includes the results of whatever messages were sent before it was registered.
6233        For now, all callbacks are fired just before committing layer changes, but it's possible future patches will want post-commit callbacks.
6234        
6235        Make use of this to remove the ViewGestureControllerIOS snapshots at the right time.
6236
6237        * Shared/mac/RemoteLayerTreeTransaction.h:
6238        (WebKit::RemoteLayerTreeTransaction::callbackIDs):
6239        (WebKit::RemoteLayerTreeTransaction::setCallbackIDs):
6240        * Shared/mac/RemoteLayerTreeTransaction.mm:
6241        (WebKit::RemoteLayerTreeTransaction::encode):
6242        (WebKit::RemoteLayerTreeTransaction::decode):
6243        Add a vector of callback IDs to the transaction; encode and decode as appropriate.
6244
6245        * UIProcess/DrawingAreaProxy.h:
6246        (WebKit::DrawingAreaProxy::dispatchAfterEnsuringDrawing):
6247        (WebKit::DrawingAreaProxy::lastVisibleTransactionID): Deleted.
6248        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
6249        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
6250        (WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy):
6251        (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
6252        (WebKit::RemoteLayerTreeDrawingAreaProxy::dispatchAfterEnsuringDrawing):
6253        Add dispatchAfterEnsuringDrawing, which takes a function.
6254        When a callback is added, we send the callback ID to the Web process via the AddTransactionCallbackID message.
6255        Perform callbacks listed in the incoming transaction's vector of callback IDs.
6256
6257        * WebProcess/WebPage/DrawingArea.h:
6258        (WebKit::DrawingArea::addTransactionCallbackID):
6259        * WebProcess/WebPage/DrawingArea.messages.in:
6260        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
6261        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
6262        (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
6263        (WebKit::RemoteLayerTreeDrawingArea::addTransactionCallbackID):
6264        Keep track of the pending callback IDs on the drawing area, and move them into the transaction.
6265        We schedule a flush when installing a transaction callback on the premise that
6266        sometimes the action (goToBackForwardListItem in the swipe case) might have already occurred
6267        and been committed by the time the Web process receives AddTransactionCallbackID, so we need
6268        to cause another commit to send the callbacks across. If said commit is still pending, this is a no-op.
6269
6270        * UIProcess/ios/ViewGestureControllerIOS.mm:
6271        (allViewGestureControllers):
6272        (WebKit::ViewGestureController::ViewGestureController):
6273        (WebKit::ViewGestureController::~ViewGestureController):
6274        (WebKit::ViewGestureController::endSwipeGesture):
6275        (WebKit::ViewGestureController::willCommitPostSwipeTransitionLayerTree):
6276        (WebKit::ViewGestureController::setRenderTreeSize):
6277        * UIProcess/mac/ViewGestureController.h:
6278        Keep a side-map of page IDs to ViewGestureControllers, so that we can safely get back to
6279        our ViewGestureController from the callback.
6280
6281        When the callback fires, if it succeeded, set m_shouldRemoveSnapshotWhenTargetRenderTreeSizeHit,
6282        so that the commit (which is about to occur immediately after the callback returns) which calls
6283        setRenderTreeSize will (perhaps) remove the snapshot.
6284
6285        If it failed, we remove the snapshot immediately, as this usually happens if the Web process crashed.
6286
62872014-07-03  Brady Eidson  <beidson@apple.com>
6288
6289        Followup to "rects sent to ServicesOverlayController are wrong"
6290        https://bugs.webkit.org/show_bug.cgi?id=134568
6291
6292        Rubberstamped by Tim Horton.
6293
6294        * WebProcess/WebPage/mac/ServicesOverlayController.mm:
6295        (WebKit::ServicesOverlayController::drawSelectionHighlight): Don’t check to see if the
6296          proposed rect intersects the dirty rect. We always need to include all rects that form
6297          the selection when creating the DDHighlight.
6298
62992014-07-03  Tim Horton  <timothy_horton@apple.com>
6300
6301        [WK2] RemoteLayerTreeDrawingAreaProxy re-checks a preference every commit for no reason
6302        https://bugs.webkit.org/show_bug.cgi?id=134586
6303
6304        Reviewed by Benjamin Poulain.
6305
6306        * UIProcess/DrawingAreaProxy.h:
6307        (WebKit::DrawingAreaProxy::setShouldShowDebugIndicator):
6308        (WebKit::DrawingAreaProxy::showDebugIndicator): Deleted.
6309        (WebKit::DrawingAreaProxy::isShowingDebugIndicator): Remove this, nobody is using it.
6310        * UIProcess/WebPageProxy.cpp:
6311        (WebKit::WebPageProxy::preferencesDidChange):
6312        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
6313        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
6314        (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
6315        (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
6316        (WebKit::RemoteLayerTreeDrawingAreaProxy::setShouldShowDebugIndicator):
6317        (WebKit::RemoteLayerTreeDrawingAreaProxy::showDebugIndicator): Deleted.
6318        Check the debug indicator pref at construction time, and update the state when it changes.
6319        Checking it every commit was surprisingly expensive.
6320
63212014-07-03  Antti Koivisto  <antti@apple.com>
6322
6323        Ensure frame creation messages get through to UI process
6324        https://bugs.webkit.org/show_bug.cgi?id=134591
6325        <rdar://problem/16918218>
6326
6327        Reviewed by Anders Carlsson.
6328
6329        If we are middle of handling a synchronous message from UI process a frame creation message back gets delayed.
6330        The subsequent synchronous DecidePolicyForNavigationAction message expects that the frame creation
6331        message has arrived first and fails.
6332
6333        * WebProcess/WebPage/WebFrame.cpp:
6334        (WebKit::WebFrame::createWithCoreMainFrame):
6335        (WebKit::WebFrame::createSubframe):
6336        
6337            Send messages with DispatchMessageEvenWhenWaitingForSyncReply so they always go through in order.
6338
63392014-07-03  Anders Carlsson  <andersca@apple.com>
6340
6341        Get rid of DecoderAdapter and EncoderAdapter
6342        https://bugs.webkit.org/show_bug.cgi?id=134598
6343
6344        Reviewed by Andreas Kling.
6345
6346        * CMakeLists.txt:
6347        * WebKit2.xcodeproj/project.pbxproj:
6348        * WebProcess/WebPage/DecoderAdapter.cpp: Removed.
6349        * WebProcess/WebPage/DecoderAdapter.h: Removed.
6350        * WebProcess/WebPage/EncoderAdapter.cpp: Removed.
6351        * WebProcess/WebPage/EncoderAdapter.h: Removed.
6352        * WebProcess/WebPage/WebPage.cpp:
6353
63542014-07-02  Anders Carlsson  <andersca@apple.com>
6355
6356        Stop using EncoderAdapter/DecoderAdapter for FormData
6357        https://bugs.webkit.org/show_bug.cgi?id=134571
6358
6359        Reviewed by Andreas Kling.
6360
6361        * Shared/Network/NetworkResourceLoadParameters.cpp:
6362        (WebKit::NetworkResourceLoadParameters::encode):
6363        (WebKit::NetworkResourceLoadParameters::decode):
6364
63652014-07-03  Brady Eidson  <beidson@apple.com>
6366
6367        Selection rects sent to ServicesOverlayController are wrong.
6368        <rdar://problem/16727796> and https://bugs.webkit.org/show_bug.cgi?id=134568
6369
6370        Reviewed by Darin Adler (and Tim Horton and Ryosuke Niwa).
6371
6372        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
6373        (WebKit::WebEditorClient::selectionRectsDidChange): Also pass the GapRects to the ServicesOverlayController.
6374        * WebProcess/WebCoreSupport/WebEditorClient.h:
6375
6376        * WebProcess/WebPage/ServicesOverlayController.h:
6377        * WebProcess/WebPage/mac/ServicesOverlayController.mm:
6378        (WebKit::expandForGap):
6379        (WebKit::compactRectsWithGapRects): Combine 3+ rects down to exactly 3 rects, then expand them based on GapRects.
6380        (WebKit::ServicesOverlayController::selectionRectsDidChange): Call compactRectsWithGapRects, then reverse the list.
6381        (WebKit::ServicesOverlayController::drawSelectionHighlight): Tell data detectors to flip this.
6382        (WebKit::ServicesOverlayController::drawTelephoneNumberHighlight): Tell data detectors to flip this.
6383        (WebKit::ServicesOverlayController::drawCurrentHighlight): No need to flip this anymore.
6384
63852014-07-03  Brady Eidson  <beidson@apple.com>
6386
6387        Possible crash in IconDatabase in WebCore::IconDatabase::dispatchDidRemoveAllIconsOnMainThread
6388        <rdar://problem/17437687> and https://bugs.webkit.org/show_bug.cgi?id=134517
6389
6390        Reviewed by Eric Carlson.
6391
6392        * UIProcess/WebContext.cpp:
6393        (WebKit::WebContext::~WebContext): Instead of directly deref’ing the WebIconDatabase, ask it to
6394          deref itself when appropriate.
6395
6396        * UIProcess/WebIconDatabase.cpp:
6397        (WebKit::WebIconDatabase::WebIconDatabase):
6398        (WebKit::WebIconDatabase::didClose): If this WebIconDatabase is supposed to deref itself when
6399          appropriate, do so now.
6400        (WebKit::WebIconDatabase::derefWhenAppropriate): If the WebCore::IconDatabase is still open then
6401          defer this deref.
6402        * UIProcess/WebIconDatabase.h:
6403
64042014-07-03  Carlos Garcia Campos  <cgarcia@igalia.com>
6405
6406        REGRESSION(r170676): [GTK] UI process crashes when the Web Process crashes
6407        https://bugs.webkit.org/show_bug.cgi?id=134541
6408
6409        Reviewed by Gyuyoung Kim.
6410
6411        It happens when attaching a new web process, because it tries to
6412        encode a null SessionState.
6413
6414        * UIProcess/LegacySessionStateCodingNone.cpp:
6415        (WebKit::encodeLegacySessionState): Return an empty API::Data
6416        object instead of nullptr.
6417        (WebKit::encodeLegacySessionHistoryEntryData): Ditto.
6418
64192014-07-03  Carlos Garcia Campos  <cgarcia@igalia.com>
6420
6421        REGRESSION(r170743): [GTK] [EFL] Build broken.
6422        https://bugs.webkit.org/show_bug.cgi?id=134585
6423
6424        Reviewed by Philippe Normand.
6425
6426        Add ENABLE(PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC) guards where needed.
6427
6428        * WebProcess/Plugins/PluginView.cpp:
6429        (WebKit::PluginView::initializePlugin):
6430        * WebProcess/WebPage/WebPage.cpp:
6431        (WebKit::WebPage::createPlugin):
6432
64332014-07-02  Benjamin Poulain  <benjamin@webkit.org>
6434
6435        [iOS][WK2] Make is safe/fast to use the animated resize API without resizing anything
6436        https://bugs.webkit.org/show_bug.cgi?id=134570
6437
6438        Reviewed by Enrica Casucci.
6439
6440        Today, if someone calls _beginAnimatedResizeWithUpdates-_endAnimatedResize, it is always a very heavy process
6441        forcing a relayout and can cause synchronous operations.
6442
6443        We should not force the caller of the API to maintain their own state tracking, we should do that for them.
6444
6445        With this patch, we track everything we need for a resize and only do the heavy lifting if anything has actually changed.
6446
6447        * UIProcess/API/Cocoa/WKWebView.mm:
6448        (activeMinimumLayoutSize):
6449        (activeMinimumLayoutSizeForMinimalUI):
6450        (activeMaximumUnobscuredSize):
6451        (activeOrientation):
6452        This code is used in both _didRelaunchProcess and _beginAnimatedResizeWithUpdates. It is moved to static functions
6453        to avoid having it in two places.
6454
6455        (-[WKWebView _didRelaunchProcess]):
6456
6457        (-[WKWebView _beginAnimatedResizeWithUpdates:]):
6458        The updates now goes like this:
6459        1) Set _isAnimatingResize to prevent the undesired side effects updateBlock() if we really need to resize.
6460        2) Get all the original values before calling the update block.
6461        3) Call the update block.
6462        4a) If nothing useful for resize has changed, reset _isAnimatingResize to false.
6463            We also need to update the visible content rect because the update block may have changed something unrelated
6464            to the view size (scale, scroll position, etc).
6465        4b) If we really need to resize, proceed as usual.
6466
6467        (-[WKWebView _endAnimatedResize]):
6468        With the changes in _beginAnimatedResizeWithUpdates:, _isAnimatingResize is only set for real cases of animated resize,
6469        bail out early if that flag isn't set.
6470
6471        The remaining code is unchanged, it is just not indented due to the removal of the if() branch.
6472
64732014-07-02  Roger Fong  <roger_fong@apple.com>
6474
6475        Improve handling of primary offscreen plugins.
6476        https://bugs.webkit.org/show_bug.cgi?id=134528.
6477        <rdar://problem/17471864>
6478
6479        Reviewed by Dean Jackson.
6480
6481        * WebProcess/Plugins/PluginView.cpp: 
6482        Determine whether or not the plugin starts offscreen when the plugin is initialized.
6483        (WebKit::PluginView::initializePlugin):
6484        (WebKit::PluginView::pluginSnapshotTimerFired):
6485        * WebProcess/WebPage/WebPage.cpp:
6486        (WebKit::WebPage::createPlugin):
6487        Use the PluginProcessTypeNormal for offscreen plugins that are potentially primary plugins.
6488
64892014-07-02  Enrica Casucci  <enrica@apple.com>
6490
6491        REGRESSION(WK2): Undo does not work in text fields in Safari.
6492        https://bugs.webkit.org/show_bug.cgi?id=134572
6493        <rdar://problem/17542238>
6494
6495        Reviewed by Benjamin Poulain.
6496        
6497        This patch adds for iOS the same implementation we have already for OS X.
6498
6499        * UIProcess/ios/PageClientImplIOS.h:
6500        * UIProcess/ios/PageClientImplIOS.mm:
6501        (-[WKEditCommandObjC initWithWebEditCommandProxy:]):
6502        (-[WKEditCommandObjC command]):
6503        (-[WKEditorUndoTargetObjC undoEditing:]):
6504        (-[WKEditorUndoTargetObjC redoEditing:]):
6505        (WebKit::PageClientImpl::PageClientImpl):
6506        (WebKit::PageClientImpl::registerEditCommand):
6507        (WebKit::PageClientImpl::clearAllEditCommands):
6508        (WebKit::PageClientImpl::canUndoRedo):
6509        (WebKit::PageClientImpl::executeUndoRedo):
6510
65112014-07-02  Gavin Barraclough  <baraclough@apple.com>
6512
6513        ProcessAssertion should also prevent UIApp suspension
6514        https://bugs.webkit.org/show_bug.cgi?id=134563
6515
6516        Reviewed by Dan Bernstein.
6517
6518        If the application suspends then the child processes will, too.
6519        Use beginBackgroundTaskWithName:expirationHandler: to request that the application remain runnable
6520        while waiting for background tasks to complete.
6521
6522        * UIProcess/ProcessAssertion.cpp:
6523        (WebKit::ProcessAssertion::~ProcessAssertion):
6524            - Added destructor.
6525        * UIProcess/ProcessAssertion.h:
6526            - Added destructor.
6527        * UIProcess/ios/ProcessAssertionIOS.mm:
6528        (+[WKProcessAssertionBackgroundTaskManager shared]):
6529            - singleton WKProcessAssertionBackgroundTaskManager.
6530        (-[WKProcessAssertionBackgroundTaskManager init]):
6531        (-[WKProcessAssertionBackgroundTaskManager dealloc]):
6532            - register/remove notification handlers.
6533        (-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]):
6534            - if we need to be runnable make sure we're holding a BackgroundTask, if not release it.
6535        (-[WKProcessAssertionBackgroundTaskManager _applicationDidEnterBackgroundOrWillEnterForeground:]):
6536            - detect when the app enters/leaves foreground; calls to _updateBackgroundTask.
6537        (-[WKProcessAssertionBackgroundTaskManager incrementNeedsToRunInBackgroundCount]):
6538        (-[WKProcessAssertionBackgroundTaskManager decrementNeedsToRunInBackgroundCount]):
6539            - interface to update the count; calls to _updateBackgroundTask.
6540        (WebKit::ProcessAssertion::ProcessAssertion):
6541        (WebKit::ProcessAssertion::~ProcessAssertion):
6542            - count ProcessAssertions in and out of existance.
6543        (WebKit::ProcessAssertion::setState):
6544            - count when the state changes.
6545
65462014-07-01  Mark Rowe  <mrowe@apple.com>
6547
6548        <https://webkit.org/b/134522> Remove duplication in code that prepares the user agent string on Mac and iOS
6549
6550        Reviewed by Simon Fraser.
6551
6552        * UIProcess/ios/WebPageProxyIOS.mm:
6553        (WebKit::webKitBundleVersionString): Return the entire CFBundleVersion now that WebCore handles formatting it.
6554        (WebKit::WebPageProxy::standardUserAgent):
6555        * UIProcess/mac/WebPageProxyMac.mm:
6556        (WebKit::webKitBundleVersionString): Ditto.
6557        (WebKit::WebPageProxy::standardUserAgent):
6558
65592014-06-28  Oliver Hunt  <oliver@apple.com>
6560
6561       Restrict network process sandbox
6562       https://bugs.webkit.org/show_bug.cgi?id=134360
6563
6564       Reviewed by Sam Weinig.
6565
6566       Add more restrictions to the network process sandbox.
6567
6568       * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
6569       (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
6570         Always use the cache directory provided in the initialization parameters,
6571         and make sure we consume the cookie directory extension.
6572       * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
6573         Make the sandbox profile much more restrictive.
6574       * Shared/Network/NetworkProcessCreationParameters.cpp:
6575       (WebKit::NetworkProcessCreationParameters::encode):
6576       (WebKit::NetworkProcessCreationParameters::decode):
6577       * Shared/Network/NetworkProcessCreationParameters.h:
6578         The network process now requires an extension to access
6579         its cookie storage.
6580       * Shared/mac/SandboxUtilities.cpp:
6581       (WebKit::pathForProcessContainer):
6582       * Shared/mac/SandboxUtilities.h:
6583         We need to be able to get hold of our container so
6584         that we can get the correct cookie storage directory.
6585       * UIProcess/WebContext.cpp:
6586       (WebKit::WebContext::ensureNetworkProcess):
6587         We have to pass in the an extension for the cookie storage directory when
6588       initalising the network process
6589       * UIProcess/mac/WebContextMac.mm:
6590       (WebKit::WebContext::platformDefaultCookieStorageDirectory):
6591         Make sure we provide the correct location on IOS
6592       * WebProcess/cocoa/WebProcessCocoa.mm:
6593       (WebKit::WebProcess::platformInitializeWebProcess):
6594         Consume the cookie storage extension
6595
65962014-07-02  Csaba Osztrogonác  <ossy@webkit.org>
6597
6598        URTBF after r170725.
6599
6600        * CMakeLists.txt: Removed Shared/LegacySessionState.cpp.
6601
66022014-07-02  Csaba Osztrogonác  <ossy@webkit.org>
6603
6604        URTBF after r170719 for !CF platforms.
6605
6606        * UIProcess/WebPageProxy.cpp:
6607        (WebKit::WebPageProxy::sessionStateData): Deleted.
6608        (WebKit::WebPageProxy::restoreFromSessionStateData): Deleted.
6609
66102014-07-02  Mark Rowe  <mrowe@apple.com>
6611
6612        <https://webkit.org/b/134521> iOS should use shared code to determine the system marketing version
6613
6614        Reviewed by Simon Fraser.
6615
6616        * Shared/ios/ChildProcessIOS.mm: Update #import.
6617        * Shared/mac/ChildProcessMac.mm: Ditto.
6618
66192014-07-02  Anders Carlsson  <andersca@apple.com>
6620
6621        Rip out more dead code
6622        https://bugs.webkit.org/show_bug.cgi?id=134562
6623
6624        Reviewed by Andreas Kling.
6625
6626        * Shared/LegacySessionState.cpp: Removed.
6627        * Shared/LegacySessionState.h: Removed.
6628        * Shared/WebBackForwardListItem.cpp:
6629        (WebKit::WebBackForwardListItem::WebBackForwardListItem): Deleted.
6630        (WebKit::WebBackForwardListItem::backForwardData): Deleted.
6631        (WebKit::WebBackForwardListItem::setBackForwardData): Deleted.
6632        (WebKit::WebBackForwardListItem::encode): Deleted.
6633        (WebKit::WebBackForwardListItem::decode): Deleted.
6634        * Shared/WebBackForwardListItem.h:
6635        (WebKit::WebBackForwardListItem::create): Deleted.
6636        (WebKit::WebBackForwardListItem::setOriginalURL): Deleted.
6637        (WebKit::WebBackForwardListItem::setURL): Deleted.
6638        (WebKit::WebBackForwardListItem::setTitle): Deleted.
6639        * UIProcess/WebPageProxy.cpp:
6640        * WebKit2.xcodeproj/project.pbxproj:
6641        * WebProcess/WebPage/WebPage.cpp:
6642
66432014-07-02  Anders Carlsson  <andersca@apple.com>
6644
6645        RestoreSession should take a vector of BackForwardListItemStates
6646        https://bugs.webkit.org/show_bug.cgi?id=134558
6647
6648        Reviewed by Tim Horton.
6649
6650        * Scripts/webkit2/messages.py:
6651        (struct_or_class):
6652        (headers_for_type):
6653        * Shared/WebPageCreationParameters.cpp:
6654        (WebKit::WebPageCreationParameters::encode):
6655        (WebKit::WebPageCreationParameters::decode):
6656        * Shared/WebPageCreationParameters.h:
6657        * UIProcess/WebBackForwardList.cpp:
6658        (WebKit::WebBackForwardList::itemStates):
6659        * UIProcess/WebBackForwardList.h:
6660        * UIProcess/WebPageProxy.cpp:
6661        (WebKit::WebPageProxy::restoreFromSessionState):
6662        (WebKit::WebPageProxy::creationParameters):
6663        * WebProcess/WebPage/WebPage.cpp:
6664        (WebKit::WebPage::WebPage):
6665        (WebKit::WebPage::restoreSession):
6666        (WebKit::WebPage::restoreSessionAndNavigateToCurrentItem): Deleted.
6667        * WebProcess/WebPage/WebPage.h:
6668        * WebProcess/WebPage/WebPage.messages.in:
6669
66702014-07-02  Anders Carlsson  <andersca@apple.com>
6671
6672        Store the back forward list item id inside BackForwardListItemState
6673        https://bugs.webkit.org/show_bug.cgi?id=134557
6674
6675        Reviewed by Tim Horton.
6676
6677        * Shared/SessionState.cpp:
6678        (WebKit::BackForwardListItemState::encode):
6679        (WebKit::BackForwardListItemState::decode):
6680        * Shared/SessionState.h:
6681        * Shared/WebBackForwardListItem.cpp:
6682        (WebKit::WebBackForwardListItem::create):
6683        (WebKit::WebBackForwardListItem::WebBackForwardListItem):
6684        (WebKit::WebBackForwardListItem::encode):
6685        * Shared/WebBackForwardListItem.h:
6686        (WebKit::WebBackForwardListItem::itemID):
6687        * UIProcess/WebBackForwardList.cpp:
6688        (WebKit::WebBackForwardList::restoreFromState):
6689        * UIProcess/WebProcessProxy.cpp:
6690        (WebKit::WebProcessProxy::addBackForwardItem):
6691
66922014-07-02  Manuel Rego Casasnovas  <rego@igalia.com>
6693
6694        Unreviewed. EFL and GTK build fix after r170716.
6695
6696        * UIProcess/LegacySessionStateCodingNone.cpp:
6697        (WebKit::decodeLegacySessionState): Update method signature.
6698
66992014-07-02  Anders Carlsson  <andersca@apple.com>
6700
6701        Begin ripping out the old session state code
6702        https://bugs.webkit.org/show_bug.cgi?id=134556
6703
6704        Reviewed by Andreas Kling.
6705
6706        * UIProcess/WebBackForwardList.h:
6707        * UIProcess/WebPageProxy.h:
6708        * UIProcess/cf/WebBackForwardListCF.cpp: Removed.
6709        * UIProcess/cf/WebPageProxyCF.cpp:
6710        (WebKit::WebPageProxy::sessionStateData): Deleted.
6711        (WebKit::WebPageProxy::restoreFromSessionStateData): Deleted.
6712        * WebKit2.xcodeproj/project.pbxproj:
6713
67142014-07-02  Anders Carlsson  <andersca@apple.com>
6715
6716        Use legacy state coding directly in WKWebView
6717        https://bugs.webkit.org/show_bug.cgi?id=134553
6718
6719        Reviewed by Dan Bernstein.
6720
6721        * UIProcess/API/C/WKPage.cpp:
6722        (WKPageRestoreFromSessionState):
6723        * UIProcess/API/C/WKSessionStateRef.cpp:
6724        (WKSessionStateCreateFromData):
6725        * UIProcess/API/Cocoa/WKWebView.mm:
6726        (-[WKWebView _sessionStateData]):
6727        (-[WKWebView _sessionState]):
6728        (-[WKWebView _restoreFromSessionStateData:]):
6729        (-[WKWebView _restoreFromSessionState:]):
6730        (releaseNSData): Deleted.
6731        * UIProcess/LegacySessionStateCoding.h:
6732        * UIProcess/WebPageProxy.cpp:
6733        (WebKit::WebPageProxy::restoreFromSessionState):
6734        (WebKit::WebPageProxy::restoreFromState): Deleted.
6735        * UIProcess/WebPageProxy.h:
6736        * UIProcess/mac/LegacySessionStateCoding.cpp:
6737        (WebKit::decodeLegacySessionState):
6738
67392014-07-02  Anders Carlsson  <andersca@apple.com>
6740
6741        Add -[WKWebView _sessionStateData] and -[WKWebView _restoreFromSessionStateData:]
6742        https://bugs.webkit.org/show_bug.cgi?id=134549
6743
6744        Reviewed by Dan Bernstein.
6745
6746        * UIProcess/API/Cocoa/WKWebView.mm:
6747        (-[WKWebView _sessionState]):
6748        (-[WKWebView _sessionStateData]):
6749        (-[WKWebView _restoreFromSessionState:]):
6750        (-[WKWebView _restoreFromSessionStateData:]):
6751        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
6752
67532014-07-02  Carlos Garcia Campos  <cgarcia@igalia.com>
6754
6755        [GTK] WebKitVersion.h should be shared between UI and Web Process APIs
6756        https://bugs.webkit.org/show_bug.cgi?id=134538
6757
6758        Reviewed by Martin Robinson.
6759
6760        To be able to check current version from web extensions too.
6761
6762        * UIProcess/API/gtk/WebKitVersion.h.in: Allow to include WebKitVersion.h also from webkit-web-extension.h.
6763        * WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h: Include WebKitVersion.h.
6764
67652014-07-02  Carlos Garcia Campos  <cgarcia@igalia.com>
6766
6767        [GTK] WebKitWebView::create should receive information about the navigation action
6768        https://bugs.webkit.org/show_bug.cgi?id=133680
6769
6770        Reviewed by Martin Robinson.
6771
6772        Add WebKitNavigationAction boxed type representing a navigation
6773        action to be passed as parameter of WebKitWebView::create
6774        signal. In the future it could be also for the
6775        WebKitNavigationPolicyDecision class. The class contains
6776        information about a navigation action like the navigation type,
6777        the request, the mouse button and key modifiers and whether it was
6778        started by a user gesture. This information is needed to be able
6779        to implement a proper popup blocker. Since all that information is
6780        not provided by the C API, we have switched the UI client to use a
6781        custom client derived from API::UIClient. This also avoids a lot
6782        of toAPI -> toImpl unneeded conversions.
6783
6784        * PlatformGTK.cmake: Add new files to compilation.
6785        * UIProcess/API/gtk/WebKitHitTestResult.cpp:
6786        (webkitHitTestResultCreate): Use a WebHitTestResult::Data const
6787        reference instead of a pointer to a WebHitTestResult.
6788        (webkitHitTestResultCompare): Ditto.
6789        * UIProcess/API/gtk/WebKitHitTestResultPrivate.h:
6790        * UIProcess/API/gtk/WebKitNavigationAction.cpp: Added.
6791        (webkitNavigationActionCreate): Create a WebKitNavigationAction
6792        for the given ResourceRequest and NavigationActionData.
6793        (webkit_navigation_action_copy):
6794        (webkit_navigation_action_free):
6795        (webkit_navigation_action_get_navigation_type):
6796        (webkit_navigation_action_get_mouse_button):
6797        (webkit_navigation_action_get_modifiers):
6798        (webkit_navigation_action_get_request):
6799        (webkit_navigation_action_is_user_gesture):
6800        * UIProcess/API/gtk/WebKitNavigationAction.h: Added.
6801        * UIProcess/API/gtk/WebKitNavigationActionPrivate.h: Added.
6802        * UIProcess/API/gtk/WebKitNavigationPolicyDecision.h:
6803        * UIProcess/API/gtk/WebKitPrivate.cpp:
6804        (toGdkModifiers):
6805        (toWebKitNavigationType):
6806        (toWebKitMouseButton):
6807        * UIProcess/API/gtk/WebKitPrivate.h:
6808        * UIProcess/API/gtk/WebKitUIClient.cpp:
6809        (UIClient::UIClient): Implement the UIClient using a custom class.
6810        (attachUIClientToView): Set the UIClient directly to the WebPageProxy.
6811        (createNewPage): Deleted.
6812        (showPage): Deleted.
6813        (closePage): Deleted.
6814        (runJavaScriptAlert): Deleted.
6815        (runJavaScriptConfirm): Deleted.
6816        (runJavaScriptPrompt): Deleted.
6817        (toolbarsAreVisible): Deleted.
6818        (setToolbarsAreVisible): Deleted.
6819        (menuBarIsVisible): Deleted.
6820        (setMenuBarIsVisible): Deleted.
6821        (statusBarIsVisible): Deleted.
6822        (setStatusBarIsVisible): Deleted.
6823        (isResizable): Deleted.
6824        (setIsResizable): Deleted.
6825        (getWindowFrame): Deleted.
6826        (setWindowFrame): Deleted.
6827        (mouseDidMoveOverElement): Deleted.
6828        (printFrame): Deleted.
6829        (runOpenPanel): Deleted.
6830        (decidePolicyForGeolocationPermissionRequest): Deleted.
6831        (runModal): Deleted.
6832        * UIProcess/API/gtk/WebKitWebView.cpp:
6833        (webkitWebViewCreate): Add WebKitNavigationAction parameter.
6834        (webkit_web_view_class_init): Add WebKitNavigationAction paramter
6835        to CREATE signal.
6836        (webkitWebViewCreateNewPage): Add WebKitNavigationAction parameter
6837        and pass it to the signal callbacks.
6838        (webkitWebViewMouseTargetChanged): Use a WebHitTestResult::Data
6839        const reference.
6840        (webkitWebViewPopulateContextMenu): Ditto.
6841        * UIProcess/API/gtk/WebKitWebView.h:
6842        * UIProcess/API/gtk/WebKitWebViewPrivate.h:
6843        * UIProcess/API/gtk/WebKitWindowProperties.cpp:
6844        (webkitWindowPropertiesUpdateFromWebWindowFeatures): Use a
6845        WebCore::WindowFeatures const reference.
6846        * UIProcess/API/gtk/WebKitWindowPropertiesPrivate.h:
6847        * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section.
6848        * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
6849        * UIProcess/API/gtk/webkit2.h: Include WebKitNavigationAction.h.
6850
68512014-07-01  KwangHyuk Kim  <hyuki.kim@samsung.com>
6852
6853        [EFL] Fix occurrence of two cursors on WK2 EFL.
6854        https://bugs.webkit.org/show_bug.cgi?id=134436
6855
6856        Reviewed by Anders Carlsson.
6857
6858        ecore_x_window_cursor is released when ecore_evas_object_cursor should be shown in order to avoid occurrence of two cursors.
6859
6860        * UIProcess/API/efl/EwkView.cpp:
6861        (EwkView::updateCursor):
6862
68632014-07-01  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
6864
6865        Fix build break on EFL and GTK ports since r170683
6866        https://bugs.webkit.org/show_bug.cgi?id=134536
6867
6868        Unreviewed, build fix.
6869
6870        * CMakeLists.txt:
6871
68722014-07-01  Dean Jackson  <dino@apple.com>
6873
6874        Make LogsPageMessagesToSystemConsoleEnabled a global debug preference
6875        https://bugs.webkit.org/show_bug.cgi?id=134534
6876
6877        Reviewed by Joseph Pecoraro.
6878
6879        * Shared/WebPreferencesDefinitions.h:
6880
68812014-07-01  Tim Horton  <timothy_horton@apple.com>
6882
6883        Handle invalid data more gracefully.
6884
6885        Reviewed by Anders Carlsson.
6886
6887        * UIProcess/mac/LegacySessionStateCoding.cpp:
6888        (WebKit::decodeFormData):
6889        (WebKit::decodeBackForwardTreeNode):
6890
68912014-07-01  Mark Rowe  <mrowe@apple.com>
6892
6893        Add a missing return statement in WKPageCopySessionState.
6894
6895        Reviewed by Anders Carlsson.
6896
6897        * UIProcess/API/C/WKPage.cpp:
6898        (WKPageCopySessionState):
6899
69002014-07-01  Anders Carlsson  <andersca@apple.com>
6901
6902        Don't encode/decode the snapshot UUID
6903        https://bugs.webkit.org/show_bug.cgi?id=134532
6904
6905        Reviewed by Sam Weinig.
6906
6907        * UIProcess/mac/LegacySessionStateCoding.cpp:
6908        (WebKit::encodeSessionHistory):
6909        (WebKit::decodeSessionHistoryEntry):
6910
69112014-07-01  Commit Queue  <commit-queue@webkit.org>
6912
6913        Unreviewed, rolling out r170608.
6914        https://bugs.webkit.org/show_bug.cgi?id=134533
6915
6916        Safari keeps crashing on device due to sandbox violation.
6917        (Requested by enrica on #webkit).
6918
6919        Reverted changeset:
6920
6921        "Restrict network process sandbox"
6922        https://bugs.webkit.org/show_bug.cgi?id=134360
6923        http://trac.webkit.org/changeset/170608
6924
69252014-07-01  Pratik Solanki  <psolanki@apple.com>
6926
6927        Encode/decode CFURLRequestRefs when USE(CFNETWORK) is enabled
6928        https://bugs.webkit.org/show_bug.cgi?id=134454
6929        <rdar://problem/17510980>
6930
6931        Reviewed by Andreas Kling.
6932
6933        Use new helper methods to serialize/deserialize CFURLRequestRef directly so we can avoid
6934        creating NSURLRequest.
6935
6936        * Shared/mac/WebCoreArgumentCodersMac.mm:
6937        (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
6938        (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
6939
69402014-07-01  Benjamin Poulain  <benjamin@webkit.org>
6941
6942        [iOS][WK2] Fix a race between the short tap and long tap highlight
6943        https://bugs.webkit.org/show_bug.cgi?id=134530
6944
6945        Reviewed by Enrica Casucci.
6946
6947        There was a potential race of event that can theoretically cause WKContentViewInteraction
6948        to call [WKContentView _showTapHighlight] after all interactions have been cancelled.
6949
6950        The race would be like this:
6951        1) On a short tap, _singleTapRecognized: is called, a tap highlight ID is defined and
6952           _potentialTapInProgress is set to YES.
6953        2) For some reason, the gesture is cancelled. The method _singleTapDidReset is called, 
6954           setting _potentialTapInProgress but leaving the tap highlight ID as valid.
6955        3) The UIProcess receives the tap highlight information from the WebProcess, _didGetTapHighlightForRequest:
6956           has a valid ID, _potentialTapInProgress is false -> the highlight is shown right away as if a long tap
6957           was in progress.
6958
6959        The missing piece that causes this is _singleTapDidReset: must also invalidate the tap highlight ID. This is done
6960        in the new static function cancelPotentialTapIfNecessary().
6961
6962        Just invalidating the ID would create another race:
6963        1) Short tap gesture recognizer starts.
6964        2) The long press recognizer starts before (1) is commited.
6965        3) The long press recognizers sets up its own tap highlight ID.
6966        4) The short tap gesture recognizer resets, erasing the tap highlight ID defined in (3).
6967
6968        To avoid this, the long press gesture recognizers immediately cancels any potential tap in progress.
6969        If _singleTapDidReset: is called before (3), this does nothing. If the reset is called after (3),
6970        _singleTapDidReset does nothing.
6971
6972        * UIProcess/ios/WKContentViewInteraction.mm:
6973        (-[WKContentView _highlightLongPressRecognized:]):
6974        (cancelPotentialTapIfNecessary):
6975        (-[WKContentView _singleTapDidReset:]):
6976
69772014-07-01  Anders Carlsson  <andersca@apple.com>
6978
6979        Add ABI hacks to allow WKPageRef to use WKSessionStateRef
6980        https://bugs.webkit.org/show_bug.cgi?id=134529
6981
6982        Reviewed by Sam Weinig.
6983
6984        * UIProcess/API/APISessionState.h:
6985        Add a sessionState() getter.
6986        
6987        * UIProcess/API/C/WKPage.cpp:
6988        (WKPageCopySessionState):
6989        Add a hack where we return a WKSessionStateRef if the least significant bit of the context pointer
6990        is 1, and a WKDataRef otherwise.
6991
6992        (WKPageRestoreFromSessionState):
6993        Handle both WKDataRef and WKSessionStateref.
6994
6995        * UIProcess/API/C/WKPage.h:
6996        Use WKTypeRefs for state saving and restoration.
6997
6998        * UIProcess/API/C/WKSessionStateRef.cpp:
6999        (WKSessionStateCopyData):
7000        Add helper function.
7001
70022014-07-01  Anders Carlsson  <andersca@apple.com>
7003
7004        WKPageRestoreFromSessionState should use the new session state restore code path
7005        https://bugs.webkit.org/show_bug.cgi?id=134526
7006
7007        Reviewed by Tim Horton.
7008
7009        * UIProcess/API/C/WKPage.cpp:
7010        (WKPageRestoreFromSessionState):
7011        Use the new code path.
7012
7013        * UIProcess/WebPageProxy.cpp:
7014        (WebKit::WebPageProxy::restoreFromState):
7015        Only restore the back-forward state if we have a back-forward list.
7016
7017        * UIProcess/mac/LegacySessionStateCoding.cpp:
7018        (WebKit::encodeSessionHistory):
7019        Save the original URL string as well.
7020
7021        (WebKit::decodeV1SessionHistory):
7022        If we don't have a current index, set it to Nullopt instead of 0.
7023
70242014-07-01  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
7025
7026        Unreviewed. EFL and GTK build fix since r170654.
7027
7028        * UIProcess/LegacySessionStateCodingNone.cpp: Add a dummy encodeLegacySessionState(const SessionState&).
7029        (WebKit::encodeLegacySessionState):
7030
70312014-07-01  Dan Bernstein  <mitz@apple.com>
7032
7033        Crash in WebDocumentLoader::setNavigationID
7034        https://bugs.webkit.org/show_bug.cgi?id=134520
7035
7036        Reviewed by Anders Carlsson.
7037
7038        * WebProcess/WebPage/WebFrame.cpp:
7039        (WebKit::WebFrame::didReceivePolicyDecision): Null-check the policy document loader.
7040
70412014-07-01  Dan Bernstein  <mitz@apple.com>
7042
7043        Build fix.
7044
7045        * UIProcess/API/APILoaderClient.h:
7046        (API::LoaderClient::didDestroyNavigation):
7047
70482014-07-01  Anders Carlsson  <andersca@apple.com>
7049
7050        Use the new legacy session state coding in WKPageCopySessionState
7051        https://bugs.webkit.org/show_bug.cgi?id=134516
7052
7053        Reviewed by Tim Horton.
7054
7055        * UIProcess/API/C/WKPage.cpp:
7056        (WKPageCopySessionState):
7057        Call encodeLegacySessionState.
7058
7059        * UIProcess/mac/LegacySessionStateCoding.cpp:
7060        (WebKit::encodeSessionHistoryEntryData):
7061        Use leakPtr() so we won't attempt to double-free the buffer.
7062
7063        (WebKit::createDictionary):
7064        Fix a typo.
7065
7066        (WebKit::encodeLegacySessionState):
7067        Don't encode the provisional URL if it's empty.
7068
70692014-07-01  Chris Fleizach  <cfleizach@apple.com>
7070
7071        AX: [iOS WebKit2] Support for Speak selection
7072        https://bugs.webkit.org/show_bug.cgi?id=134512
7073
7074        Reviewed by Darin Adler.
7075
7076        Implement a method that Speak Selection can use to retrieve the selected content.
7077
7078        * UIProcess/ios/WKContentViewInteraction.mm:
7079        (-[WKContentView accessibilityRetrieveSpeakSelectionContent]):
7080
70812014-07-01  Anders Carlsson  <andersca@apple.com>
7082
7083        Update the highest back-forward list item ID in the other WebBackForwardListItem constructor
7084        https://bugs.webkit.org/show_bug.cgi?id=134515
7085
7086        Reviewed by Tim Horton.
7087
7088        * Shared/WebBackForwardListItem.cpp:
7089        (WebKit::WebBackForwardListItem::WebBackForwardListItem):
7090
70912014-07-01  Brady Eidson  <beidson@apple.com>
7092
7093        Fix ServicesOverlayController teardown
7094        <rdar://problem/17523998> and https://bugs.webkit.org/show_bug.cgi?id=134510
7095
7096        Reviewed by Mark Rowe.
7097
7098        * WebProcess/WebPage/mac/ServicesOverlayController.mm:
7099        (WebKit::ServicesOverlayController::~ServicesOverlayController): Flipped logic on null-checking the overlay.
7100
71012014-07-01  Sam Weinig  <sam@webkit.org>
7102
7103        [Cocoa][Mac] WKWebView should automatically set topContentInset when beneath a toolbar
7104        <rdar://problem/17523159>
7105        https://bugs.webkit.org/show_bug.cgi?id=134496
7106
7107        Reviewed by Beth Dakin.
7108
7109        - Adds _automaticallyAdjustsContentInsets SPI to both WKView and WKWebView.
7110        - Defaults _automaticallyAdjustsContentInsets to NO for WKView to keep legacy clients working.
7111        - Defaults _automaticallyAdjustsContentInsets to YES for WKWebView.
7112
7113        * UIProcess/API/Cocoa/WKViewPrivate.h:
7114        Add _automaticallyAdjustsContentInsets SPI.
7115
7116        * UIProcess/API/Cocoa/WKWebView.mm:
7117        (-[WKWebView initWithFrame:configuration:]):
7118        Default _automaticallyAdjustsContentInsets to YES for WKWebView.
7119
7120        (-[WKWebView _setTopContentInset:]):
7121        (-[WKWebView _topContentInset]):
7122        Change to forward to the WKView, since we now do coalescing and caching there.
7123
7124        (-[WKWebView _setAutomaticallyAdjustsContentInsets:]):
7125        (-[WKWebView _automaticallyAdjustsContentInsets]):
7126        Forward to the WKView.
7127
7128        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
7129        Add _automaticallyAdjustsContentInsets SPI.
7130
7131        * UIProcess/API/mac/WKView.mm:
7132        (-[WKView renewGState]):
7133        Ensure the contentInset is updated when the view changes, as its relative location to the toolbar may have changed.
7134
7135        (-[WKView addWindowObserversForWindow:]):
7136        (-[WKView removeWindowObservers]):
7137        (-[WKView observeValueForKeyPath:ofObject:change:context:]):
7138        Add observers for the contentLayoutRect and titlebarAppearsTransparent properties on the window. If either of them
7139        change, we need to recalculate the content inset.
7140
7141        (-[WKView _updateContentInsetsIfAutomatic]):
7142        If _automaticallyAdjustsContentInsets is YES, follow the same rules as AppKit in setting the top content inset. Like
7143        AppKit this is only done when:
7144            - The window's style mask has the NSFullSizeContentViewWindowMask bit.
7145            - The window does not have titlebarAppearsTransparent set.
7146            - And we are not in an enclosing NSScrollView.
7147
7148        (-[WKView _setTopContentInset:]):
7149        (-[WKView _topContentInset]):
7150        Coalesce setting the topContentInset to avoid a visual lag when resizing the window that was caused by us sending
7151        multiple topContentInsets to the WebContentProcess per runloop cycle. The reason for the lag was that at the time
7152        we observe the contentLayoutRect changing, our view may not yet be in its final position yet, so the inset will be
7153        temporarily wrong. When the view is finally positioned correctly, we will get a renewGState, at which point we will
7154        again calculate the inset, which now will be correct. Since these both happen in the same runloop iteration, we can
7155        just defer sending the inset to the WebContentProcess.
7156
7157        (-[WKView _setAutomaticallyAdjustsContentInsets:]):
7158        (-[WKView _automaticallyAdjustsContentInsets]):
7159        Add the new SPI.
7160
71612014-07-01  Anders Carlsson  <andersca@apple.com>
7162
7163        Add a function for restoring page state given a SessionState object
7164        https://bugs.webkit.org/show_bug.cgi?id=134509
7165
7166        Reviewed by Tim Horton.
7167
7168        * Shared/WebBackForwardListItem.h:
7169        (WebKit::WebBackForwardListItem::itemState):
7170        * UIProcess/WebBackForwardList.cpp:
7171        (WebKit::WebBackForwardList::saveState):
7172        * UIProcess/WebBackForwardList.h:
7173        * UIProcess/WebPageProxy.cpp:
7174        (WebKit::WebPageProxy::saveState):
7175        * UIProcess/WebPageProxy.h:
7176
71772014-07-01  Dan Bernstein  <mitz@apple.com>
7178
7179        [Cocoa] Navigation parameter in navigation delegate messages is nil for navigations started by the Web Content process
7180        https://bugs.webkit.org/show_bug.cgi?id=134482
7181
7182        Reviewed by Tim Horton.
7183
7184        * UIProcess/API/APILoaderClient.h:
7185        (API::LoaderClient::didDestroyNavigation): New client function, called when a navigation ID
7186        is not going to be used anymore.
7187
7188        * UIProcess/API/Cocoa/WKWebView.mm:
7189        (-[WKWebView _restoreFromSessionState:]): If restoring triggered a navigation, create a
7190        WKNavigation for its ID.
7191
7192        * UIProcess/Cocoa/NavigationState.h:
7193        * UIProcess/Cocoa/NavigationState.mm:
7194        (WebKit::NavigationState::createLoadRequestNavigation): Removed FIXME, because we now remove
7195        navigations from the map in LoaderClient::didDestroyNavigation.
7196        (WebKit::NavigationState::createBackForwardNavigation): Ditto.
7197        (WebKit::NavigationState::createReloadNavigation): Ditto.
7198        (WebKit::NavigationState::createLoadDataNavigation): Ditto.
7199        (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction): If we are only
7200        getting a navigation ID now, create a WKNavigation for it. Also changed to create the
7201        NSURLRequest lazily.
7202        (WebKit::NavigationState::LoaderClient::didStartProvisionalLoadForFrame): Assert that
7203        navigationID is not zero and that it maps to an existing WKNavigation.
7204        (WebKit::NavigationState::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
7205        Ditto.
7206        (WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame): Ditto.
7207        (WebKit::NavigationState::LoaderClient::didCommitLoadForFrame): Ditto.
7208        (WebKit::NavigationState::LoaderClient::didFinishDocumentLoadForFrame): Ditto.
7209        (WebKit::NavigationState::LoaderClient::didFinishLoadForFrame): Ditto.
7210        (WebKit::NavigationState::LoaderClient::didFailLoadWithErrorForFrame): Ditto.
7211        (WebKit::NavigationState::LoaderClient::didDestroyNavigation): Override the new client
7212        function to remove the navigation from the map.
7213        (WebKit::NavigationState::LoaderClient::processDidCrash): Clear the navigations map.
7214
7215        * UIProcess/WebFrameListenerProxy.cpp:
7216        (WebKit::WebFrameListenerProxy::WebFrameListenerProxy): Initialize new m_navigationID
7217        member variable.
7218        (WebKit::WebFrameListenerProxy::receivedPolicyDecision): Pass the navigation ID to
7219        WebFrame::receivedPolicyDecision.
7220        * UIProcess/WebFrameListenerProxy.h:
7221        (WebKit::WebFrameListenerProxy::navigationID): Added this accessor.
7222        (WebKit::WebFrameListenerProxy::setNavigationID): Ditto.
7223
7224        * UIProcess/WebFrameProxy.cpp:
7225        (WebKit::WebFrameProxy::receivedPolicyDecision): Added navigationID parameter, which is
7226        passed along to the WebPageProxy.
7227        * UIProcess/WebFrameProxy.h:
7228
7229        * UIProcess/WebPageProxy.cpp:
7230        (WebKit::WebPageProxy::receivedPolicyDecision): Added navigationID parameter, which is
7231        passed along in the message to the Web Content process.
7232        (WebKit::WebPageProxy::restoreFromSessionStateData): Changed to return a navigation ID of 0.
7233        (WebKit::WebPageProxy::restoreFromState): Changed to return a navigation ID if one was
7234        started.
7235        (WebKit::WebPageProxy::didDestroyNavigation): Added. Calls the new client function.
7236        (WebKit::WebPageProxy::decidePolicyForNavigationAction): Added navigationID and
7237        newNavigationID parameters. If a main-frame navigation doesn’t already have an ID, assign it
7238        a new ID and return it in the newNavigationID parmeter as well as setting it on the listener
7239        for the asynchronous case.
7240        * UIProcess/WebPageProxy.h:
7241
7242        * UIProcess/WebPageProxy.messages.in: Added navigationID and newNavigationID parameters.
7243
7244        * UIProcess/cf/WebPageProxyCF.cpp:
7245        (WebKit::WebPageProxy::restoreFromSessionStateData): Changed to return a navigation ID if
7246        one was started.
7247
7248        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
7249        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse): Updated for additional
7250        parameter.
7251        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Send the navigation
7252        ID to the UI process, get the new navigation ID from the reply, and set it on the document
7253        loader.
7254
7255        * WebProcess/WebPage/WebDocumentLoader.cpp:
7256        (WebKit::WebDocumentLoader::detachFromFrame): Override to let the UI process know that the
7257        navigation ID will not be used anymore.
7258        * WebProcess/WebPage/WebDocumentLoader.h:
7259
7260        * WebProcess/WebPage/WebFrame.cpp:
7261        (WebKit::WebFrame::didReceivePolicyDecision): Added navigationID parameter, set it on the
7262        document loader.
7263        (WebKit::WebFrame::documentLoaderDetached): Pass the message along to the UI process.
7264        * WebProcess/WebPage/WebFrame.h:
7265
7266        * WebProcess/WebPage/WebPage.cpp:
7267        (WebKit::WebPage::didReceivePolicyDecision): Pass new navigationID parameter along.
7268        * WebProcess/WebPage/WebPage.h:
7269
7270        * WebProcess/WebPage/WebPage.messages.in: Added navigationID parameter.
7271
72722014-07-01  Anders Carlsson  <andersca@apple.com>
7273
7274        Fix build.
7275
7276        * WebKit2.xcodeproj/project.pbxproj:
7277
72782014-07-01  Anders Carlsson  <andersca@apple.com>
7279
7280        Temporarily encode and decode the snapshot UUID
7281        https://bugs.webkit.org/show_bug.cgi?id=134507
7282
7283        Reviewed by Tim Horton.
7284
7285        * UIProcess/mac/LegacySessionStateCoding.cpp:
7286        (WebKit::encodeSessionHistory):
7287        (WebKit::decodeSessionHistoryEntry):
7288        (WebKit::decodeSessionHistoryEntries):
7289
72902014-07-01  Anders Carlsson  <andersca@apple.com>
7291
7292        Implement encodeSessionHistoryEntryData
7293        https://bugs.webkit.org/show_bug.cgi?id=134505
7294
7295        Reviewed by Tim Horton.
7296
7297        * UIProcess/API/C/WKPage.cpp:
7298        (WKPageCopySessionState):
7299        Add back a missing null check for the filter pointer.
7300
7301        * UIProcess/mac/LegacySessionStateCoding.cpp:
7302        (WebKit::encodeSessionHistoryEntryData):
7303
73042014-07-01  Simon Fraser  <simon.fraser@apple.com>
7305
7306        [UI-side compositing] Bad spinner on news.google.com: animations need to be ordered
7307        https://bugs.webkit.org/show_bug.cgi?id=134504
7308        <rdar://problem/17507892>
7309
7310        Reviewed by Tim Horton.
7311        
7312        The layer's addedAnimations property needs to maintain order, since the order
7313        in which transforms are applied is important.
7314
7315        * Shared/mac/RemoteLayerTreeTransaction.h: Use a Vector<pair<>> for addedAnimations.
7316        * Shared/mac/RemoteLayerTreeTransaction.mm:
7317        (WebKit::dumpChangedLayers):
7318        * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
7319        * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
7320        (WebKit::PlatformCAAnimationRemote::updateLayerAnimations):
7321        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
7322        (WebKit::PlatformCALayerRemote::addAnimationForKey): If this is a new entry, we
7323        can just append to addedAnimations, otherwise we have to find the existing one
7324        and update its properties.
7325        (WebKit::PlatformCALayerRemote::removeAnimationForKey): Do linear search to
7326        find the animation to remove (this list will normally be short).
7327
73282014-07-01  Anders Carlsson  <andersca@apple.com>
7329
7330        Add a encodeLegacySessionState function
7331        https://bugs.webkit.org/show_bug.cgi?id=134502
7332
7333        Reviewed by Tim Horton.
7334
7335        * UIProcess/LegacySessionStateCoding.h:
7336        * UIProcess/mac/LegacySessionStateCoding.cpp:
7337        (WebKit::encodeSessionHistoryEntryData):
7338        (WebKit::encodeLegacySessionHistoryEntryData):
7339        (WebKit::createDictionary):
7340        (WebKit::encodeSessionHistory):
7341        (WebKit::encodeLegacySessionState):
7342
73432014-07-01  Alexey Proskuryakov  <ap@apple.com>
7344
7345        [Cocoa] WebProcess doesn't follow localization of UI process when run as a service
7346        https://bugs.webkit.org/show_bug.cgi?id=133126
7347        <rdar://problem/13396515>
7348
7349        Patch by Alexey Proskuryakov.
7350        Reviewed by Tim Horton.
7351
7352        * Configurations/WebContentService.Development.xcconfig:
7353        * Configurations/WebContentService.xcconfig:
7354        Figure out which of the two keys to use. CFBundleAllowMixedLocalizations was
7355        a workaround before we got CFBundleFollowParentLocalization, and these cannot be
7356        used together.
7357
7358        * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::connectToService): Set up
7359        XPC bootstrap for CFBundle to use.
7360
7361        * WebKit2.xcodeproj/project.pbxproj: Added a script that applies the key to Info.plist.
7362
7363        * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-OSX.plist:
7364        * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-iOS.plist:
7365        * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist:
7366        * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist:
7367        Removed CFBundleAllowMixedLocalizations, we now add it programmatically.
7368
73692014-07-01  Alex Christensen  <achristensen@webkit.org>
7370
7371        [iOS] Unreviewed build fix after r170640.
7372
7373        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
7374        (WebKit::WebEditorClient::selectedTelephoneNumberRangesChanged):
7375        (WebKit::WebEditorClient::selectionRectsDidChange):
7376        * WebProcess/WebCoreSupport/WebEditorClient.h:
7377        * WebProcess/WebPage/WebPage.h:
7378        Add ifdefs to make everything compile and link.
7379
73802014-07-01  Anders Carlsson  <andersca@apple.com>
7381
7382        Add WKSessionStateGetTypeID
7383        https://bugs.webkit.org/show_bug.cgi?id=134499
7384
7385        Reviewed by Tim Horton.
7386
7387        * UIProcess/API/C/WKSessionStateRef.cpp:
7388        (WKSessionStateGetTypeID):
7389        * UIProcess/API/C/WKSessionStateRef.h:
7390
73912014-07-01  Daniel Bates  <dabates@apple.com>
7392
7393        Remove unnecessary calls to std::move()
7394        https://bugs.webkit.org/show_bug.cgi?id=134493
7395
7396        Reviewed by Anders Carlsson.
7397
7398        * Shared/ShareableResource.cpp:
7399        (WebKit::ShareableResource::Handle::tryWrapInCFData):
7400        * WebProcess/WebPage/WebFrame.cpp:
7401        (WebKit::WebFrame::certificateInfo): Return a WebCore::CertificateInfo instead
7402        of const WebCore::CertificateInfo& to avoid returning a dangling reference to
7403        a local variable. Also, remove the unnecessary calls to std::move() as the compiler
7404        will invoke the move constructor for WebCore::CertificateInfo on return from the
7405        function.
7406        * WebProcess/WebPage/WebFrame.h:
7407
74082014-07-01  Anders Carlsson  <andersca@apple.com>
7409
7410        Add a BackForwardListItemState struct and put the snapshot UUID there
7411        https://bugs.webkit.org/show_bug.cgi?id=134497
7412
7413        Reviewed by Sam Weinig.
7414
7415        * Shared/SessionState.cpp:
7416        (WebKit::PageState::encode):
7417        (WebKit::PageState::decode):
7418        (WebKit::BackForwardListItemState::encode):
7419        (WebKit::BackForwardListItemState::decode):
7420        * Shared/SessionState.h:
7421        * Shared/WebBackForwardListItem.cpp:
7422        (WebKit::WebBackForwardListItem::create):
7423        (WebKit::WebBackForwardListItem::WebBackForwardListItem):
7424        (WebKit::WebBackForwardListItem::backForwardData):
7425        (WebKit::WebBackForwardListItem::setBackForwardData):
7426        (WebKit::WebBackForwardListItem::encode):
7427        * Shared/WebBackForwardListItem.h:
7428        (WebKit::WebBackForwardListItem::setPageState):
7429        (WebKit::WebBackForwardListItem::setOriginalURL):
7430        (WebKit::WebBackForwardListItem::originalURL):
7431        (WebKit::WebBackForwardListItem::setURL):
7432        (WebKit::WebBackForwardListItem::url):
7433        (WebKit::WebBackForwardListItem::setTitle):
7434        (WebKit::WebBackForwardListItem::title):
7435        (WebKit::WebBackForwardListItem::setSnapshotUUID):
7436        (WebKit::WebBackForwardListItem::snapshotUUID):
7437        * UIProcess/WebBackForwardList.cpp:
7438        (WebKit::WebBackForwardList::restoreFromState):
7439        * UIProcess/WebProcessProxy.cpp:
7440        (WebKit::WebProcessProxy::addBackForwardItem):
7441        * UIProcess/mac/LegacySessionStateCoding.cpp:
7442        (WebKit::decodeSessionHistoryEntries):
7443
74442014-07-01  Yongjun Zhang  <yongjun_zhang@apple.com>
7445
7446        Add encodeInteger and decodeInteger for remote object encoder and decoder.
7447        https://bugs.webkit.org/show_bug.cgi?id=134453
7448
7449        In 64bit system, encodeInteger/decodeInteger is by default mapped into encodeInt64/decodeInt64.  For
7450        32bit system, they are mapped to encodeInt32/decodeInt32.  However, since we don't have encodeInt32/decodeInt32
7451        implementation in WKRemoteObjectCoder, we could hit crash in 32bit systems.
7452
7453        Reviewed by Sam Weinig.
7454
7455        * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
7456        (-[WKRemoteObjectEncoder encodeInteger:forKey:]): Instead of creating a new number type UInt32, use encodeInt64 for
7457            encoding NSInteger.
7458        (-[WKRemoteObjectDecoder decodeIntegerForKey:]):
7459
74602014-06-30  Anders Carlsson  <andersca@apple.com>
7461
7462        Use an std::function for filtering session state data
7463        https://bugs.webkit.org/show_bug.cgi?id=134481
7464
7465        Reviewed by Sam Weinig.
7466
7467        * UIProcess/API/C/WKPage.cpp:
7468        (WKPageCopySessionState):
7469        * UIProcess/API/Cocoa/WKWebView.mm:
7470        (-[WKWebView _sessionState]):
7471        * UIProcess/WebBackForwardList.h:
7472        * UIProcess/WebPageProxy.cpp:
7473        (WebKit::WebPageProxy::sessionStateData):
7474        * UIProcess/WebPageProxy.h:
7475        * UIProcess/cf/WebBackForwardListCF.cpp:
7476        (WebKit::WebBackForwardList::createCFDictionaryRepresentation):
7477        * UIProcess/cf/WebPageProxyCF.cpp:
7478        (WebKit::WebPageProxy::sessionStateData):
7479
74802014-07-01  Rohit Kumar  <kumar.rohit@samsung.com>
7481
7482        Clean up the WebKit build from unused parameter warning in Webkit2/UIProcess module
7483        https://bugs.webkit.org/show_bug.cgi?id=134294
7484
7485        Reviewed by Darin Adler.
7486
7487        * UIProcess/API/APIUIClient.h:
7488        (API::UIClient::reachedApplicationCacheOriginQuota):
7489
74902014-07-01  Brady Eidson  <beidson@apple.com>
7491
7492        Followup for: Combine the Telephone and Selection overlay controllers, updating UI behavior.
7493        https://bugs.webkit.org/show_bug.cgi?id=134461
7494
7495        Rubberstamped by Tim Horton.
7496
7497        * WebProcess/WebPage/mac/ServicesOverlayController.mm: Include the correct constant.
7498
74992014-07-01  Brady Eidson  <beidson@apple.com>
7500
7501        Build fix.
7502
7503        Forgot to commit locally before pushing.
7504
7505        * WebProcess/WebPage/WebPage.cpp:
7506        (WebKit::WebPage::servicesOverlayController): s/this/*this/
7507
75082014-07-01  Brady Eidson  <beidson@apple.com>
7509
7510        Combine the Telephone and Selection overlay controllers, updating UI behavior.
7511        https://bugs.webkit.org/show_bug.cgi?id=134461
7512
7513        Reviewed by Tim Horton.
7514
7515        * WebKit2.xcodeproj/project.pbxproj:
7516
7517        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
7518        (WebKit::WebEditorClient::selectedTelephoneNumberRangesChanged):
7519        (WebKit::WebEditorClient::selectionRectsDidChange):
7520
7521        Remove the separate Selection overlay controller:
7522        * WebProcess/WebPage/SelectionOverlayController.cpp: Removed.
7523        * WebProcess/WebPage/ServicesOverlayController.h: Renamed from Source/WebKit2/WebProcess/WebPage/SelectionOverlayController.h.
7524        (WebKit::ServicesOverlayController::create):
7525        * WebProcess/WebPage/mac/SelectionOverlayControllerMac.mm: Removed.
7526
7527        Remove the separate TelephoneNumber overlay controller:
7528        * WebProcess/WebPage/TelephoneNumberOverlayController.cpp: Removed.
7529        * WebProcess/WebPage/TelephoneNumberOverlayController.h: Removed.
7530        * WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm: Removed.
7531
7532        * WebProcess/WebPage/WebPage.cpp:
7533        (WebKit::WebPage::servicesOverlayController):
7534        (WebKit::WebPage::telephoneNumberOverlayController): Deleted.
7535        (WebKit::WebPage::selectionOverlayController): Deleted.
7536        (WebKit::WebPage::didChangeScrollOffsetForFrame): Deleted.
7537        * WebProcess/WebPage/WebPage.h:
7538        (WebKit::WebPage::serviceControlsEnabled): Deleted.
7539
7540        ServicesOverlayController is a combination of the old TelephoneNumber and Selection overlay controllers.
7541        A lot of code duplication is resolved, and things are generally easier to follow.
7542        It enforces displaying a telephone number highlight if precisely one telephone number is selected, or
7543        the selection highlight if the selection contains more than a single phone number
7544        * WebProcess/WebPage/mac/ServicesOverlayController.mm: Added.
7545        (WebKit::textQuadsToBoundingRectForRange):
7546        (WebKit::ServicesOverlayController::ServicesOverlayController):
7547        (WebKit::ServicesOverlayController::destroyOverlay):
7548        (WebKit::ServicesOverlayController::pageOverlayDestroyed):
7549        (WebKit::ServicesOverlayController::willMoveToWebPage):
7550        (WebKit::ServicesOverlayController::didMoveToWebPage):
7551        (WebKit::ServicesOverlayController::createOverlayIfNeeded):
7552        (WebKit::ServicesOverlayController::selectionRectsDidChange):
7553        (WebKit::ServicesOverlayController::selectedTelephoneNumberRangesChanged):
7554        (WebKit::ServicesOverlayController::clearHighlightState):
7555        (WebKit::ServicesOverlayController::drawRect):
7556        (WebKit::ServicesOverlayController::drawSelectionHighlight):
7557        (WebKit::ServicesOverlayController::drawTelephoneNumberHighlight):
7558        (WebKit::ServicesOverlayController::drawCurrentHighlight):
7559        (WebKit::ServicesOverlayController::mouseEvent):
7560        (WebKit::ServicesOverlayController::handleClick):
7561
75622014-07-01  Zan Dobersek  <zdobersek@igalia.com>
7563
7564        [WK2] IPC messages' arguments() method returns const std::tuple<> copies
7565        https://bugs.webkit.org/show_bug.cgi?id=131975
7566
7567        Reviewed by Darin Adler.
7568
7569        The arguments() method of the different IPC message objects should return a const reference
7570        to the std::tuple<> containing the arguments, instead of a const value. This avoids copying
7571        the std::tuple<> every time the arguments are encoded, and works best with the
7572        ArgumentEncoder::encode<std::tuple<...>>(const std::tuple<...>&) template instantiation.
7573
7574        The unit test baselines are updated accordingly.
7575
7576        * Scripts/webkit2/LegacyMessages-expected.h:
7577        (Messages::WebPage::LoadURL::arguments):
7578        (Messages::WebPage::LoadSomething::arguments):
7579        (Messages::WebPage::TouchEvent::arguments):
7580        (Messages::WebPage::AddEvent::arguments):
7581        (Messages::WebPage::LoadSomethingElse::arguments):
7582        (Messages::WebPage::DidReceivePolicyDecision::arguments):
7583        (Messages::WebPage::Close::arguments):
7584        (Messages::WebPage::PreferencesDidChange::arguments):
7585        (Messages::WebPage::SendDoubleAndFloat::arguments):
7586        (Messages::WebPage::SendInts::arguments):
7587        (Messages::WebPage::CreatePlugin::arguments):
7588        (Messages::WebPage::RunJavaScriptAlert::arguments):
7589        (Messages::WebPage::GetPlugins::arguments):
7590        (Messages::WebPage::GetPluginProcessConnection::arguments):
7591        (Messages::WebPage::TestMultipleAttributes::arguments):
7592        (Messages::WebPage::TestParameterAttributes::arguments):
7593        (Messages::WebPage::TemplateTest::arguments):
7594        (Messages::WebPage::SetVideoLayerID::arguments):
7595        (Messages::WebPage::DidCreateWebProcessConnection::arguments):
7596        (Messages::WebPage::InterpretKeyEvent::arguments):
7597        (Messages::WebPage::DeprecatedOperation::arguments):
7598        (Messages::WebPage::ExperimentalOperation::arguments):
7599        * Scripts/webkit2/Messages-expected.h:
7600        (Messages::WebPage::LoadURL::arguments):
7601        (Messages::WebPage::LoadSomething::arguments):
7602        (Messages::WebPage::TouchEvent::arguments):
7603        (Messages::WebPage::AddEvent::arguments):
7604        (Messages::WebPage::LoadSomethingElse::arguments):
7605        (Messages::WebPage::DidReceivePolicyDecision::arguments):
7606        (Messages::WebPage::Close::arguments):
7607        (Messages::WebPage::PreferencesDidChange::arguments):
7608        (Messages::WebPage::SendDoubleAndFloat::arguments):
7609        (Messages::WebPage::SendInts::arguments):
7610        (Messages::WebPage::CreatePlugin::arguments):
7611        (Messages::WebPage::RunJavaScriptAlert::arguments):
7612        (Messages::WebPage::GetPlugins::arguments):
7613        (Messages::WebPage::GetPluginProcessConnection::arguments):
7614        (Messages::WebPage::TestMultipleAttributes::arguments):
7615        (Messages::WebPage::TestParameterAttributes::arguments):
7616        (Messages::WebPage::TemplateTest::arguments):
7617        (Messages::WebPage::SetVideoLayerID::arguments):
7618        (Messages::WebPage::DidCreateWebProcessConnection::arguments):
7619        (Messages::WebPage::InterpretKeyEvent::arguments):
7620        (Messages::WebPage::DeprecatedOperation::arguments):
7621        (Messages::WebPage::ExperimentalOperation::arguments):
7622        * Scripts/webkit2/MessagesSuperclass-expected.h:
7623        (Messages::WebPage::LoadURL::arguments):
7624        * Scripts/webkit2/messages.py:
7625        (message_to_struct_declaration):
7626
76272014-07-01  Evan Nemerson  <evan@nemerson.com>
7628
7629        [GTK] Annotations for WebResource.get_data produce wrong signature in Vala binding
7630        https://bugs.webkit.org/show_bug.cgi?id=134476
7631
7632        Reviewed by Carlos Garcia Campos.
7633
7634        * UIProcess/API/gtk/WebKitWebResource.cpp: Add array length and
7635        element-type annotations to return value of webkit_web_resource_get_data_finish().
7636
76372014-07-01  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
7638
7639        [WK2] Can not convert ‘sessionState.WebKit::SessionState::provisionalURL’ from ‘WebCore::URL’ to ‘bool’
7640        https://bugs.webkit.org/show_bug.cgi?id=134487
7641
7642        Rubber-stamped by Carlos Garcia Campos.
7643
7644        * UIProcess/WebPageProxy.cpp: Use isNull().
7645        (WebKit::WebPageProxy::restoreFromState):
7646
76472014-07-01  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
7648
7649        Fix build break on EFL and GTK ports since r170611 and r170614
7650        https://bugs.webkit.org/show_bug.cgi?id=134479
7651
7652        Reviewed by Carlos Garcia Campos.
7653
7654        Add LegacySessionStateCodingNone.cpp in order to fix build break on EFL and GTK ports. Additionally
7655        SessionStateConversion.cpp is added to CMakeLists.txt as well.
7656
7657        * CMakeLists.txt:
7658        * UIProcess/LegacySessionStateCoding.h: Copied from Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.h.
7659        * UIProcess/LegacySessionStateCodingNone.cpp: Renamed from Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.h.
7660        (WebKit::encodeLegacySessionHistoryEntryData):
7661        (WebKit::decodeLegacySessionState):
7662        (WebKit::decodeLegacySessionHistoryEntryData):
7663        * UIProcess/WebPageProxy.cpp:
7664        (WebKit::WebPageProxy::loadFile):
7665        (WebKit::WebPageProxy::restoreFromState):
7666        * WebKit2.xcodeproj/project.pbxproj:
7667
76682014-06-30  Benjamin Poulain  <benjamin@webkit.org>
7669
7670        [iOS][WK2] The long press gesture recognizers should not block the pinch gesture
7671        https://bugs.webkit.org/show_bug.cgi?id=134477
7672        <rdar://problem/17514936>
7673
7674        Reviewed by Tim Horton.
7675
7676        * UIProcess/ios/WKContentViewInteraction.mm:
7677        (-[WKContentView gestureRecognizer:canPreventGestureRecognizer:]):
7678
76792014-06-30  Anders Carlsson  <andersca@apple.com>
7680
7681        Add WebPageProxy::restoreFromState
7682        https://bugs.webkit.org/show_bug.cgi?id=134480
7683
7684        Reviewed by Tim Horton.
7685
7686        * UIProcess/WebPageProxy.cpp:
7687        (WebKit::WebPageProxy::restoreFromState):
7688        * UIProcess/WebPageProxy.h:
7689
76902014-06-30  Anders Carlsson  <andersca@apple.com>
7691
7692        Add a function to restore a WebBackForwardList object from a BackForwardListState object
7693        https://bugs.webkit.org/show_bug.cgi?id=134478
7694
7695        Reviewed by Tim Horton.
7696
7697        * UIProcess/WebBackForwardList.cpp:
7698        (WebKit::generateWebBackForwardItemID):
7699        (WebKit::WebBackForwardList::restoreFromState):
7700        * UIProcess/WebBackForwardList.h:
7701        * UIProcess/cf/WebBackForwardListCF.cpp:
7702        (WebKit::generateWebBackForwardItemID): Deleted.
7703
77042014-06-30  Anders Carlsson  <andersca@apple.com>
7705
7706        Change the AddBackForwardItem message to take a page state object
7707        https://bugs.webkit.org/show_bug.cgi?id=134475
7708
7709        Reviewed by Andreas Kling.
7710
7711        * Scripts/webkit2/messages.py:
7712        (struct_or_class):
7713        (headers_for_type):
7714        * Shared/WebBackForwardListItem.cpp:
7715        (WebKit::WebBackForwardListItem::create):
7716        (WebKit::WebBackForwardListItem::WebBackForwardListItem):
7717        * Shared/WebBackForwardListItem.h:
7718        (WebKit::WebBackForwardListItem::setPageState):
7719        * UIProcess/WebProcessProxy.cpp:
7720        (WebKit::WebProcessProxy::addBackForwardItem):
7721        * UIProcess/WebProcessProxy.h:
7722        * UIProcess/WebProcessProxy.messages.in:
7723        * WebProcess/WebPage/WebBackForwardListProxy.cpp:
7724        (WebKit::updateBackForwardItem):
7725
77262014-06-30  Tim Horton  <timothy_horton@apple.com>
7727
7728        [WK2] Add a flatter find-in-page current match indicator style
7729        https://bugs.webkit.org/show_bug.cgi?id=134434
7730        <rdar://problem/16225673>
7731
7732        Reviewed by Simon Fraser.
7733
7734        * UIProcess/FindIndicator.cpp:
7735        (WebKit::findIndicatorsForTextRectsOverlap):
7736        (WebKit::FindIndicator::frameRect):
7737        (WebKit::flatHighlightColor):
7738        (WebKit::flatRimShadowColor):
7739        (WebKit::flatDropShadowColor):
7740        (WebKit::FindIndicator::draw):
7741        Add a flatter find indicator, with a bigger shadow.
7742
7743        * WebProcess/WebPage/FindController.cpp:
7744        (WebKit::FindController::updateFindUIAfterPageScroll):
7745        (WebKit::FindController::getFindIndicatorBitmapAndRect):
7746        (WebKit::FindController::hideFindIndicator):
7747        (WebKit::FindController::drawRect):
7748        Don't paint a shadow behind the secondary matches if we're using the new style.
7749
77502014-06-30  Benjamin Poulain  <benjamin@webkit.org>
7751
7752        [iOS][WK2] Improve double-tap-to-scroll on image documents
7753        https://bugs.webkit.org/show_bug.cgi?id=134474
7754        <rdar://problem/17496778>
7755
7756        Reviewed by Enrica Casucci.
7757
7758        On image document, we were always rendering the center of the image as the origin, which broke
7759        double tap to scroll.
7760
7761        This patch improves on this in two ways:
7762        1) If the hit testing already got the image, only change the type to replaced (to get the right
7763           scaling behavior for images since the type is block on iOS's image document).
7764        2) If the hit testing is outside the image, only center the axis that is not in the image.
7765           This way, we "fix" the component that is not valid, and keep the vali component.
7766           This works great for viewing comics on iPad.
7767
7768        * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
7769        (WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
7770
77712014-06-30  Enrica Casucci  <enrica@apple.com>
7772
7773        REGRESSION (WK2): Weird selection behavior on autos.yahoo.com, en.wikipedia.org.
7774        https://bugs.webkit.org/show_bug.cgi?id=134466
7775        <rdar://problem/16817263>
7776
7777        Reviewed by Benjamin Poulain.
7778
7779        Avoid selecting blocks across frame boundaries and skip non-selectable
7780        blocks. If the only block we find is almost the same height as the
7781        visible area, we should not select at all.
7782        This patch also fixes the logic to compute the next block when
7783        shrinking the selection. When calculating the new range after shrinking,
7784        we should not include the block that corresponds to the current handle position.
7785
7786        * WebProcess/WebPage/ios/WebPageIOS.mm:
7787        (WebKit::WebPage::rangeForWebSelectionAtPosition):
7788        (WebKit::WebPage::expandedRangeFromHandle):
7789        (WebKit::WebPage::contractedRangeFromHandle):
7790        (WebKit::WebPage::updateSelectionWithTouches):
7791
77922014-06-30  Anders Carlsson  <andersca@apple.com>
7793
7794        WebBackForwardListItem should not store back-forward data
7795        https://bugs.webkit.org/show_bug.cgi?id=134469
7796
7797        Reviewed by Darin Adler.
7798
7799        Change WebBackForwardListItem::backForwardData to encode the main frame state lazily,
7800        and change WebBackForwardListItem::setBackForwardData to decode it into the main frame state.
7801
7802        * Shared/WebBackForwardListItem.cpp:
7803        (WebKit::WebBackForwardListItem::backForwardData):
7804        (WebKit::WebBackForwardListItem::setBackForwardData):
7805        (WebKit::WebBackForwardListItem::encode):
7806        * Shared/WebBackForwardListItem.h:
7807        (WebKit::WebBackForwardListItem::backForwardData): Deleted.
7808        * UIProcess/cf/WebBackForwardListCF.cpp:
7809        (WebKit::WebBackForwardList::createCFDictionaryRepresentation):
7810        * WebProcess/WebPage/WebPage.cpp:
7811        (WebKit::WebPage::restoreSession):
7812
78132014-06-30  Anders Carlsson  <andersca@apple.com>
7814
7815        WebBackForwardListItems should hold on to PageState objects
7816        https://bugs.webkit.org/show_bug.cgi?id=134467
7817
7818        Reviewed by Darin Adler.
7819
7820        * Shared/WebBackForwardListItem.cpp:
7821        (WebKit::WebBackForwardListItem::WebBackForwardListItem):
7822        (WebKit::WebBackForwardListItem::encode):
7823        * Shared/WebBackForwardListItem.h:
7824        (WebKit::WebBackForwardListItem::setOriginalURL):
7825        (WebKit::WebBackForwardListItem::originalURL):
7826        (WebKit::WebBackForwardListItem::setURL):
7827        (WebKit::WebBackForwardListItem::url):
7828        (WebKit::WebBackForwardListItem::setTitle):
7829        (WebKit::WebBackForwardListItem::title):
7830
78312014-06-30  Benjamin Poulain  <benjamin@webkit.org>
7832
7833        Add a missing semicolon in WKContentViewInteraction
7834
7835        * UIProcess/ios/WKContentViewInteraction.mm:
7836        (nsSizeForTapHighlightBorderRadius):
7837        I messed up this when fixing the patch on landing.
7838
78392014-06-30  Anders Carlsson  <andersca@apple.com>
7840
7841        Adopt the legacy session decoding inside WebPage::restoreSession for now
7842        https://bugs.webkit.org/show_bug.cgi?id=134465
7843
7844        Reviewed by Sam Weinig.
7845
7846        * UIProcess/mac/LegacySessionStateCoding.cpp:
7847        (WebKit::decodeLegacySessionHistoryEntryData):
7848        * UIProcess/mac/LegacySessionStateCoding.h:
7849        * WebProcess/WebPage/WebPage.cpp:
7850        (WebKit::WebPage::restoreSession):
7851
78522014-06-30  Simon Fraser  <simon.fraser@apple.com>
7853
7854        [iOS WK2] Don't crash on status bar tap with overflow scroll views
7855        https://bugs.webkit.org/show_bug.cgi?id=134459
7856
7857        Reviewed by Tim Horton.
7858        
7859        The tiled scrolling indicator parents UIViews under CALayers, but that causes
7860        those views to miss -willMoveToWindow:nil notifications on teardown. This can leave
7861        deleted UIScrollViews in UIKit's "scroll to top" list.
7862        
7863        Fix by not making UIScrollViews in the debug layer tree host.
7864
7865        * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
7866        (WebKit::RemoteLayerTreeHost::createLayer):
7867
78682014-06-28  Oliver Hunt  <oliver@apple.com>
7869
7870       Restrict network process sandbox
7871       https://bugs.webkit.org/show_bug.cgi?id=134360
7872
7873       Reviewed by Sam Weinig.
7874
7875       Add more restrictions to the network process sandbox.
7876
7877       * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
7878       (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
7879         Always use the cache directory provided in the initialization parameters,
7880         and make sure we consume the cookie directory extension.
7881       * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
7882         Make the sandbox profile much more restrictive.
7883       * Shared/Network/NetworkProcessCreationParameters.cpp:
7884       (WebKit::NetworkProcessCreationParameters::encode):
7885       (WebKit::NetworkProcessCreationParameters::decode):
7886       * Shared/Network/NetworkProcessCreationParameters.h:
7887         The network process now requires an extension to access
7888         its cookie storage.
7889       * Shared/mac/SandboxUtilities.cpp:
7890       (WebKit::pathForProcessContainer):
7891       * Shared/mac/SandboxUtilities.h:
7892         We need to be able to get hold of our container so
7893         that we can get the correct cookie storage directory.
7894       * UIProcess/WebContext.cpp:
7895       (WebKit::WebContext::ensureNetworkProcess):
7896         We have to pass in the an extension for the cookie storage directory when
7897       initalising the network process
7898       * UIProcess/mac/WebContextMac.mm:
7899       (WebKit::WebContext::platformDefaultCookieStorageDirectory):
7900         Make sure we provide the correct location on IOS
7901       * WebProcess/cocoa/WebProcessCocoa.mm:
7902       (WebKit::WebProcess::platformInitializeWebProcess):
7903         Consume the cookie storage extension
7904
79052014-06-30  Simon Fraser  <simon.fraser@apple.com>
7906
7907        [iOS WK2] Turn off scrollsToTop on overflow UIScrollViews
7908        https://bugs.webkit.org/show_bug.cgi?id=134456
7909
7910        Reviewed by Tim Horton.
7911        
7912        Set scrollsToTop to NO on our UIScrollViews created for overflow scrolling, since
7913        we don't have a good strategy for when to allow it, and doing so would also require
7914        some smarts in the main UIScrollView.
7915
7916        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
7917        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren):
7918
79192014-06-30  Enrica Casucci  <enrica@apple.com>
7920
7921        REGRESSION (Okemo): The contextual menu on tap and hold does not cancel the other gestures.
7922        https://bugs.webkit.org/show_bug.cgi?id=134463
7923        <rdar://problem/17388907>
7924
7925        Reviewed by Benjamin Poulain.
7926
7927        * UIProcess/ios/WKContentViewInteraction.mm:
7928        (-[WKContentView _longPressRecognized:]):
7929
79302014-06-30  Anders Carlsson  <andersca@apple.com>
7931
7932        Implement the last pieces of encodeFrameStateNode
7933        https://bugs.webkit.org/show_bug.cgi?id=134460
7934
7935        Reviewed by Andreas Kling.
7936
7937        * UIProcess/mac/LegacySessionStateCoding.cpp:
7938        (WebKit::HistoryEntryDataEncoder::operator<<):
7939        (WebKit::isValidEnum):
7940        (WebKit::encodeFormDataElement):
7941        (WebKit::encodeFormData):
7942        (WebKit::encodeFrameStateNode):
7943
79442014-06-30  Benjamin Poulain  <bpoulain@apple.com>
7945
7946        [iOS][WK2] Move tap highlight to the inverseScaleRootView
7947        https://bugs.webkit.org/show_bug.cgi?id=134424
7948        <rdar://problem/17480880>
7949
7950        Reviewed by Tim Horton.
7951
7952        Enrica introduced the inverseScaleRootView that is a dynamic version of _highlightRootView.
7953
7954        This patch moves the tap highlight from its own inverse root to inverseScaleRootView. This provides better handling
7955        of scale, better behavior on crash, and remove one extra view from the hierarchy.
7956
7957        The code is pretty much the same, just moved around. Some of the changes:
7958
7959        Now the code needs to handle repainting live when the view scale. To do that, _showTapHighlightXXX was split in two:
7960        -_showTapHighlight to setup the view.
7961        -_updateTapHighlight to update the view based on the current scale.
7962
7963        Since the view updates live on scaling, we need to recompute the coordinates for each update. To do that, the _potentialTapHighlightInformation
7964        was generalized to handle all cases of highlight.
7965
7966        Since we can no longer test for the nullity of _potentialTapHighlightInformation,
7967        a new attribute is introduced for that: _hasTapHighlightForPotentialTap.
7968
7969        The last bit of change concern reentering the tap highlight. This becomes quite simple:
7970        1) _isTapHighlightIDValid is updated before the animation starts
7971           so that it can be set again during an animation.
7972        2) The animation checks the "finished" flags before removing the view from its superview
7973           to avoid breaking the new animation.
7974
7975        * UIProcess/API/Cocoa/WKWebView.mm:
7976        (withinEpsilon): Deleted.
7977        * UIProcess/ios/WKContentView.mm:
7978        (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
7979        Make _updateUnscaledView conditional to scale changes, that thing isn't cheap!
7980
7981        * UIProcess/ios/WKContentViewInteraction.h:
7982        (withinEpsilon):
7983        Move withinEpsilon() from WKContentView to use it from both classes.
7984
7985        * UIProcess/ios/WKContentViewInteraction.mm:
7986        (-[WKContentView cleanupInteraction]):
7987        (-[WKContentView _updateUnscaledView]):
7988        (-[WKContentView _updateTapHighlight]):
7989        (-[WKContentView _showTapHighlight]):
7990        (-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:]):
7991        (-[WKContentView _cancelInteraction]):
7992        (-[WKContentView _finishInteraction]):
7993        (-[WKContentView _singleTapDidReset:]):
7994        (-[WKContentView _singleTapCommited:]):
7995        (-[WKContentView _showTapHighlightWithColor:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:]): Deleted.
7996
79972014-06-30  Anders Carlsson  <andersca@apple.com>
7998
7999        Add code for encoding legacy session history entries
8000        https://bugs.webkit.org/show_bug.cgi?id=134452
8001
8002        Reviewed by Andreas Kling.
8003
8004        * UIProcess/mac/LegacySessionStateCoding.cpp:
8005        (WebKit::HistoryEntryDataEncoder::HistoryEntryDataEncoder):
8006        (WebKit::HistoryEntryDataEncoder::operator<<):
8007        (WebKit::HistoryEntryDataEncoder::finishEncoding):
8008        (WebKit::HistoryEntryDataEncoder::encodeArithmeticType):
8009        (WebKit::HistoryEntryDataEncoder::encodeFixedLengthData):
8010        (WebKit::HistoryEntryDataEncoder::grow):
8011        (WebKit::HistoryEntryDataEncoder::growCapacity):
8012        (WebKit::encodeFrameStateNode):
8013        (WebKit::encodeLegacySessionHistoryEntryData):
8014        (WebKit::decodeSessionHistoryEntryData):
8015        (WebKit::decodeLegacySessionHistoryEntryData):
8016        * UIProcess/mac/LegacySessionStateCoding.h:
8017
80182014-06-29  Yoav Weiss  <yoav@yoav.ws>
8019
8020        Add support for HTMLImageElement's sizes attribute
8021        https://bugs.webkit.org/show_bug.cgi?id=133620
8022
8023        Reviewed by Dean Jackson.
8024
8025        Added an ENABLE_PICTURE_SIZES compile flag.
8026
8027        * Configurations/FeatureDefines.xcconfig:
8028
80292014-06-28  Tim Horton  <timothy_horton@apple.com>
8030
8031        [iOS][WK2] PDFs never load inline again after the Web process crashes
8032        https://bugs.webkit.org/show_bug.cgi?id=134432
8033        <rdar://problem/17484205>
8034
8035        Reviewed by Dan Bernstein.
8036
8037        After a crash, the WebPage never gets mimeTypesWithCustomContentProviders filled back in.
8038
8039        * Shared/WebPageCreationParameters.cpp:
8040        (WebKit::WebPageCreationParameters::encode):
8041        (WebKit::WebPageCreationParameters::decode):
8042        * Shared/WebPageCreationParameters.h:
8043        * UIProcess/WebPageProxy.cpp:
8044        (WebKit::WebPageProxy::creationParameters):
8045        * WebProcess/WebPage/WebPage.cpp:
8046        (WebKit::WebPage::WebPage):
8047        Add mimeTypesWithCustomContentProviders to WebPageCreationParameters.
8048
8049        * UIProcess/Cocoa/WKWebViewContentProviderRegistry.h:
8050        * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:
8051        (-[WKWebViewContentProviderRegistry addPage:]):
8052        We don't need to send the MIME types across when a page is added, because it already got them in its creation parameters.
8053
8054        (-[WKWebViewContentProviderRegistry removePage:]):
8055        (-[WKWebViewContentProviderRegistry _mimeTypesWithCustomContentProviders]):
8056        Return a vector of all registered MIME types.
8057
8058        * UIProcess/ios/PageClientImplIOS.h:
8059        * UIProcess/ios/PageClientImplIOS.mm:
8060        (WebKit::PageClientImpl::mimeTypesWithCustomContentProviders):
8061        * UIProcess/PageClient.h:
8062        Add (iOS only for now) mimeTypesWithCustomContentProviders to PageClient.
8063
80642014-06-28  Dan Bernstein  <mitz@apple.com>
8065
8066        REGRESSION: WebPageProxy::attributedSubstringForCharacterRangeAsync never calls its callback function
8067        https://bugs.webkit.org/show_bug.cgi?id=134429
8068
8069        Reviewed by Tim Horton.
8070
8071        * UIProcess/mac/WebPageProxyMac.mm:
8072        (WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync):
8073
80742014-06-27  Simon Fraser  <simon.fraser@apple.com>
8075
8076        [iOS WK2] position:fixed inside accelerated overflow:scroll is jumpy
8077        https://bugs.webkit.org/show_bug.cgi?id=134426
8078        <rdar://problem/17474523>
8079
8080        Reviewed by Tim Horton.
8081
8082        After committing a new layer tree (with possibly stale position:fixed layer
8083        positions), we need the scrolling tree to update those positions based on
8084        the current scroll offset.
8085        
8086        To achieve that, implement ScrollingTreeOverflowScrollingNodeIOS::updateLayersAfterAncestorChange()
8087        and have it add to the cumulative delta the difference between the last committed scroll
8088        position and the current scroll position.
8089        
8090        Also make sure that ScrollingTreeOverflowScrollingNodeIOS doesn't call back to scrollViewDidScroll()
8091        when we're updating its scroll position inside a scrolling tree commit.
8092
8093        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
8094        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
8095        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::ScrollingTreeOverflowScrollingNodeIOS):
8096        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren):
8097        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateLayersAfterAncestorChange):
8098        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollViewDidScroll):
8099
81002014-06-27  Antti Koivisto  <antti@apple.com>
8101
8102        Flush throttling with remote layers
8103        https://bugs.webkit.org/show_bug.cgi?id=134398
8104
8105        Reviewed by Darin Adler.
8106
8107        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
8108        (WebKit::WebChromeClient::adjustLayerFlushThrottling):
8109        * WebProcess/WebCoreSupport/WebChromeClient.h:
8110        * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
8111        * WebProcess/WebPage/DrawingArea.h:
8112        (WebKit::DrawingArea::adjustLayerFlushThrottling):
8113        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
8114        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
8115        (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
8116        (WebKit::RemoteLayerTreeDrawingArea::updateScrolledExposedRect):
8117        (WebKit::RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlush):
8118
8119            Delay layer flushes during page loading.
8120            If use interacts with the page the next flush in unthrottled even if loading is in progress.
8121
8122        (WebKit::RemoteLayerTreeDrawingArea::adjustLayerFlushThrottling):
8123        
8124            Compute the new delay. The first visual flush uses a shorter delay.
8125            Flush immediately when we are no longer throttling.
8126
8127        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
8128        (WebKit::TiledCoreAnimationDrawingArea::updateScrolledExposedRect):
8129
81302014-06-27  Joseph Pecoraro  <pecoraro@apple.com>
8131
8132        [iOS][WK2] <select> tapping "next" does not save new picker value
8133        https://bugs.webkit.org/show_bug.cgi?id=134409
8134
8135        Reviewed by Enrica Casucci.
8136
8137        * UIProcess/ios/WKContentViewInteraction.mm:
8138        (-[WKContentView accessoryTab:]):
8139        We know the assisted node will change, so call endEditing
8140        before the assisted node changes in the WebProcess.
8141
8142        (-[WKContentView _stopAssistingNode]):
8143        Ensure we call endEditing to trigger controlEndEditing.
8144
8145        * UIProcess/ios/forms/WKFormSelectPicker.mm:
8146        (-[WKMultipleSelectPicker initWithView:]):
8147        (-[WKMultipleSelectPicker pickerView:row:column:checked:]):
8148        (-[WKSelectSinglePicker dealloc]):
8149        Style fixes.
8150
81512014-06-27  Peyton Randolph  <prandolph@apple.com>
8152
8153         Add feature flag for link long-press gesture.                                                                   
8154         https://bugs.webkit.org/show_bug.cgi?id=134262                                                                  
8155                                                                                                                         
8156         Reviewed by Enrica Casucci.                                                                                     
8157                                                                                                                         
8158         * Configurations/FeatureDefines.xcconfig:                                                                       
8159         Add ENABLE_LINK_LONG_PRESS. 
8160
81612014-06-26  Simon Fraser  <simon.fraser@apple.com>
8162
8163        [iOS WK2] Fix touch-scrollable elements with overflow:scroll on just one axis, and RTL scrolling
8164        https://bugs.webkit.org/show_bug.cgi?id=134377
8165        <rdar://problem/16762224>
8166
8167        Reviewed by Tim Horton.
8168
8169        Make -webkit-overflow-scrolling:touch scrolling work correctly when one axis
8170        has overflow:scroll and the other overflow:hidden. Also fix scrolling in RTL
8171        contexts.
8172        
8173        An RTL scroller with overflow-x:hidden will have a non-zero scroll origin,
8174        and needs to truncate the scrolled content on the left side. To pass the
8175        correct geometry to the UI process, we need to introduce the concept of
8176        "reachable" size as well as total content size; normally these are the same,
8177        but will differ when scrolling is only allowed on one axis but there is overflow
8178        on both axes.
8179        
8180        ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren() uses the total and
8181        reachable content sizes to set a negative edge inset on the left (for RTL) or top
8182        (for bottom-to-top) so prevent scrolling into these areas.
8183
8184        * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
8185        (ArgumentCoder<ScrollingStateScrollingNode>::encode):
8186        (ArgumentCoder<ScrollingStateScrollingNode>::decode):
8187        (WebKit::RemoteScrollingTreeTextStream::dump):
8188        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
8189        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren): 
8190
81912014-06-27  Joseph Pecoraro  <pecoraro@apple.com>
8192
8193        Fix various leaks, RetainPtrs should adopt allocs
8194        https://bugs.webkit.org/show_bug.cgi?id=134308
8195
8196        Reviewed by Alexey Proskuryakov.
8197
8198        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
8199        (-[WKWebProcessPlugInBrowserContextController _remoteObjectRegistry]):
8200
82012014-06-27  Dan Bernstein  <mitz@apple.com>
8202
8203        Remove unused definitions that were mistakenly added back in r170323 and then again in r170329
8204        https://bugs.webkit.org/show_bug.cgi?id=134397
8205
8206        Reviewed by Geoff Garen.
8207
8208        * UIProcess/API/Cocoa/WKBackForwardList.mm:
8209
82102014-06-26  Daniel Bates  <dabates@apple.com>
8211
8212        [iOS][WK2] Distant focusable element may not be scrolled into view when focused using keyboard
8213        https://bugs.webkit.org/show_bug.cgi?id=134309
8214        <rdar://problem/17427385>
8215
8216        Reviewed by Darin Adler.
8217
8218        Fixes an issue where the focusable element may not be scrolled into view when it's focused by
8219        using the keyboard accessory (i.e. the < and > buttons). In particular, we don't scroll a
8220        keyboard focused text field into view when it's positioned significantly outside the visible region.
8221
8222        * UIProcess/ios/WKContentViewInteraction.h: Added an instance variable called _didAccessoryTabInitiateFocus
8223        to track whether an accessory tab initiated the focus of the focusable element.
8224        * UIProcess/ios/WKContentViewInteraction.mm:
8225        (-[WKContentView cleanupInteraction]): Clear _didAccessoryTabInitiateFocus so that we're in a good state
8226        should the WebProcess crash between the time the UIProcess receives the accessory tab request and the
8227        WebProcess calls back to the UIProcess to zoom/scroll to the newly focused element.
8228        (-[WKContentView _displayFormNodeInputView]): Modified to pass an empty rectangle for the selection
8229        rectangle to -_zoomToFocusRect to avoid constraining the scroll to the newly focused element when it
8230        was focused using the keyboard accessory tab buttons
8231        (-[WKContentView accessoryTab:]): Modified to set _didAccessoryTabInitiateFocus to YES. We'll set
8232        this boolean to NO in -_displayFormNodeInputView.
8233
82342014-06-26  Timothy Horton  <timothy_horton@apple.com>
8235
8236        [iOS][WK2] Implement WKPDFView smart magnification
8237        https://bugs.webkit.org/show_bug.cgi?id=134269
8238        <rdar://problem/17272825>
8239
8240        Reviewed by Dan Bernstein.
8241
8242        * UIProcess/API/Cocoa/WKWebView.mm:
8243        (-[WKWebView _currentContentView]):
8244        (contentZoomScale):
8245        Factor _currentContentView out of contentZoomScale.
8246
8247        (-[WKWebView _zoomToRect:WebCore::atScale:origin:WebCore::]):
8248        (-[WKWebView _scrollToRect:WebCore::origin:WebCore::minimumScrollDistance:]):
8249        (-[WKWebView _contentRectForUserInteraction]):
8250        Use it in a bunch more places so we query the right view when zooming/scrolling for smart magnification.
8251
8252        * UIProcess/ios/WKPDFView.h:
8253        * UIProcess/ios/WKPDFView.mm:
8254        (-[WKPDFView scrollViewDidScroll:]):
8255        (-[WKPDFView _revalidateViews]):
8256        (-[WKPDFView zoom:to:atPoint:kind:]):
8257        (-[WKPDFView resetZoom:]):
8258        Implement zoom:to:atPoint:kind: and resetZoom: UIPDFPageViewDelegate methods.
8259        Convert the rects/points and forward them on to the WKWebView to do the zoom.
8260        resetZoom: doesn't provide the gesture origin, so we zoom out using the view center as our origin.
8261        Avoid parenting new UIPDFPageViews while starting a zoom; they'll end up with a bizarre
8262        animation on them and go flying across the screen (even before _isAnimatingZoom is set).
8263
82642014-06-26  Tim Horton  <timothy_horton@apple.com>
8265
8266        [WK2] Pinch-zoom shadows can overlap headers and footers
8267        https://bugs.webkit.org/show_bug.cgi?id=134372
8268        <rdar://problem/16004095>
8269
8270        Reviewed by Simon Fraser.
8271
8272        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
8273        (WebKit::shadowLayerPositionForFrame):
8274        (WebKit::shadowLayerBoundsForFrame):
8275        Compute the initial shadow layer and shadow bounds exactly as RenderLayerCompositor does
8276        (in updateRootLayerPosition and friends). Also, clip the shadow layer to the old document rect,
8277        otherwise it can extend over top of the header/footers. The content is automatically clipped to
8278        this rect by the root content layer, but the shadow is outside of that.
8279
8280        (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToLayers):
8281        (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
8282        Pass all of the arguments to constrainScrollPositionForOverhang, not just half of them.
8283        There's still a bug where we constrain incorrectly with header/footer layers, but that
8284        will be addressed elsewhere.
8285
8286        (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
8287        Make use of the new helpers.
8288
82892014-06-26  Tim Horton  <timothy_horton@apple.com>
8290
8291        Don't leak WKBrowsingContextControllers
8292        https://bugs.webkit.org/show_bug.cgi?id=134368
8293        <rdar://problem/17476582>
8294
8295        Reviewed by Sam Weinig.
8296
8297        * UIProcess/API/mac/WKView.mm:
8298        (-[WKView browsingContextController]):
8299        Adoption is important.
8300
83012014-06-26  Alexey Proskuryakov  <ap@apple.com>
8302
8303        REGRESSION: Mountain Lion: Gmail's "in new window" view of mail threads is very slow to load its content
8304        https://bugs.webkit.org/show_bug.cgi?id=133882
8305        <rdar://problem/17271965>
8306
8307        Reviewed by Brady Eidson.
8308
8309        * NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm:
8310        (WebKit::NetworkResourceLoadScheduler::platformInitializeMaximumHTTPConnectionCountPerHost):
8311        Same fix as in WebCore.
8312
83132014-06-26  Brady Eidson  <beidson@apple.com>
8314
8315        Remove use of PlatformStrategies for Gamepad API.
8316        https://bugs.webkit.org/show_bug.cgi?id=134348
8317
8318https://bugs.webkit.org/show_bug.cgi?id=134348
8319        * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
8320        (WebKit::NetworkProcessPlatformStrategies::createGamepadStrategy): Deleted.
8321        * NetworkProcess/NetworkProcessPlatformStrategies.h:
8322
8323        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
8324        (WebKit::WebPlatformStrategies::createGamepadStrategy): Deleted.
8325        (WebKit::WebPlatformStrategies::startMonitoringGamepads): Deleted.
8326        (WebKit::WebPlatformStrategies::stopMonitoringGamepads): Deleted.
8327        (WebKit::WebPlatformStrategies::platformGamepads): Deleted.
8328        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
8329
83302014-06-26  Dan Bernstein  <mitz@apple.com>
8331
8332        [iOS] Add API for opting into character selection granularity
8333        https://bugs.webkit.org/show_bug.cgi?id=134354
8334
8335        Reviewed by Geoff Garen.
8336
8337        * Shared/API/Cocoa/WKFoundation.h: Added a definition of WK_ENUM_AVAILABLE_IOS.
8338        * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
8339        (WKSelectionGranularity): Added this enum with two values, one representing dynamic
8340        granularity( the current, default behavior) and one representing character granularity.
8341        Delcared new selectionGranularity property.
8342        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
8343        (-[WKWebViewConfiguration copyWithZone:]): Copy the _selectionGranularity ivar.
8344
8345        * UIProcess/ios/WKContentViewInteraction.mm:
8346        (toUIWebSelectionMode): Added this helper function for mapping WKSelectionGranularity values
8347        to UIWebSelectionMode values.
8348        (-[WKContentView setupInteraction]): Use a selection assistant with the mode specified in
8349        the configuration.
8350        (-[WKContentView _stopAssistingKeyboard]): Ditto.
8351
8352        * WebProcess/WebPage/ios/WebPageIOS.mm:
8353        (WebKit::WebPage::selectWithGesture): Changed the behavior of the loupe gesture type in
8354        non-editable text to select a word, rather than an empty range, matching the UITextView
8355        behavior.
8356
83572014-06-26  Ada Chan  <adachan@apple.com>
8358
8359        Change the target membership of WKBackForwardListPrivate.h from WebKit2 to WebKit.
8360
8361        Rubber-stamped by Dan Bernstein.
8362
8363        * WebKit2.xcodeproj/project.pbxproj:
8364
83652014-06-26  Benjamin Poulain  <bpoulain@apple.com>
8366
8367        Remove a useless return in WebPageProxyIOS
8368
8369        * UIProcess/ios/WebPageProxyIOS.mm:
8370        (WebKit::WebPageProxy::updateVisibleContentRects):
8371        Darin caught this mistake in r170460.
8372
83732014-06-26  Chris Fleizach  <cfleizach@apple.com>
8374
8375        Add an undo group for each dictated utterance in WebKit
8376        https://bugs.webkit.org/show_bug.cgi?id=134086
8377
8378        Applied review comments from Sam Weinig.
8379
8380        Move the associated USE #define into Platform.h.
8381
8382        * UIProcess/PageClient.h:
8383
83842014-06-24  Roger Fong  <roger_fong@apple.com>
8385
8386        Don't allow sudden termination while writing to local storage.
8387        https://bugs.webkit.org/show_bug.cgi?id=134254.
8388        <rdar://problem/15093854>.
8389
8390        Reviewed by Darin Adler.
8391
8392        * UIProcess/Storage/LocalStorageDatabase.cpp:
8393        (WebKit::LocalStorageDatabase::scheduleDatabaseUpdate):
8394        Disable sudden termination when a database update is scheduled.
8395        (WebKit::LocalStorageDatabase::updateDatabase):
8396        Re-enable sudden termination when the update completes.
8397        * UIProcess/Storage/LocalStorageDatabase.h:
8398
83992014-06-25  Benjamin Poulain  <bpoulain@apple.com>
8400
8401        [iOS][WK2] Update the long press interactions correctly when an overflow scroll view scrolls
8402        https://bugs.webkit.org/show_bug.cgi?id=134334
8403
8404        Reviewed by Simon Fraser.
8405
8406        * UIProcess/PageClient.h:
8407        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
8408        (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidScroll):
8409        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
8410        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
8411        (-[WKOverflowScrollViewDelegate scrollViewWillBeginDragging:]):
8412        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::overflowScrollViewWillStartPanGesture):
8413        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollViewWillStartPanGesture): Deleted.
8414        * UIProcess/WebPageProxy.h:
8415        * UIProcess/ios/PageClientImplIOS.h:
8416        * UIProcess/ios/PageClientImplIOS.mm:
8417        (WebKit::PageClientImpl::overflowScrollViewWillStartPanGesture):
8418        (WebKit::PageClientImpl::overflowScrollViewDidScroll):
8419        (WebKit::PageClientImpl::scrollViewWillStartPanGesture): Deleted.
8420        * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
8421        (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeWillStartPanGesture):
8422        * UIProcess/ios/WKContentViewInteraction.h:
8423        * UIProcess/ios/WebPageProxyIOS.mm:
8424        (WebKit::WebPageProxy::overflowScrollViewWillStartPanGesture):
8425        (WebKit::WebPageProxy::overflowScrollViewDidScroll):
8426        (WebKit::WebPageProxy::scrollViewWillStartPanGesture): Deleted.
8427
84282014-06-25  Simon Fraser  <simon.fraser@apple.com>
8429
8430        [iOS WK2] Page jumps when rubber-banding on azuremagazine.com 
8431        https://bugs.webkit.org/show_bug.cgi?id=134238
8432        <rdar://problem/16918228>
8433
8434        Reviewed by Benjamin Poulain.
8435        
8436        If the scroll view is in the process of rubber-banding when -setContentSize: is called,
8437        it clamps the scroll offsets between zero and the max value, which visibly interrupts the
8438        rubberband. This can easily happen now that we continually send scroll events to the page
8439        on scrolling, especially when pages like azuremagazine.com do fake sticky by toggling
8440        in-flow elements into position:fixed.
8441        
8442        Fix by computing the amount of rubber-band before calling -setContentSize:, and then
8443        restoring the contentOffset with the same amount of rubber-band even when the content size
8444        is different, for top/left rubberbands.
8445        
8446        * UIProcess/API/Cocoa/WKWebView.mm:
8447        (-[WKWebView _didCommitLayerTree:WebKit::]):
8448        * UIProcess/ios/WKScrollView.h:
8449        * UIProcess/ios/WKScrollView.mm:
8450        (-[WKScrollView _currentTopLeftRubberbandAmount]):
8451        (-[WKScrollView _restoreContentOffsetWithRubberbandAmount:]):
8452        (-[WKScrollView _setContentSizePreservingContentOffsetDuringRubberband:]):
8453
84542014-06-25  Simon Fraser  <simon.fraser@apple.com>
8455
8456        [iOS WK2] Fixed position elements jump around when zooming
8457        https://bugs.webkit.org/show_bug.cgi?id=134328
8458        <rdar://problem/17447048>
8459
8460        Reviewed by Zalan Bujtas.
8461
8462        If a given remote layer tree commit contains changes of layers for viewport-constrained
8463        objects, then the associated scrolling tree also needs to show that the layers changed,
8464        since we need to re-run the "viewport changed" logic in the UI process to get the
8465        layers correctly positioned for the current zoom level.
8466        
8467        The bug was that page scale changes resulted in small "pixel alignment" position
8468        changes which touched layers, but we didn't commit any scrolling tree changes. So
8469        the scrolling tree commit would result in visibly stale layer positions, with no scrolling tree
8470        update to adjust them for the current transient zoom.
8471
8472        Fix by making use of the existing "alignment offset" field in the ViewportConstraints
8473        data, and having RemoteScrollingCoordinatorProxy::connectStateNodeLayers() note that
8474        fixed or sticky layers changed if any properties of fixed or sticky scrolling tree
8475        nodes were updated.
8476
8477        * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
8478        (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
8479
84802014-06-25  Benjamin Poulain  <bpoulain@apple.com>
8481
8482        REGRESSION (r170325): UI process crashes in lastCommittedLayerTreeTransactionID() when the Web Content process crashes
8483        https://bugs.webkit.org/show_bug.cgi?id=134284
8484
8485        Reviewed by Simon Fraser.
8486
8487        The crash was caused by the access to the Drawing Area after the crash.
8488        This lead to discovering another bug: m_lastVisibleContentRectUpdate could have been updated after WebPageProxy::resetState(),
8489        which in turn would prevent valid updates when a new WebProcess is created.
8490
8491        This patch fixes both issues by moving the VisibleContentRectUpdateInfo to be internal to WebPageProxy,
8492        then early return if we get there in an invalid state.
8493
8494        * UIProcess/WebPageProxy.h:
8495        * UIProcess/ios/WKContentView.mm:
8496        (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
8497        * UIProcess/ios/WebPageProxyIOS.mm:
8498        (WebKit::WebPageProxy::updateVisibleContentRects):
8499
85002014-06-25  Brady Eidson  <beidson@apple.com>
8501
8502        Add new platform gamepad abstractions
8503        https://bugs.webkit.org/show_bug.cgi?id=134325
8504
8505        Reviewed by Dean Jackson.
8506
8507        * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
8508        (WebKit::NetworkProcessPlatformStrategies::createGamepadStrategy):
8509        * NetworkProcess/NetworkProcessPlatformStrategies.h:
8510
8511        Actually return a GamepadStrategy in WK2 with no implementation for now:
8512        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
8513        (WebKit::WebPlatformStrategies::createGamepadStrategy):
8514        (WebKit::WebPlatformStrategies::startMonitoringGamepads):
8515        (WebKit::WebPlatformStrategies::stopMonitoringGamepads):
8516        (WebKit::WebPlatformStrategies::platformGamepads):
8517        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
8518
85192014-06-25  Jaehun Lim  <ljaehun.lim@samsung.com>
8520
8521        Unreviewed, CMake build fix after r170450
8522
8523        * CMakeLists.txt: Add ProcessAssertion.cpp and ProcessThrottler.cpp.
8524        * UIProcess/ProcessAssertion.cpp: Replace #import with #include.
8525
85262014-06-25  Tim Horton  <timothy_horton@apple.com>
8527
8528        [WK2] Shadow layer is in the wrong place while pinch-zooming
8529        https://bugs.webkit.org/show_bug.cgi?id=134321
8530
8531        Reviewed by Dan Bernstein.
8532
8533        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
8534        (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToLayers):
8535        (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
8536        (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
8537        The anchor point of the shadow layer changed, so we no longer need to shift our position to the center.
8538
85392014-06-25  Dan Bernstein  <mitz@apple.com>
8540
8541        Fixed crashes after r170450.
8542
8543        Reviewed by Tim Horton.
8544
8545        * UIProcess/WebProcessProxy.cpp:
8546        (WebKit::WebProcessProxy::WebProcessProxy): Removed iOS platform #ifdef around
8547        initialization of m_throttler.
8548
85492014-06-25  Beth Dakin  <bdakin@apple.com>
8550
8551        Crash in ScrollingTree::isRubberBandInProgress()
8552        https://bugs.webkit.org/show_bug.cgi?id=134316
8553        -and corresponding-
8554        <rdar://problem/16247911>
8555
8556        Reviewed by Geoffrey Garen.
8557
8558        Move all ScrollingTreeNode creation from ScrollingCoordinator subclasses into 
8559        ScrollingTree subclasses.
8560
8561        * UIProcess/Scrolling/RemoteScrollingTree.cpp:
8562        (WebKit::RemoteScrollingTree::createScrollingTreeNode):
8563        (WebKit::RemoteScrollingTree::createNode): Deleted.
8564        * UIProcess/Scrolling/RemoteScrollingTree.h:
8565        * WebProcess/Scrolling/RemoteScrollingCoordinator.h:
8566        * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
8567        (WebKit::RemoteScrollingCoordinator::createScrollingTreeNode): Deleted.
8568
85692014-06-25  Dan Bernstein  <mitz@apple.com>
8570
8571        Web process should become active when sent a message that requires a callback
8572        https://bugs.webkit.org/show_bug.cgi?id=134315
8573
8574        Reviewed by Tim Horton.
8575
8576        * UIProcess/API/Cocoa/WKWebView.mm:
8577        (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]): Removed one-off code to
8578        acquire an activity token, now that WebPageProxy::takeSnapshot does it automatically for us.
8579
8580        * UIProcess/GenericCallback.h:
8581        (WebKit::CallbackBase::CallbackBase): Made this constructor take and adopt an activity
8582        token.
8583        (WebKit::GenericCallback::create): Added an optional activity token parameter.
8584        (WebKit::GenericCallback::GenericCallback): Pass the activity token to the CallbackBase
8585        constructor.
8586        (WebKit::CallbackMap::put): Added an activity token parameter, which is passed along to
8587        GenericCallback::create.
8588
8589        * UIProcess/ProcessAssertion.cpp: Moved from Source/WebKit2/UIProcess/ios/ProcessAssertion.mm.
8590        This copy includes generic no-op implementations for platforms that don’t have assertions.
8591        (WebKit::ProcessAssertion::ProcessAssertion):
8592        (WebKit::ProcessAssertion::setState):
8593        * UIProcess/ProcessAssertion.h: Moved from Source/WebKit2/UIProcess/ios/ProcessAssertion.h.
8594        Changed platform #ifdefs to make this usable by all platforms.
8595
8596        * UIProcess/ProcessThrottler.cpp: Moved from Source/WebKit2/UIProcess/ios/ProcessThrottler.mm.
8597        Removed iOS platform #ifdef.
8598        * UIProcess/ProcessThrottler.h: Moved from Source/WebKit2/UIProcess/ios/ProcessThrottler.h.
8599        Ditto.
8600
8601        * UIProcess/WebPageProxy.cpp:
8602        (WebKit::WebPageProxy::validateCommand): Create a background activity token and pass it
8603        along to CallbackMap::put.
8604        (WebKit::WebPageProxy::runJavaScriptInMainFrame): Ditto.
8605        (WebKit::WebPageProxy::getRenderTreeExternalRepresentation): Ditto.
8606        (WebKit::WebPageProxy::getSourceForFrame): Ditto.
8607        (WebKit::WebPageProxy::getContentsAsString): Ditto.
8608        (WebKit::WebPageProxy::getBytecodeProfile): Ditto.
8609        (WebKit::WebPageProxy::getSelectionOrContentsAsString): Ditto.
8610        (WebKit::WebPageProxy::getSelectionAsWebArchiveData): Ditto.
8611        (WebKit::WebPageProxy::getMainResourceDataOfFrame): Ditto.
8612        (WebKit::WebPageProxy::getResourceDataFromFrame): Ditto.
8613        (WebKit::WebPageProxy::getWebArchiveOfFrame): Ditto.
8614        (WebKit::WebPageProxy::getMarkedRangeAsync): Ditto.
8615        (WebKit::WebPageProxy::getSelectedRangeAsync): Ditto.
8616        (WebKit::WebPageProxy::characterIndexForPointAsync): Ditto.
8617        (WebKit::WebPageProxy::firstRectForCharacterRangeAsync): Ditto.
8618        (WebKit::WebPageProxy::takeSnapshot): Ditto.
8619
8620        * UIProcess/WebProcessProxy.cpp:
8621        (WebKit::WebProcessProxy::sendProcessWillSuspend): Moved from WebProcessProxyIOS.mm.
8622        (WebKit::WebProcessProxy::sendCancelProcessWillSuspend): Ditto.
8623        (WebKit::WebProcessProxy::processReadyToSuspend): Ditto.
8624        (WebKit::WebProcessProxy::didCancelProcessSuspension): Ditto.
8625        * UIProcess/WebProcessProxy.h: Removed iOS platform #ifdef.
8626        * UIProcess/WebProcessProxy.messages.in: Ditto.
8627
8628        * UIProcess/ios/ProcessAssertionIOS.mm: Renamed from Source/WebKit2/UIProcess/ios/ProcessAssertion.mm.
8629
8630        * UIProcess/ios/WebPageProxyIOS.mm:
8631        (WebKit::WebPageProxy::selectWithGesture): Changed to pass the function directly to
8632        CallbackMap::put, along with a background activity token.
8633        (WebKit::WebPageProxy::updateSelectionWithTouches): Ditto.
8634        (WebKit::WebPageProxy::requestAutocorrectionData): Ditto.
8635        (WebKit::WebPageProxy::applyAutocorrection): Ditto.
8636        (WebKit::WebPageProxy::requestDictationContext): Ditto.
8637        (WebKit::WebPageProxy::requestAutocorrectionContext): Ditto.
8638        (WebKit::WebPageProxy::selectWithTwoTouches): Ditto.
8639
8640        * UIProcess/ios/WebProcessProxyIOS.mm:
8641        (WebKit::WebProcessProxy::sendProcessWillSuspend): Moved to WebProcessProxy.cpp.
8642        (WebKit::WebProcessProxy::sendCancelProcessWillSuspend): Ditto.
8643        (WebKit::WebProcessProxy::processReadyToSuspend): Ditto.
8644        (WebKit::WebProcessProxy::didCancelProcessSuspension): Ditto.
8645
8646        * UIProcess/mac/WebPageProxyMac.mm:
8647        (WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync): Create a background
8648        activity token and pass it along to CallbackMap::put.
8649
8650        * WebKit2.xcodeproj/project.pbxproj: Updated for moves and copies.
8651
8652        * WebProcess/WebProcess.cpp:
8653        (WebKit::WebProcess::WebProcess): Moved iOS platform #ifdef.
8654        * WebProcess/WebProcess.h: Ditto.
8655        * WebProcess/WebProcess.messages.in: Ditto.
8656
86572014-06-25  Chris Fleizach  <cfleizach@apple.com>
8658
8659        Add an undo group for each dictated utterance in WebKit
8660        https://bugs.webkit.org/show_bug.cgi?id=134086
8661
8662        Reviewed by Enrica Casucci.
8663
8664        * UIProcess/API/mac/WKView.mm:
8665        (-[WKView insertText:replacementRange:]):
8666        (-[WKView validAttributesForMarkedText]):
8667        * UIProcess/PageClient.h:
8668        * UIProcess/WebPageProxy.cpp:
8669        (WebKit::WebPageProxy::registerInsertionUndoGrouping):
8670        (WebKit::WebPageProxy::insertTextAsync):
8671        * UIProcess/WebPageProxy.h:
8672        * UIProcess/WebPageProxy.messages.in:
8673        * UIProcess/ios/PageClientImplIOS.mm:
8674        (WebKit::PageClientImpl::registerInsertionUndoGrouping):
8675        * UIProcess/mac/PageClientImpl.h:
8676        * UIProcess/mac/PageClientImpl.mm:
8677        (WebKit::PageClientImpl::registerInsertionUndoGrouping):
8678        * UIProcess/mac/WebPageProxyMac.mm:
8679        (WebKit::WebPageProxy::insertDictatedTextAsync):
8680        * WebProcess/WebPage/WebPage.cpp:
8681        (WebKit::WebPage::insertTextAsync):
8682        * WebProcess/WebPage/WebPage.h:
8683        * WebProcess/WebPage/WebPage.messages.in:
8684        * WebProcess/WebPage/mac/WebPageMac.mm:
8685        (WebKit::WebPage::insertDictatedTextAsync):
8686
86872014-06-25  Joseph Pecoraro  <pecoraro@apple.com>
8688
8689        [iOS]: WK2 Inspector Node Search
8690        https://bugs.webkit.org/show_bug.cgi?id=134279
8691
8692        Reviewed by Benjamin Poulain.
8693
8694        * UIProcess/ios/WKInspectorNodeSearchGestureRecognizer.h: Added.
8695        * UIProcess/ios/WKInspectorNodeSearchGestureRecognizer.mm: Added.
8696        (-[WKInspectorNodeSearchGestureRecognizer locationInView:]):
8697        (-[WKInspectorNodeSearchGestureRecognizer _processTouches:state:]):
8698        (-[WKInspectorNodeSearchGestureRecognizer touchesBegan:withEvent:]):
8699        (-[WKInspectorNodeSearchGestureRecognizer touchesMoved:withEvent:]):
8700        (-[WKInspectorNodeSearchGestureRecognizer touchesEnded:withEvent:]):
8701        (-[WKInspectorNodeSearchGestureRecognizer touchesCancelled:withEvent:]):
8702        (-[WKInspectorNodeSearchGestureRecognizer reset]):
8703        Gesture recognizer that tracks a single touch, updates as that touch
8704        moves, and ends when that touch is cancelled or ends. The location
8705        of the gesture recognizer is the location of the touch it was tracking.
8706
8707        * UIProcess/ios/WKContentViewInteraction.h:
8708        * UIProcess/ios/WKContentViewInteraction.mm:
8709        (-[WKContentView cleanupInteraction]):
8710        Handle the inspector node search gesture recognizer if needed.
8711
8712        (-[WKContentView _removeDefaultGestureRecognizers]):
8713        (-[WKContentView _addDefaultGestureRecognizers]):
8714        Helpers to add and remove the default gestures.
8715
8716        (-[WKContentView _enableInspectorNodeSearch]):
8717        (-[WKContentView _disableInspectorNodeSearch]):
8718        When node search is enabled, remove all gesture recognizers and
8719        replace with a single inspector node search gesture recognizer.
8720        Likewise, inverse that when disabled.
8721
8722        (-[WKContentView _inspectorNodeSearchRecognized:]):
8723        Notify the WebProcess of new touch positions during node search.
8724
8725        (-[WKContentView hasSelectablePositionAtPoint:]):
8726        When inspector node search is enabled, disable selection.
8727
8728        * WebProcess/WebPage/ios/WebPageIOS.mm:
8729        (WebKit::WebPage::inspectorNodeSearchMovedToPosition):
8730        Send a mouse move to the new location. WebCore will update the highlight.
8731
8732        (WebKit::WebPage::inspectorNodeSearchEndedAtPosition):
8733        Inspect the node at the location.
8734
8735        * UIProcess/API/Cocoa/WKWebView.mm:
8736        (-[WKWebView _enableInspectorNodeSearch]):
8737        (-[WKWebView _disableInspectorNodeSearch]):
8738        * UIProcess/API/Cocoa/WKWebViewInternal.h:
8739        * UIProcess/PageClient.h:
8740        * UIProcess/WebPageProxy.h:
8741        * UIProcess/WebPageProxy.messages.in:
8742        * UIProcess/ios/PageClientImplIOS.h:
8743        * UIProcess/ios/PageClientImplIOS.mm:
8744        (WebKit::PageClientImpl::enableInspectorNodeSearch):
8745        (WebKit::PageClientImpl::disableInspectorNodeSearch):
8746        * UIProcess/ios/WebPageProxyIOS.mm:
8747        (WebKit::WebPageProxy::inspectorNodeSearchMovedToPosition):
8748        (WebKit::WebPageProxy::inspectorNodeSearchEndedAtPosition):
8749        (WebKit::WebPageProxy::enableInspectorNodeSearch):
8750        (WebKit::WebPageProxy::disableInspectorNodeSearch):
8751        * WebKit2.xcodeproj/project.pbxproj:
8752        * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
8753        (WebKit::WebInspectorClient::didSetSearchingForNode):
8754        * WebProcess/WebCoreSupport/WebInspectorClient.h:
8755        * WebProcess/WebPage/WebPage.h:
8756        * WebProcess/WebPage/WebPage.messages.in:
8757        * WebProcess/WebPage/ios/WebPageIOS.mm:
8758        (WebKit::WebPage::enableInspectorNodeSearch):
8759        (WebKit::WebPage::disableInspectorNodeSearch):
8760        Pass the inspector node search state up from the WebProcess
8761        to the WKContentView in the UIProcess. Likewise some messages
8762        in the reverse direction.
8763
87642014-06-25  Dana Burkart  <dburkart@apple.com>
8765
8766        Add support for 5-tuple versioning.
8767
8768        Reviewed by David Farler.
8769
8770        * Configurations/Version.xcconfig:
8771
87722014-06-25  Dan Bernstein  <mitz@apple.com>
8773
8774        <rdar://problem/17448049> REGRESSION (r170254): Input methods don’t work
8775        https://bugs.webkit.org/show_bug.cgi?id=134311
8776
8777        Reviewed by Tim Horton.
8778
8779        * UIProcess/WebPageProxy.cpp:
8780        (WebKit::WebPageProxy::getSelectedRangeAsync): Removed code that accidentally put the
8781        callback function into a throwaway EditingRangeCallback.
8782
87832014-06-25  Timothy Horton  <timothy_horton@apple.com>
8784
8785        [iOS][WK2] Rotating a zoomed PDF leads to weird scrolling behavior
8786        https://bugs.webkit.org/show_bug.cgi?id=134286
8787
8788        Reviewed by Benjamin Poulain.
8789
8790        * UIProcess/ios/WKPDFView.mm:
8791        (-[WKPDFView _computePageAndDocumentFrames]):
8792        The WKPDFView frame and scroll view content size need to be scaled.
8793
8794        (-[WKPDFView web_setScrollView:]): Deleted.
8795
8796        (-[WKPDFView web_initWithFrame:webView:]):
8797        Get rid of _documentFrame, and don't set it at initWithFrame: time (it's not useful yet).
8798
87992014-06-25  Laszlo Gombos  <l.gombos@samsung.com>
8800
8801        Remove build guard for progress element
8802        https://bugs.webkit.org/show_bug.cgi?id=134292
8803
8804        Reviewed by Benjamin Poulain.
8805
8806        * Configurations/FeatureDefines.xcconfig:
8807
88082014-06-24  Carlos Garcia Campos  <cgarcia@igalia.com>
8809
8810        [GTK] Windowed plugins visibility doesn't work
8811        https://bugs.webkit.org/show_bug.cgi?id=131487
8812
8813        Reviewed by Anders Carlsson.
8814
8815        Implement plugins visibility changes and add a new message to
8816        notify the UI process when a windowed plugin is shown/hidden to
8817        show/hide the plugin widget.
8818
8819        * PluginProcess/PluginControllerProxy.cpp:
8820        (WebKit::PluginControllerProxy::visibilityDidChange): Add
8821        implementation to notify the plugin about visibility change.
8822        (WebKit::PluginControllerProxy::windowedPluginVisibilityDidChange):
8823        Send WindowedPluginVisibilityDidChange to the plugin proxy.
8824        * PluginProcess/PluginControllerProxy.h:
8825        * PluginProcess/PluginControllerProxy.messages.in: Add VisibilityDidChange message.
8826        * UIProcess/WebPageProxy.h: Add windowedPluginVisibilityDidChange
8827        to handle WindowedPluginVisibilityDidChange message.
8828        * UIProcess/WebPageProxy.messages.in: Add WindowedPluginVisibilityDidChange message.
8829        * UIProcess/efl/WebPageProxyEfl.cpp:
8830        (WebKit::WebPageProxy::windowedPluginVisibilityDidChange):
8831        * UIProcess/gtk/WebPageProxyGtk.cpp:
8832        (WebKit::WebPageProxy::createPluginContainer): Do not show the
8833        plugins by default.
8834        (WebKit::WebPageProxy::windowedPluginVisibilityDidChange): Show or hide the plugin widget.
8835        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
8836        (WebKit::NetscapePlugin::NetscapePlugin): Initialize m_isVisible.
8837        (WebKit::NetscapePlugin::visibilityDidChange): Add visible parameter and save it in m_isVisible
8838        member, calling platformVisibilityDidChange() only when it has actually changed.
8839        * WebProcess/Plugins/Netscape/NetscapePlugin.h:
8840        * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
8841        (WebKit::NetscapePlugin::platformVisibilityDidChange): Notify the controller about visibility change.
8842        * WebProcess/Plugins/PDF/PDFPlugin.h:
8843        * WebProcess/Plugins/Plugin.h:
8844        * WebProcess/Plugins/PluginController.h:
8845        * WebProcess/Plugins/PluginProxy.cpp:
8846        (WebKit::PluginProxy::visibilityDidChange): Send VisibilityDidChange message to the plugin controller proxy.
8847        (WebKit::PluginProxy::windowedPluginVisibilityDidChange): Notify the controller about visibility change.
8848        * WebProcess/Plugins/PluginProxy.h:
8849        * WebProcess/Plugins/PluginProxy.messages.in: Add WindowedPluginVisibilityDidChange message.
8850        * WebProcess/Plugins/PluginView.cpp:
8851        (WebKit::PluginView::didInitializePlugin): Also call viewVisibilityDidChange() when the plugin is initialized.
8852        (WebKit::PluginView::setParentVisible): Override this Widget method to update the plugin visibility when parent
8853        widget is shown/hidden.
8854        (WebKit::PluginView::viewVisibilityDidChange): Pass visible parameter to visibilityDidChange().
8855        (WebKit::PluginView::windowedPluginVisibilityDidChange): Send WindowedPluginVisibilityDidChange message to the UI process.
8856        * WebProcess/Plugins/PluginView.h:
8857
88582014-06-24  Benjamin Poulain  <bpoulain@apple.com>
8859
8860        [iOS][WK2] We should not start potential tap activation unless the tap gesture recognizer succeed
8861        https://bugs.webkit.org/show_bug.cgi?id=134277
8862        <rdar://problem/17439973>
8863
8864        Reviewed by Anders Carlsson.
8865
8866        * UIProcess/ios/WKSyntheticClickTapGestureRecognizer.m:
8867        (-[WKSyntheticClickTapGestureRecognizer setState:]):
8868        We were calling the _gestureRecognizedAction even for failure states. The potential activation work
8869        is not light on the Web Process, we should not start if we don't care about the result.
8870
88712014-06-24  Benjamin Poulain  <bpoulain@apple.com>
8872
8873        [iOS][WK2] Adopt the C API of UIWebTouchEventsGestureRecognizer for touch event mapping
8874        https://bugs.webkit.org/show_bug.cgi?id=134234
8875
8876        Reviewed by Tim Horton.
8877
8878        The C API is more efficient and expose properties we will need for other patches. This patch moves from
8879        getting each value independently on UIWebTouchEventsGestureRecognizer to the single structure exposed
8880        by _UIWebTouchEvent.
8881
8882        * Shared/NativeWebTouchEvent.h:
8883        * Shared/ios/NativeWebTouchEventIOS.mm:
8884        (WebKit::convertTouchPhase):
8885        (WebKit::extractWebTouchPoint):
8886        (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
8887        * UIProcess/ios/WKContentViewInteraction.mm:
8888        (-[WKContentView _webTouchEventsRecognized:]):
8889
88902014-06-24  Joseph Pecoraro  <pecoraro@apple.com>
8891
8892        [iOS]: WK2 Inspector Node Highlighting
8893        https://bugs.webkit.org/show_bug.cgi?id=134257
8894
8895        Reviewed by Timothy Hatcher.
8896
8897        * Scripts/webkit2/messages.py:
8898        (struct_or_class):
8899        (headers_for_type):
8900        * Shared/WebCoreArgumentCoders.h:
8901        * Shared/WebCoreArgumentCoders.cpp:
8902        (IPC::ArgumentCoder<Highlight>::encode):
8903        (IPC::ArgumentCoder<Highlight>::decode):
8904        Add a way to encode a WebCore::Highlight struct.
8905
8906        * UIProcess/API/Cocoa/WKWebViewInternal.h:
8907        * UIProcess/API/Cocoa/WKWebView.mm:
8908        (-[WKWebView _showInspectorHighlight:WebCore::]):
8909        (-[WKWebView _hideInspectorHighlight]):
8910        * UIProcess/PageClient.h:
8911        * UIProcess/WebPageProxy.h:
8912        * UIProcess/WebPageProxy.messages.in:
8913        * UIProcess/ios/PageClientImplIOS.h:
8914        * UIProcess/ios/PageClientImplIOS.mm:
8915        (WebKit::PageClientImpl::showInspectorHighlight):
8916        (WebKit::PageClientImpl::hideInspectorHighlight):
8917        * UIProcess/ios/WebPageProxyIOS.mm:
8918        (WebKit::WebPageProxy::showInspectorHighlight):
8919        (WebKit::WebPageProxy::hideInspectorHighlight):
8920        * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
8921        (WebKit::WebInspectorClient::highlight):
8922        (WebKit::WebInspectorClient::hideHighlight):
8923        * WebProcess/WebPage/WebPage.h:
8924        * WebProcess/WebPage/ios/WebPageIOS.mm:
8925        (WebKit::WebPage::showInspectorHighlight):
8926        (WebKit::WebPage::hideInspectorHighlight):
8927        Send web process highlight / hideHighlight messages up to
8928        the UIProcess so it can highlight in the WKContentView.
8929        Pass up a WebCore::Highlight in Document coordinates.
8930
8931        * UIProcess/ios/WKContentView.h:
8932        * UIProcess/ios/WKContentView.mm:
8933        (-[WKInspectorHighlightView initWithFrame:]):
8934        (-[WKInspectorHighlightView dealloc]):
8935        (-[WKInspectorHighlightView _removeAllLayers]):
8936        (-[WKInspectorHighlightView _createLayers:]):
8937        (findIntersectionOnLineBetweenPoints):
8938        (quadIntersection):
8939        (layerPathWithHole):
8940        (layerPath):
8941        (-[WKInspectorHighlightView _layoutForNodeHighlight:]):
8942        (-[WKInspectorHighlightView _layoutForRectsHighlight:]):
8943        (-[WKInspectorHighlightView update:]):
8944        Reuse the WebKit1 code to turn highlight float quads into CAShapeLayers.
8945
8946        (-[WKContentView _showInspectorHighlight:WebCore::]):
8947        (-[WKContentView _hideInspectorHighlight]):
8948        Show and hide the highlight view with the respective WebCore::Highlight.
8949
89502014-06-24  Anders Carlsson  <andersca@apple.com>
8951
8952        Simplify decodeLegacySessionState
8953        https://bugs.webkit.org/show_bug.cgi?id=134280
8954
8955        Reviewed by Andreas Kling.
8956
8957        There's no need to use a LegacySessionStateDecoder object with a single member,
8958        just make all functions static and only export a single entry point; decodeLegacySessionState.
8959
8960        No functionality change, just moving code around.
8961
8962        * UIProcess/API/C/WKSessionStateRef.cpp:
8963        (WKSessionStateCreateFromData):
8964        * UIProcess/mac/LegacySessionStateCoding.cpp:
8965        (WebKit::decodeSessionHistoryEntryData):
8966        (WebKit::decodeSessionHistoryEntry):
8967        (WebKit::decodeSessionHistoryEntries):
8968        (WebKit::decodeV0SessionHistory):
8969        (WebKit::decodeV1SessionHistory):
8970        (WebKit::decodeSessionHistory):
8971        (WebKit::decodeLegacySessionState):
8972        (WebKit::LegacySessionStateDecoder::LegacySessionStateDecoder): Deleted.
8973        (WebKit::LegacySessionStateDecoder::~LegacySessionStateDecoder): Deleted.
8974        (WebKit::LegacySessionStateDecoder::decodeSessionState): Deleted.
8975        (WebKit::LegacySessionStateDecoder::decodeSessionHistory): Deleted.
8976        (WebKit::LegacySessionStateDecoder::decodeV0SessionHistory): Deleted.
8977        (WebKit::LegacySessionStateDecoder::decodeV1SessionHistory): Deleted.
8978        (WebKit::LegacySessionStateDecoder::decodeSessionHistoryEntries): Deleted.
8979        (WebKit::LegacySessionStateDecoder::decodeSessionHistoryEntry): Deleted.
8980        (WebKit::LegacySessionStateDecoder::decodeSessionHistoryEntryData): Deleted.
8981        * UIProcess/mac/LegacySessionStateCoding.h:
8982
89832014-06-24  Brady Eidson  <beidson@apple.com>
8984
8985        Enable GAMEPAD in the Mac build, but disabled at runtime.
8986        https://bugs.webkit.org/show_bug.cgi?id=134255
8987
8988        Reviewed by Dean Jackson.
8989
8990        * Configurations/FeatureDefines.xcconfig:
8991
8992        * Shared/WebPreferencesDefinitions.h:
8993        * UIProcess/API/C/WKPreferences.cpp:
8994        (WKPreferencesSetGamepadsEnabled):
8995        (WKPreferencesGetGamepadsEnabled):
8996        * UIProcess/API/C/WKPreferencesRefPrivate.h:
8997
8998        * WebProcess/WebPage/WebPage.cpp:
8999        (WebKit::WebPage::updatePreferences):
9000
90012014-06-24  Anders Carlsson  <andersca@apple.com>
9002
9003        Add support for v0 legacy decoding
9004        https://bugs.webkit.org/show_bug.cgi?id=134275
9005
9006        Reviewed by Andreas Kling.
9007
9008        * Shared/SessionState.h:
9009        * UIProcess/mac/LegacySessionStateCoding.cpp:
9010        (WebKit::LegacySessionStateDecoder::decodeV0SessionHistory):
9011        (WebKit::LegacySessionStateDecoder::decodeV1SessionHistory):
9012
90132014-06-24  Anders Carlsson  <andersca@apple.com>
9014
9015        Add SPI for clearing an entire back-forward list
9016        https://bugs.webkit.org/show_bug.cgi?id=134274
9017
9018        Reviewed by Dan Bernstein.
9019
9020        Add -[WKBackForwardList _clear] which only clears the back-forward items, and
9021        change -[WKBackForwardList _removeAllItems] to remove all items including the current one.
9022
9023        * UIProcess/API/Cocoa/WKBackForwardList.mm:
9024        (-[WKBackForwardList _removeAllItems]):
9025        (-[WKBackForwardList _clear]):
9026        * UIProcess/API/Cocoa/WKBackForwardListPrivate.h:
9027        * UIProcess/WebBackForwardList.cpp:
9028        (WebKit::WebBackForwardList::removeAllItems):
9029        * UIProcess/WebBackForwardList.h:
9030
90312014-06-24  Anders Carlsson  <andersca@apple.com>
9032
9033        Add iOS specific frame state member variables
9034        https://bugs.webkit.org/show_bug.cgi?id=134268
9035
9036        Reviewed by Andreas Kling.
9037
9038        * Shared/SessionState.cpp:
9039        (WebKit::FrameState::encode):
9040        (WebKit::FrameState::decode):
9041        * Shared/SessionState.h:
9042        * UIProcess/mac/LegacySessionStateCoding.cpp:
9043        (WebKit::HistoryEntryDataDecoder::operator>>):
9044        (WebKit::decodeBackForwardTreeNode):
9045        * WebProcess/WebCoreSupport/SessionStateConversion.cpp:
9046        (WebKit::toFrameState):
9047        (WebKit::applyFrameState):
9048
90492014-06-24  Enrica Casucci  <enrica@apple.com>
9050
9051        iOS WebKit2: block selection tends to prefer block to single words even when the page is zoomed.
9052        https://bugs.webkit.org/show_bug.cgi?id=134267
9053        <rdar://problem/17138059>
9054
9055        Reviewed by Benjamin Poulain.
9056
9057        When trying to find the best selection match for the position where the tap occurs,
9058        we need to take into account the page scale. This patch applies the scale factor
9059        to the selection rect before comparing it with the desired size.
9060
9061        * WebProcess/WebPage/ios/WebPageIOS.mm:
9062        (WebKit::WebPage::rangeForWebSelectionAtPosition):
9063
90642014-06-24  Anders Carlsson  <andersca@apple.com>
9065
9066        Add code to convert HistoryItem to PageState
9067        https://bugs.webkit.org/show_bug.cgi?id=134263
9068
9069        Reviewed by Andreas Kling.
9070
9071        * WebProcess/WebCoreSupport/SessionStateConversion.cpp:
9072        (WebKit::toHTTPBody):
9073        (WebKit::toFrameState):
9074        (WebKit::toPageState):
9075        * WebProcess/WebCoreSupport/SessionStateConversion.h:
9076
90772014-06-24  Andreas Kling  <akling@apple.com>
9078
9079        [iOS WebKit2] Disable screen font substitution by default.
9080        <https://webkit.org/b/134266>
9081        <rdar://problem/17427740>
9082
9083        Just like OS X >= 10.9, screen font substitution should be disabled
9084        by default in WebKit2 for iOS.
9085
9086        Reviewed by Anders Carlsson.
9087
9088        * Shared/WebPreferencesDefinitions.h:
9089
90902014-06-24  Anders Carlsson  <andersca@apple.com>
9091
9092        Add PageState to HistoryItem conversion code
9093        https://bugs.webkit.org/show_bug.cgi?id=134259
9094
9095        Reviewed by Andreas Kling.
9096
9097        * Shared/SessionState.h:
9098        * UIProcess/mac/LegacySessionStateCoding.cpp:
9099        (WebKit::decodeBackForwardTreeNode):
9100        * WebKit2.xcodeproj/project.pbxproj:
9101        * WebProcess/WebCoreSupport/SessionStateConversion.cpp: Added.
9102        (WebKit::toFormData):
9103        (WebKit::applyFrameState):
9104        (WebKit::toHistoryItem):
9105        * WebProcess/WebCoreSupport/SessionStateConversion.h: Added.
9106
91072014-06-24  Antti Koivisto  <antti@apple.com>
9108
9109        Only flush layers when the exposed rect actually changes
9110        https://bugs.webkit.org/show_bug.cgi?id=134248
9111
9112        Reviewed by Anders Carlsson.
9113
9114        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
9115        (WebKit::RemoteLayerTreeDrawingArea::setExposedContentRect):
9116
91172014-06-24  Martin Hock  <mhock@apple.com>
9118
9119        [iOS] DOMWindow::outerWidth and outerHeight don't return useful values, so return 0.
9120        Also, revert r169281.
9121        https://bugs.webkit.org/show_bug.cgi?id=134233
9122        <rdar://problem/17060183>
9123
9124        Reviewed by Benjamin Poulain.
9125
9126        * UIProcess/Cocoa/UIDelegate.h:
9127        * UIProcess/Cocoa/UIDelegate.mm:
9128        (WebKit::UIDelegate::UIClient::windowFrame): Deleted.
9129        * UIProcess/ios/PageClientImplIOS.mm:
9130        (WebKit::PageClientImpl::convertToUserSpace):
9131
91322014-06-24  Jeremy Jones  <jeremyj@apple.com>
9133
9134        Initialize WKWebViewConfiguration properties to their default values.
9135        https://bugs.webkit.org/show_bug.cgi?id=134216
9136
9137        Reviewed by Anders Carlsson.
9138
9139        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
9140        (-[WKWebViewConfiguration init]):
9141        add -init method to initialize _mediaPlaybackRequiresUserAction and _mediaPlaybackAllowsAirPlay.
9142
91432014-06-24  Anders Carlsson  <andersca@apple.com>
9144
9145        Add missing semicolon.
9146
9147        * UIProcess/API/Cocoa/WKWebView.mm:
9148        (-[WKWebView _updateVisibleContentRects]):
9149
91502014-06-24  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
9151
9152        Fix unused parameter warnings if inspector is disabled
9153        https://bugs.webkit.org/show_bug.cgi?id=134244
9154
9155        Reviewed by Zalan Bujtas.
9156
9157        * WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp:
9158        (WKBundleInspectorShow):
9159        (WKBundleInspectorClose):
9160        (WKBundleInspectorEvaluateScriptForTest):
9161        (WKBundleInspectorSetPageProfilingEnabled):
9162
91632014-06-24  Anders Carlsson  <andersca@apple.com>
9164
9165        WKWebView doesn't respect -[UIScrollView contentInset]
9166        https://bugs.webkit.org/show_bug.cgi?id=134230
9167        <rdar://problem/17429107>
9168
9169        Reviewed by Tim Horton.
9170
9171        * UIProcess/API/Cocoa/WKWebView.mm:
9172        (-[WKWebView _setHasCustomContentView:loadedMIMEType:WTF::]):
9173        Call initWithFrame and pass the WKWebView along.
9174
9175        (-[WKWebView _adjustedContentOffset:]):
9176        New helper method that takes a content offset as a CGPoint and offsets it by the computed content inset.
9177
9178        (-[WKWebView _computedContentInset]):
9179        New helper method that returns the _obscuredInsets, or if it's zero, the scroll view's content inset.
9180
9181        (-[WKWebView _processDidExit]):
9182        Use _computedContentInset.
9183
9184        (-[WKWebView _didCommitLayerTree:WebKit::]):
9185        use _computedContentInset.
9186
9187        (-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:]):
9188        Use _computedContentInset.
9189
9190        (-[WKWebView _scrollToContentOffset:WebCore::]):
9191        Use _computedContentInset.
9192
9193        (-[WKWebView _updateVisibleContentRects]):
9194        If we have a custom content view, call web_computedContentInsetDidChange.
9195
9196        (-[WKWebView _setObscuredInsets:]):
9197        Don't call web_setObscuredInsets: if we have a custom content view.
9198
9199        * UIProcess/API/Cocoa/WKWebViewInternal.h:
9200        Add new methods.
9201
9202        * UIProcess/Cocoa/WKWebViewContentProvider.h:
9203        Add new methods.
9204
9205        * UIProcess/ios/WKPDFView.mm:
9206        (-[WKPDFView web_initWithFrame:webView:]):
9207        Set the _webView and _scrollView ivars.
9208
9209        (-[WKPDFView _offsetForPageNumberIndicator]):
9210        Get the computed content offset from the WKWebView.
9211
9212        (-[WKPDFView web_computedContentInsetDidChange]):
9213        Update the page indicator.
9214        
9215        (-[WKPDFView initWithFrame:]): Deleted.
9216        (-[WKPDFView web_setObscuredInsets:]): Deleted.
9217
9218        * UIProcess/ios/WKScrollView.mm:
9219        (-[WKScrollView setContentInset:]):
9220        Call _updateVisibleContentRects.
9221
92222014-06-23  Jaehun Lim  <ljaehun.lim@samsung.com>
9223
9224        Unreviewed, fix build warning.
9225
9226        Source/WebKit2/WebProcess/WebPage/DrawingArea.h:117:18: warning: unused parameter ‘wantsDidUpdateViewState’ [-Wunused-parameter]
9227
9228        * WebProcess/WebPage/DrawingArea.h:
9229        (WebKit::DrawingArea::viewStateDidChange):
9230
92312014-06-23  Ryuan Choi  <ryuan.choi@samsung.com>
9232
9233        [EFL] Replace RefPtr<Evas_Object> with UniquePtrEfl
9234        https://bugs.webkit.org/show_bug.cgi?id=134236
9235
9236        Reviewed by Gyuyoung Kim.
9237
9238        * PlatformEfl.cmake:
9239        * UIProcess/API/efl/EwkView.cpp:
9240        (EwkView::updateCursor):
9241        * UIProcess/API/efl/EwkView.h:
9242        * UIProcess/API/efl/SnapshotImageGL.cpp:
9243        * UIProcess/API/efl/ewk_favicon_database.cpp:
9244        (ewk_favicon_database_icon_get):
9245        * UIProcess/API/efl/tests/test_ewk2_refptr_evas_object.cpp: Removed.
9246
92472014-06-23  Daniel Bates  <dabates@apple.com>
9248
9249        [iOS][WK2] REGRESSION (r169324): Page jumps to top when you type into a text field
9250        https://bugs.webkit.org/show_bug.cgi?id=134219
9251        <rdar://problem/17279113>
9252
9253        Reviewed by Benjamin Poulain.
9254
9255        Fixes an issue where typing into a text field may cause a noticeable jump to the top of
9256        the page.
9257
9258        Currently when updating the visual content rectangles we always constrain the scroll offset
9259        (s_x, s_y) such that 0 <= s_x <= "content width" - "visible width" and 0 <= s_y <= "content height" - "visible height".
9260        However the UIProcess may want to scroll the page by an offset outside of this range to
9261        create a visually pleasing result. In particular, on iOS we may scroll the page slightly
9262        outside of this range (e.g. s_y > 0 = "content height" - "visible height") when a form
9263        control is focused so as to be consistent with platform convention.
9264
9265        * WebProcess/WebPage/ios/WebPageIOS.mm:
9266        (WebKit::WebPage::updateVisibleContentRects): Temporarily disable content edge constraint when
9267        updating scroll offset.
9268
92692014-06-23  Dan Bernstein  <mitz@apple.com>
9270
9271        <rdar://problem/17413374> [iOS] Application cache size per origin is not limited
9272        https://bugs.webkit.org/show_bug.cgi?id=134229
9273
9274        Reviewed by Anders Carlsson.
9275
9276        * UIProcess/WebContext.cpp:
9277        (WebKit::WebContext::createNewWebProcess): Set the default quota per origin to the same
9278        value it is set in Legacy WebKit.
9279
92802014-06-23  Ryuan Choi  <ryuan.choi@samsung.com>
9281
9282        Unreviewed, EFL build fix after r170330.
9283
9284        * WebProcess/WebPage/WebPage.cpp: Guard WKStringCF.h with PLATFORM(COCOA) macro.
9285
92862014-06-23  Timothy Horton  <timothy_horton@apple.com>
9287
9288        [WK2] Use the page background color instead of white when swipe snapshots were purged (134218)
9289        https://bugs.webkit.org/show_bug.cgi?id=134218
9290        <rdar://problem/17426454>
9291
9292        Reviewed by Benjamin Poulain.
9293
9294        * UIProcess/API/Cocoa/WKWebView.mm:
9295        (-[WKWebView _updateScrollViewBackground]):
9296        (-[WKWebView WebKit::]):
9297        * UIProcess/API/mac/WKView.mm:
9298        (-[WKView _takeViewSnapshot]):
9299        * UIProcess/ios/ViewGestureControllerIOS.mm:
9300        (WebKit::ViewGestureController::beginSwipeGesture):
9301        * UIProcess/mac/ViewGestureControllerMac.mm:
9302        (WebKit::ViewGestureController::shouldUseSnapshotForSize):
9303        (WebKit::ViewGestureController::beginSwipeGesture):
9304        (WebKit::ViewGestureController::retrieveSnapshotForItem): Deleted.
9305        * UIProcess/mac/ViewSnapshotStore.h:
9306        Store a color along with each snapshot.
9307        Set the background color of the swipe snapshot layer accordingly.
9308
93092014-06-23  Anders Carlsson  <andersca@apple.com>
9310
9311        Add -[WKBackForwardList _removeAllItems]
9312        https://bugs.webkit.org/show_bug.cgi?id=134227
9313        <rdar://problem/17291623>
9314
9315        Reviewed by Tim Horton.
9316
9317        * UIProcess/API/Cocoa/WKBackForwardList.mm:
9318        (-[WKBackForwardList _removeAllItems]):
9319        * UIProcess/API/Cocoa/WKBackForwardListPrivate.h: Added.
9320        * WebKit2.xcodeproj/project.pbxproj:
9321
93222014-06-23  Dan Bernstein  <mitz@apple.com>
9323
9324        <rdar://problem/17413498> [Cocoa] Expose WebPreferences::offlineWebApplicationCacheEnabled
9325        https://bugs.webkit.org/show_bug.cgi?id=134217
9326
9327        Reviewed by Anders Carlsson.
9328
9329        * UIProcess/API/Cocoa/WKPreferences.mm:
9330        (-[WKPreferences _offlineApplicationCacheIsEnabled]):
9331        (-[WKPreferences _setOfflineApplicationCacheIsEnabled:]):
9332        * UIProcess/API/Cocoa/WKPreferencesPrivate.h: Added _offlineWebApplicationCacheIsEnabled
9333        property.
9334
93352014-06-23  Grant Kennell  <gkennell@apple.com>
9336
9337        Add SPI for Injected Bundle to provide user agent for a given URL.
9338        https://bugs.webkit.org/show_bug.cgi?id=133562
9339
9340        Reviewed by Sam Weinig.
9341
9342        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h: 
9343          Added delegate method to WebProcess PluIn protocol to provide UserAgent per URL.
9344        * WebProcess/InjectedBundle/API/c/WKBundlePageLoaderClient.h:
9345          Added new typedef for function pointer for this new delegate call.
9346          Added new version (V8) of bundle loader client struct containing
9347          a function pointer of that new type.
9348        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
9349        (userAgentForURL): Makes delegate call with the new method.
9350        (setUpPageLoaderClient): Sets the struct's new function pointer to the new method.
9351        * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
9352        (WebKit::InjectedBundlePageLoaderClient::userAgentForURL):
9353        * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
9354        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
9355        (WebKit::WebFrameLoaderClient::userAgent):
9356        * WebProcess/WebPage/WebPage.cpp:
9357        (WebKit::WebPage::userAgent): Began using the new API to ask for user agent
9358          instead of simply returning what had been stored.
9359        * WebProcess/WebPage/WebPage.h:
9360        (WebKit::WebPage::userAgent): Deleted.
9361
93622014-06-23  Commit Queue  <commit-queue@webkit.org>
9363
9364        Unreviewed, rolling out r170324.
9365        https://bugs.webkit.org/show_bug.cgi?id=134223
9366
9367        lots of build breakage (Requested by bradeeoh on #webkit).
9368
9369        Reverted changeset:
9370
9371        "Unreviewed, revert an unintentional change committed with
9372        r170323."
9373        http://trac.webkit.org/changeset/170324
9374
93752014-06-23  Timothy Horton  <timothy_horton@apple.com>
9376
9377        [iOS][wk2] Don't use view snapshots if the destination layer is a different size
9378        https://bugs.webkit.org/show_bug.cgi?id=134210
9379        <rdar://problem/17369463>
9380
9381        Reviewed by Benjamin Poulain.
9382
9383        * UIProcess/ios/ViewGestureControllerIOS.mm:
9384        (WebKit::ViewGestureController::beginSwipeGesture):
9385        Only use the view snapshot if the snapshot is the same (in device space) size
9386        as the layer it's going to be put into, and only if the device scale factor is
9387        the same as it was when the snapshot was taken.
9388
93892014-06-23  Benjamin Poulain  <bpoulain@apple.com>
9390
9391        [iOS][WK2] Make the state restore from HistoryItem more precise and reliable
9392        https://bugs.webkit.org/show_bug.cgi?id=134150
9393
9394        Reviewed by Tim Horton.
9395
9396        This patch make several little improvements to improve how we restore the visible content rect and scale
9397        from the HistoryItem.
9398
9399        The biggest architectural change is that the exposed rect is now restored on the UIProcess instead of the WebProcess,
9400        this ensure we restore the same position regardless of any modification of obscured areas.
9401
9402        * Shared/VisibleContentRectUpdateInfo.cpp:
9403        (WebKit::VisibleContentRectUpdateInfo::encode):
9404        (WebKit::VisibleContentRectUpdateInfo::decode):
9405        * Shared/VisibleContentRectUpdateInfo.h:
9406        (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
9407        (WebKit::VisibleContentRectUpdateInfo::lastLayerTreeTransactionId):
9408        (WebKit::WebPage::updateVisibleContentRects):
9409        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
9410        A race between the UIProcess and the WebProcess could cause the viewport of the next page to be influenced by updates
9411        of the previous page. To avoid that, VisibleContentRectUpdateInfo keeps track of the last transaction seen at the time
9412        of the update.
9413
9414        The WebProcess updates the size and scale of the content through layer tree updates. If an update was generated for a layer tree
9415        update of the old page, none of the information is valid for the current content. Since the UIProcess drives the state in case of conflicts,
9416        the WebProcess was updating the scale of the current page based on incorrect information.
9417
9418        To avoid the problems, we save the layer tree transaction ID when we commit a new page. Only updates after that transaction are useful
9419        for the current page.
9420
9421        * UIProcess/API/Cocoa/WKWebView.mm:
9422        (-[WKWebView _processDidExit]):
9423        (withinEpsilon):
9424        (changeContentOffsetBoundedInValidRange):
9425        (-[WKWebView _didCommitLayerTree:WebKit::]):
9426        (-[WKWebView _restorePageStateToExposedRect:WebCore::scale:]):
9427        (-[WKWebView _restorePageStateToUnobscuredCenter:WebCore::scale:]):
9428        * UIProcess/API/Cocoa/WKWebViewInternal.h:
9429        * UIProcess/PageClient.h:
9430        * UIProcess/WebPageProxy.h:
9431        * UIProcess/WebPageProxy.messages.in:
9432        * UIProcess/ios/PageClientImplIOS.h:
9433        * UIProcess/ios/PageClientImplIOS.mm:
9434        (WebKit::PageClientImpl::restorePageState):
9435        (WebKit::PageClientImpl::restorePageCenterAndScale):
9436        Restoring the state is now done by WKWebView. The state is only updated on the next layer tree commit,
9437        this is done to avoid any jumping if the page has scrolled since we tried to restore its state.
9438
9439        Both update path end up calling _updateVisibleContentRects. This is because the update on the WebProcess
9440        never sets the ScrollPosition (because it does not know the current state of the obscured insets). Pushing
9441        a new VisibleContentRect will nicely udpates the exposed rect, scroll position, fixed elements, etc.
9442
9443        * UIProcess/ios/WKContentView.mm:
9444        (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
9445        * UIProcess/ios/WebPageProxyIOS.mm:
9446        (WebKit::WebPageProxy::restorePageState):
9447        (WebKit::WebPageProxy::restorePageCenterAndScale):
9448        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
9449        (WebKit::RemoteLayerTreeDrawingAreaProxy::lastCommittedLayerTreeTransactionID):
9450        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
9451        (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
9452        * WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
9453        (WebKit::WebFrameLoaderClient::saveViewStateToItem):
9454        (WebKit::WebFrameLoaderClient::restoreViewState):
9455        * WebProcess/WebPage/WebPage.cpp:
9456        (WebKit::WebPage::WebPage):
9457        (WebKit::WebPage::didCommitLoad):
9458        * WebProcess/WebPage/WebPage.h:
9459        Get rid of m_obscuredTopInset. It was a bad idea. The UIProcess updates the obscured insets a lot during
9460        page load, the value we used to restore the scroll position was frequently stale.
9461
9462        (WebKit::WebPage::userHasChangedPageScaleFactor): Deleted.
9463        * WebProcess/WebPage/ios/WebPageIOS.mm:
9464        (WebKit::WebPage::savePageState):
9465        (WebKit::scaleAfterViewportWidthChange):
9466        (WebKit::relativeCenterAfterContentSizeChange):
9467        (WebKit::adjustExposedRectForNewScale):
9468        Extract this out of dynamicViewportSizeUpdate(). It is useful to adjust the exposed rect when restoring a HistoryItem
9469        to a ViewportConfiguration that is different from when it was saved.
9470
9471        (WebKit::WebPage::restorePageState):
9472        There are two variations of restorePage:
9473        1) If the viewport configuration is compatible, restore the exact scale and position of the page.
9474        2) Otherwise, restore the scale and position similarily to dynamicViewportSizeUpdate().
9475
9476        (WebKit::WebPage::dynamicViewportSizeUpdate):
9477        (WebKit::WebPage::viewportConfigurationChanged):
9478        (WebKit::adjustExposedRectForBoundedScale):
9479        (WebKit::RemoteLayerTreeDrawingArea::currentTransactionID):
9480        Expose the transactionID for the race issue on VisibleRectUpdate.
9481
9482        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
9483        (WebKit::RemoteLayerTreeDrawingArea::setExposedContentRect):
9484        Store the exposed rect in floating point coordinates. This makes it possible to restore that exact
9485        position when needed.
9486
94872014-06-23  Eric Carlson  <eric.carlson@apple.com>
9488
9489        Unreviewed, revert an unintentional change committed with r170323.
9490
9491        * UIProcess/API/Cocoa/WKBackForwardList.mm:
9492
94932014-06-23  Anders Carlsson  <andersca@apple.com>
9494
9495        Policy delegate methods should use CompletionHandlerCallChecker
9496        https://bugs.webkit.org/show_bug.cgi?id=134215
9497
9498        Reviewed by Dan Bernstein.
9499
9500        * UIProcess/Cocoa/NavigationState.mm:
9501        (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
9502        (WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
9503
95042014-06-23  Anders Carlsson  <andersca@apple.com>
9505
9506        Don't use the WK prefix for internal C++ types
9507        https://bugs.webkit.org/show_bug.cgi?id=134214
9508
9509        Reviewed by Dan Bernstein.
9510
9511        * Shared/AssistedNodeInformation.cpp:
9512        (WebKit::OptionItem::encode):
9513        (WebKit::OptionItem::decode):
9514        (WebKit::WKOptionItem::encode): Deleted.
9515        (WebKit::WKOptionItem::decode): Deleted.
9516        * Shared/AssistedNodeInformation.h:
9517        (WebKit::OptionItem::OptionItem):
9518        (WebKit::AssistedNodeInformation::AssistedNodeInformation):
9519        (WebKit::WKOptionItem::WKOptionItem): Deleted.
9520        * UIProcess/ios/WKContentViewInteraction.h:
9521        * UIProcess/ios/WKContentViewInteraction.mm:
9522        (-[WKContentView _requiresKeyboardWhenFirstResponder]):
9523        (-[WKContentView inputView]):
9524        (-[WKContentView requiresAccessoryView]):
9525        (-[WKContentView _updateAccessory]):
9526        (-[WKContentView textInputTraits]):
9527        (-[WKContentView assistedNodeSelectOptions]):
9528        (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
9529        (-[WKContentView _stopAssistingNode]):
9530        * UIProcess/ios/forms/WKFormInputControl.mm:
9531        (-[WKDateTimePicker initWithView:datePickerMode:]):
9532        (-[WKFormInputControl initWithView:]):
9533        * UIProcess/ios/forms/WKFormSelectControl.h:
9534        * UIProcess/ios/forms/WKFormSelectControl.mm:
9535        (adjustedFontSize):
9536        * UIProcess/ios/forms/WKFormSelectPicker.mm:
9537        (-[WKOptionPickerCell initWithOptionItem:]):
9538        (-[WKOptionGroupPickerCell initWithOptionItem:]):
9539        (-[WKMultipleSelectPicker initWithView:]):
9540        (-[WKMultipleSelectPicker pickerView:viewForRow:forComponent:reusingView:]):
9541        (-[WKMultipleSelectPicker pickerView:row:column:checked:]):
9542        (-[WKSelectSinglePicker pickerView:attributedTitleForRow:forComponent:]):
9543        (-[WKSelectSinglePicker pickerView:didSelectRow:inComponent:]):
9544        * UIProcess/ios/forms/WKFormSelectPopover.mm:
9545        (-[WKSelectTableViewController initWithView:hasGroups:]):
9546        (-[WKSelectTableViewController tableView:numberOfRowsInSection:]):
9547        (-[WKSelectTableViewController tableView:titleForHeaderInSection:]):
9548        (-[WKSelectTableViewController populateCell:withItem:]):
9549        (-[WKSelectTableViewController findItemIndexAt:]):
9550        (-[WKSelectTableViewController findItemAt:]):
9551        (-[WKSelectTableViewController tableView:cellForRowAtIndexPath:]):
9552        (-[WKSelectTableViewController tableView:didSelectRowAtIndexPath:]):
9553        * WebProcess/WebPage/ios/WebPageIOS.mm:
9554        (WebKit::WebPage::getAssistedNodeInformation):
9555
95562014-06-23  Dan Bernstein  <mitz@apple.com>
9557
9558        [Cocoa] No way to grant storage quotas for web application cache
9559        https://bugs.webkit.org/show_bug.cgi?id=134213
9560
9561        Reviewed by Anders Carlsson.
9562
9563        * UIProcess/API/APIUIClient.h:
9564        (API::UIClient::reachedApplicationCacheOriginQuota): Added this new client function, with
9565        a default implementation that calls the completion handler with the current quota.
9566
9567        * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Declared a new delegate method.
9568
9569        * UIProcess/API/Cocoa/_WKSecurityOrigin.mm:
9570        (-[_WKSecurityOrigin _initWithSecurityOrigin:WebCore::]): Changed the parameter into a const
9571        reference, since we copy it.
9572        * UIProcess/API/Cocoa/_WKSecurityOriginInternal.h:
9573
9574        * UIProcess/Cocoa/UIDelegate.h: Override API::UIClient::reachedApplicationCacheOriginQuota.
9575        Added flag to m_delegateMethods struct for new delegate method.
9576        * UIProcess/Cocoa/UIDelegate.mm:
9577        (WebKit::UIDelegate::setDelegate): Set new flag in m_delegateMethods struct.
9578        (WebKit::UIDelegate::UIClient::exceededDatabaseQuota): Updated for change in
9579        _WKSecurityOrigin initializer.
9580        (WebKit::UIDelegate::UIClient::reachedApplicationCacheOriginQuota): Added. Calls the new
9581        delegate method.
9582
9583        * UIProcess/WebPageProxy.cpp:
9584        (WebKit::WebPageProxy::reachedApplicationCacheOriginQuota): Added. Forwards the message to
9585        the UI client.
9586        * UIProcess/WebPageProxy.h:
9587
9588        * UIProcess/WebPageProxy.messages.in: Added ReachedApplicationCacheOriginQuota message.
9589
9590        * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
9591        (API::InjectedBundle::PageUIClient::didReachApplicationCacheOriginQuota): Changed the return
9592        type to bool, indicating whether the client handled the callback.
9593
9594        * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
9595        (WebKit::InjectedBundlePageUIClient::didReachApplicationCacheOriginQuota): Return the
9596        appropriate value.
9597        * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
9598
9599        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
9600        (WebKit::WebChromeClient::reachedApplicationCacheOriginQuota): If the bundle client didn’t
9601        handle the callback, send a message the the UI process, and update the quota with the reply.
9602
96032014-06-23  Tim Horton  <timothy_horton@apple.com>
9604
9605        [wk2] Synchronously wait a short time for a layer tree update after bringing a web view in-window
9606        https://bugs.webkit.org/show_bug.cgi?id=134189
9607
9608        Reviewed by Simon Fraser.
9609
9610        Make the old behavior of -[WKView endDeferringViewInWindowChangesSync] the default; synchronously wait
9611        for a fraction of a second when a page that was previously in-window but currently isn't comes back in-window,
9612        until new content is painted (or we hit a timeout).
9613        
9614        * UIProcess/DrawingAreaProxy.h:
9615        (WebKit::DrawingAreaProxy::waitForDidUpdateViewState):
9616        * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
9617        * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
9618        (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateViewState):
9619        Delegate waitForDidUpdateViewState to the DrawingAreaProxys, because behavior is very dependent on them.
9620
9621        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
9622        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
9623        (WebKit::RemoteLayerTreeDrawingAreaProxy::coreAnimationDidCommitLayers):
9624        (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateViewState):
9625        Implement waitForDidUpdateViewState for the RemoteLayerTree; it waits for CommitLayerTree.
9626
9627        * UIProcess/WebPageProxy.cpp:
9628        (WebKit::WebPageProxy::WebPageProxy):
9629        (WebKit::WebPageProxy::updateViewState):
9630        (WebKit::WebPageProxy::viewStateDidChange):
9631        (WebKit::WebPageProxy::dispatchViewStateChange):
9632        (WebKit::WebPageProxy::waitForDidUpdateViewState):
9633        (WebKit::WebPageProxy::resetStateAfterProcessExited):
9634        (WebKit::WebPageProxy::viewSize): Deleted.
9635        * UIProcess/WebPageProxy.h:
9636        (WebKit::WebPageProxy::didUpdateViewState):
9637        * UIProcess/API/mac/WKView.mm:
9638        (-[WKView endDeferringViewInWindowChangesSync]):
9639        Always waitForDidUpdateViewState when a page that was previously in-window but currently isn't comes back in-window.
9640
9641        * WebProcess/WebPage/DrawingArea.h:
9642        (WebKit::DrawingArea::viewStateDidChange):
9643        * WebProcess/WebPage/WebPage.cpp:
9644        (WebKit::WebPage::WebPage):
9645        (WebKit::WebPage::setViewState):
9646        (WebKit::WebPage::didUpdateViewStateTimerFired): Deleted.
9647        * WebProcess/WebPage/WebPage.h:
9648        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
9649        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
9650        (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
9651        (WebKit::RemoteLayerTreeDrawingArea::viewStateDidChange):
9652        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
9653        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
9654        (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
9655        (WebKit::TiledCoreAnimationDrawingArea::viewStateDidChange):
9656        (WebKit::TiledCoreAnimationDrawingArea::didUpdateViewStateTimerFired):
9657        * WebProcess/WebPage/mac/WebPageMac.mm:
9658        (WebKit::WebPage::didUpdateViewStateTimerFired): Deleted.
9659        Delegate sending of didUpdateViewState to the DrawingAreas (RemoteLayerTreeDrawingArea won't send it,
9660            because the UI process waits for CommitLayerTree instead).
9661
96622014-06-23  Timothy Horton  <timothy_horton@apple.com>
9663
9664        [iOS][wk2] Ensure that layers are marked volatile before allowing the process to suspend
9665        https://bugs.webkit.org/show_bug.cgi?id=134004
9666        <rdar://problem/17186342>
9667
9668        Reviewed by Simon Fraser.
9669
9670        WebKit tries to make layers volatile when unparented, but sometimes isn't given
9671        a chance to do so before the process gets suspended, so we end up with lots of
9672        non-volatile surfaces that should really be volatile.
9673
9674        * Shared/mac/RemoteLayerBackingStoreCollection.h:
9675        * Shared/mac/RemoteLayerBackingStoreCollection.mm:
9676        (WebKit::RemoteLayerBackingStoreCollection::markBackingStoreVolatileImmediately):
9677        (WebKit::RemoteLayerBackingStoreCollection::markAllBackingStoreVolatileImmediatelyIfPossible):
9678        Add markAllBackingStoreVolatileImmediatelyIfPossible, which tries to mark *all*
9679        buffers of *all* backing store, (live and unreachable), (front, back, and secondary),
9680        volatile right away. It returns false if any buffer isn't marked volatile (because it was in-use).
9681
9682        * UIProcess/ios/ProcessThrottler.h:
9683        * UIProcess/ios/ProcessThrottler.mm:
9684        (WebKit::ProcessThrottler::updateAssertion):
9685        (WebKit::ProcessThrottler::processReadyToSuspend):
9686        (WebKit::ProcessThrottler::didCancelProcessSuspension):
9687        * UIProcess/ios/WebProcessProxyIOS.mm:
9688        (WebKit::WebProcessProxy::sendCancelProcessWillSuspend):
9689        (WebKit::WebProcessProxy::didCancelProcessSuspension):
9690        * UIProcess/WebProcessProxy.h:
9691        * UIProcess/WebProcessProxy.messages.in:
9692        * WebProcess/WebProcess.h:
9693        * WebProcess/WebProcess.messages.in:
9694        If the UI process is waiting for the Web process to confirm that it can suspend
9695        and something happens (the view is reparented) that cancels the suspension, inform
9696        the Web process that this happened, so that it can cancel any cleanup that might still be taking place.
9697
9698        * UIProcess/WebPageProxy.cpp:
9699        (WebKit::WebPageProxy::viewStateDidChange):
9700        If a view goes in-window, dispatch the view state change immediately without delay,
9701        to minimize the latency between coming in-window and being ready to go.
9702
9703        * WebProcess/WebPage/DrawingArea.h:
9704        (WebKit::DrawingArea::markLayersVolatileImmediatelyIfPossible):
9705        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
9706        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
9707        (WebKit::RemoteLayerTreeDrawingArea::setRootCompositingLayer):
9708        Schedule a flush when we change the root layer; otherwise, we can end up
9709        detaching the root layer but changing nothing else, and never committing that change.
9710
9711        (WebKit::RemoteLayerTreeDrawingArea::markLayersVolatileImmediatelyIfPossible):
9712
9713        * WebProcess/WebProcess.cpp:
9714        (WebKit::WebProcess::WebProcess):
9715        (WebKit::WebProcess::processWillSuspend):
9716        (WebKit::WebProcess::cancelProcessWillSuspend):
9717        (WebKit::WebProcess::markAllLayersVolatileIfPossible):
9718        (WebKit::WebProcess::processSuspensionCleanupTimerFired):
9719        When the UI process is going to suspend the process, it sends us ProcessWillSuspend,
9720        and defers the suspension until we send a ProcessReadyToSuspend back.
9721        Delay ProcessReadyToSuspend until all layers in our process have been marked volatile.
9722        We'll keep trying every 20ms until they're all volatile. For safety, the UI process will eventually
9723        stop waiting for us, but the volatility change is usually applied successfully within the first
9724        or second timer callback.
9725
97262014-06-23  Oliver Hunt  <oliver@apple.com>
9727
9728        Ensure that we always use symlink free paths when specifying cache directories
9729        https://bugs.webkit.org/show_bug.cgi?id=134206
9730
9731        Reviewed by Anders Carlsson.
9732
9733        Sandboxing will deny symlink based paths, so we use realpath to create extensions.
9734        This leaves us in the position of an extension using a visually different path
9735        from other parts of the process code.  This patch simply makes sure that we always
9736        use the realpath for cache directories, so making debugging easier and also ensuring
9737        that we don't ever accidentally try to use a path with symlinks that will thus get
9738        denied.
9739
9740        * Shared/SandboxExtension.h:
9741        (WebKit::stringByResolvingSymlinksInPath):
9742        * Shared/mac/SandboxExtensionMac.mm:
9743        (WebKit::stringByResolvingSymlinksInPath):
9744        * UIProcess/WebContext.cpp:
9745        (WebKit::WebContext::ensureNetworkProcess):
9746        * UIProcess/mac/WebContextMac.mm:
9747        (WebKit::WebContext::platformDefaultApplicationCacheDirectory):
9748        (WebKit::WebContext::platformDefaultDiskCacheDirectory):
9749        (WebKit::WebContext::platformDefaultWebSQLDatabaseDirectory):
9750        (WebKit::WebContext::platformDefaultIconDatabasePath):
9751        (WebKit::WebContext::platformDefaultLocalStorageDirectory):
9752
97532014-06-23  Roger Fong  <roger_fong@apple.com>
9754
9755        Unregister notification observer registered in r170156.
9756        https://bugs.webkit.org/show_bug.cgi?id=134204.
9757
9758        Reviewed by Tim Horton.
9759
9760        * UIProcess/API/mac/WKView.mm:
9761        (-[WKView dealloc]):
9762
97632014-06-23  Dan Bernstein  <mitz@apple.com>
9764
9765        [Cocoa] No way to grant storage quotas for WebSQL
9766        https://bugs.webkit.org/show_bug.cgi?id=134175
9767
9768        Reviewed by Anders Carlsson.
9769
9770        * Shared/WebSecurityOrigin.h:
9771        (WebKit::WebSecurityOrigin::securityOrigin): Changed to return a non-const reference.
9772
9773        * UIProcess/API/APIUIClient.h:
9774        (API::UIClient::exceededDatabaseQuota): Added a completion handler parameter than takes the
9775        new quota, and changed the return type to void.
9776
9777        * UIProcess/API/C/WKPage.cpp:
9778        (WKPageSetPageUIClient): Changed the override of exceededDatabaseQuota to call the
9779        completion handler with the new quota, or with the existing quota if the client doesn’t
9780        implement the callback.
9781
9782        * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Declared new delegate method.
9783
9784        * UIProcess/API/Cocoa/_WKSecurityOrigin.h: Added.
9785        * UIProcess/API/Cocoa/_WKSecurityOrigin.mm: Added.
9786        (-[_WKSecurityOrigin _initWithSecurityOrigin:WebCore::]): Store the origin in an ivar.
9787        (-[_WKSecurityOrigin protocol]): Added this accessor.
9788        (-[_WKSecurityOrigin host]): Ditto.
9789        (-[_WKSecurityOrigin port]): Ditto.
9790        * UIProcess/API/Cocoa/_WKSecurityOriginInternal.h: Added.
9791
9792        * UIProcess/Cocoa/UIDelegate.h: Override API::UIClient::exceededDatabaseQuota. Added flag
9793        to m_delegateMethods struct for new delegate method.
9794        * UIProcess/Cocoa/UIDelegate.mm:
9795        (WebKit::UIDelegate::setDelegate): Set new flag in m_delegateMethods struct.
9796        (WebKit::UIDelegate::UIClient::exceededDatabaseQuota): Added. Calls the new delegate method.
9797
9798        * UIProcess/WebPageProxy.cpp:
9799        (WebKit::WebPageProxy::exceededDatabaseQuota): Updated for the new client interface: now
9800        passing a completion handler that replies with the new quota.
9801
9802        * WebKit2.xcodeproj/project.pbxproj: Added references to new files, sorted a group.
9803
98042014-06-23  Simon Fraser  <simon.fraser@apple.com>
9805
9806        More build fixing after r170295.
9807
9808        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
9809        (InitWebCoreSystemInterface):
9810
98112014-06-23  Anders Carlsson  <andersca@apple.com>
9812
9813        Give read-only properties proper ownership attributes
9814        https://bugs.webkit.org/show_bug.cgi?id=134197
9815        <rdar://problem/16830117>
9816
9817        Reviewed by Dan Bernstein.
9818
9819        Also, make WKFrameInfo conform to NSCopying since it's a data-only object and thus intended to be copied.
9820
9821        * UIProcess/API/Cocoa/WKBackForwardList.h:
9822        * UIProcess/API/Cocoa/WKBackForwardListItem.h:
9823        * UIProcess/API/Cocoa/WKFrameInfo.h:
9824        * UIProcess/API/Cocoa/WKFrameInfo.mm:
9825        (-[WKFrameInfo copyWithZone:]):
9826        (-[WKFrameInfo setRequest:]): Deleted.
9827        * UIProcess/API/Cocoa/WKNavigation.h:
9828        * UIProcess/API/Cocoa/WKNavigationAction.h:
9829        * UIProcess/API/Cocoa/WKNavigationAction.mm:
9830        (-[WKNavigationAction setSourceFrame:]):
9831        (-[WKNavigationAction setTargetFrame:]):
9832        * UIProcess/API/Cocoa/WKNavigationActionInternal.h:
9833        * UIProcess/API/Cocoa/WKNavigationResponse.h:
9834        * UIProcess/API/Cocoa/WKScriptMessage.h:
9835        * UIProcess/API/Cocoa/WKUserContentController.h:
9836        * UIProcess/API/Cocoa/WKUserScript.h:
9837        * UIProcess/API/Cocoa/WKWebView.h:
9838
98392014-06-23  Gwang Yoon Hwang  <yoon@igalia.com>
9840
9841        Unreviewed, GTK build fix after r170274.
9842
9843        * WebProcess/WebPage/DrawingAreaImpl.cpp:
9844        Drawing::m_webPage changed to reference.
9845
9846        (WebKit::DrawingAreaImpl::DrawingAreaImpl):
9847        (WebKit::DrawingAreaImpl::setNeedsDisplay):
9848        (WebKit::DrawingAreaImpl::setNeedsDisplayInRect):
9849        (WebKit::DrawingAreaImpl::forceRepaint):
9850        (WebKit::DrawingAreaImpl::updatePreferences):
9851        (WebKit::DrawingAreaImpl::layerHostDidFlushLayers):
9852        (WebKit::DrawingAreaImpl::updateBackingStoreState):
9853        (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState):
9854        (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
9855        (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
9856        (WebKit::DrawingAreaImpl::display):
9857        * WebProcess/WebPage/DrawingAreaImpl.h:
9858
98592014-06-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
9860
9861        REGRESSION(r170163): It made everything crash on EFL
9862        https://bugs.webkit.org/show_bug.cgi?id=134097
9863
9864        Unreviewed EFL layout test and perforamcne crash fix.
9865
9866        * WebProcess/WebPage/WebPage.cpp: Add a null check for m_mainFrame.
9867        (WebKit::WebPage::didCompletePageTransition):
9868
98692014-06-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
9870
9871        Unreviewed EFL build fix since r170274. Use reference for m_webPage member variable.
9872
9873        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
9874        (WebKit::CoordinatedDrawingArea::CoordinatedDrawingArea):
9875        (WebKit::CoordinatedDrawingArea::setNeedsDisplay):
9876        (WebKit::CoordinatedDrawingArea::setNeedsDisplayInRect):
9877        (WebKit::CoordinatedDrawingArea::forceRepaint):
9878        (WebKit::CoordinatedDrawingArea::updatePreferences):
9879        (WebKit::CoordinatedDrawingArea::mainFrameContentSizeChanged):
9880        (WebKit::CoordinatedDrawingArea::layerHostDidFlushLayers):
9881        (WebKit::CoordinatedDrawingArea::updateBackingStoreState):
9882        (WebKit::CoordinatedDrawingArea::sendDidUpdateBackingStoreState):
9883        (WebKit::CoordinatedDrawingArea::suspendPainting):
9884        (WebKit::CoordinatedDrawingArea::resumePainting):
9885        (WebKit::CoordinatedDrawingArea::enterAcceleratedCompositingMode):
9886        (WebKit::CoordinatedDrawingArea::display):
9887        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
9888
98892014-06-22  Tim Horton  <timothy_horton@apple.com>
9890
9891        [iOS][wk2] Swiping back sometimes results in a missing (not blank) swipe snapshot
9892        https://bugs.webkit.org/show_bug.cgi?id=134181
9893
9894        Reviewed by Benjamin Poulain.
9895
9896        * UIProcess/ios/ViewGestureControllerIOS.mm:
9897        (WebKit::ViewGestureController::ViewGestureController):
9898        (WebKit::ViewGestureController::endSwipeGesture):
9899        (WebKit::ViewGestureController::setRenderTreeSize):
9900        (WebKit::ViewGestureController::removeSwipeSnapshot):
9901        * UIProcess/mac/ViewGestureController.h:
9902        Make it explicit that we should only remove the swipe snapshot when a
9903        big-enough render tree size arrives *after the swipe ends*.
9904
99052014-06-22  Tim Horton  <timothy_horton@apple.com>
9906
9907        Thread some references through the remote layer tree code
9908        https://bugs.webkit.org/show_bug.cgi?id=134177
9909
9910        Reviewed by Zalan Bujtas.
9911
9912        A first pass at references for never-null things (first pass because I didn't touch the collections).
9913        Things that aren't straightforward reference-threading:
9914
9915        * Shared/mac/RemoteLayerBackingStoreCollection.h:
9916        * Shared/mac/RemoteLayerBackingStoreCollection.mm:
9917        Remove the unimplemented/nonexistant RemoteLayerBackingStoreCollection::create.
9918        Make RemoteLayerBackingStoreCollection constructor not take a context, because m_context is never used.
9919
9920        * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
9921        * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
9922        Factor out grabbing the PlatformLayerID in a few places.
9923
9924        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
9925        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
9926        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
9927        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
9928        Use WebPage::mainFrameView() instead of WebPage::corePage()->mainFrame().view().
9929
9930        * Shared/mac/RemoteLayerTreeTransaction.h:
9931        * Shared/mac/RemoteLayerTreeTransaction.mm:
9932        * WebProcess/WebPage/DrawingArea.cpp:
9933        * WebProcess/WebPage/DrawingArea.h:
9934        * WebProcess/WebPage/WebPage.cpp:
9935        * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
9936        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
9937        * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
9938        * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
9939        * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:om):
9940        * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
9941        * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
9942        * Shared/mac/RemoteLayerBackingStore.mm:
9943        References.
9944        
99452014-06-22  Anders Carlsson  <andersca@apple.com>
9946
9947        Replace a couple of uses of bind with lambdas
9948        https://bugs.webkit.org/show_bug.cgi?id=134172
9949
9950        Reviewed by Sam Weinig.
9951
9952        * Platform/IPC/Connection.cpp:
9953        (IPC::Connection::postConnectionDidCloseOnConnectionWorkQueue):
9954        (IPC::Connection::connectionDidClose):
9955        (IPC::Connection::dispatchMessage):
9956        (IPC::Connection::dispatchConnectionDidClose): Deleted.
9957        * Platform/IPC/Connection.h:
9958        * Shared/Plugins/NPObjectProxy.cpp:
9959        (WebKit::NPObjectProxy::NP_Deallocate):
9960        * UIProcess/Storage/LocalStorageDatabase.cpp:
9961        (WebKit::LocalStorageDatabase::scheduleDatabaseUpdate):
9962        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
9963        (WebKit::NetscapePlugin::pluginThreadAsyncCall):
9964        (WebKit::NetscapePlugin::handlePluginThreadAsyncCall): Deleted.
9965        * WebProcess/Plugins/Netscape/NetscapePlugin.h:
9966        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
9967        (WebKit::TiledCoreAnimationDrawingArea::forceRepaintAsync):
9968        (WebKit::TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):
9969
99702014-06-20  Simon Fraser  <simon.fraser@apple.com>
9971
9972        Have scrollingTreeAsText() dump the non-fast-scrollable region
9973        https://bugs.webkit.org/show_bug.cgi?id=134149
9974
9975        Reviewed by Sam Weinig.
9976
9977        Dump the non-fast-scrollable region (as an array of rects).
9978
9979        * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
9980        (WebKit::RemoteScrollingTreeTextStream::dump):
9981
99822014-06-22  Anders Carlsson  <andersca@apple.com>
9983
9984        Add IPC decoding support to BackForwardListState
9985        https://bugs.webkit.org/show_bug.cgi?id=134171
9986
9987        Reviewed by Dan Bernstein.
9988
9989        * Shared/SessionState.cpp:
9990        (WebKit::isValidEnum):
9991        (WebKit::HTTPBody::Element::decode):
9992        (WebKit::HTTPBody::decode):
9993        (WebKit::FrameState::decode):
9994        (WebKit::PageState::decode):
9995        (WebKit::BackForwardListState::decode):
9996        * Shared/SessionState.h:
9997
99982014-06-22  Anders Carlsson  <andersca@apple.com>
9999
10000        Address a review comment.
10001
10002        * UIProcess/mac/LegacySessionStateCoding.cpp:
10003        (WebKit::HistoryEntryDataDecoder::markInvalid):
10004        (WebKit::decodeFormDataElement):
10005
100062014-06-21  Anders Carlsson  <andersca@apple.com>
10007
10008        Implement the rest of back forward tree decoding
10009        https://bugs.webkit.org/show_bug.cgi?id=134166
10010
10011        Reviewed by Sam Weinig.
10012
10013        * UIProcess/mac/LegacySessionStateCoding.cpp:
10014        (WebKit::HistoryEntryDataDecoder::operator>>):
10015        (WebKit::decodeFormDataElement):
10016        (WebKit::decodeFormData):
10017        (WebKit::decodeBackForwardTreeNode):
10018
100192014-06-22  Dan Bernstein  <mitz@apple.com>
10020
10021        [iOS] WKWebViewConfiguration.allowsInlineMediaPlayback has no effect
10022        https://bugs.webkit.org/show_bug.cgi?id=134170
10023
10024        Reviewed by Anders Carlsson.
10025
10026        * UIProcess/API/Cocoa/WKWebView.mm:
10027        (-[WKWebView initWithFrame:configuration:]): Fixed a typo.
10028
100292014-06-21  Zan Dobersek  <zdobersek@igalia.com>
10030
10031        Unreviewed. Fixing the GTK+ build after r170253.
10032
10033        * UIProcess/API/gtk/WebKitSettings.cpp:
10034        (_WebKitSettingsPrivate::_WebKitSettingsPrivate): WebPreferences::create()
10035        now takes an additional String argument.
10036
100372014-06-21  Dan Bernstein  <mitz@apple.com>
10038
10039        CallbackMap::put should be able to take an unwrapped function
10040        https://bugs.webkit.org/show_bug.cgi?id=134104
10041
10042        Reviewed by Anders Carlsson.
10043
10044        * UIProcess/GenericCallback.h:
10045        (WebKit::CallbackMap::put): Added an overload that takes a function and creates and puts a
10046        callback. Changed both overloads of put() to return the callback ID.
10047
10048        * UIProcess/WebPageProxy.cpp:
10049        (WebKit::WebPageProxy::validateCommand):
10050        (WebKit::WebPageProxy::runJavaScriptInMainFrame):
10051        (WebKit::WebPageProxy::getRenderTreeExternalRepresentation):
10052        (WebKit::WebPageProxy::getSourceForFrame):
10053        (WebKit::WebPageProxy::getContentsAsString):
10054        (WebKit::WebPageProxy::getBytecodeProfile):
10055        (WebKit::WebPageProxy::getContentsAsMHTMLData):
10056        (WebKit::WebPageProxy::getSelectionOrContentsAsString):
10057        (WebKit::WebPageProxy::getSelectionAsWebArchiveData):
10058        (WebKit::WebPageProxy::getMainResourceDataOfFrame):
10059        (WebKit::WebPageProxy::getResourceDataFromFrame):
10060        (WebKit::WebPageProxy::getWebArchiveOfFrame):
10061        (WebKit::WebPageProxy::getMarkedRangeAsync):
10062        (WebKit::WebPageProxy::getSelectedRangeAsync):
10063        (WebKit::WebPageProxy::characterIndexForPointAsync):
10064        (WebKit::WebPageProxy::firstRectForCharacterRangeAsync):
10065        (WebKit::WebPageProxy::takeSnapshot):
10066
100672014-06-21  Anders Carlsson  <andersca@apple.com>
10068
10069        Make it possible to override debug preferences on a per-identifier basis as well as globally
10070        https://bugs.webkit.org/show_bug.cgi?id=134164
10071
10072        Reviewed by Dan Bernstein.
10073
10074        * Shared/WebPreferencesDefinitions.h:
10075        * Shared/WebPreferencesKeys.cpp:
10076        * Shared/WebPreferencesKeys.h:
10077        * Shared/WebPreferencesStore.cpp:
10078        (WebKit::defaults):
10079        * UIProcess/API/C/WKPreferences.cpp:
10080        (WKPreferencesCreate):
10081        (WKPreferencesCreateWithIdentifier):
10082        * UIProcess/API/Cocoa/WKPreferences.mm:
10083        (-[WKPreferences init]):
10084        * UIProcess/WebPageGroup.cpp:
10085        (WebKit::WebPageGroup::WebPageGroup):
10086        * UIProcess/WebPreferences.cpp:
10087        (WebKit::WebPreferences::create):
10088        (WebKit::WebPreferences::createWithLegacyDefaults):
10089        (WebKit::WebPreferences::WebPreferences):
10090        * UIProcess/WebPreferences.h:
10091        * UIProcess/mac/WebPreferencesMac.mm:
10092        (WebKit::makeKey):
10093        (WebKit::debugUserDefaultsValue):
10094        (WebKit::setDebugBoolValueIfInUserDefaults):
10095        (WebKit::WebPreferences::platformInitializeStore):
10096
100972014-06-21  Anders Carlsson  <andersca@apple.com>
10098
10099        Begin work on decoding form data
10100        https://bugs.webkit.org/show_bug.cgi?id=134163
10101
10102        Reviewed by Sam Weinig.
10103
10104        * UIProcess/mac/LegacySessionStateCoding.cpp:
10105        (WebKit::HistoryEntryDataDecoder::operator>>):
10106        (WebKit::HistoryEntryDataDecoder::isValid):
10107        (WebKit::isValidEnum):
10108        (WebKit::decodeFormDataElement):
10109        (WebKit::decodeFormData):
10110        (WebKit::decodeBackForwardTreeNode):
10111
101122014-06-21  Anders Carlsson  <andersca@apple.com>
10113
10114        Only initialize WebPreferences from NSUserDefaults if there's an identifier
10115        https://bugs.webkit.org/show_bug.cgi?id=134162
10116
10117        Reviewed by Sam Weinig.
10118
10119        We don't want to allow changing preferences by registering user defaults.
10120
10121        * UIProcess/mac/WebPreferencesMac.mm:
10122        (WebKit::makeKey):
10123        (WebKit::WebPreferences::platformInitializeStore):
10124
101252014-06-21  Anders Carlsson  <andersca@apple.com>
10126
10127        Begin work on decoding the back/forward tree
10128        https://bugs.webkit.org/show_bug.cgi?id=134161
10129
10130        Reviewed by Sam Weinig.
10131
10132        * UIProcess/mac/LegacySessionStateCoding.cpp:
10133        (WebKit::LegacySessionStateDecoder::decodeSessionHistoryEntries):
10134        (WebKit::HistoryEntryDataDecoder::operator>>):
10135        (WebKit::HistoryEntryDataDecoder::decodeArithmeticType):
10136        (WebKit::HistoryEntryDataDecoder::bufferIsLargeEnoughToContain):
10137        (WebKit::decodeBackForwardTreeNode):
10138        (WebKit::LegacySessionStateDecoder::decodeSessionHistoryEntryData):
10139        (WebKit::HistoryEntryDataDecoder::decode): Deleted.
10140
101412014-06-21  Brady Eidson  <beidson@apple.com>
10142
10143        Gamepad API - Deprecate the existing implementation
10144        https://bugs.webkit.org/show_bug.cgi?id=134108
10145
10146        Reviewed by Timothy Hatcher.
10147
10148        -Add new "GAMEPAD_DEPRECATED" build flag, moving the existing implementation to use it
10149        -Move some implementation files into a "deprecated" subdirectory.
10150
10151        * Configurations/FeatureDefines.xcconfig:
10152
101532014-06-20  Anders Carlsson  <andersca@apple.com>
10154
10155        Implement more of HistoryEntryDataDecoder
10156        https://bugs.webkit.org/show_bug.cgi?id=134146
10157
10158        Reviewed by Sam Weinig.
10159
10160        * UIProcess/mac/LegacySessionStateCoding.cpp:
10161        (WebKit::HistoryEntryDataDecoder::HistoryEntryDataDecoder):
10162        (WebKit::HistoryEntryDataDecoder::operator>>):
10163        (WebKit::HistoryEntryDataDecoder::decode):
10164        (WebKit::HistoryEntryDataDecoder::decodeFixedLengthData):
10165        (WebKit::HistoryEntryDataDecoder::alignBufferPosition):
10166        (WebKit::HistoryEntryDataDecoder::alignedBuffer):
10167        (WebKit::HistoryEntryDataDecoder::alignedBufferIsLargeEnoughToContain):
10168        (WebKit::HistoryEntryDataDecoder::markInvalid):
10169        (WebKit::LegacySessionStateDecoder::decodeSessionHistoryEntryData):
10170
101712014-06-21  Commit Queue  <commit-queue@webkit.org>
10172
10173        Unreviewed, rolling out r170244.
10174        https://bugs.webkit.org/show_bug.cgi?id=134157
10175
10176        GTK/EFL bindings generator works differently, making this
10177        patch not work there.  Will fix entire patch after a rollout.
10178        (Requested by bradee-oh on #webkit).
10179
10180        Reverted changeset:
10181
10182        "Gamepad API - Deprecate the existing implementation"
10183        https://bugs.webkit.org/show_bug.cgi?id=134108
10184        http://trac.webkit.org/changeset/170244
10185
101862014-06-21  Brady Eidson  <beidson@apple.com>
10187
10188        Gamepad API - Deprecate the existing implementation
10189        https://bugs.webkit.org/show_bug.cgi?id=134108
10190
10191        Reviewed by Timothy Hatcher.
10192
10193        -Add new "GAMEPAD_DEPRECATED" build flag, moving the existing implementation to use it
10194        -Add the "Deprecated" suffix to some implementation files
10195
10196        * Configurations/FeatureDefines.xcconfig:
10197
101982014-06-21  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
10199
10200        [CoordinatedGraphics][WK2][EFL] Page is moved to (0,0) position before rendering content
10201        https://bugs.webkit.org/show_bug.cgi?id=133300
10202
10203        Reviewed by Csaba Osztrogonác.
10204
10205        When new page is loaded, PageViewportController::didCommitLoad() calls PageViewportController::syncVisibleContents()
10206        with initial position via applyPositionAfterRenderingContents() before starting to render
10207        new page by PageViewportController::didRenderFrame(). This call flow causes that webview shows
10208        incomplete tiles to the user during a few milliseconds. To fix showing incomplete tiles during
10209        the page loading, this patch adds a flag so that we don't show the incomplete tiles until showing
10210        new page.
10211
10212        * UIProcess/API/efl/EwkView.cpp:
10213        (EwkView::EwkView):
10214        * UIProcess/API/efl/EwkView.h:
10215        (EwkView::setWaitingForNewPage):
10216        (EwkView::waitingForNewPage):
10217        * UIProcess/efl/PageLoadClientEfl.cpp:
10218        (WebKit::PageLoadClientEfl::didCommitLoadForFrame):
10219        * UIProcess/efl/PageViewportControllerClientEfl.cpp:
10220        (WebKit::PageViewportControllerClientEfl::didChangeVisibleContents):
10221        * UIProcess/efl/ViewClientEfl.cpp:
10222        (WebKit::ViewClientEfl::didRenderFrame):
10223        (WebKit::ViewClientEfl::didCompletePageTransition):
10224
102252014-06-21  Ryosuke Niwa  <rniwa@webkit.org>
10226
10227        Commit queue has been failing due to a build failure in WKFoundation.h
10228        https://bugs.webkit.org/show_bug.cgi?id=134152
10229
10230        Reviewed by Csaba Osztrogonác.
10231        Landed by Brady Eidson.
10232
10233        The build failure was caused by WKFoundation.h erroneously redefining
10234        NSURLSessionAuthChallengeDisposition even when building with 10.9 SDK.
10235
10236        The availability of this type depends on the version of SDK,
10237        not the target operating system.
10238
10239        * Shared/API/Cocoa/WKFoundation.h:
10240
102412014-06-21  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
10242
10243        Removing PAGE_VISIBILITY_API compile guard.
10244        https://bugs.webkit.org/show_bug.cgi?id=133844
10245
10246        Reviewed by Gavin Barraclough.
10247
10248        * Configurations/FeatureDefines.xcconfig:
10249        * WebProcess/WebPage/WebPage.cpp:
10250        (WebKit::WebPage::updatePreferences):
10251
102522014-06-20  Anders Carlsson  <andersca@apple.com>
10253
10254        Implement more of LegacySessionStateDecoder
10255        https://bugs.webkit.org/show_bug.cgi?id=134145
10256
10257        Reviewed by Sam Weinig.
10258
10259        * Shared/SessionState.h:
10260        * UIProcess/mac/LegacySessionStateCoding.cpp:
10261        (WebKit::LegacySessionStateDecoder::decodeSessionHistoryEntry):
10262        (WebKit::HistoryEntryDataDecoder::HistoryEntryDataDecoder):
10263        (WebKit::HistoryEntryDataDecoder::finishDecoding):
10264        (WebKit::LegacySessionStateDecoder::decodeSessionHistoryEntryData):
10265        * UIProcess/mac/LegacySessionStateCoding.h:
10266
102672014-06-20  Anders Carlsson  <andersca@apple.com>
10268
10269        Implement more of LegacySessionStateDecoder
10270        https://bugs.webkit.org/show_bug.cgi?id=134144
10271
10272        Reviewed by Sam Weinig.
10273
10274        * Shared/SessionState.cpp:
10275        (WebKit::BackForwardListState::encode):
10276        (WebKit::SessionState::encode): Deleted.
10277        * Shared/SessionState.h:
10278        * UIProcess/mac/LegacySessionStateCoding.cpp:
10279        (WebKit::LegacySessionStateDecoder::decodeSessionState):
10280        (WebKit::LegacySessionStateDecoder::decodeSessionHistory):
10281        (WebKit::LegacySessionStateDecoder::decodeV0SessionHistory):
10282        (WebKit::LegacySessionStateDecoder::decodeV1SessionHistory):
10283        (WebKit::LegacySessionStateDecoder::decodeSessionHistoryEntries):
10284        (WebKit::LegacySessionStateDecoder::decodeSessionHistoryEntry):
10285        * UIProcess/mac/LegacySessionStateCoding.h:
10286
102872014-06-20  Ryuan Choi  <ryuan.choi@samsung.com>
10288
10289        Unreviewed. build fix for the cmake based ports since r170188
10290
10291        * CMakeLists.txt: Added LegacySessionState.cpp in source list.
10292
102932014-06-20  Dan Bernstein  <mitz@apple.com>
10294
10295        [Cocoa] No way to get the main frame’s main resource’s data
10296        https://bugs.webkit.org/show_bug.cgi?id=134113
10297
10298        Reviewed by Sam Weinig.
10299
10300        * UIProcess/API/Cocoa/WKWebView.mm:
10301        (-[WKWebView _getMainResourceDataWithCompletionHandler:]): Added. Calls
10302        WebPageProxy::getMainResourceDataOfFrame and invokes the completion handler form the
10303        callback.
10304        * UIProcess/API/Cocoa/WKWebViewPrivate.h: Declared new method.
10305
10306        * UIProcess/WebPageProxy.cpp:
10307        (WebKit::WebPageProxy::getMainResourceDataOfFrame): Made it safe to pass a NULL frame into
10308        this function.
10309
103102014-06-20  Anders Carlsson  <andersca@apple.com>
10311
10312        Introduce a WKSessionStateRef object
10313        https://bugs.webkit.org/show_bug.cgi?id=134136
10314
10315        Reviewed by Tim Horton.
10316
10317        WKSessionStateRef is going to hold session state, making it possible to migrate state from one 
10318        webpage to another without having to do any serialization/deserialization.
10319
10320        * Shared/API/c/WKBase.h:
10321        * Shared/APIObject.h:
10322        * Shared/SessionState.cpp:
10323        (WebKit::SessionState::encode):
10324        * Shared/SessionState.h:
10325        * UIProcess/API/APISessionState.cpp: Added.
10326        (API::SessionState::create):
10327        (API::SessionState::SessionState):
10328        (API::SessionState::~SessionState):
10329        * UIProcess/API/APISessionState.h:
10330        * UIProcess/API/C/WKAPICast.h:
10331        * UIProcess/API/C/WKSessionStateRef.cpp:
10332        (WKSessionStateCreateFromData):
10333        * UIProcess/API/C/WKSessionStateRef.h:
10334        * UIProcess/mac/LegacySessionStateCoding.cpp:
10335        (WebKit::LegacySessionStateDecoder::LegacySessionStateDecoder):
10336        (WebKit::LegacySessionStateDecoder::~LegacySessionStateDecoder):
10337        (WebKit::LegacySessionStateDecoder::decodeSessionState):
10338        * UIProcess/mac/LegacySessionStateCoding.h:
10339        * WebKit2.xcodeproj/project.pbxproj:
10340
103412014-06-19  Enrica Casucci  <enrica@apple.com>
10342
10343        iOS WebKit2: selection handles become too large when zooming a page.
10344        https://bugs.webkit.org/show_bug.cgi?id=134084
10345        <rdar://problem/16799164>
10346
10347        Reviewed by Benjamin Poulain.
10348
10349        Since the document view is zoomed, we add a subview that has the inverse transform
10350        of the document view. This new view becomes the root for the selection hierarchy.
10351        The new view has zero size, not to interfere with the existing gestures on the WKContenView
10352        therefore we implement hitTest to detect interaction with the selection elements.
10353
10354        * UIProcess/ios/WKContentView.mm:
10355        (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
10356        * UIProcess/ios/WKContentViewInteraction.h:
10357        * UIProcess/ios/WKContentViewInteraction.mm:
10358        (-[WKContentView setupInteraction]):
10359        (-[WKContentView cleanupInteraction]):
10360        (-[WKContentView unscaledView]):
10361        (-[WKContentView inverseScale]):
10362        (-[WKContentView _updateUnscaledView]):
10363        (-[WKContentView hitTest:withEvent:::]):
10364        (-[WKContentView selectedTextRange]):
10365
103662014-06-20  Timothy Horton  <timothy_horton@apple.com>
10367
10368        Snapshotting WKThumbnailViews should not tell Web processes backing unparented WKViews that they're in window
10369        https://bugs.webkit.org/show_bug.cgi?id=134134
10370        <rdar://problem/17402119>
10371
10372        Reviewed by Anders Carlsson.
10373
10374        * UIProcess/API/mac/WKView.mm:
10375        (-[WKView _setThumbnailView:]):
10376        Re-evaluating our in-window state is only useful if we're going to use the live layer tree;
10377        snapshots can be taken of unparented views with no trouble. Plus, doing so sets off a chain of
10378        expensive things in the Web process which we can avoid if using snapshots.
10379
103802014-06-20  Timothy Horton  <timothy_horton@apple.com>
10381
10382        WKThumbnailView should only use live layer trees before the snapshot arrives for parented WKViews
10383        https://bugs.webkit.org/show_bug.cgi?id=134129
10384        <rdar://problem/17401591>
10385
10386        Reviewed by Anders Carlsson.
10387
10388        * UIProcess/API/Cocoa/_WKThumbnailView.mm:
10389        (-[_WKThumbnailView initWithFrame:fromWKView:]):
10390        Add a white background to WKThumbnailView, so that if we have no snapshot and no layer tree,
10391        the view isn't transparent.
10392
10393        * UIProcess/API/mac/WKView.mm:
10394        (-[WKView _updateThumbnailViewLayer]):
10395        We currently pull the live layer tree into the WKThumbnailView even in snapshot mode,
10396        before the snapshot arrives, to avoid flashing when transitioning a live WKView to a thumbnail view.
10397        This is, however, not useful for unparented WKViews, because their layer tree will be detached
10398        and we'll flash anyway. So, only do that when the WKView is parented.
10399
104002014-06-20  Geoffrey Garen  <ggaren@apple.com>
10401
10402        WebKit delegate methods should document their default behaviors
10403        https://bugs.webkit.org/show_bug.cgi?id=134132
10404
10405        Reviewed by Dan Bernstein.
10406
10407        * UIProcess/API/Cocoa/WKNavigationDelegate.h:
10408        * UIProcess/API/Cocoa/WKUIDelegate.h:
10409
104102014-06-20  Simon Fraser  <simon.fraser@apple.com>
10411
10412        Fix lots of WK2 test crashes.
10413
10414        We don't always have a ScrollingCoordinator.
10415
10416        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
10417        (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
10418
104192014-06-20  Anders Carlsson  <andersca@apple.com>
10420
10421        Always use XPC on iOS
10422        https://bugs.webkit.org/show_bug.cgi?id=134130
10423
10424        Reviewed by Sam Weinig.
10425
10426        * UIProcess/ios/WebProcessProxyIOS.mm:
10427        (WebKit::WebProcessProxy::platformGetLaunchOptions):
10428        (WebKit::shouldUseXPC): Deleted.
10429
104302014-06-20  Anders Carlsson  <andersca@apple.com>
10431
10432        Fix build.
10433
10434        * Shared/SessionState.cpp:
10435
104362014-06-20  Anders Carlsson  <andersca@apple.com>
10437
10438        Add ArgumentEncoder support to PageState and friends
10439        https://bugs.webkit.org/show_bug.cgi?id=134128
10440
10441        Reviewed by Andreas Kling.
10442
10443        Change the classes to structs, get rid of the constructors/destructors
10444        and add encode member functions.
10445
10446        * Shared/SessionState.cpp:
10447        (WebKit::HTTPBody::Element::encode):
10448        (WebKit::HTTPBody::encode):
10449        (WebKit::FrameState::encode):
10450        (WebKit::PageState::encode):
10451        (WebKit::HTTPBody::Element::Element): Deleted.
10452        (WebKit::HTTPBody::Element::~Element): Deleted.
10453        (WebKit::FrameState::FrameState): Deleted.
10454        (WebKit::FrameState::~FrameState): Deleted.
10455        (WebKit::PageState::PageState): Deleted.
10456        (WebKit::PageState::~PageState): Deleted.
10457        * Shared/SessionState.h:
10458        (WebKit::HTTPBody::Element::type): Deleted.
10459
104602014-06-20  Anders Carlsson  <andersca@apple.com>
10461
10462        Add encoding and decoding support for WTF::Optional
10463        https://bugs.webkit.org/show_bug.cgi?id=134125
10464
10465        Reviewed by Andreas Kling.
10466
10467        * Platform/IPC/ArgumentCoders.h:
10468        (IPC::ArgumentCoder<WTF::Optional<T>>::encode):
10469        (IPC::ArgumentCoder<WTF::Optional<T>>::decode):
10470
104712014-06-20  Anders Carlsson  <andersca@apple.com>
10472
10473        Give NPAPI post requests a default content type
10474        https://bugs.webkit.org/show_bug.cgi?id=134120
10475
10476        Reviewed by Andreas Kling.
10477
10478        * WebProcess/Plugins/PluginView.cpp:
10479        (WebKit::PluginView::loadURL):
10480
104812014-06-20  Simon Fraser  <simon.fraser@apple.com>
10482
10483        Always commit the scrolling tree when we flush layers
10484        https://bugs.webkit.org/show_bug.cgi?id=134115
10485
10486        Reviewed by Beth Dakin.
10487        
10488        The scrolling state tree contains bare pointers to GraphicsLayers, which get
10489        converted to CALayers at commit time. To avoid a window of time where those
10490        GraphicsLayer pointers go stale, commit the scrolling tree whenever we flush the
10491        compositing layer tree.
10492
10493        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
10494        (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
10495
104962014-06-19  Simon Fraser  <simon.fraser@apple.com>
10497
10498        [iOS WebKit2] Make -webkit-overflow-scrolling:touch work in iframes (breaks MSWord previews)
10499        https://bugs.webkit.org/show_bug.cgi?id=134085
10500        <rdar://problem/16440586>
10501
10502        Reviewed by Tim Horton.
10503        
10504        Add some debug-only assertions that check that the number of nodes we encoded is
10505        the expected number.
10506
10507        * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
10508        (WebKit::encodeNodeAndDescendants):
10509        (WebKit::RemoteScrollingCoordinatorTransaction::encode):
10510
105112014-06-19  Simon Fraser  <simon.fraser@apple.com>
10512
10513        Handle scrolling tree modifications which remove intermediate nodes
10514        https://bugs.webkit.org/show_bug.cgi?id=134082
10515
10516        Reviewed by Tim Horton.
10517
10518        When updating the scrolling tree from the state tree, we failed to maintain
10519        the children arrays correctly. Fix by removing all children on scrolling nodes,
10520        and allowing the calls on children to add them back. A temporary hash map
10521        keeps the nodes alive.
10522        
10523        The state tree's m_nodesRemovedSinceLastCommit was also made into a HashSet,
10524        to make it easier to handle removal followed by re-insertion.
10525
10526        * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
10527        (WebKit::RemoteScrollingCoordinatorTransaction::decode):
10528        (WebKit::RemoteScrollingTreeTextStream::dump):
10529
105302014-06-19  Simon Fraser  <simon.fraser@apple.com>
10531
10532        Make ScrollingTreeNodes refounted, for easier tree reconfiguration
10533        https://bugs.webkit.org/show_bug.cgi?id=134075
10534
10535        Reviewed by Tim Horton.
10536
10537        Make ScrollingTreeNode be ref-counted.
10538
10539        * UIProcess/Scrolling/RemoteScrollingTree.cpp:
10540        (WebKit::RemoteScrollingTree::createNode):
10541        * UIProcess/Scrolling/RemoteScrollingTree.h:
10542        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
10543        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
10544        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::create):
10545        * WebProcess/Scrolling/RemoteScrollingCoordinator.h:
10546        * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
10547        (WebKit::RemoteScrollingCoordinator::createScrollingTreeNode):
10548
105492014-06-20  Dan Bernstein  <mitz@apple.com>
10550
10551        [Cocoa] No way to get the MIME type of the main frame
10552        https://bugs.webkit.org/show_bug.cgi?id=134111
10553
10554        Reviewed by Anders Carlsson.
10555
10556        * UIProcess/API/Cocoa/WKWebView.mm:
10557        (-[WKWebView _MIMEType]): Added. Returns the MIME type of the main frame, or nil.
10558        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
10559
105602014-06-20  Joseph Pecoraro  <pecoraro@apple.com>
10561
10562        [iOS]: Overrelease of RetainPtr object in file upload
10563        https://bugs.webkit.org/show_bug.cgi?id=134072
10564
10565        Reviewed by Brady Eidson.
10566
10567        This ivar is a RetainPtr, the release will be done automatically
10568        for us when we assign to nil or destruct.
10569
10570        * UIProcess/ios/WKContentViewInteraction.mm:
10571        (-[WKContentView fileUploadPanelDidDismiss:]):
10572
105732014-06-20  Anders Carlsson  <andersca@apple.com>
10574
10575        Begin stubbing out new session state classes
10576        https://bugs.webkit.org/show_bug.cgi?id=134110
10577
10578        Reviewed by Geoffrey Garen.
10579
10580        The basic idea is that these classes will replace the data blobs representing HistoryItems
10581        that we currently send back and forth between the web and UI processes.
10582        
10583        * Shared/SessionState.cpp: Added.
10584        (WebKit::HTTPBody::Element::Element):
10585        (WebKit::HTTPBody::Element::~Element):
10586        (WebKit::FrameState::FrameState):
10587        (WebKit::FrameState::~FrameState):
10588        (WebKit::PageState::PageState):
10589        (WebKit::PageState::~PageState):
10590        * Shared/SessionState.h: Added.
10591        (WebKit::HTTPBody::Element::type):
10592        * WebKit2.xcodeproj/project.pbxproj:
10593
105942014-06-20  Anders Carlsson  <andersca@apple.com>
10595
10596        Rename SessionState to LegacySessionState
10597        https://bugs.webkit.org/show_bug.cgi?id=134107
10598
10599        Reviewed by Dan Bernstein.
10600
10601        * Shared/LegacySessionState.cpp: Renamed from Source/WebKit2/Shared/SessionState.cpp.
10602        (IPC::ArgumentCoder<RefPtr<T>>::encode):
10603        (IPC::ArgumentCoder<RefPtr<T>>::decode):
10604        (WebKit::LegacySessionState::LegacySessionState):
10605        (WebKit::LegacySessionState::isEmpty):
10606        (WebKit::LegacySessionState::encode):
10607        (WebKit::LegacySessionState::decode):
10608        * Shared/LegacySessionState.h: Renamed from Source/WebKit2/Shared/SessionState.h.
10609        (WebKit::LegacySessionState::list):
10610        (WebKit::LegacySessionState::currentIndex):
10611        * Shared/WebPageCreationParameters.h:
10612        * UIProcess/WebPageProxy.cpp:
10613        (WebKit::WebPageProxy::creationParameters):
10614        * UIProcess/cf/WebPageProxyCF.cpp:
10615        (WebKit::WebPageProxy::restoreFromSessionStateData):
10616        * WebKit2.xcodeproj/project.pbxproj:
10617        * WebProcess/WebPage/WebPage.cpp:
10618        (WebKit::WebPage::restoreSession):
10619        (WebKit::WebPage::restoreSessionAndNavigateToCurrentItem):
10620        * WebProcess/WebPage/WebPage.h:
10621        * WebProcess/WebPage/WebPage.messages.in:
10622
106232014-06-20  Anders Carlsson  <andersca@apple.com>
10624
10625        Document the underlying types of the WKWindowFeatures rect properties
10626        https://bugs.webkit.org/show_bug.cgi?id=134103
10627
10628        Reviewed by Dan Bernstein.
10629
10630        * UIProcess/API/Cocoa/WKWindowFeatures.h:
10631
106322014-06-20  Zan Dobersek  <zdobersek@igalia.com>
10633
10634        PluginProcessMainUnix should only scan for plugins when X11 plugin architecture is enabled
10635        https://bugs.webkit.org/show_bug.cgi?id=134098
10636
10637        Reviewed by Carlos Garcia Campos.
10638
10639        * PluginProcess/unix/PluginProcessMainUnix.cpp: Guard the call to NetscapePluginModule::scanPlugin()
10640        with PLUGIN_ARCHITECTURE(X11) since the declaration has the same build guard. In case the X11 plugin
10641        architecture is not enabled the program exits with EXIT_FAILURE.
10642
106432014-06-20  Tim Horton  <timothy_horton@apple.com>
10644
10645        LayerPool’d PlatformCALayerRemote/RemoteLayerBackingStore can have stale context pointers
10646        https://bugs.webkit.org/show_bug.cgi?id=134050
10647        <rdar://problem/17315114>
10648
10649        Reviewed by Simon Fraser.
10650
10651        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
10652        (WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
10653        (WebKit::PlatformCALayerRemote::layerPool):
10654        * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
10655        * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
10656        (WebKit::RemoteLayerTreeContext::layerPool):
10657        * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
10658        (WebKit::RemoteLayerTreeContext::buildTransaction):
10659        Ensure that layers being committed are always in the context that is committing them.
10660        Use a LayerPool per RemoteLayerTreeContext, to avoid moving layers between contexts.
10661
106622014-06-20  Tim Horton  <timothy_horton@apple.com>
10663
10664        WKContentViewInteraction isn't cleaned up when the Web Content process crashes
10665        https://bugs.webkit.org/show_bug.cgi?id=134080
10666        <rdar://problem/17387652> and <rdar://problem/16848360>
10667
10668        Reviewed by Benjamin Poulain.
10669
10670        * UIProcess/ios/WKContentView.mm:
10671        (-[WKContentView _processDidExit]):
10672        Tear down WKContentViewInteraction when the process crashes.
10673
10674        (-[WKContentView _didRelaunchProcess]):
10675        Set WKContentViewInteraction back up when the process is relaunched.
10676
10677        * UIProcess/ios/WKContentViewInteraction.mm:
10678        (-[WKContentView cleanupInteraction]):
10679        Clear the SmartMagnificationController, which is a message receiver and thus must be re-created with the new page.
10680        Remove all gesture recognizers from the content view.
10681        Clear _fileUploadPanel, else we'll get an assert the next time we try to open one.
10682
10683        * UIProcess/WebPageProxy.cpp:
10684        (WebKit::WebPageProxy::resetStateAfterProcessExited):
10685        Give the PageClient a chance to clean up *before* we clean up internals;
10686        it is at a higher level and some cleanup depends on WebPageProxy members
10687        not having been cleared yet.
10688
106892014-06-19  Dan Bernstein  <mitz@apple.com>
10690
10691        Removed unused SPI -[WKWebView _runJavaScriptInMainFrame:].
10692
10693        Rubber-stamped by Simon Fraser.
10694
10695        * UIProcess/API/Cocoa/WKWebView.mm:
10696        (-[WKWebView _runJavaScriptInMainFrame:]): Deleted.
10697        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
10698
106992014-06-19  Dan Bernstein  <mitz@apple.com>
10700
10701        Use a single map for all callback types in WebPageProxy
10702        https://bugs.webkit.org/show_bug.cgi?id=134069
10703
10704        Reviewed by Tim Horton.
10705
10706        * UIProcess/GenericCallback.h:
10707        (WebKit::CallbackMap::take):
10708        * UIProcess/WebPageProxy.cpp:
10709        (WebKit::WebPageProxy::printFinishedCallback):
10710        (WebKit::WebPageProxy::resetState):
10711        (WebKit::WebPageProxy::drawPagesForPrinting):
10712        * UIProcess/WebPageProxy.h:
10713        * UIProcess/mac/WebPageProxyMac.mm:
10714        (WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync):
10715        (WebKit::WebPageProxy::attributedStringForCharacterRangeCallback):
10716
107172014-06-19  Anders Carlsson  <andersca@apple.com>
10718
10719        Another build fix attempt.
10720
10721        * Shared/API/Cocoa/WKFoundation.h:
10722
107232014-06-19  Dan Bernstein  <mitz@apple.com>
10724
10725        [iOS] Legacy processes are installed inside WebKit.framework
10726        https://bugs.webkit.org/show_bug.cgi?id=134079
10727
10728        Reviewed by Anders Carlsson.
10729
10730        * Configurations/All.xcconfig: Exclude the legacy processes on iOS so they don’t get copied.
10731        * Configurations/BaseLegacyProcess.xcconfig: Set SKIP_INSTALL to YES on iOS.
10732
107332014-06-19  Anders Carlsson  <andersca@apple.com>
10734
10735        It's OS X, not OSX...
10736
10737        * Shared/API/Cocoa/WKFoundation.h:
10738
107392014-06-19  Antti Koivisto  <antti@apple.com>
10740
10741        Unfreeze the layer tree on DidFirstVisuallyNonEmptyLayout
10742        https://bugs.webkit.org/show_bug.cgi?id=134073
10743
10744        Reviewed by Simon Fraser.
10745        
10746        DidFirstLayout is too early and we usually get a blank page. This doesn't match the existing iOS behavior either.
10747
10748        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
10749        (WebKit::WebFrameLoaderClient::dispatchDidLayout):
10750        * WebProcess/WebPage/WebPage.cpp:
10751        (WebKit::WebPage::WebPage):
10752
107532014-06-19  Anders Carlsson  <andersca@apple.com>
10754
10755        Try to fix the Mavericks build.
10756
10757        * Shared/API/Cocoa/WKFoundation.h:
10758
107592014-06-19  Sam Weinig  <sam@webkit.org>
10760
10761        [Cocoa] Need SPI to determine if the WKWebView is displaying a standalone image
10762        https://bugs.webkit.org/show_bug.cgi?id=134071
10763
10764        Reviewed by Anders Carlsson.
10765
10766        * UIProcess/API/Cocoa/WKWebView.mm:
10767        (-[WKWebView _isDisplayingStandaloneImageDocument]):
10768        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
10769
107702014-06-19  Dan Bernstein  <mitz@apple.com>
10771
10772        Use a single map for all callback types in WebPageProxy
10773        https://bugs.webkit.org/show_bug.cgi?id=134069
10774
10775        Reviewed by Anders Carlsson.
10776
10777        * UIProcess/GenericCallback.h:
10778        (WebKit::CallbackBase::as): Added. Performs a dynamic cast to a specific callback type.
10779        (WebKit::CallbackBase::CallbackBase): Added a type parameter, which is used to initialize
10780        the new m_type member.
10781        (WebKit::GenericCallback::GenericCallback): Pass the type to the base class constructor.
10782        (WebKit::GenericCallback::type): Added. Returns a unique type.
10783        (WebKit::GenericCallback::invalidate): Now virtual.
10784
10785        (WebKit::CallbackMap::put): Adds the callback to the map.
10786        (WebKit::CallbackMap::take): Removes the callback from the map, and dynamically casts it to
10787        the specified type.
10788        (WebKit::CallbackMap::invalidate): Invalidates the map.
10789
10790        * UIProcess/WebPageProxy.cpp:
10791        (WebKit::WebPageProxy::validateCommand):
10792        (WebKit::WebPageProxy::runJavaScriptInMainFrame):
10793        (WebKit::WebPageProxy::getRenderTreeExternalRepresentation):
10794        (WebKit::WebPageProxy::getSourceForFrame):
10795        (WebKit::WebPageProxy::getContentsAsString):
10796        (WebKit::WebPageProxy::getBytecodeProfile):
10797        (WebKit::WebPageProxy::getSelectionOrContentsAsString):
10798        (WebKit::WebPageProxy::getSelectionAsWebArchiveData):
10799        (WebKit::WebPageProxy::getMainResourceDataOfFrame):
10800        (WebKit::WebPageProxy::getResourceDataFromFrame):
10801        (WebKit::WebPageProxy::getWebArchiveOfFrame):
10802        (WebKit::WebPageProxy::forceRepaint):
10803        (WebKit::WebPageProxy::clearLoadDependentCallbacks):
10804        (WebKit::WebPageProxy::voidCallback):
10805        (WebKit::WebPageProxy::dataCallback):
10806        (WebKit::WebPageProxy::imageCallback):
10807        (WebKit::WebPageProxy::stringCallback):
10808        (WebKit::WebPageProxy::scriptValueCallback):
10809        (WebKit::WebPageProxy::computedPagesCallback):
10810        (WebKit::WebPageProxy::validateCommandCallback):
10811        (WebKit::WebPageProxy::unsignedCallback):
10812        (WebKit::WebPageProxy::editingRangeCallback):
10813        (WebKit::WebPageProxy::rectForCharacterRangeCallback):
10814        (WebKit::WebPageProxy::resetState):
10815        (WebKit::WebPageProxy::computePagesForPrinting):
10816        (WebKit::WebPageProxy::drawRectToImage):
10817        (WebKit::WebPageProxy::drawPagesToPDF):
10818        (WebKit::WebPageProxy::getMarkedRangeAsync):
10819        (WebKit::WebPageProxy::getSelectedRangeAsync):
10820        (WebKit::WebPageProxy::characterIndexForPointAsync):
10821        (WebKit::WebPageProxy::firstRectForCharacterRangeAsync):
10822        (WebKit::WebPageProxy::takeSnapshot):
10823        * UIProcess/WebPageProxy.h:
10824        * UIProcess/ios/WebPageProxyIOS.mm:
10825        (WebKit::WebPageProxy::gestureCallback):
10826        (WebKit::WebPageProxy::touchesCallback):
10827        (WebKit::WebPageProxy::autocorrectionDataCallback):
10828        (WebKit::WebPageProxy::dictationContextCallback):
10829        (WebKit::WebPageProxy::autocorrectionContextCallback):
10830        (WebKit::WebPageProxy::selectWithGesture):
10831        (WebKit::WebPageProxy::updateSelectionWithTouches):
10832        (WebKit::WebPageProxy::requestAutocorrectionData):
10833        (WebKit::WebPageProxy::applyAutocorrection):
10834        (WebKit::WebPageProxy::requestDictationContext):
10835        (WebKit::WebPageProxy::requestAutocorrectionContext):
10836        (WebKit::WebPageProxy::selectWithTwoTouches):
10837
108382014-06-19  Anders Carlsson  <andersca@apple.com>
10839
10840        No way to handle HTTP Authentication with WKWebView
10841        https://bugs.webkit.org/show_bug.cgi?id=134067
10842        <rdar://problem/17317874>
10843
10844        Reviewed by Dan Bernstein.
10845
10846        Add a public webView:didReceiveAuthenticationChallenge:completionHandler: delegate method and get rid of the SPI.
10847        
10848        * Shared/API/Cocoa/WKFoundation.h:
10849        * UIProcess/API/Cocoa/WKNavigationDelegate.h:
10850        * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
10851        * UIProcess/Cocoa/NavigationState.mm:
10852        (WebKit::NavigationState::setNavigationDelegate):
10853        (WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame):
10854
108552014-06-18  Roger Fong  <roger_fong@apple.com>
10856
10857        Don't kill the UIProcess until all local storage transactions have been committed.
10858        https://bugs.webkit.org/show_bug.cgi?id=134042.
10859        <rdar://problem/16660724>.
10860
10861        Reviewed by Anders Carlsson.
10862
10863        * UIProcess/API/mac/WKView.mm: Add a listener for the application will terminate notification.
10864        (-[WKView _applicationWillTerminate:]):
10865        (-[WKView initWithFrame:context:configuration:webView:]):
10866        * UIProcess/WebContext.cpp: Calls code in StorageManager to cleanup local storage transactions upon application termination.
10867        (WebKit::WebContext::applicationWillTerminate):
10868        * UIProcess/WebContext.h:
10869
10870        * UIProcess/Storage/StorageManager.cpp:
10871        (WebKit::StorageManager::applicationWillTerminate):
10872        Dispatch local storage cleanup task to background thread and make sure the UIProcess can't exit early.
10873        * UIProcess/Storage/StorageManager.h:
10874
108752014-06-19  Oliver Hunt  <oliver@apple.com>
10876
10877        Switch to using the process parameters during initialisation
10878        to determine whether we hsould be using the network process.
10879
10880        RS=Sam Weinig
10881
10882        * WebProcess/cocoa/WebProcessCocoa.mm:
10883        (WebKit::WebProcess::platformInitializeWebProcess):
10884
108852014-06-19  Pratik Solanki  <psolanki@apple.com>
10886
10887        Copy SharedBuffer data into IPC message directly
10888        https://bugs.webkit.org/show_bug.cgi?id=133920
10889
10890        Reviewed by Anders Carlsson.
10891
10892        When data array callbacks are enabled, we currently merge all the CFDataRefs in SharedBuffer
10893        into one contiguous memory buffer when creating IPC::DataReference. This patch creates a
10894        subclass of DataReference that uses SharedBuffer::getSomeData() to copy the data directly
10895        into the IPC message.
10896
10897        * NetworkProcess/AsynchronousNetworkLoaderClient.cpp:
10898        (WebKit::AsynchronousNetworkLoaderClient::didReceiveBuffer):
10899        * Platform/IPC/ArgumentEncoder.cpp:
10900        (IPC::ArgumentEncoder::reserve): Added.
10901        (IPC::ArgumentEncoder::grow):
10902        * Platform/IPC/ArgumentEncoder.h:
10903        * Platform/IPC/DataReference.cpp:
10904        (IPC::SharedBufferDataReference::encode):
10905        * Platform/IPC/DataReference.h:
10906        (IPC::DataReference::~DataReference):
10907
109082014-06-18  Zan Dobersek  <zdobersek@igalia.com>
10909
10910        Unreviewed. Fixing the GTK+ build after r170114.
10911
10912        * UIProcess/API/gtk/WebKitAuthenticationRequest.cpp:
10913        (webkit_authentication_request_get_proposed_credential):
10914        The core() accessor has been renamed to credential().
10915
109162014-06-18  Dan Bernstein  <mitz@apple.com>
10917
10918        Try to fix the Mountain Lion build.
10919
10920        * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
10921        * UIProcess/Cocoa/NavigationState.mm:
10922        (WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame):
10923
109242014-06-18  Tim Horton  <timothy_horton@apple.com>
10925
10926        Remove RemoteLayerBackingStore’s RemoteLayerTreeContext pointer
10927        https://bugs.webkit.org/show_bug.cgi?id=134055
10928
10929        Reviewed by Simon Fraser.
10930
10931        * Shared/mac/RemoteLayerBackingStore.h:
10932        * Shared/mac/RemoteLayerBackingStore.mm:
10933        (WebKit::RemoteLayerBackingStore::RemoteLayerBackingStore):
10934        (WebKit::RemoteLayerBackingStore::~RemoteLayerBackingStore):
10935        (WebKit::RemoteLayerBackingStore::ensureBackingStore):
10936        (WebKit::RemoteLayerBackingStore::display):
10937        (WebKit::RemoteLayerBackingStore::drawInContext):
10938        Remove RemoteLayerBackingStore's RemoteLayerTreeContext pointer. Instead, use the PlatformCALayer's.
10939        Pass the PlatformCALayer in to the constructor, and remove it from ensureBackingStore();
10940        RemoteLayerBackingStore is (for now) strictly tied to a single layer.
10941
10942        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
10943        (WebKit::PlatformCALayerRemote::ensureBackingStore):
10944        (WebKit::PlatformCALayerRemote::updateBackingStore):
10945        * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
10946        (WebKit::PlatformCALayerRemote::context):
10947
109482014-06-18  Dan Bernstein  <mitz@apple.com>
10949
10950        [Cocoa] Modernize one-method authentication
10951        https://bugs.webkit.org/show_bug.cgi?id=134051
10952
10953        Reviewed by Anders Carlsson.
10954
10955        Instead of an NSURLConnection-style delegate method that takes a challenge and responds to
10956        its sender, provide an NSURLSession-style method that takes a challenge and a completion
10957        handler.
10958
10959        * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new delegate method, replacing
10960        old unused method.
10961        * UIProcess/Cocoa/NavigationState.h: Renamed flag in m_navigationDelegateMethods struct.
10962        * UIProcess/Cocoa/NavigationState.mm:
10963        (WebKit::NavigationState::setNavigationDelegate): Check for new delegate method and update
10964        new flag.
10965
10966        (WebKit::NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame): If
10967        the delegate implements the new method, return true (if it cannot handle the protection
10968        space, it can reject it through the completion handler), except for server-trust
10969        authentication, which is not supported yet.
10970        (WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame): If the
10971        delegate implements the new method, call it, passing a completion handler that calls the
10972        right AuthenticationDecisionListener function based on its disposition and credential
10973        parameters.
10974
109752014-06-18  Anders Carlsson  <andersca@apple.com>
10976
10977        Make FrameLoadType a strongly typed enum
10978        https://bugs.webkit.org/show_bug.cgi?id=134047
10979
10980        Reviewed by Andreas Kling.
10981
10982        * UIProcess/WebPageProxy.cpp:
10983        (WebKit::WebPageProxy::didCommitLoadForFrame):
10984        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
10985        (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
10986        * WebProcess/WebPage/WebPage.cpp:
10987        (WebKit::WebPage::goForward):
10988        (WebKit::WebPage::goBack):
10989        (WebKit::WebPage::goToBackForwardItem):
10990        (WebKit::shouldReuseCommittedSandboxExtension):
10991        (WebKit::WebPage::didCommitLoad):
10992
109932014-06-18  Anders Carlsson  <andersca@apple.com>
10994
10995        Simplify WebSecurityOrigin
10996        https://bugs.webkit.org/show_bug.cgi?id=134049
10997
10998        Reviewed by Andreas Kling.
10999
11000        * Shared/API/c/WKSecurityOrigin.cpp:
11001        (WKSecurityOriginCreateFromString):
11002        (WKSecurityOriginCreateFromDatabaseIdentifier):
11003        (WKSecurityOriginCopyDatabaseIdentifier):
11004        (WKSecurityOriginCopyToString):
11005        (WKSecurityOriginCopyProtocol):
11006        (WKSecurityOriginCopyHost):
11007        (WKSecurityOriginGetPort):
11008        * Shared/WebSecurityOrigin.h:
11009        (WebKit::WebSecurityOrigin::securityOrigin):
11010        (WebKit::WebSecurityOrigin::createFromDatabaseIdentifier): Deleted.
11011        (WebKit::WebSecurityOrigin::protocol): Deleted.
11012        (WebKit::WebSecurityOrigin::host): Deleted.
11013        (WebKit::WebSecurityOrigin::port): Deleted.
11014        (WebKit::WebSecurityOrigin::databaseIdentifier): Deleted.
11015        (WebKit::WebSecurityOrigin::toString): Deleted.
11016        * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
11017        (WebKit::WebNotificationManagerProxy::providerDidUpdateNotificationPolicy):
11018        (WebKit::WebNotificationManagerProxy::providerDidRemoveNotificationPolicies):
11019        * UIProcess/Storage/StorageManager.cpp:
11020        (WebKit::StorageManager::deleteEntriesForOrigin):
11021        * UIProcess/Storage/StorageManager.h:
11022        * UIProcess/WebApplicationCacheManagerProxy.cpp:
11023        (WebKit::WebApplicationCacheManagerProxy::deleteEntriesForOrigin):
11024        * UIProcess/WebDatabaseManagerProxy.cpp:
11025        (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
11026        (WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
11027        (WebKit::WebDatabaseManagerProxy::deleteDatabaseWithNameForOrigin):
11028        (WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin):
11029        (WebKit::WebDatabaseManagerProxy::setQuotaForOrigin):
11030        (WebKit::WebDatabaseManagerProxy::didModifyOrigin):
11031        (WebKit::WebDatabaseManagerProxy::didModifyDatabase):
11032        * UIProcess/WebKeyValueStorageManager.cpp:
11033        (WebKit::didGetStorageDetailsByOrigin):
11034        * UIProcess/WebOriginDataManagerProxy.cpp:
11035        (WebKit::WebOriginDataManagerProxy::deleteEntriesForOrigin):
11036        * UIProcess/WebPageProxy.cpp:
11037        (WebKit::WebPageProxy::exceededDatabaseQuota):
11038        (WebKit::WebPageProxy::requestGeolocationPermissionForFrame):
11039        * UIProcess/WebResourceCacheManagerProxy.cpp:
11040        (WebKit::WebResourceCacheManagerProxy::clearCacheForOrigin):
11041        * UIProcess/ios/WKGeolocationProviderIOS.mm:
11042        (-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:request:window:]):
11043        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
11044        (WebKit::WebChromeClient::exceededDatabaseQuota):
11045
110462014-06-18  Anders Carlsson  <andersca@apple.com>
11047
11048        Add back WKPageRunJavaScriptInMainFrame_b for now
11049        https://bugs.webkit.org/show_bug.cgi?id=134045
11050        <rdar://problem/17368879>
11051
11052        Reviewed by Tim Horton.
11053
11054        Reverted changeset:
11055
11056        "Remove WKPageRunJavaScriptInMainFrame_b"
11057        https://bugs.webkit.org/show_bug.cgi?id=133926
11058        http://trac.webkit.org/changeset/169991
11059
110602014-06-18  Anders Carlsson  <andersca@apple.com>
11061
11062        Simplify WebPageProxy::saveRecentSearches and WebPageProxy::loadRecentSearches
11063        https://bugs.webkit.org/show_bug.cgi?id=134041
11064
11065        Reviewed by Andreas Kling.
11066
11067        * UIProcess/cf/WebPageProxyCF.cpp:
11068        (WebKit::WebPageProxy::saveRecentSearches):
11069        (WebKit::WebPageProxy::loadRecentSearches):
11070
110712014-06-18  Simon Fraser  <simon.fraser@apple.com>
11072
11073        Make ScrollingStateNodes refcounted, and other minor cleanup
11074        https://bugs.webkit.org/show_bug.cgi?id=134040
11075
11076        Reviewed by Beth Dakin.
11077
11078        * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
11079        (WebKit::encodeNodeAndDescendants):
11080
110812014-06-18  Benjamin Poulain  <benjamin@webkit.org>
11082
11083        [iOS][WK2] Do not add padding when magnifying replaced elements
11084        https://bugs.webkit.org/show_bug.cgi?id=134019
11085
11086        Reviewed by Tim Horton.
11087
11088        Having margins for regular blocks make sense to improve readability. For replaced elements,
11089        we should follow iOS's UI and display edge to edge.
11090
11091        * UIProcess/ios/SmartMagnificationController.mm:
11092        (WebKit::SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture):
11093
110942014-06-18  Benjamin Poulain  <bpoulain@apple.com>
11095
11096        [iOS][WK2] Re-sync didCommitLoadForMainFrame with its corresponding tile update
11097        https://bugs.webkit.org/show_bug.cgi?id=134009
11098
11099        Reviewed by Tim Horton.
11100
11101        WKWebView assumed the first _didCommitLayerTree: after _didCommitLoadForMainFrame
11102        had the state of the page being loaded.
11103
11104        This is not always true. Sometimes, a set of tiles can be rendering asynchronously while the next
11105        page is loaded, and does not flush the queue until after didCommitLoadForMainFrame is executed.
11106
11107        Tim introduced a transactionID with each layer tree update. This patch uses that to synchronize
11108        WKWebView with the right set of tiles.
11109
11110        * UIProcess/API/Cocoa/WKWebView.mm:
11111        (-[WKWebView _didCommitLoadForMainFrame]):
11112        (-[WKWebView _didCommitLayerTree:WebKit::]):
11113        (-[WKWebView _updateVisibleContentRects]):
11114        * UIProcess/WebPageProxy.h:
11115        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
11116        (WebKit::RemoteLayerTreeDrawingAreaProxy::nextLayerTreeTransactionID):
11117        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.messages.in:
11118        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
11119        (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
11120        (WebKit::RemoteLayerTreeDrawingAreaProxy::willCommitLayerTree):
11121        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
11122        (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
11123
111242014-06-18  Anders Carlsson  <andersca@apple.com>
11125
11126        Simplify WebCredential
11127        https://bugs.webkit.org/show_bug.cgi?id=134036
11128
11129        Reviewed by Andreas Kling.
11130
11131        * UIProcess/API/C/WKCredential.cpp:
11132        (WKCredentialCreate):
11133        (WKCredentialCreateWithCertificateInfo):
11134        (WKCredentialCopyUser):
11135        * UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
11136        (WebKit::AuthenticationChallengeProxy::useCredential):
11137        * UIProcess/Authentication/WebCredential.cpp:
11138        (WebKit::WebCredential::credential):
11139        (WebKit::WebCredential::core): Deleted.
11140        (WebKit::WebCredential::user): Deleted.
11141        * UIProcess/Authentication/WebCredential.h:
11142        (WebKit::WebCredential::create): Deleted.
11143
111442014-06-18  Anders Carlsson  <andersca@apple.com>
11145
11146        Adopt modern C++11 loops and fix WebArchive creation functions
11147        https://bugs.webkit.org/show_bug.cgi?id=134032
11148
11149        Reviewed by Andreas Kling.
11150
11151        * Shared/APIWebArchive.cpp:
11152        (API::WebArchive::WebArchive):
11153
111542014-06-18  Anders Carlsson  <andersca@apple.com>
11155
11156        Give WKWebView on iOS a mobile user agent
11157        https://bugs.webkit.org/show_bug.cgi?id=134034
11158        <rdar://problem/17346489>
11159
11160        Reviewed by Enrica Casucci.
11161
11162        * UIProcess/API/Cocoa/WKWebView.mm:
11163        (-[WKWebView initWithFrame:configuration:]):
11164
111652014-06-18  Joseph Pecoraro  <pecoraro@apple.com>
11166
11167        Remove stale include, header was removed in r170101.
11168
11169        Unreviewed build fix.
11170
11171        * Shared/API/Cocoa/WebKitPrivate.h:
11172
111732014-06-18  Anders Carlsson  <andersca@apple.com>
11174
11175        Add CF type cast function templates and use them in KeyedDecoder in WebKit2
11176        https://bugs.webkit.org/show_bug.cgi?id=134033
11177
11178        Reviewed by Sam Weinig.
11179
11180        * Shared/cf/KeyedDecoder.cpp:
11181        (WebKit::KeyedDecoder::KeyedDecoder):
11182        (WebKit::KeyedDecoder::decodeBytes):
11183        (WebKit::KeyedDecoder::decodeBool):
11184        (WebKit::KeyedDecoder::decodeInt32):
11185        (WebKit::KeyedDecoder::decodeInt64):
11186        (WebKit::KeyedDecoder::decodeFloat):
11187        (WebKit::KeyedDecoder::decodeDouble):
11188        (WebKit::KeyedDecoder::decodeString):
11189        (WebKit::KeyedDecoder::beginObject):
11190        (WebKit::KeyedDecoder::beginArray):
11191        (WebKit::KeyedDecoder::beginArrayElement):
11192
111932014-06-18  Dan Bernstein  <mitz@apple.com>
11194
11195        Remove the unused _WKBackForwardListDidChangeNotification.
11196
11197        Reviewed by Anders Carlsson.
11198
11199        * UIProcess/API/Cocoa/WKBackForwardList.mm:
11200        * UIProcess/API/Cocoa/WKBackForwardListInternal.h:
11201        * UIProcess/API/Cocoa/WKBackForwardListPrivate.h: Removed.
11202        * UIProcess/Cocoa/NavigationState.h:
11203        * UIProcess/Cocoa/NavigationState.mm:
11204        (WebKit::NavigationState::LoaderClient::didChangeBackForwardList): Deleted.
11205        * WebKit2.xcodeproj/project.pbxproj:
11206
112072014-06-18  Andreas Kling  <akling@apple.com>
11208
11209        Set main thread QoS policies after IPC initialization.
11210        <https://webkit.org/b/134014>
11211
11212        Something was flipping the QoS level back to "unspecified" after
11213        setting it in the ChildProcess initialization code. Pending a better
11214        understanding of what really happens, move the code to a later stage,
11215        after IPC channels are up and running. Now the priority sticks.
11216
11217        Reviewed by Anders Carlsson.
11218
11219        * NetworkProcess/NetworkProcess.cpp:
11220        (WebKit::NetworkProcess::initializeNetworkProcess):
11221        * Shared/ChildProcess.cpp:
11222        (WebKit::ChildProcess::initialize):
11223        * WebProcess/WebProcess.cpp:
11224        (WebKit::WebProcess::initializeWebProcess):
11225
112262014-06-17  Dan Bernstein  <mitz@apple.com>
11227
11228        [Cocoa] WKWebView's _privateBrowsingEnabled property is unused
11229        https://bugs.webkit.org/show_bug.cgi?id=134013
11230
11231        Reviewed by Sam Weinig.
11232
11233        * UIProcess/API/Cocoa/WKWebView.mm:
11234        (-[WKWebView _privateBrowsingEnabled]): Deleted.
11235        (-[WKWebView _setPrivateBrowsingEnabled:]): Deleted.
11236        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
11237
112382014-06-17  Tim Horton  <timothy_horton@apple.com>
11239
11240        [iOS][wk2] Use ImageDocument to display subframe PDFs
11241        https://bugs.webkit.org/show_bug.cgi?id=133944
11242        <rdar://problem/17205983>
11243
11244        Reviewed by Dan Bates.
11245
11246        * WebProcess/WebPage/WebPage.cpp:
11247        (WebKit::WebPage::updatePreferences):
11248        Always use ImageDocument for subframe PDFs in WebKit2 on iOS.
11249
112502014-06-17  Anders Carlsson  <andersca@apple.com>
11251
11252        Make it possible to use -[NSBundle classNamed:] to find WebKitLegacy classes
11253        https://bugs.webkit.org/show_bug.cgi?id=134008
11254        <rdar://problem/17037600>
11255
11256        Reviewed by Dan Bernstein.
11257
11258        * UIProcess/API/Cocoa/LegacyBundleForClass.mm: Added.
11259        * WebKit2.xcodeproj/project.pbxproj:
11260
112612014-06-17  Anders Carlsson  <andersca@apple.com>
11262
11263        Expose the location of website data
11264        https://bugs.webkit.org/show_bug.cgi?id=134000
11265        <rdar://problem/17350498>
11266
11267        Reviewed by Dan Bernstein.
11268
11269        Also, remove the bundle ID from the website data path for containerized apps.
11270
11271        * Shared/mac/SandboxUtilities.cpp:
11272        (WebKit::processIsAppSandboxed):
11273        * Shared/mac/SandboxUtilities.h:
11274        * UIProcess/API/Cocoa/WKProcessPool.mm:
11275        (+[WKProcessPool _websiteDataURLForContainerWithURL:]):
11276        (websiteDataDirectoryURL):
11277        * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
11278
112792014-06-17  Jeremy Jones  <jeremyj@apple.com>
11280
11281        Improve enter and exit fullscreen transition by using two step transition.
11282        https://bugs.webkit.org/show_bug.cgi?id=133706
11283
11284        Reviewed by Simon Fraser.
11285
11286        Add setupFullscreen()/didSetupFullscreen() and cleanupFullscreen()/didCleanupFullscreen()
11287        to the proxies. And refactor enter/exit fullscreen to do some of the work in setup/cleanup.
11288
11289        * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
11290        Add four methods mentioned above.
11291        * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
11292        Add Setup/Cleanup functions.
11293        * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
11294        (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): does what enterFullscreen used to do.
11295        (WebKit::WebVideoFullscreenManagerProxy::didCleanupFullscreen): forward IPC.
11296        (WebKit::WebVideoFullscreenManagerProxy::didSetupFullscreen): forward IPC.
11297        (WebKit::WebVideoFullscreenManagerProxy::enterFullscreenWithID): changed to enterFullscreen
11298        * WebProcess/ios/WebVideoFullscreenManager.h: Add didSetup/didCleanup
11299        * WebProcess/ios/WebVideoFullscreenManager.messages.in: Add didSetup/didCleanup
11300        * WebProcess/ios/WebVideoFullscreenManager.mm: 
11301        (WebKit::WebVideoFullscreenManager::enterFullscreenForNode): refactored,
11302        some implementation moves to didSetupFullscreen.
11303        (WebKit::WebVideoFullscreenManager::didSetupFullscreen):
11304        Moves the video layer over to the hosted layer, and initiates fullscreen.
11305        (WebKit::WebVideoFullscreenManager::didExitFullscreen): refactored,
11306        some implementation moves to didCleanupFullscreen, and initiates cleanup.
11307        (WebKit::WebVideoFullscreenManager::didCleanupFullscreen):
11308        Final cleanup refactored from didExitFullscreen()
11309
113102014-06-17  Eric Carlson  <eric.carlson@apple.com>
11311
11312        [iOS] enable background audio in WK2
11313        https://bugs.webkit.org/show_bug.cgi?id=133996
11314
11315        Reviewed by Jer Noble.
11316
11317        * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-iOS.plist: Mark as
11318            allowed to play audio when in the background.
11319        * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist: Ditto.
11320
113212014-06-17  Simon Fraser  <simon.fraser@apple.com>
11322
11323        [UI-side compositing] fix reflections on composited layers
11324        https://bugs.webkit.org/show_bug.cgi?id=133942
11325
11326        Reviewed by Tim Horton.
11327        
11328        Fix reflections on composited layers. There are two main set of changes.
11329        
11330        First, a PlatformCALayerRemote which is a clone has to track the layer
11331        it is a clone of, so it knows where to grab the contents from in the UI process.
11332        This layer may be told that its contents need updating out of order during
11333        recursiveBuildTransaction(), so we need some small changes in RemoteLayerTreeContext
11334        to allow a layer to add itself to the set of layers requiring commit.
11335        
11336        In the UI process, a new step is added to RemoteLayerTreeHost::updateLayerTree()
11337        to go through clones, and copy their contents from the origin layer.
11338        
11339        The second set of changes makes platformCALayerLayerDidDisplay() work for
11340        UI-side compositing by not taking a PlatformLayer*, but instead a PlatformCALayer*.
11341        PlatformCALayer::setContentsChanged() changed to copyContentsFromLayer() so we know
11342        what the origin layer is.
11343
11344        * Shared/mac/RemoteLayerBackingStore.mm:
11345        (WebKit::RemoteLayerBackingStore::display): Remove the early return so we can always
11346        call platformCALayerLayerDidDisplay().
11347        * Shared/mac/RemoteLayerTreeTransaction.h:
11348        * Shared/mac/RemoteLayerTreeTransaction.mm:
11349        (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
11350        (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
11351        (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
11352        (WebKit::dumpChangedLayers):
11353        * UIProcess/mac/RemoteLayerTreeHost.mm:
11354        (WebKit::RemoteLayerTreeHost::updateLayerTree):
11355        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
11356        (WebKit::PlatformCALayerRemote::clone):
11357        (WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
11358        (WebKit::PlatformCALayerRemote::copyContentsFromLayer):
11359        (WebKit::PlatformCALayerRemote::setClonedLayer):
11360        (WebKit::PlatformCALayerRemote::setContentsChanged): Deleted.
11361        * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
11362        (WebKit::PlatformCALayerRemote::properties):
11363        (WebKit::PlatformCALayerRemote::context):
11364
113652014-06-17  Anders Carlsson  <andersca@apple.com>
11366
11367        Remove session state methods from WKBrowsingContextController
11368        https://bugs.webkit.org/show_bug.cgi?id=133995
11369
11370        Reviewed by Dan Bernstein.
11371
11372        * UIProcess/API/Cocoa/WKBrowsingContextController.h:
11373        * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
11374        (-[WKBrowsingContextController sessionState]): Deleted.
11375        (-[WKBrowsingContextController restoreFromSessionState:]): Deleted.
11376
113772014-06-17  Brady Eidson  <beidson@apple.com>
11378
11379        Only show telephone number highlights if only one number is selected
11380        <rdar://problem/16874568> and https://bugs.webkit.org/show_bug.cgi?id=133989
11381
11382        Reviewed by Tim Horton.
11383
11384        Add a flag to TelephoneNumberData to remember if it was hovered over:
11385        * WebProcess/WebPage/TelephoneNumberOverlayController.h:
11386        (WebKit::TelephoneNumberData::hovered):
11387        (WebKit::TelephoneNumberData::setHovered):
11388        (WebKit::TelephoneNumberData::TelephoneNumberData):
11389
11390        * WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
11391        (WebKit::TelephoneNumberOverlayController::drawRect): Only draw the highlight if one
11392          phone number is selected.
11393        (WebKit::TelephoneNumberOverlayController::mouseEvent): Update the hover state of the
11394          current phone number, and setNeedsDisplay if the hover state changes.
11395        (WebKit::TelephoneNumberOverlayController::clearHighlights):
11396
113972014-06-17  Tim Horton  <timothy_horton@apple.com>
11398
11399        Remove WKContentView _setFindIndicator:fadeOut:animate:
11400        https://bugs.webkit.org/show_bug.cgi?id=133976
11401
11402        Reviewed by Anders Carlsson.
11403
11404        Find indicators are totally internal to FindController on iOS,
11405        we don't need to push them to the content view via PageClient,
11406        so this code was unused.
11407
11408        * UIProcess/ios/PageClientImplIOS.mm:
11409        (WebKit::PageClientImpl::setFindIndicator):
11410        * UIProcess/ios/WKContentView.h:
11411        * UIProcess/ios/WKContentView.mm:
11412        (-[WKContentView _setFindIndicator:WebKit::fadeOut:animate:]): Deleted.
11413
114142014-06-17  Andreas Kling  <akling@apple.com>
11415
11416        Web process main thread priority is lower than some network process threads.
11417        <https://webkit.org/b/133987>
11418        <rdar://problem/17330300>
11419
11420        Mark the main thread as "user initiated" in process entry.
11421
11422        Reviewed by Maciej Stachowiak.
11423
11424        * Shared/ChildProcess.cpp:
11425        (WebKit::ChildProcess::initialize):
11426
114272014-06-17  Anders Carlsson  <andersca@apple.com>
11428
11429        Add SPI to get the NSURLRequest from a WKNavigationResponse
11430        https://bugs.webkit.org/show_bug.cgi?id=133984
11431        <rdar://problem/17006399>
11432
11433        Reviewed by Dan Bernstein.
11434
11435        * UIProcess/API/Cocoa/WKNavigationResponse.mm:
11436        (-[WKNavigationResponse _request]):
11437        * UIProcess/API/Cocoa/WKNavigationResponseInternal.h:
11438        * UIProcess/API/Cocoa/WKNavigationResponsePrivate.h:
11439        * UIProcess/Cocoa/NavigationState.mm:
11440        (WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
11441
114422014-06-17  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
11443
11444        [EFL][WK2] Skip failing EFL API tests
11445        https://bugs.webkit.org/show_bug.cgi?id=133981
11446
11447        Reviewed by Csaba Osztrogonác.
11448
11449        UserMessage, WillLoad and test_ewk2_view have been failed since r169784.
11450
11451        * PlatformEfl.cmake:
11452
114532014-06-17  Zan Dobersek  <zdobersek@igalia.com>
11454
11455        Unreviewed build fix for the GTK+ port. Removing the *Callback::create() wrappings
11456        for lambda callbacks that aren't required anymore after the changes in r170041.
11457
11458        * UIProcess/API/gtk/WebKitWebView.cpp:
11459        (webkit_web_view_can_execute_editing_command):
11460        (webkit_web_view_run_javascript):
11461        (resourcesStreamReadCallback):
11462        (webkit_web_view_save):
11463        (webkit_web_view_save_to_file):
11464
114652014-06-16  Jaehun Lim  <ljaehun.lim@samsung.com>
11466
11467        Unreviewed build fix when MHTML is enabled after r170041
11468
11469        * UIProcess/API/C/WKPage.cpp:
11470        (WKPageGetContentsAsMHTMLData):
11471
114722014-06-16  Dan Bernstein  <mitz@apple.com>
11473
11474        Part 2 of: Change GenericCallback<> function parameters into std::function<>
11475        https://bugs.webkit.org/show_bug.cgi?id=133927
11476
11477        Reviewed by Sam Weinig.
11478
11479        * UIProcess/API/C/WKPage.cpp:
11480        (WKPageRunJavaScriptInMainFrame):
11481        (WKPageRenderTreeExternalRepresentation):
11482        (WKPageGetSourceForFrame):
11483        (WKPageGetContentsAsString):
11484        (WKPageGetBytecodeProfile):
11485        (WKPageGetSelectionAsWebArchiveData):
11486        (WKPageValidateCommand):
11487        * UIProcess/API/C/WKPluginSiteDataManager.cpp:
11488        (WKPluginSiteDataManagerClearSiteData):
11489        (WKPluginSiteDataManagerClearAllSiteData):
11490        * UIProcess/API/Cocoa/WKWebView.mm:
11491        (-[WKWebView evaluateJavaScript:completionHandler:]):
11492        * UIProcess/API/mac/WKView.mm:
11493        (-[WKView validateUserInterfaceItem:]):
11494        (-[WKView startSpeaking:]):
11495        (-[WKView selectedRangeWithCompletionHandler:]):
11496        (-[WKView markedRangeWithCompletionHandler:]):
11497        (-[WKView hasMarkedTextWithCompletionHandler:]):
11498        (-[WKView firstRectForCharacterRange:completionHandler:]):
11499        (-[WKView characterIndexForPoint:completionHandler:]):
11500        * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
11501        (WebKit::WebPluginSiteDataManager::clearSiteData):
11502        * UIProcess/Plugins/WebPluginSiteDataManager.h:
11503        * UIProcess/WebPageProxy.cpp:
11504        (WebKit::WebPageProxy::validateCommand):
11505        (WebKit::WebPageProxy::runJavaScriptInMainFrame):
11506        (WebKit::WebPageProxy::getRenderTreeExternalRepresentation):
11507        (WebKit::WebPageProxy::getSourceForFrame):
11508        (WebKit::WebPageProxy::getContentsAsString):
11509        (WebKit::WebPageProxy::getBytecodeProfile):
11510        (WebKit::WebPageProxy::getContentsAsMHTMLData):
11511        (WebKit::WebPageProxy::getSelectionOrContentsAsString):
11512        (WebKit::WebPageProxy::getSelectionAsWebArchiveData):
11513        (WebKit::WebPageProxy::getMarkedRangeAsync):
11514        (WebKit::WebPageProxy::getSelectedRangeAsync):
11515        (WebKit::WebPageProxy::characterIndexForPointAsync):
11516        (WebKit::WebPageProxy::firstRectForCharacterRangeAsync):
11517        (WebKit::WebPageProxy::takeSnapshot):
11518        * UIProcess/WebPageProxy.h:
11519        * UIProcess/ios/WKContentViewInteraction.mm:
11520        (-[WKContentView _define:]):
11521        (-[WKContentView changeSelectionWithTouchAt:withSelectionTouch:baseIsStart:]):
11522        (-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
11523        (-[WKContentView requestDictationContext:]):
11524        (-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
11525        (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
11526        * UIProcess/ios/WebPageProxyIOS.mm:
11527        (WebKit::WebPageProxy::updateSelectionWithTouches):
11528        (WebKit::WebPageProxy::requestAutocorrectionData):
11529        (WebKit::WebPageProxy::applyAutocorrection):
11530        (WebKit::WebPageProxy::requestDictationContext):
11531        (WebKit::WebPageProxy::requestAutocorrectionContext):
11532
115332014-06-16  Jaehun Lim  <ljaehun.lim@samsung.com>
11534
11535        Unreviewed build fix after r170029
11536
11537        Use String() instead of AtomicString().
11538
11539        * UIProcess/InspectorServer/HTTPRequest.cpp:
11540        (WebKit::HTTPRequest::parseHeaders):
11541
115422014-06-16  Brent Fulgham  <bfulgham@apple.com>
11543
11544        [Win] Use TileController on Windows
11545        https://bugs.webkit.org/show_bug.cgi?id=133895
11546
11547        Reviewed by Tim Horton.
11548
11549        * WebProcess/WebPage/mac/PlatformCALayerRemote.h: Remove
11550        unneeded overload.
11551
115522014-06-16  Timothy Horton  <timothy_horton@apple.com>
11553
11554        [iOS][wk2] Swipe snapshots are removed too quickly if there is no saved render tree size
11555        https://bugs.webkit.org/show_bug.cgi?id=133891
11556
11557        Reviewed by Simon Fraser.
11558
11559        * UIProcess/ios/ViewGestureControllerIOS.mm:
11560        (WebKit::ViewGestureController::endSwipeGesture):
11561        (WebKit::ViewGestureController::setRenderTreeSize):
11562        If we don't know the target render tree size, wait until the first layer tree commit
11563        that comes in, instead of removing the snapshot when the gesture ends.
11564
115652014-06-16  Timothy Horton  <timothy_horton@apple.com>
11566
11567        [iOS][wk2] Swiping back briefly shows the previous page before loading the new one
11568        https://bugs.webkit.org/show_bug.cgi?id=133885
11569
11570        Reviewed by Simon Fraser.
11571
11572        Remove a race between the UI and Web processes when removing the swipe snapshot.
11573        Previously, it was possible to get a commit from the Web process with layer content
11574        (and render tree size) from the previous page *after* sending the navigation request
11575        to the page, because of the asynchronicity of layer tree commits. This could cause
11576        the snapshot to be removed early (if the previous fully-loaded page had a sufficiently
11577        large render tree size), revealing the old tiles underneath the snapshot.
11578
11579        * Shared/mac/RemoteLayerTreeTransaction.h:
11580        (WebKit::RemoteLayerTreeTransaction::transactionID):
11581        (WebKit::RemoteLayerTreeTransaction::setTransactionID):
11582        * Shared/mac/RemoteLayerTreeTransaction.mm:
11583        (WebKit::RemoteLayerTreeTransaction::encode):
11584        (WebKit::RemoteLayerTreeTransaction::decode):
11585        * UIProcess/DrawingAreaProxy.h:
11586        (WebKit::DrawingAreaProxy::lastVisibleTransactionID):
11587        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
11588        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
11589        (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
11590        (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
11591        (WebKit::RemoteLayerTreeDrawingAreaProxy::coreAnimationDidCommitLayers):
11592        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
11593        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
11594        (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
11595        (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
11596        (WebKit::RemoteLayerTreeDrawingArea::didUpdate):
11597        Keep track of an ever-increasing transaction ID in RemoteLayerTreeDrawingArea(Proxy).
11598        It increments in the UI process at didUpdate time, because the Web process cannot
11599        have started on a new layer tree commit until didUpdate is sent.
11600        It increments in the Web process at commit time.
11601
11602        * UIProcess/ios/ViewGestureControllerIOS.mm:
11603        (WebKit::ViewGestureController::endSwipeGesture):
11604        (WebKit::ViewGestureController::setRenderTreeSize):
11605        * UIProcess/mac/ViewGestureController.h:
11606        Adopt transaction IDs; don't remove the snapshot until the commit
11607        that includes the navigation arrives.
11608
116092014-06-16  Dan Bernstein  <mitz@apple.com>
11610
11611        <rdar://problem/17327707> [Cocoa] Expose WebPreferences::storageBlockingPolicy
11612        https://bugs.webkit.org/show_bug.cgi?id=133958
11613
11614        Reviewed by Anders Carlsson.
11615
11616        * UIProcess/API/Cocoa/WKPreferences.mm:
11617        (toStorageBlockingPolicy): Added this helper conversion function.
11618        (toAPI): Ditto.
11619        (-[WKPreferences _storageBlockingPolicy]): Added this getter.
11620        (-[WKPreferences _setStorageBlockingPolicy:]): Added this setter.
11621        * UIProcess/API/Cocoa/WKPreferencesPrivate.h: Declared new _storageBlockingPolicy property
11622        and _WKStorageBlockingPolicy enum. 
11623
116242014-06-16  Anders Carlsson  <andersca@apple.com>
11625
11626        Don't use AtomicString in HTTPHeaderMap
11627        https://bugs.webkit.org/show_bug.cgi?id=133957
11628        <rdar://problem/15256572>
11629
11630        Reviewed by Andreas Kling.
11631
11632        Update for WebCore changes.
11633
11634        * Shared/WebCoreArgumentCoders.cpp:
11635        (IPC::ArgumentCoder<HTTPHeaderMap>::decode):
11636
116372014-06-15  Anders Carlsson  <andersca@apple.com>
11638
11639        Change ResourceRequestBase::addHTTPHeaderFields to setHTTPHeaderFields instead
11640        https://bugs.webkit.org/show_bug.cgi?id=133925
11641
11642        Reviewed by Sam Weinig.
11643
11644        * PluginProcess/PluginControllerProxy.h:
11645        * Shared/WebCoreArgumentCoders.cpp:
11646        (IPC::ArgumentCoder<ResourceRequest>::decode):
11647        * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
11648        (WebKit::NPN_PostURL):
11649        * WebProcess/Plugins/PluginView.cpp:
11650        (WebKit::PluginView::loadURL):
11651        * WebProcess/Plugins/PluginView.h:
11652
116532014-06-16  Anders Carlsson  <andersca@apple.com>
11654
11655        Add HTTPHeaderName overloads on ResourceResponseBase
11656        https://bugs.webkit.org/show_bug.cgi?id=133946
11657
11658        Reviewed by Andreas Kling.
11659
11660        * WebProcess/Plugins/PluginView.cpp:
11661        (WebKit::buildHTTPHeaders):
11662
116632014-06-16  Dan Bernstein  <mitz@apple.com>
11664
11665        Fixed a typo in the last change.
11666
11667        * UIProcess/API/Cocoa/WKPreferences.mm:
11668        (-[WKPreferences init]):
11669
116702014-06-16  Dan Bernstein  <mitz@apple.com>
11671
11672        [Cocoa] Remove WKPreferences persistence in user defaults
11673        https://bugs.webkit.org/show_bug.cgi?id=133945
11674
11675        Reviewed by Anders Carlsson.
11676
11677        * UIProcess/API/Cocoa/WKPreferences.h: Removed userDefaultsKeyPrefix property and
11678        initializer with userDefaultsKeyPrefix parameter.
11679        * UIProcess/API/Cocoa/WKPreferences.mm:
11680        (-[WKPreferences init]): Changed to initialize an instance with an empty identifier, which
11681        means that it won’t persist to user defaults.
11682        (-[WKPreferences initWithUserDefaultsKeyPrefix:]): Deleted.
11683        (-[WKPreferences userDefaultsKeyPrefix]): Deleted.
11684
116852014-06-16  Zan Dobersek  <zdobersek@igalia.com>
11686
11687        Page::findStringMatchingRanges() should take Vector<RefPtr<Range>> by reference instead of pointer
11688        https://bugs.webkit.org/show_bug.cgi?id=133677
11689
11690        Reviewed by Anders Carlsson.
11691
11692        * WebProcess/WebPage/FindController.cpp:
11693        (WebKit::FindController::findString): Update the call to Page::findStringMatchingRanges() to pass
11694        in a Vector<RefPtr<Range>> reference instead of a pointer.
11695        (WebKit::FindController::findStringMatches): Ditto.
11696
116972014-06-16  Zan Dobersek  <zdobersek@igalia.com>
11698
11699        Unreviewed build fixes for the EFL and GTK+ ports after r169994 and 170000.
11700
11701        * UIProcess/API/C/WKPluginSiteDataManager.cpp: Undefine the None macro under X11.
11702        * UIProcess/API/gtk/WebKitCookieManager.cpp:
11703        (webkit_cookie_manager_get_accept_policy): Remove unnecessary ::create() wrappings.
11704        (webkit_cookie_manager_get_domains_with_cookies): Ditto.
11705        * UIProcess/API/gtk/WebKitWebResource.cpp:
11706        (webkit_web_resource_get_data): Ditto.
11707
117082014-06-15  Dan Bernstein  <mitz@apple.com>
11709
11710        Part 1 of: Change GenericCallback<> function parameters into std::function<>
11711        https://bugs.webkit.org/show_bug.cgi?id=133927
11712
11713        Reviewed by Sam Weinig.
11714
11715        * UIProcess/API/C/WKApplicationCacheManager.cpp:
11716        (WKApplicationCacheManagerGetApplicationCacheOrigins):
11717        * UIProcess/API/C/WKContext.cpp:
11718        (WKContextGetStatistics):
11719        (WKContextGetStatisticsWithOptions):
11720        * UIProcess/API/C/WKCookieManager.cpp:
11721        (WKCookieManagerGetHostnamesWithCookies):
11722        (WKCookieManagerGetHTTPCookieAcceptPolicy):
11723        * UIProcess/API/C/WKDatabaseManager.cpp:
11724        (WKDatabaseManagerGetDatabasesByOrigin):
11725        (WKDatabaseManagerGetDatabaseOrigins):
11726        * UIProcess/API/C/WKFrame.cpp:
11727        (WKFrameGetMainResourceData):
11728        (WKFrameGetResourceData):
11729        (WKFrameGetWebArchive):
11730        * UIProcess/API/C/WKKeyValueStorageManager.cpp:
11731        (WKKeyValueStorageManagerGetKeyValueStorageOrigins):
11732        (WKKeyValueStorageManagerGetStorageDetailsByOrigin):
11733        * UIProcess/API/C/WKMediaCacheManager.cpp:
11734        (WKMediaCacheManagerGetHostnamesWithMediaCache):
11735        * UIProcess/API/C/WKOriginDataManager.cpp:
11736        (WKOriginDataManagerGetOrigins):
11737        * UIProcess/API/C/WKPluginSiteDataManager.cpp:
11738        (WKPluginSiteDataManagerGetSitesWithData):
11739        * UIProcess/API/C/WKResourceCacheManager.cpp:
11740        (WKResourceCacheManagerGetCacheOrigins):
11741        * UIProcess/API/Cocoa/WKWebView.mm:
11742        (-[WKWebView _getWebArchiveDataWithCompletionHandler:]):
11743        * UIProcess/API/mac/WKView.mm:
11744        (-[WKView attributedSubstringForProposedRange:completionHandler:]):
11745        * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
11746        (WebKit::WebPluginSiteDataManager::getSitesWithData):
11747        * UIProcess/Plugins/WebPluginSiteDataManager.h:
11748        * UIProcess/WebApplicationCacheManagerProxy.cpp:
11749        (WebKit::WebApplicationCacheManagerProxy::getApplicationCacheOrigins):
11750        * UIProcess/WebApplicationCacheManagerProxy.h:
11751        * UIProcess/WebContext.cpp:
11752        (WebKit::WebContext::getStatistics):
11753        * UIProcess/WebContext.h:
11754        * UIProcess/WebCookieManagerProxy.cpp:
11755        (WebKit::WebCookieManagerProxy::getHostnamesWithCookies):
11756        (WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
11757        * UIProcess/WebCookieManagerProxy.h:
11758        * UIProcess/WebDatabaseManagerProxy.cpp:
11759        (WebKit::WebDatabaseManagerProxy::getDatabasesByOrigin):
11760        (WebKit::WebDatabaseManagerProxy::getDatabaseOrigins):
11761        * UIProcess/WebDatabaseManagerProxy.h:
11762        * UIProcess/WebFrameProxy.cpp:
11763        (WebKit::WebFrameProxy::getWebArchive):
11764        (WebKit::WebFrameProxy::getMainResourceData):
11765        (WebKit::WebFrameProxy::getResourceData):
11766        * UIProcess/WebFrameProxy.h:
11767        * UIProcess/WebKeyValueStorageManager.cpp:
11768        (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
11769        (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
11770        * UIProcess/WebKeyValueStorageManager.h:
11771        * UIProcess/WebMediaCacheManagerProxy.cpp:
11772        (WebKit::WebMediaCacheManagerProxy::getHostnamesWithMediaCache):
11773        * UIProcess/WebMediaCacheManagerProxy.h:
11774        * UIProcess/WebOriginDataManagerProxy.cpp:
11775        (WebKit::WebOriginDataManagerProxy::getOrigins):
11776        * UIProcess/WebOriginDataManagerProxy.h:
11777        * UIProcess/WebPageProxy.cpp:
11778        (WebKit::WebPageProxy::getMainResourceDataOfFrame):
11779        (WebKit::WebPageProxy::getResourceDataFromFrame):
11780        (WebKit::WebPageProxy::getWebArchiveOfFrame):
11781        * UIProcess/WebPageProxy.h:
11782        * UIProcess/WebResourceCacheManagerProxy.cpp:
11783        (WebKit::WebResourceCacheManagerProxy::getCacheOrigins):
11784        * UIProcess/WebResourceCacheManagerProxy.h:
11785        * UIProcess/ios/WKContentViewInteraction.mm:
11786        (-[WKContentView changeSelectionWithGestureAt:withGesture:withState:]):
11787        (-[WKContentView changeSelectionWithTouchesFrom:to:withGesture:withState:]):
11788        * UIProcess/ios/WebPageProxyIOS.mm:
11789        (WebKit::WebPageProxy::selectWithGesture):
11790        (WebKit::WebPageProxy::selectWithTwoTouches):
11791        * UIProcess/mac/WebPageProxyMac.mm:
11792        (WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync):
11793
117942014-06-15  Dan Bernstein  <mitz@apple.com>
11795
11796        <rdar://problem/17291697> [Cocoa] Can’t tell at policy decision time whether WebKit can handle the request
11797        https://bugs.webkit.org/show_bug.cgi?id=133930
11798
11799        Reviewed by Sam Weinig.
11800
11801        * Shared/NavigationActionData.cpp:
11802        (WebKit::NavigationActionData::NavigationActionData): Initialize new member canHandleRequest
11803        to false.
11804        (WebKit::NavigationActionData::encode): Encode canHandleRequest.
11805        (WebKit::NavigationActionData::decode): Decode it.
11806        * Shared/NavigationActionData.h: Declared new boolean member canHandleRequest.
11807
11808        * UIProcess/API/Cocoa/WKNavigationAction.mm:
11809        (-[WKNavigationAction _initWithNavigationActionData:]): Set new ivar _canHandleRequest from
11810        the action data.
11811        (-[WKNavigationAction _canHandleRequest]): Added this getter.
11812        * UIProcess/API/Cocoa/WKNavigationActionPrivate.h: Declared new property _canHandleRequest.
11813
11814        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
11815        (WebKit::WebChromeClient::createWindow): Set canHandleRequest in the NavigationActionData.
11816
11817        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
11818        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): Ditto.
11819        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Ditto.
11820
118212014-06-15  Ryuan Choi  <ryuan.choi@samsung.com>
11822
11823        [EFL][WK2] Change ewk_view_settings_get to ewk_page_group_settings_get
11824        https://bugs.webkit.org/show_bug.cgi?id=133841
11825
11826        Reviewed by Gyuyoung Kim.
11827
11828        Ewk_Settings object is a member of Ewk_Page_Group.
11829        So, Ewk_Page_Group is better place for the getter of Ewk_Settings.
11830
11831        * UIProcess/API/efl/ewk_page_group.cpp:
11832        (ewk_page_group_settings_get): Added instead of ewk_view_settings_get.
11833        * UIProcess/API/efl/ewk_page_group.h:
11834        * UIProcess/API/efl/ewk_view.cpp:
11835        (ewk_view_settings_get): Deleted.
11836        * UIProcess/API/efl/ewk_view.h:
11837        * UIProcess/API/efl/tests/test_ewk2_page_group.cpp:
11838        (TEST_F):
11839        * UIProcess/API/efl/tests/test_ewk2_settings.cpp:
11840        (TEST_F):
11841        * UIProcess/API/efl/tests/test_ewk2_view.cpp:
11842        (TEST_F): Deleted.
11843
118442014-06-15  Anders Carlsson  <andersca@apple.com>
11845
11846        Add an autorelease() member function to RetainPtr
11847        https://bugs.webkit.org/show_bug.cgi?id=133929
11848
11849        Reviewed by Dan Bernstein.
11850
11851        * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
11852        (-[_WKRemoteObjectRegistry remoteObjectProxyWithInterface:]):
11853        * UIProcess/API/Cocoa/WKWebView.mm:
11854        (-[WKWebView navigationDelegate]):
11855        (-[WKWebView UIDelegate]):
11856        (-[WKWebView loadRequest:]):
11857        (-[WKWebView loadHTMLString:baseURL:]):
11858        (-[WKWebView goToBackForwardListItem:]):
11859        (-[WKWebView goBack]):
11860        (-[WKWebView goForward]):
11861        (-[WKWebView reload]):
11862        (-[WKWebView reloadFromOrigin]):
11863        (-[WKWebView _historyDelegate]):
11864        * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
11865        (WebKit::animationValueFromKeyframeValue):
11866
118672014-06-15  Dan Bernstein  <mitz@apple.com>
11868
11869        Get rid of VoidAPICallback
11870        https://bugs.webkit.org/show_bug.cgi?id=133928
11871
11872        Reviewed by Sam Weinig.
11873
11874        * UIProcess/API/C/WKPage.cpp:
11875        (WKPageForceRepaint): Wrap the API callback in a generic callback here.
11876
11877        * UIProcess/API/C/WKPluginSiteDataManager.cpp:
11878        (WKPluginSiteDataManagerClearSiteData): Ditto.
11879        (WKPluginSiteDataManagerClearAllSiteData): Ditto.
11880
11881        * UIProcess/GenericCallback.h:
11882        (WebKit::GenericCallback::performCallback): Added this helper for 0-argument callbacks.
11883        (WebKit::VoidCallback::create): Deleted.
11884        (WebKit::VoidCallback::~VoidCallback): Deleted.
11885        (WebKit::VoidCallback::performCallback): Deleted.
11886        (WebKit::VoidCallback::invalidate): Deleted.
11887        (WebKit::VoidCallback::VoidCallback): Deleted.
11888        (WebKit::VoidAPICallback::create): Deleted.
11889
11890        * UIProcess/mac/WKFullScreenWindowController.h:
11891
118922014-06-15  Zan Dobersek  <zdobersek@igalia.com>
11893
11894        Unreviewed build fix for the GTK+ port after r169990.
11895
11896        * UIProcess/WebPageProxy.cpp:
11897        (WebKit::WebPageProxy::resetState): Pass the error value to
11898        the rest of invalidateCallbackMap calls.
11899
119002014-06-15  Anders Carlsson  <andersca@apple.com>
11901
11902        Remove WKPageRunJavaScriptInMainFrame_b
11903        https://bugs.webkit.org/show_bug.cgi?id=133926
11904
11905        Reviewed by Dan Bernstein.
11906
11907        * UIProcess/API/C/WKPage.cpp:
11908        (callRunJavaScriptBlockAndRelease): Deleted.
11909        (WKPageRunJavaScriptInMainFrame_b): Deleted.
11910        * UIProcess/API/C/WKPage.h:
11911
119122014-06-15  Anders Carlsson  <andersca@apple.com>
11913
11914        invalidateCallbackMap doesn’t pass the error parameter on to invalidate(), so script completion handler is passed the wrong error
11915        https://bugs.webkit.org/show_bug.cgi?id=133921
11916        <rdar://problem/17316653>
11917
11918        Reviewed by Dan Bernstein.
11919
11920        * UIProcess/GenericCallback.h:
11921        (WebKit::VoidCallback::performCallback):
11922        (WebKit::VoidCallback::invalidate):
11923        (WebKit::VoidAPICallback::create):
11924        (WebKit::invalidateCallbackMap):
11925        * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
11926        (WebKit::WebPluginSiteDataManager::invalidate):
11927        (WebKit::WebPluginSiteDataManager::clearSiteData):
11928        * UIProcess/WebApplicationCacheManagerProxy.cpp:
11929        (WebKit::WebApplicationCacheManagerProxy::contextDestroyed):
11930        (WebKit::WebApplicationCacheManagerProxy::processDidClose):
11931        * UIProcess/WebContext.cpp:
11932        (WebKit::WebContext::~WebContext):
11933        * UIProcess/WebCookieManagerProxy.cpp:
11934        (WebKit::WebCookieManagerProxy::contextDestroyed):
11935        (WebKit::WebCookieManagerProxy::processDidClose):
11936        * UIProcess/WebDatabaseManagerProxy.cpp:
11937        (WebKit::WebDatabaseManagerProxy::contextDestroyed):
11938        (WebKit::WebDatabaseManagerProxy::processDidClose):
11939        * UIProcess/WebMediaCacheManagerProxy.cpp:
11940        (WebKit::WebMediaCacheManagerProxy::contextDestroyed):
11941        (WebKit::WebMediaCacheManagerProxy::processDidClose):
11942        * UIProcess/WebOriginDataManagerProxy.cpp:
11943        (WebKit::WebOriginDataManagerProxy::contextDestroyed):
11944        (WebKit::WebOriginDataManagerProxy::processDidClose):
11945        * UIProcess/WebPageProxy.cpp:
11946        (WebKit::WebPageProxy::forceRepaint):
11947        (WebKit::WebPageProxy::resetState):
11948        * UIProcess/WebResourceCacheManagerProxy.cpp:
11949        (WebKit::WebResourceCacheManagerProxy::contextDestroyed):
11950        (WebKit::WebResourceCacheManagerProxy::processDidClose):
11951        * UIProcess/mac/WKFullScreenWindowController.mm:
11952        (-[WKFullScreenWindowController dealloc]):
11953        (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
11954
119552014-06-15  Zan Dobersek  <zdobersek@igalia.com>
11956
11957        Unreviewed build fix for the GTK+ port after r169987.
11958
11959        * UIProcess/API/gtk/WebKitWebView.cpp:
11960        (webkit_web_view_can_execute_editing_command): The first passed-in parameter
11961        is now a reference to a const String object.
11962
119632014-06-14  Dan Bernstein  <mitz@apple.com>
11964
11965        Replace StringImpl* callback parameters with const String&
11966        https://bugs.webkit.org/show_bug.cgi?id=133922
11967
11968        Reviewed by Sam Weinig.
11969
11970        * UIProcess/API/C/WKPage.cpp:
11971        (toGenericCallbackFunction): Added this helper function to wrap a WKStringRef-returning
11972        API callback in a generic const String&-returning callback.
11973        (WKPageRenderTreeExternalRepresentation):
11974        (WKPageGetSourceForFrame):
11975        (WKPageGetContentsAsString):
11976        (WKPageGetBytecodeProfile):
11977        (WKPageValidateCommand):
11978        * UIProcess/API/mac/WKView.mm:
11979        (-[WKView validateUserInterfaceItem:]):
11980        (-[WKView startSpeaking:]):
11981        * UIProcess/WebPageProxy.h:
11982        * UIProcess/ios/WKContentViewInteraction.mm:
11983        (-[WKContentView _define:]):
11984        (-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
11985
119862014-06-14  Dan Bernstein  <mitz@apple.com>
11987
11988        Additional iOS build fix.
11989
11990        * UIProcess/ios/WKContentViewInteraction.mm:
11991        (-[WKContentView _define:]):
11992        (selectionChangedWithGesture):
11993        (selectionChangedWithTouch):
11994        (-[WKContentView changeSelectionWithGestureAt:withGesture:withState:]):
11995        (-[WKContentView changeSelectionWithTouchAt:withSelectionTouch:baseIsStart:]):
11996        (-[WKContentView changeSelectionWithTouchesFrom:to:withGesture:withState:]):
11997        (-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
11998
119992014-06-14  Dan Bernstein  <mitz@apple.com>
12000
12001        iOS build fix.
12002
12003        * UIProcess/API/Cocoa/WKWebView.mm:
12004        (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
12005
120062014-06-14  Dan Bernstein  <mitz@apple.com>
12007
12008        Get rid of GenericAPICallback
12009        https://bugs.webkit.org/show_bug.cgi?id=133909
12010
12011        Reviewed by Sam Weinig.
12012
12013        In preparation for passing callbacks as functions, replace GenericAPICallback::create, which
12014        returned a GenericCallback, with a function template that returns an appropriate callback
12015        function.
12016
12017        * UIProcess/API/C/WKApplicationCacheManager.cpp:
12018        (WKApplicationCacheManagerGetApplicationCacheOrigins):
12019        * UIProcess/API/C/WKContext.cpp:
12020        (WKContextGetStatistics):
12021        (WKContextGetStatisticsWithOptions):
12022        * UIProcess/API/C/WKCookieManager.cpp:
12023        (WKCookieManagerGetHostnamesWithCookies):
12024        (WKCookieManagerGetHTTPCookieAcceptPolicy):
12025        * UIProcess/API/C/WKDatabaseManager.cpp:
12026        (WKDatabaseManagerGetDatabasesByOrigin):
12027        (WKDatabaseManagerGetDatabaseOrigins):
12028        * UIProcess/API/C/WKFrame.cpp:
12029        (WKFrameGetMainResourceData):
12030        (WKFrameGetResourceData):
12031        (WKFrameGetWebArchive):
12032        * UIProcess/API/C/WKKeyValueStorageManager.cpp:
12033        (WKKeyValueStorageManagerGetKeyValueStorageOrigins):
12034        (WKKeyValueStorageManagerGetStorageDetailsByOrigin):
12035        * UIProcess/API/C/WKMediaCacheManager.cpp:
12036        (WKMediaCacheManagerGetHostnamesWithMediaCache):
12037        * UIProcess/API/C/WKOriginDataManager.cpp:
12038        (WKOriginDataManagerGetOrigins):
12039        * UIProcess/API/C/WKPage.cpp:
12040        (WKPageRunJavaScriptInMainFrame):
12041        (WKPageRenderTreeExternalRepresentation):
12042        (WKPageGetSourceForFrame):
12043        (WKPageGetContentsAsString):
12044        (WKPageGetBytecodeProfile):
12045        (WKPageGetSelectionAsWebArchiveData):
12046        (WKPageGetContentsAsMHTMLData):
12047        (WKPageDrawPagesToPDF):
12048        * UIProcess/API/C/WKPluginSiteDataManager.cpp:
12049        (WKPluginSiteDataManagerGetSitesWithData):
12050        * UIProcess/API/C/WKResourceCacheManager.cpp:
12051        (WKResourceCacheManagerGetCacheOrigins):
12052
12053        * UIProcess/GenericCallback.h:
12054        (WebKit::toGenericCallbackFunction): Added. Given a C SPI callback function, returns a generic
12055        callback function that wraps it.
12056
120572014-06-14  Dan Bernstein  <mitz@apple.com>
12058
12059        Reverted the last change, which broken the Mac build.
12060
12061        * UIProcess/GenericCallback.h:
12062        (WebKit::invalidateCallbackMap):
12063
120642014-06-14  Dan Bernstein  <mitz@apple.com>
12065
12066        Tried to fix the GTK build.
12067
12068        * UIProcess/GenericCallback.h:
12069        (WebKit::invalidateCallbackMap):
12070
120712014-06-14  Anders Carlsson  <andersca@apple.com>
12072
12073        Fix build.
12074
12075        * UIProcess/API/mac/WKView.mm:
12076        (-[WKView selectedRangeWithCompletionHandler:]):
12077        (-[WKView markedRangeWithCompletionHandler:]):
12078        (-[WKView hasMarkedTextWithCompletionHandler:]):
12079        (-[WKView attributedSubstringForProposedRange:completionHandler:]):
12080        (-[WKView firstRectForCharacterRange:completionHandler:]):
12081        (-[WKView characterIndexForPoint:completionHandler:]):
12082
120832014-06-14  Zan Dobersek  <zdobersek@igalia.com>
12084
12085        Unreviewed build fix for the GTK+ port.
12086        Fixing the callback lambda parameters after r169962.
12087
12088        * UIProcess/API/gtk/WebKitPrintOperation.cpp:
12089        (webkitPrintOperationPrintPagesForFrame):
12090        * UIProcess/API/gtk/WebKitWebResource.cpp:
12091        (webkit_web_resource_get_data):
12092        * UIProcess/API/gtk/WebKitWebView.cpp:
12093        (webkit_web_view_can_execute_editing_command):
12094        (webkit_web_view_run_javascript):
12095        (resourcesStreamReadCallback):
12096        (webkit_web_view_save):
12097        (webkit_web_view_save_to_file):
12098
120992014-06-14  Csaba Osztrogonác  <ossy@webkit.org>
12100
12101        URTBF after r169943 and r169946, use the format of set/get.
12102
12103        * UIProcess/InspectorServer/WebInspectorServer.cpp:
12104        (WebKit::WebInspectorServer::didReceiveUnrecognizedHTTPRequest):
12105        * UIProcess/InspectorServer/WebSocketServerConnection.cpp:
12106        (WebKit::WebSocketServerConnection::readHTTPMessage):
12107        (WebKit::WebSocketServerConnection::upgradeToWebSocketServerConnection):
12108
121092014-06-13  Andreas Kling  <akling@apple.com>
12110
12111        REGRESSION (r167635): Reference leak in NetworkResourceLoader while loads are being deferred.
12112        <https://webkit.org/b/133894>
12113        <rdar://problem/17312299>
12114
12115        Don't self-ref() in start() until we actually start; if page loads are being
12116        deferred, start() will be called again once deferral stops.
12117
12118        This was causing us to leak the entire NetworkResourceLoader object graph.
12119
12120        Reviewed by Brady Eidson.
12121
12122        * NetworkProcess/NetworkResourceLoader.cpp:
12123        (WebKit::NetworkResourceLoader::start):
12124
121252014-06-13  Dan Bernstein  <mitz@apple.com>
12126
12127        Make GenericCallback variadic
12128        https://bugs.webkit.org/show_bug.cgi?id=133897
12129
12130        Reviewed by Sam Weinig.
12131
12132        Also eliminated legacy callback functions and all CallbackBase derived classes outside of
12133        GenericCallback.h.
12134
12135        * UIProcess/API/C/WKPage.cpp:
12136        (WKPageValidateCommand): Changed legacy callback (with leading bool parameter) into modern
12137        callback (with trailing error parameter).
12138        (WKPageComputePagesForPrinting): Ditto.
12139
12140        * UIProcess/API/Cocoa/WKWebView.mm:
12141        (-[WKWebView _getWebArchiveDataWithCompletionHandler:]): Ditto.
12142        (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]): Ditto.
12143
12144        * UIProcess/API/Cocoa/_WKThumbnailView.mm:
12145        (-[_WKThumbnailView _requestSnapshotIfNeeded]): Ditto.
12146
12147        * UIProcess/API/mac/WKView.mm:
12148        (-[WKView validateUserInterfaceItem:]): Ditto.
12149        (-[WKView startSpeaking:]): Ditto.
12150
12151        * UIProcess/AutoCorrectionCallback.h: Replaced CallbackBase derived classes with
12152        GenericCallback specializations.
12153
12154        * UIProcess/GenericCallback.h:
12155        - Made GenericCallback variadic:
12156        (WebKit::GenericCallback::performCallbackWithReturnValue):
12157        (WebKit::GenericCallback::invalidate):
12158        (WebKit::GenericAPICallback::create):
12159
12160        - Replaced CallbackBase derived classes with GenericCallback specializations:
12161        (WebKit::GenericCallback::create): Deleted.
12162        (WebKit::ComputedPagesCallback::create): Deleted.
12163        (WebKit::ComputedPagesCallback::~ComputedPagesCallback): Deleted.
12164        (WebKit::ComputedPagesCallback::performCallbackWithReturnValue): Deleted.
12165        (WebKit::ComputedPagesCallback::invalidate): Deleted.
12166        (WebKit::ComputedPagesCallback::ComputedPagesCallback): Deleted.
12167        (WebKit::ImageCallback::create): Deleted.
12168        (WebKit::ImageCallback::~ImageCallback): Deleted.
12169        (WebKit::ImageCallback::performCallbackWithReturnValue): Deleted.
12170        (WebKit::ImageCallback::invalidate): Deleted.
12171        (WebKit::ImageCallback::ImageCallback): Deleted.
12172
12173        * UIProcess/WebPageProxy.h: Replaced CallbackBase derived classes with GenericCallback
12174        specializations.
12175
12176        * UIProcess/ios/WKContentViewInteraction.mm:
12177        (-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]): Changed
12178        legacy callback (with leading bool parameter) into modern callback (with trailing error
12179        parameter).
12180        (-[WKContentView requestDictationContext:]): Ditto.
12181        (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]): Ditto.
12182
12183        * UIProcess/mac/WKPrintingView.mm:
12184        (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): Ditto.
12185        (-[WKPrintingView _askPageToComputePageRects]): Ditto.
12186        (-[WKPrintingView _drawPreview:]): Ditto.
12187
121882014-06-13  Tim Horton  <timothy_horton@apple.com>
12189
12190        Unreviewed; fix the build.
12191
12192        * Shared/mac/RemoteLayerBackingStore.mm:
12193        (WebKit::RemoteLayerBackingStore::drawInContext):
12194
121952014-06-13  Martin Hock  <mhock@apple.com>
12196
12197        Clean up layers in RemoteLayerTreeHost::clearLayers().
12198        https://bugs.webkit.org/show_bug.cgi?id=133888
12199
12200        Reviewed by Tim Horton.
12201
12202        * UIProcess/mac/RemoteLayerTreeHost.mm:
12203        (WebKit::RemoteLayerTreeHost::clearLayers):
12204
122052014-06-13  Anders Carlsson  <andersca@apple.com>
12206
12207        Add a HTTPHeaderMap::get overload that takes an HTTPHeaderName
12208        https://bugs.webkit.org/show_bug.cgi?id=133877
12209
12210        Reviewed by Andreas Kling.
12211
12212        * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
12213        (WebKit::parsePostBuffer):
12214
122152014-06-13  Dan Bernstein  <mitz@apple.com>
12216
12217        [iOS] Networking process always decodes keys
12218        https://bugs.webkit.org/show_bug.cgi?id=133863
12219
12220        Reviewed by Anders Carlsson.
12221
12222        * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
12223        (WebKit::XPCServiceInitializer): Call checkEntitlements on iOS, too.
12224        * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
12225        (WebKit::XPCServiceInitializerDelegate::checkEntitlements): On iOS, allow decoding keys
12226        if the application has the appropriate keychain access group.
12227
12228        * Shared/cf/ArgumentCodersCF.cpp:
12229        (IPC::setAllowsDecodingSecKeyRef): Added. Sets static bool.
12230        (IPC::decode): Check the secKeyRefDecodingAllowed bool before decoding a key.
12231        * Shared/cf/ArgumentCodersCF.h:
12232
122332014-06-12  Anders Carlsson  <andersca@apple.com>
12234
12235        Add overloads of HTTPHeaderMap::find and remove that take enums
12236        https://bugs.webkit.org/show_bug.cgi?id=133823
12237
12238        Reviewed by Sam Weinig.
12239
12240        * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
12241        (WebKit::parsePostBuffer):
12242        Update for WebCore changes.
12243
122442014-06-12  Benjamin Poulain  <bpoulain@apple.com>
12245
12246        [iOS][WK2] Do not update the viewport configuration on load until the first viewport arguments is received
12247        https://bugs.webkit.org/show_bug.cgi?id=133719
12248        <rdar://problem/17008149>
12249
12250        Reviewed by Simon Fraser.
12251
12252        When pages are loaded from the page cache, we were updating the viewport to the initial values
12253        in WebPage::dynamicViewportSizeUpdate(), then update the viewport again when the page's viewport argument
12254        are received.
12255
12256        The problem is that was messing up with text autosizing. The page would relayout with the default viewport
12257        configuration, adopt the text autosizing parameters from that size, then remain in that state when
12258        the actual viewport configuration would be set.
12259
12260        With this patch, the viewport configuration is updated from the values in WebCore instead of with default values.
12261        For new documents, this is strictly equivalent. For documents coming from the page cache, the values are from
12262        the previous state of the page, which ensure we do not restart negotiating a viewport configuration from scratch.
12263
12264        * WebProcess/WebPage/WebPage.cpp:
12265        (WebKit::WebPage::didCommitLoad):
12266
122672014-06-12  Gavin Barraclough  <barraclough@apple.com>
12268
12269        Add support for thread/WorkQueue QoS
12270        https://bugs.webkit.org/show_bug.cgi?id=130688
12271
12272        Reviewed by Anders Carlson & Simon Fraser.
12273
12274        The EventDispatcher's WorkQueue should be UserInteractive.
12275
12276        * Platform/WorkQueue.cpp:
12277        (WorkQueue::create):
12278            - pass QOS to constructor.
12279        (WorkQueue::WorkQueue):
12280            - pass QOS to platformInitialize.
12281        * Platform/WorkQueue.h:
12282            - added enum, arguments.
12283        * Platform/efl/WorkQueueEfl.cpp:
12284        (WorkQueue::platformInitialize):
12285            - has extra argument.
12286        * Platform/gtk/WorkQueueGtk.cpp:
12287        (WorkQueue::platformInitialize):
12288            - has extra argument.
12289        * Platform/mac/WorkQueueMac.cpp:
12290        (platformQOS):
12291            - map from enum to platform type.
12292        (WorkQueue::platformInitialize):
12293            - set the QoS of the dispatch queue.
12294        * WebProcess/WebPage/EventDispatcher.cpp:
12295        (WebKit::EventDispatcher::EventDispatcher):
12296            - EventDispatcher's WorkQueue should be UserInteractive.
12297        * config.h:
12298            - added HAVE_QOS_CLASSES
12299
123002014-06-12  Simon Fraser  <simon.fraser@apple.com>
12301
12302        [iOS] Tiny hack to fix WebKitTestRunner view visibility
12303        https://bugs.webkit.org/show_bug.cgi?id=133833
12304
12305        Reviewed by Tim Horton.
12306        
12307        PageClientImplIOS in WebKitTestRunner has a null m_webView, so isViewInWindow
12308        was returning false, which confused things.
12309        
12310        Fix by falling back to a check on the content view if the m_webView is nil.
12311
12312        * UIProcess/ios/PageClientImplIOS.mm:
12313        (WebKit::PageClientImpl::isViewVisible):
12314        (WebKit::PageClientImpl::isViewInWindow):
12315
123162014-06-12  Brady Eidson  <beidson@apple.com>
12317
12318        Add SPI for image controls and service controls preferences.
12319        <rdar://problem/17292209> and https://bugs.webkit.org/show_bug.cgi?id=133820
12320
12321        Reviewed by Anders Carlsson.
12322
12323        * UIProcess/API/C/WKPreferences.cpp:
12324        (WKPreferencesSetServiceControlsEnabled):
12325        (WKPreferencesGetServiceControlsEnabled):
12326        (WKPreferencesSetImageControlsEnabled):
12327        (WKPreferencesGetImageControlsEnabled):
12328        * UIProcess/API/C/WKPreferencesRefPrivate.h:
12329
123302014-06-12  Alexey Proskuryakov  <ap@apple.com>
12331
12332        [Mac] Allow reading com.apple.universalaccess preferences
12333        https://bugs.webkit.org/show_bug.cgi?id=133817
12334        <rdar://problem/17028261>
12335
12336        Reviewed by Anders Carlsson.
12337
12338        * WebProcess/com.apple.WebProcess.sb.in:
12339
123402014-06-12  Anders Carlsson  <andersca@apple.com>
12341
12342        Fix build.
12343
12344        * Shared/WebCoreArgumentCoders.cpp:
12345        (IPC::ArgumentCoder<HTTPHeaderMap>::decode):
12346        (CoreIPC::ArgumentCoder<ResourceRequest>::decode):
12347
123482014-06-12  Dan Bernstein  <mitz@apple.com>
12349
12350        Fixed a harmless error message when rewrite-availability-macros.sh is run in a clean build.
12351
12352        Rubber-stamped by Anders Carlsson.
12353
12354        * mac/rewrite-availability-macros.sh:
12355
123562014-06-12  Carlos Garcia Campos  <cgarcia@igalia.com>
12357
12358        [GTK] Remove view mode API
12359        https://bugs.webkit.org/show_bug.cgi?id=133725
12360
12361        Reviewed by Martin Robinson.
12362
12363        It currently does nothing because support for view source mode was
12364        removed from WebCore.
12365
12366        * UIProcess/API/gtk/WebKitWebView.cpp:
12367        (webkitWebViewSetProperty):
12368        (webkitWebViewGetProperty):
12369        (webkit_web_view_class_init):
12370        (webkit_web_view_set_view_mode): Deleted.
12371        (webkit_web_view_get_view_mode): Deleted.
12372        * UIProcess/API/gtk/WebKitWebView.h:
12373        * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
12374
123752014-06-12  Pratik Solanki  <psolanki@apple.com>
12376
12377        Avoid creating a CFData when checking if a resource is file backed
12378        https://bugs.webkit.org/show_bug.cgi?id=133783
12379
12380        Reviewed by Andreas Kling.
12381
12382        When a resource is file backed, we have it as a single CFDataRef in SharedBuffer. Add an
12383        early return in tryGetShareableHandleFromSharedBuffer() so we don't end up creating a new
12384        CFDataRef if we don't already have one in SharedBuffer. If we had to create a CFDataRef, the
12385        it can't have been a file backed resource.
12386
12387        * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
12388        (WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer):
12389
123902014-06-11  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
12391
12392        Fix build break on EFL and GTK ports since r169820
12393        https://bugs.webkit.org/show_bug.cgi?id=133786
12394
12395        Reviewed by Philippe Normand.
12396
12397        ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC macro are missing in PluginView::pluginSnapshotTimerFired().
12398
12399        * WebProcess/Plugins/PluginView.cpp:
12400        (WebKit::PluginView::pluginSnapshotTimerFired):
12401
124022014-06-11  Csaba Osztrogonác  <ossy@webkit.org>
12403
12404        [EFL][GTK] Ultimate fix not to have build failures
12405        in the future because of "#if TARGET_OS_IPHONE" guards.
12406
12407        Unreviewed buildfix.
12408
12409        Revert the previous wrong fix attempt r169879.
12410
12411        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
12412        * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
12413
124142014-06-11  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
12415
12416        Fix build break on EFL port since r169869
12417        https://bugs.webkit.org/show_bug.cgi?id=133785
12418
12419        Unreviewed, fix a build break on EFL port.
12420
12421        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: Use defined(TARGET_OS_IPHONE).
12422        * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: ditto.
12423
124242014-06-11  Simon Fraser  <simon.fraser@apple.com>
12425
12426        [iOS WK2] Give WebKitTestRunner a viewport configuration with initial scale=1 for testing
12427        https://bugs.webkit.org/show_bug.cgi?id=133779
12428
12429        Reviewed by Benjamin Poulain.
12430        
12431        Support a custom viewport configuration for testing, on iOS.
12432
12433        * UIProcess/API/ios/WKViewIOS.mm:
12434        (-[WKView _frameOrBoundsChanged]): Call setViewportConfigurationMinimumLayoutSize()
12435        just as WKWebView does.
12436        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
12437        (WKBundlePageSetUseTestingViewportConfiguration): New SPI to set a viewport config for testing.
12438        * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: Ditto.
12439        * WebProcess/WebPage/WebPage.cpp:
12440        (WebKit::WebPage::WebPage):
12441        * WebProcess/WebPage/WebPage.h:
12442        (WebKit::WebPage::setUseTestingViewportConfiguration):
12443        (WebKit::WebPage::isUsingTestingViewportConfiguration):
12444        * WebProcess/WebPage/ios/WebPageIOS.mm:
12445        (WebKit::WebPage::resetViewportDefaultConfiguration):
12446
124472014-06-11  Timothy Horton  <timothy_horton@apple.com>
12448
12449        Remove unused VisibleContentRectUpdateInfo update ID
12450        https://bugs.webkit.org/show_bug.cgi?id=133777
12451
12452        Reviewed by Benjamin Poulain.
12453
12454        Remove some unused code.
12455
12456        * Shared/VisibleContentRectUpdateInfo.cpp:
12457        (WebKit::VisibleContentRectUpdateInfo::encode):
12458        (WebKit::VisibleContentRectUpdateInfo::decode):
12459        * Shared/VisibleContentRectUpdateInfo.h:
12460        (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
12461        (WebKit::operator==):
12462        (WebKit::VisibleContentRectUpdateInfo::updateID): Deleted.
12463        * Shared/mac/RemoteLayerTreeTransaction.h:
12464        (WebKit::RemoteLayerTreeTransaction::setLastVisibleContentRectUpdateID): Deleted.
12465        (WebKit::RemoteLayerTreeTransaction::lastVisibleContentRectUpdateID): Deleted.
12466        * Shared/mac/RemoteLayerTreeTransaction.mm:
12467        (WebKit::RemoteLayerTreeTransaction::encode):
12468        (WebKit::RemoteLayerTreeTransaction::decode):
12469        * UIProcess/WebPageProxy.h:
12470        (WebKit::WebPageProxy::nextVisibleContentRectUpdateID): Deleted.
12471        (WebKit::WebPageProxy::lastVisibleContentRectUpdateID): Deleted.
12472        * UIProcess/ios/WKContentView.mm:
12473        (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
12474        * WebProcess/WebPage/WebPage.cpp:
12475        (WebKit::WebPage::WebPage):
12476        (WebKit::WebPage::willCommitLayerTree):
12477        * WebProcess/WebPage/WebPage.h:
12478        * WebProcess/WebPage/ios/WebPageIOS.mm:
12479        (WebKit::WebPage::updateVisibleContentRects):
12480
124812014-06-11  Dan Bernstein  <mitz@apple.com>
12482
12483        [Cocoa] Move CompletionHandlerCallChecker into a separate file
12484        https://bugs.webkit.org/show_bug.cgi?id=133774
12485
12486        Reviewed by Anders Carlsson.
12487
12488        * Shared/Cocoa/CompletionHandlerCallChecker.h: Added.
12489        * Shared/Cocoa/CompletionHandlerCallChecker.mm: Added.
12490        (WebKit::CompletionHandlerCallChecker::create):
12491        (WebKit::CompletionHandlerCallChecker::CompletionHandlerCallChecker):
12492        (WebKit::CompletionHandlerCallChecker::~CompletionHandlerCallChecker):
12493        (WebKit::CompletionHandlerCallChecker::didCallCompletionHandler):
12494        (WebKit::CompletionHandlerCallChecker::classImplementingDelegateMethod):
12495
12496        * UIProcess/Cocoa/UIDelegate.mm:
12497        (WebKit::CompletionHandlerCallChecker::create): Deleted.
12498        (WebKit::CompletionHandlerCallChecker::~CompletionHandlerCallChecker): Deleted.
12499        (WebKit::CompletionHandlerCallChecker::didCallCompletionHandler): Deleted.
12500        (WebKit::CompletionHandlerCallChecker::CompletionHandlerCallChecker): Deleted.
12501        (WebKit::CompletionHandlerCallChecker::classImplementingDelegateMethod): Deleted.
12502        * WebKit2.xcodeproj/project.pbxproj:
12503
125042014-06-11  Martin Hock  <mhock@apple.com>
12505
12506        [iOS] Clear UIProcess visual state after WebProcess crash
12507        https://bugs.webkit.org/show_bug.cgi?id=133664
12508        <rdar://problem/16952742>
12509
12510        Reviewed by Benjamin Poulain.
12511
12512        * UIProcess/API/Cocoa/WKWebView.mm:
12513        (-[WKWebView _didRelaunchProcess]):
12514        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
12515        * UIProcess/ios/PageClientImplIOS.mm:
12516        (WebKit::PageClientImpl::didRelaunchProcess):
12517        * UIProcess/mac/RemoteLayerTreeHost.h:
12518        * UIProcess/mac/RemoteLayerTreeHost.mm:
12519        (WebKit::RemoteLayerTreeHost::~RemoteLayerTreeHost):
12520        (WebKit::RemoteLayerTreeHost::clearLayers):
12521
125222014-06-11  Tim Horton  <timothy_horton@apple.com>
12523
12524        Implement swipeWithEvent for non-fluid swipes
12525        https://bugs.webkit.org/show_bug.cgi?id=133766
12526        <rdar://problem/17126889>
12527
12528        Reviewed by Anders Carlsson.
12529
12530        * UIProcess/API/mac/WKView.mm:
12531        (-[WKView swipeWithEvent:]):
12532        On non-fluid swipes, go back or forward depending on the swipe direction.
12533
125342014-06-11  Dan Bernstein  <mitz@apple.com>
12535
12536        [Cocoa] Xcode cannot infer that the WebKit target implicitly depends on WebCore.framework
12537        https://bugs.webkit.org/show_bug.cgi?id=133765
12538
12539        Reviewed by Anders Carlsson.
12540
12541        * Configurations/WebKit.xcconfig: Move linking against WebCore from OTHER_LDFLAGS here...
12542        * WebKit2.xcodeproj/project.pbxproj: ...to the Link Binary With Libraries build phase here.
12543
125442014-06-11  Timothy Horton  <timothy_horton@apple.com>
12545
12546        [wk2] Don't dispatch view state changes immediately
12547        https://bugs.webkit.org/show_bug.cgi?id=133713
12548
12549        Reviewed by Simon Fraser.
12550
12551        * UIProcess/WebPageProxy.cpp:
12552        (WebKit::WebPageProxy::WebPageProxy):
12553        (WebKit::WebPageProxy::viewStateDidChange):
12554        (WebKit::WebPageProxy::dispatchViewStateChange):
12555        (WebKit::WebPageProxy::updateViewState): Deleted.
12556        * UIProcess/WebPageProxy.h:
12557        On PLATFORM(COCOA), wait until just before CA is going to commit the UI process layer
12558        tree to dispatch view state changes to the Web process. This avoids sending multiple
12559        view state change messages to the Web process within one run-loop cycle, for example
12560        when a view is moved around in the view hierarchy but the view state otherwise remains the same.
12561
125622014-06-11  Timothy Horton  <timothy_horton@apple.com>
12563
12564        Make it possible for waitForAndDispatchImmediately to bail if a sync message comes in from the other direction
12565        https://bugs.webkit.org/show_bug.cgi?id=133708
12566
12567        Reviewed by Anders Carlsson.
12568
12569        * Platform/IPC/Connection.cpp:
12570        (IPC::WaitForMessageState):
12571        (IPC::Connection::Connection):
12572        (IPC::Connection::waitForMessage):
12573        (IPC::Connection::processIncomingMessage):
12574        (IPC::Connection::connectionDidClose):
12575        * Platform/IPC/Connection.h:
12576        (IPC::Connection::waitForAndDispatchImmediately):
12577        Remove the waitForMessageMap, and assert that we're only ever waiting for one message at a time.
12578        This simplifies this code a bit, and we never wait on more than one message at a time, so it was unnecessary.
12579
12580        Add a flag to waitForAndDispatchImmediately, InterruptWaitingIfSyncMessageArrives, which will cause
12581        waitForAndDispatchImmediately to bail if a sync message arrives, to avoid pointlessly blocking both processes
12582        for the entire timeout.
12583
125842014-06-11  Oliver Hunt  <oliver@apple.com>
12585
12586        Restrict database process profile
12587        https://bugs.webkit.org/show_bug.cgi?id=133750
12588
12589        Reviewed by Alexey Proskuryakov.
12590
12591        Make the sandbox profile much more restrictive.
12592
12593        * Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb:
12594
125952014-06-11  Roger Fong  <roger_fong@apple.com>
12596
12597        Don't snapshot offscreen plugins that would normally be considered primary plugins after they are moved in view.
12598        https://bugs.webkit.org/show_bug.cgi?id=133667.
12599        <rdar://problem/16743250>
12600
12601        Reviewed by Tim Horton.
12602
12603        * WebProcess/Plugins/PluginView.cpp:
12604        (WebKit::PluginView::PluginView):
12605        (WebKit::PluginView::pluginSnapshotTimerFired):
12606        Set the display state to Playing if the following is true:
12607        The plugin in question is large enough to be considered the primary snapshot and either:
12608        a) The maximum number of snapshot retries has been reached and no good snapshot has been found.
12609        b) The plugin is moved to be on-screen while the snapshot attempts are in progress.
12610        * WebProcess/Plugins/PluginView.h:
12611        * WebProcess/WebPage/WebPage.cpp:
12612        (WebKit::WebPage::plugInIntersectsSearchRect): Re-factor out intersection logic.
12613        (WebKit::WebPage::plugInIsPrimarySize): Re-factor out primary plugin size logic.
12614        (WebKit::WebPage::determinePrimarySnapshottedPlugIn): Use the above two methods here.
12615        * WebProcess/WebPage/WebPage.h:
12616
126172014-06-11  Anders Carlsson  <andersca@apple.com>
12618
12619        Move more WKPreferences to WKWebViewConfiguration
12620        https://bugs.webkit.org/show_bug.cgi?id=133756
12621        <rdar://problem/17271468>
12622
12623        Reviewed by Tim Horton.
12624
12625        * UIProcess/API/Cocoa/WKPreferences.h:
12626        * UIProcess/API/Cocoa/WKPreferences.mm:
12627        (-[WKPreferences setMinimumFontSize:]):
12628        (-[WKPreferences suppressesIncrementalRendering]): Deleted.
12629        (-[WKPreferences setSuppressesIncrementalRendering:]): Deleted.
12630        (-[WKPreferences allowsInlineMediaPlayback]): Deleted.
12631        (-[WKPreferences setAllowsInlineMediaPlayback:]): Deleted.
12632        (-[WKPreferences mediaPlaybackRequiresUserAction]): Deleted.
12633        (-[WKPreferences setMediaPlaybackRequiresUserAction:]): Deleted.
12634        (-[WKPreferences mediaPlaybackAllowsAirPlay]): Deleted.
12635        (-[WKPreferences setMediaPlaybackAllowsAirPlay:]): Deleted.
12636        * UIProcess/API/Cocoa/WKWebView.mm:
12637        (-[WKWebView initWithFrame:configuration:]):
12638        * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
12639        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
12640        (-[WKWebViewConfiguration copyWithZone:]):
12641        * WebKit2.xcodeproj/project.pbxproj:
12642
126432014-06-11  Enrica Casucci  <enrica@apple.com>
12644
12645        WebKit2 iOS: Unable to open UI menu for "open in new tab" for links on yahoo.com.
12646        https://bugs.webkit.org/show_bug.cgi?id=133749
12647        <rdar://problem/17165992>
12648
12649        Reviewed by Brady Eidson.
12650
12651        The URL returned to the UIProcess as string needs to be encoded.
12652
12653        * WebProcess/WebPage/ios/WebPageIOS.mm:
12654        (WebKit::WebPage::getPositionInformation):
12655
126562014-06-10  Anders Carlsson  <andersca@apple.com>
12657
12658        Move suppressesIncrementalRendering to WKWebViewConfiguration
12659        https://bugs.webkit.org/show_bug.cgi?id=133707
12660        <rdar://problem/17271468>
12661
12662        Reviewed by Sam Weinig.
12663
12664        * UIProcess/API/Cocoa/WKPreferences.h:
12665        Get rid of suppressesIncrementalRendering.
12666
12667        * UIProcess/API/Cocoa/WKWebView.mm:
12668        (-[WKWebView initWithFrame:configuration:]):
12669        Set the suppressesIncrementalRenderingKey key in webPageConfiguration.preferenceValues.
12670
12671        * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
12672        Add suppressesIncrementalRendering.
12673
12674        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
12675        (-[WKWebViewConfiguration copyWithZone:]):
12676        Assign suppressesIncrementalRendering.
12677
12678        * UIProcess/WebPageProxy.cpp:
12679        (WebKit::WebPageProxy::WebPageProxy):
12680        Copy webPageConfiguration.preferenceValues to m_configurationPreferenceValues.
12681
12682        (WebKit::WebPageProxy::preferencesStore):
12683        If m_configurationPreferenceValues is empty, just return m_preferences->store(). Otherwise,
12684        copy the store and apply the configuration preference values.
12685
12686        (WebKit::WebPageProxy::preferencesDidChange):
12687        Call preferencesStore() so we'll get the configuration preference values as well.
12688
12689        (WebKit::WebPageProxy::creationParameters):
12690        Ditto.
12691
12692        * UIProcess/WebPageProxy.h:
12693
126942014-06-11  Antti Koivisto  <antti@apple.com>
12695
12696        Wrap NSURLRequest in bundle API
12697        https://bugs.webkit.org/show_bug.cgi?id=133732
12698        <rdar://problem/17267217>
12699
12700        Reviewed by Andreas Kling.
12701        
12702        Patch by Dan Bernstein.
12703
12704        We don't want to construct actual NSURLRequests in the web process side unless really needed as it is slow.
12705
12706        * Shared/Cocoa/APIObject.mm:
12707        (API::Object::newObject):
12708        * Shared/Cocoa/WKNSURLRequest.h: Added.
12709        (WebKit::wrapper):
12710        * Shared/Cocoa/WKNSURLRequest.mm: Added.
12711        
12712            Add a wrapper object that initializes the underlying NSURLRequest on-demand.
12713
12714        (-[WKNSURLRequest _web_createTarget]):
12715        (-[WKNSURLRequest URL]):
12716        (-[WKNSURLRequest copyWithZone:]):
12717        * WebKit2.xcodeproj/project.pbxproj:
12718        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
12719        (willSendRequestForFrame):
12720        (didInitiateLoadForResource):
12721
127222014-06-11  Dan Bernstein  <mitz@apple.com>
12723
12724        <rdar://problem/17218629> [Cocoa] WKWebView’s canGoBack and canGoForward properties are not KVO-compliant
12725        https://bugs.webkit.org/show_bug.cgi?id=133722
12726
12727        Reviewed by Anders Carlsson.
12728
12729        * UIProcess/API/Cocoa/WKBrowsingContextController.mm: Added no-op overrides of new
12730        PageLoadStateObserver member functions.
12731
12732        * UIProcess/API/Cocoa/WKWebView.h: Documented the canGoBack and canGoForward properties as
12733        being KVO-compliant.
12734        * UIProcess/API/Cocoa/WKWebView.mm:
12735        (-[WKWebView canGoBack]): Changed to get the return value from the page load state.
12736        (-[WKWebView canGoForward]): Ditto.
12737
12738        * UIProcess/Cocoa/NavigationState.h:
12739        * UIProcess/Cocoa/NavigationState.mm:
12740        (WebKit::NavigationState::willChangeCanGoBack): Override this new PageLoadStateObserver
12741        member function by sending the appropriate KVO change message to the WKWebView.
12742        (WebKit::NavigationState::didChangeCanGoBack): Ditto.
12743        (WebKit::NavigationState::willChangeCanGoForward): Ditto.
12744        (WebKit::NavigationState::didChangeCanGoForward): Ditto.
12745
12746        * UIProcess/PageLoadState.cpp:
12747        (WebKit::PageLoadState::commitChanges): Check for changes to canGoBack and canGoForward
12748        and call the observers if needed.
12749        (WebKit::PageLoadState::canGoBack): Added. Returns the value from the committed state.
12750        (WebKit::PageLoadState::setCanGoBack): Added. Sets the value in the uncommitted state.
12751        (WebKit::PageLoadState::canGoForward): Added. Returns the value from the committed state.
12752        (WebKit::PageLoadState::setCanGoForward): Added. Sets the value in the uncommitted state.
12753        * UIProcess/PageLoadState.h:
12754        (WebKit::PageLoadState::Data::Data): Added canGoBack and canGoForward boolean members.
12755
12756        * UIProcess/WebPageProxy.cpp:
12757        (WebKit::WebPageProxy::didChangeBackForwardList): Update the page load state with the new
12758        state of canGoBack and canGoForward.
12759        * UIProcess/WebPageProxy.h: Removed unused member variables m_canGoBack and m_canGoForward.
12760
127612014-06-11  Zan Dobersek  <zdobersek@igalia.com>
12762
12763        Avoid Vector copies in WebNotificationManagerProxy::providerDidCloseNotifications(), FindController::findStringMatches()
12764        https://bugs.webkit.org/show_bug.cgi?id=133676
12765
12766        Reviewed by Andreas Kling.
12767
12768        * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
12769        (WebKit::WebNotificationManagerProxy::providerDidCloseNotifications): Move the newly-created
12770        Vector object into the HashMap<>::add() call.
12771        * WebProcess/WebPage/FindController.cpp:
12772        (WebKit::FindController::findStringMatches): Movethe newly-create Vector object into the
12773        Vector<>::append() call.
12774
127752014-06-11  Shivakumar JM  <shiva.jm@samsung.com>
12776
12777        [EFL][WK2] Add missing test cases for EWK2ViewTest.
12778        https://bugs.webkit.org/show_bug.cgi?id=133715
12779
12780        Reviewed by Gyuyoung Kim.
12781
12782        Add missing test cases for ewk_view.h APIs, ewk_view_stop(), ewk_view_html_string_load(), ewk_view_theme_get(), 
12783        ewk_view_feed_touch_event(), ewk_view_text_find_highlight_clear(), ewk_view_text_find(), ewk_view_text_matches_count(),
12784        ewk_view_page_contents_get(), ewk_view_script_execute().
12785
12786        * PlatformEfl.cmake:
12787        * UIProcess/API/efl/tests/test_ewk2_view.cpp:
12788        (TEST_F):
12789
127902014-06-11  Carlos Garcia Campos  <cgarcia@igalia.com>
12791
12792        [GTK] Use a different user agent string depending on the site
12793        https://bugs.webkit.org/show_bug.cgi?id=132681
12794
12795        Reviewed by Anders Carlsson.
12796
12797        * UIProcess/API/gtk/WebKitSettings.cpp:
12798        (webkit_settings_class_init): Enable site specific quirks setting
12799        by default.
12800        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
12801        (WebKit::WebFrameLoaderClient::userAgent): Pass the given URL to WebPage.
12802        * WebProcess/WebPage/WebPage.cpp:
12803        (WebKit::WebPage::userAgent): Try to get the user agent for the
12804        URL received falling back to the current one otherwise.
12805        * WebProcess/WebPage/WebPage.h:
12806        (WebKit::WebPage::platformUserAgent): Added.
12807        * WebProcess/WebPage/efl/WebPageEfl.cpp:
12808        (WebKit::WebPage::platformUserAgent): Return null String.
12809        * WebProcess/WebPage/gtk/WebPageGtk.cpp:
12810        (WebKit::WebPage::platformUserAgent): Use WebCore::standardUserAgentForURL() when site specific quirks
12811        setting is enabled.
12812        * WebProcess/WebPage/ios/WebPageIOS.mm:
12813        (WebKit::WebPage::platformUserAgent): Return null String.
12814        * WebProcess/WebPage/mac/WebPageMac.mm:
12815        (WebKit::WebPage::platformUserAgent): Return null String.
12816
128172014-06-10  Benjamin Poulain  <benjamin@webkit.org>
12818
12819        [iOS][WK2] ScrollingTreeOverflowScrollingNode does not use asynchronous touch dispatch
12820        https://bugs.webkit.org/show_bug.cgi?id=133702
12821        <rdar://problem/17259261>
12822
12823        Reviewed by Simon Fraser.
12824
12825        Notify the WKWebView and the TouchGestureRecognizer when on of the internal UIScrollView
12826        starts scrolling in response to a gesture.
12827
12828        * UIProcess/PageClient.h:
12829        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
12830        * UIProcess/Scrolling/RemoteScrollingTree.cpp:
12831        (WebKit::RemoteScrollingTree::scrollingTreeNodeWillStartPanGesture):
12832        * UIProcess/Scrolling/RemoteScrollingTree.h:
12833        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
12834        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
12835        (-[WKOverflowScrollViewDelegate scrollViewWillBeginDragging:]):
12836        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollViewWillStartPanGesture):
12837        * UIProcess/WebPageProxy.h:
12838        * UIProcess/ios/PageClientImplIOS.h:
12839        * UIProcess/ios/PageClientImplIOS.mm:
12840        (WebKit::PageClientImpl::scrollViewWillStartPanGesture):
12841        * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
12842        (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeWillStartPanGesture):
12843        * UIProcess/ios/WebPageProxyIOS.mm:
12844        (WebKit::WebPageProxy::scrollViewWillStartPanGesture):
12845
128462014-06-10  Dan Bernstein  <mitz@apple.com>
12847
12848        WebKit2 part of [Cocoa] Handling authentication challenges should not require multiple delegate methods
12849        https://bugs.webkit.org/show_bug.cgi?id=133697
12850
12851        Reviewed by Anders Carlsson.
12852
12853        * Shared/Authentication/AuthenticationManager.cpp:
12854        (WebKit::AuthenticationManager::performDefaultHandling): Added. Calls the new
12855        AuthenticationClient function receivedRequestToPerformDefaultHandling.
12856        (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinue): Added. Calls the new
12857        AuthenticationClient function receivedChallengeRejection.
12858        * Shared/Authentication/AuthenticationManager.h:
12859        * Shared/Authentication/AuthenticationManager.messages.in: Added new messages
12860        PerformDefaultHandling and RejectProtectionSpaceAndContinue.
12861
12862        * Shared/Downloads/DownloadAuthenticationClient.h: Override new AuthenticationClient member
12863        functions.
12864
12865        * Shared/Downloads/ios/DownloadIOS.mm:
12866        (WebKit::Download::receivedRequestToPerformDefaultHandling): Added empty implementation.
12867        (WebKit::Download::receivedChallengeRejection): Ditto.
12868
12869        * Shared/Downloads/mac/DownloadMac.mm:
12870        (WebKit::Download::receivedRequestToPerformDefaultHandling): Added. Forwards to the sender.
12871        (WebKit::Download::receivedChallengeRejection): Ditto.
12872
12873        * UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.mm:
12874        (checkChallenge): Factored out a bit of code into this helper function.
12875        (-[WKNSURLAuthenticationChallengeSender cancelAuthenticationChallenge:]): Use new helper.
12876        (-[WKNSURLAuthenticationChallengeSender continueWithoutCredentialForAuthenticationChallenge:]):
12877        Ditto.
12878        (-[WKNSURLAuthenticationChallengeSender useCredential:forAuthenticationChallenge:]): Ditto.
12879        (-[WKNSURLAuthenticationChallengeSender performDefaultHandlingForAuthenticationChallenge:]):
12880        Implemented this optional NSURLAuthenticationChallengeSender protocol method by forwarding
12881        to the decision listener.
12882        (-[WKNSURLAuthenticationChallengeSender rejectProtectionSpaceAndContinueWithChallenge:]):
12883        Ditto.
12884
12885        * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new delegate method.
12886
12887        * UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
12888        (WebKit::AuthenticationChallengeProxy::performDefaultHandling): Added. Sends a message to
12889        the authentication manager.
12890        (WebKit::AuthenticationChallengeProxy::rejectProtectionSpaceAndContinue): Ditto.
12891        * UIProcess/Authentication/AuthenticationChallengeProxy.h:
12892
12893        * UIProcess/Authentication/AuthenticationDecisionListener.cpp:
12894        (WebKit::AuthenticationDecisionListener::performDefaultHandling): Added. Forwards to the
12895        authentication challenge proxy.
12896        (WebKit::AuthenticationDecisionListener::rejectProtectionSpaceAndContinue): Ditto.
12897        * UIProcess/Authentication/AuthenticationDecisionListener.h:
12898
12899        * UIProcess/Cocoa/NavigationState.h: Added flag in m_navigationDelegateMethods struct.
12900        * UIProcess/Cocoa/NavigationState.mm:
12901        (WebKit::NavigationState::setNavigationDelegate): Initialize
12902        webViewWillSendRequestForAuthenticationChallenge flag in the delegate methods struct.
12903        (WebKit::NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame): If
12904        the delegate implements -_webView:willSendRequestForAuthenticationChallenge:, return true
12905        here; the delegate will respond with -rejectProtectionSpaceAndContinueWithChallenge: if
12906        it cannot authenticate.
12907        (WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame): If the
12908        delegate implements -_webView:willSendRequestForAuthenticationChallenge:, send that message.
12909
129102014-06-10  Timothy Horton  <timothy_horton@apple.com>
12911
12912        Factor repeated CFRunLoopObserver code out
12913        https://bugs.webkit.org/show_bug.cgi?id=133690
12914
12915        Reviewed by Simon Fraser.
12916
12917        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
12918        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
12919        (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
12920        (WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy):
12921        (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
12922        (WebKit::RemoteLayerTreeDrawingAreaProxy::showDebugIndicator):
12923        (WebKit::coreAnimationDidCommitLayersCallback): Deleted.
12924        (WebKit::RemoteLayerTreeDrawingAreaProxy::scheduleCoreAnimationLayerCommitObserver): Deleted.
12925        (WebKit::RemoteLayerTreeDrawingAreaProxy::coreAnimationDidCommitLayers): Deleted.
12926        Make use of WebCore::RunLoopObserver.
12927
129282014-06-10  Anders Carlsson  <andersca@apple.com>
12929
12930        Fix availability declaration.
12931
12932        * UIProcess/API/Cocoa/WKError.h:
12933
129342014-06-10  Anders Carlsson  <andersca@apple.com>
12935
12936        Address a comment about a comment.
12937
12938        * UIProcess/API/Cocoa/WKWebView.mm:
12939        (-[WKWebView evaluateJavaScript:completionHandler:]):
12940
129412014-06-10  Anders Carlsson  <andersca@apple.com>
12942
12943        Add -[WKWebView evaluateJavaScript:completionHandler:]
12944        https://bugs.webkit.org/show_bug.cgi?id=133689
12945        <rdar://problem/17152685>
12946
12947        Reviewed by Geoffrey Garen.
12948
12949        * Shared/API/c/WKErrorRef.h:
12950        Remove WKErrorCode typedef from here.
12951
12952        * UIProcess/API/C/WKPageLoaderClient.h:
12953        Use uint32_t instead of WKErrorCode.
12954
12955        * UIProcess/API/Cocoa/WKError.h:
12956        (NS_ENUM):
12957        Add a WKErrorDomain and a WKErrorCode enum.
12958
12959        * UIProcess/API/Cocoa/WKError.mm:
12960        (localizedDescriptionForErrorCode):
12961        Helper that returns the localized description given an error code.
12962
12963        (createNSError):
12964        Helper that creates an NSError with the correct localized description given an error code.
12965
12966        * UIProcess/API/Cocoa/WKErrorInternal.h:
12967        Add helpers.
12968
12969        * UIProcess/API/Cocoa/WKWebView.h:
12970        Add evaluateJavaScript:completionHandler: method.
12971
12972        * UIProcess/API/Cocoa/WKWebView.mm:
12973        (callbackErrorCode):
12974        Helper that returns a WKErrorCode from a WebKit::CallbackBase::Error enum.
12975
12976        (-[WKWebView evaluateJavaScript:completionHandler:]):
12977        Run the JavaScript code and handle all the error cases.
12978
12979        (-[WKWebView _runJavaScriptInMainFrame:]):
12980        Reimplement this using the API method.
12981
12982        * WebKit2.xcodeproj/project.pbxproj:
12983        Add new files.
12984
129852014-06-10  Anders Carlsson  <andersca@apple.com>
12986
12987        Don't call Connection::terminateSoon if the connection is null
12988        https://bugs.webkit.org/show_bug.cgi?id=133695
12989        <rdar://problem/17069024>
12990
12991        Reviewed by Tim Horton.
12992
12993        * UIProcess/WebProcessProxy.cpp:
12994        (WebKit::WebProcessProxy::removeWebPage):
12995
129962014-06-10  Oliver Hunt  <oliver@apple.com>
12997
12998        Add process entitlements
12999        https://bugs.webkit.org/show_bug.cgi?id=133693
13000
13001        Reviewed by Alexey Proskuryakov.
13002
13003        Add entitlements description for Database process, and
13004        ensure that we reference the correct seatbelt profiles.
13005
13006        * Configurations/DatabaseService.Development.xcconfig:
13007        * Configurations/DatabaseService.xcconfig:
13008        * Configurations/Databases-iOS.entitlements:
13009        * Configurations/Network-iOS.entitlements:
13010        * Configurations/WebContent-iOS.entitlements:
13011        * WebKit2.xcodeproj/project.pbxproj:
13012
130132014-06-10  Alexey Proskuryakov  <ap@apple.com>
13014
13015        Fix crashes on some plug-in tests.
13016        https://bugs.webkit.org/show_bug.cgi?id=133691
13017        <rdar://problem/17255836>
13018
13019        Reviewed by Anders Carlsson.
13020
13021        * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::initialize):
13022        Cannot use TemporaryChange here, because the object may go away before stack unwinds.
13023
130242014-06-10  Antti Koivisto  <antti@apple.com>
13025
13026        Serialize ResourceRequests without platform request
13027        https://bugs.webkit.org/show_bug.cgi?id=133679
13028
13029        Reviewed by Alexey Proskuryakov.
13030
13031        * Shared/WebCoreArgumentCoders.cpp:
13032        (IPC::ArgumentCoder<ResourceRequest>::encode):
13033        (IPC::ArgumentCoder<ResourceRequest>::decode):
13034        
13035            Encode ResourceRequest directly if possible.
13036
130372014-06-09  Anders Carlsson  <andersca@apple.com>
13038
13039        Fix build.
13040
13041        * UIProcess/WebPageProxy.cpp:
13042        (WebKit::WebPageProxy::resetState):
13043
130442014-06-09  Simon Fraser  <simon.fraser@apple.com>
13045
13046        Work towards having frames in the scrolling tree
13047        https://bugs.webkit.org/show_bug.cgi?id=133665
13048
13049        Reviewed by Tim Horton.
13050        
13051        Override coordinatesScrollingForFrameView() to always return true for composited
13052        frames, for iOS WK2 (eventually this class will have to be specialized for iOS and OS X).
13053
13054        * WebProcess/Scrolling/RemoteScrollingCoordinator.h:
13055        * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
13056        (WebKit::RemoteScrollingCoordinator::coordinatesScrollingForFrameView):
13057
130582014-06-09  Anders Carlsson  <andersca@apple.com>
13059
13060        Give callbacks real status codes
13061        https://bugs.webkit.org/show_bug.cgi?id=133668
13062
13063        Reviewed by Dan Bernstein.
13064
13065        This makes it possible to know whether a callback was invalidated due to the webpage being closed,
13066        or whether it was due the a web process crash.
13067
13068        * UIProcess/GenericCallback.h:
13069        (WebKit::GenericCallback::create):
13070        (WebKit::GenericCallback::performCallbackWithReturnValue):
13071        (WebKit::GenericCallback::invalidate):
13072        (WebKit::invalidateCallbackMap):
13073        * UIProcess/WebPageProxy.cpp:
13074        (WebKit::WebPageProxy::close):
13075        (WebKit::WebPageProxy::resetState):
13076        (WebKit::WebPageProxy::resetStateAfterProcessExited):
13077        * UIProcess/WebPageProxy.h:
13078
130792014-06-09  Enrica Casucci  <enrica@apple.com>
13080
13081        iOS WebKit: Crash in charactersAroundPosition.
13082        https://bugs.webkit.org/show_bug.cgi?id=133659
13083        <rdar://problem/17220870>
13084
13085        Reviewed by Benjamin Poulain.
13086
13087        We only need to compute charactersAroundPosition when we are in
13088        editable content.
13089
13090        * WebProcess/WebPage/WebPage.cpp:
13091        (WebKit::WebPage::editorState):
13092
130932014-06-06  Andy Estes  <aestes@apple.com>
13094
13095        [iOS] Expose _WKWebViewPrintFormatter and -_webView:printFrame: as SPI
13096        https://bugs.webkit.org/show_bug.cgi?id=133600
13097
13098        Reviewed by David Kilzer.
13099
13100        Expose -_webView:printFrame: in WKUIDelegatePrivate so that clients can implement support for window.print().
13101        Since window.print() can be called from a subframe, expose _WKWebViewPrintFormatter (renamed from
13102        WKWebViewPrintFormatter to reflect its new SPI status) as SPI and add a frameToPrint property.
13103
13104        * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Forward-declared _WKFrameHandle and declared -_webView:printFrame:.
13105        * UIProcess/API/Cocoa/WKWebView.mm:
13106        (-[WKWebView _webViewPrintFormatter]): Added to get a _WKWebViewPrintFormatter.
13107        (-[WKWebView _printFormatterClass]): Updated the class name to _WKWebViewPrintFormatter.
13108        (-[WKWebView _computePageCountAndStartDrawingToPDFForFrame:printInfo:WebKit::firstPage:computedTotalScaleFactor:]):
13109        Added a frame argument. If frame is nil, print the main frame.
13110        (-[WKWebView _computePageCountAndStartDrawingToPDFWithPrintInfo:WebKit::firstPage:computedTotalScaleFactor:]): Deleted.
13111        * UIProcess/API/Cocoa/WKWebViewInternal.h: Forward-declared _WKFrameHandle; removed an unneccessary
13112        forward-declaration of WKWebViewPrintFormatter.
13113        * UIProcess/API/Cocoa/WKWebViewPrivate.h: Added a _webViewPrintFormatter property.
13114        * UIProcess/Cocoa/UIDelegate.h:
13115        * UIProcess/Cocoa/UIDelegate.mm:
13116        (WebKit::UIDelegate::setDelegate):
13117        (WebKit::UIDelegate::UIClient::printFrame): Called -_webView:printFrame:.
13118        * UIProcess/_WKWebViewPrintFormatter.h: Renamed from Source/WebKit2/UIProcess/WKWebViewPrintFormatter.h.
13119        * UIProcess/_WKWebViewPrintFormatter.mm: Renamed from Source/WebKit2/UIProcess/WKWebViewPrintFormatter.mm.
13120        * WebKit2.xcodeproj/project.pbxproj:
13121
131222014-06-09  Beth Dakin  <bdakin@apple.com>
13123
13124        Flash video controls hit-test incorrectly after changing topContentInset
13125        https://bugs.webkit.org/show_bug.cgi?id=133658
13126        -and corresponding-
13127        <rdar://problem/16978590>
13128
13129        Reviewed by Anders Carlsson.
13130
13131        When the topContent changes, the PluginView needs to be informed.
13132
13133        New function PluginView::topContentInsetDidChange() calls viewGeometryDidChange().
13134        * WebProcess/Plugins/PluginView.cpp:
13135        (WebKit::PluginView::topContentInsetDidChange):
13136        * WebProcess/Plugins/PluginView.h:
13137
13138        Call topContentInsetDidChange() after setting an inset only if it is a new inset.
13139        * WebProcess/WebPage/WebPage.cpp:
13140        (WebKit::WebPage::setTopContentInset):
13141
131422014-06-09  Daniel Bates  <dabates@apple.com>
13143
13144        Another attempt to fix the EFL and GTK builds after <http://trac.webkit.org/changeset/169711>
13145        (https://bugs.webkit.org/show_bug.cgi?id=133657)
13146
13147        Substitute WKErrorRef.h for WKError.h.
13148
13149        * UIProcess/API/efl/ewk_error.cpp:
13150        * WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:
13151        * WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp:
13152
131532014-06-09  Daniel Bates  <dabates@apple.com>
13154
13155        Attempt to fix the EFL and GTK builds after <http://trac.webkit.org/changeset/169711>
13156        (https://bugs.webkit.org/show_bug.cgi?id=133657)
13157
13158        Rename Shared/API/c/WKError.cpp to Shared/API/c/WKErrorRef.cpp.
13159
13160        * CMakeLists.txt:
13161
131622014-06-09  Anders Carlsson  <andersca@apple.com>
13163
13164        Address review feedback.
13165
13166        * UIProcess/API/Cocoa/WKWebView.h:
13167
131682014-06-09  Anders Carlsson  <andersca@apple.com>
13169
13170        Add a WKError.h header and rename the existing WKError.h to WKErrorRef.h
13171        https://bugs.webkit.org/show_bug.cgi?id=133657
13172
13173        Reviewed by Dan Bernstein.
13174
13175        * Shared/API/Cocoa/WebKit.h:
13176        * Shared/API/c/WKErrorRef.cpp: Renamed from Source/WebKit2/Shared/API/c/WKError.cpp.
13177        (WKErrorGetTypeID):
13178        (WKErrorCopyWKErrorDomain):
13179        (WKErrorCopyDomain):
13180        (WKErrorGetErrorCode):
13181        (WKErrorCopyFailingURL):
13182        (WKErrorCopyLocalizedDescription):
13183        * Shared/API/c/WKErrorRef.h: Renamed from Source/WebKit2/Shared/API/c/WKError.h.
13184        * UIProcess/API/C/WKPage.h:
13185        * UIProcess/API/C/WKPageLoaderClient.h:
13186        * UIProcess/API/C/WebKit2_C.h:
13187        * UIProcess/API/Cocoa/WKError.h: Copied from Source/WebKit2/Shared/API/Cocoa/WebKit.h.
13188        * UIProcess/API/Cocoa/WKError.mm: Copied from Source/WebKit2/Shared/API/Cocoa/WebKit.h.
13189        * WebKit2.xcodeproj/project.pbxproj:
13190        * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
13191
131922014-06-09  Brady Eidson  <beidson@apple.com>
13193
13194        Use different AppKit API for all services menus
13195        <rdar://problem/16874403> and https://bugs.webkit.org/show_bug.cgi?id=133649
13196
13197        Reviewed by Tim Horton.
13198
13199        * UIProcess/mac/WebContextMenuProxyMac.mm:
13200        (WebKit::WebContextMenuProxyMac::showContextMenu):
13201
132022014-06-09  Anders Carlsson  <andersca@apple.com>
13203
13204        Add WKWindowFeatures.h to the umbrella header.
13205
13206        Reviewed by Dan Bernstein.
13207
13208        * Shared/API/Cocoa/WebKit.h:
13209
132102014-06-09  Anders Carlsson  <andersca@apple.com>
13211
13212        Add -[WKWebView loadHTMLString:baseURL:]
13213        https://bugs.webkit.org/show_bug.cgi?id=133645
13214        <rdar://problem/17170649>
13215
13216        Reviewed by Sam Weinig.
13217
13218        * UIProcess/API/Cocoa/WKWebView.h:
13219        * UIProcess/API/Cocoa/WKWebView.mm:
13220        (-[WKWebView loadHTMLString:baseURL:]):
13221        * UIProcess/Cocoa/NavigationState.h:
13222        * UIProcess/Cocoa/NavigationState.mm:
13223        (WebKit::NavigationState::createLoadDataNavigation):
13224        * UIProcess/WebPageProxy.cpp:
13225        (WebKit::WebPageProxy::loadHTMLString):
13226        * UIProcess/WebPageProxy.h:
13227        * WebProcess/WebPage/WebPage.cpp:
13228        (WebKit::WebPage::loadDataImpl):
13229        (WebKit::WebPage::loadString):
13230        (WebKit::WebPage::loadData):
13231        (WebKit::WebPage::loadHTMLString):
13232        (WebKit::WebPage::loadAlternateHTMLString):
13233        (WebKit::WebPage::loadPlainTextString):
13234        (WebKit::WebPage::loadWebArchiveData):
13235        * WebProcess/WebPage/WebPage.h:
13236        * WebProcess/WebPage/WebPage.messages.in:
13237
132382014-06-09  Simon Fraser  <simon.fraser@apple.com>
13239
13240        Fix more latched scrolling test flakiness and slowness
13241        https://bugs.webkit.org/show_bug.cgi?id=133601
13242
13243        Reviewed by Brent Fulgham.
13244
13245        Latched scrolling tests were flakey for two reasons. First, the EventSender
13246        wheel events were async from the web to the UI process, and the resulting
13247        synthetic events also async from the UI to the web process. Make them sync
13248        for testing.
13249        
13250        Secondly, the timer-based scrolling tree commit could result in the scrolling
13251        tree (specifically the frame node's notion of the scrollable area and content
13252        size) not being updated before the scrolling thread starts getting wheel events.
13253        Fix by having WebPage::wheelEventSyncForTesting() commit if necessary.
13254        
13255        Finally remove all the now-unnecessary timeouts from the tests.
13256
13257        * WebProcess/WebPage/WebPage.cpp:
13258        (WebKit::WebPage::wheelEventSyncForTesting):
13259
132602014-06-09  Andrzej Badowski  <a.badowski@samsung.com>
13261
13262        [EFL] Add parameter to MiniBrowser to disable web security
13263        https://bugs.webkit.org/show_bug.cgi?id=121095
13264
13265        Reviewed by Gyuyoung Kim.
13266
13267        -w (--web-security) commandline allows to disable/enable web security (enabled by default).
13268        The reason for this is to test and debug (using, for example, MiniBrowser) scripts accessing
13269        resources from other domains (cross-domain requests) such as access map location on another server.
13270        Another possibility is to launch in a webkit browser local file tests that will refer to the links
13271        in the http website loaded in an iframe. It will not be possible without deactivation of web security.
13272
13273        * UIProcess/API/efl/ewk_settings.cpp:
13274        (ewk_settings_web_security_enabled_set):
13275        (ewk_settings_web_security_enabled_get):
13276        * UIProcess/API/efl/ewk_settings.h:
13277        * UIProcess/API/efl/tests/test_ewk2_settings.cpp:
13278        (TEST_F):
13279
132802014-06-08  Sam Weinig  <sam@webkit.org>
13281
13282        [Cocoa] WKScriptMessage should include the frame the message is from
13283        <rdar://problem/17210226>
13284        https://bugs.webkit.org/show_bug.cgi?id=133623
13285
13286        Reviewed by Dan Bernstein.
13287
13288        * UIProcess/API/Cocoa/WKScriptMessage.h:
13289        Add WKFrameInfo property.
13290
13291        * UIProcess/API/Cocoa/WKScriptMessage.mm:
13292        (-[WKScriptMessage _initWithBody:webView:frameInfo:name:]):
13293        Add WKFrameInfo to the initializer.
13294
13295        (-[WKScriptMessage frameInfo]):
13296        Implement frameInfo accessor.
13297
13298        * UIProcess/API/Cocoa/WKScriptMessageInternal.h:
13299        Add WKFrameInfo to the initializer.
13300
13301        * UIProcess/API/Cocoa/WKUserContentController.mm:
13302        Pass the WKFrameInfo to the WKScriptMessage initializer.
13303
133042014-06-08  Dan Bernstein  <mitz@apple.com>
13305
13306        [Cococa] WKWindowFeatures.h is missing from WebKit.framework
13307        https://bugs.webkit.org/show_bug.cgi?id=133622
13308
13309        Reviewed by Sam Weinig.
13310
13311        * WebKit2.xcodeproj/project.pbxproj: Promoted WKWindowFeatures.h to Public.
13312
133132014-06-08  Dan Bernstein  <mitz@apple.com>
13314
13315        <rdar://problem/17208234> [Mac] Client-certificate authentication isn’t working when using the modern API
13316        https://bugs.webkit.org/show_bug.cgi?id=133617
13317
13318        Reviewed by Sam Weinig.
13319
13320        * Shared/WebCoreArgumentCoders.cpp:
13321        (IPC::ArgumentCoder<Credential>::encode): Encode certificate credentials on Mac as well.
13322        (IPC::ArgumentCoder<Credential>::decode): Decode certificate credentials on Mac as well.
13323
13324        * Shared/cf/ArgumentCodersCF.cpp:
13325        (IPC::encode): Use OS X API for getting a persistent reference to a key.
13326        (IPC::decode): Use OS X API for getting a key from a persistent reference.
13327
13328        * Shared/cf/ArgumentCodersCF.h: Make identity coding available on Mac as well.
13329
133302014-06-07  Anders Carlsson  <andersca@apple.com>
13331
13332        Get rid of _WKScriptWorld
13333        https://bugs.webkit.org/show_bug.cgi?id=133610
13334
13335        Reviewed by Dan Bernstein.
13336
13337        * Shared/API/Cocoa/WebKitPrivate.h:
13338        * UIProcess/API/Cocoa/_WKScriptWorld.h: Removed.
13339        * UIProcess/API/Cocoa/_WKScriptWorld.mm: Removed.
13340        * WebKit2.xcodeproj/project.pbxproj:
13341
133422014-05-29  Anders Carlsson  <andersca@apple.com>
13343
13344        HTTPHeaderMap should not derive from HashMap
13345        https://bugs.webkit.org/show_bug.cgi?id=133392
13346
13347        Reviewed by Darin Adler.
13348
13349        * Shared/WebCoreArgumentCoders.cpp:
13350        (IPC::ArgumentCoder<HTTPHeaderMap>::encode):
13351        (IPC::ArgumentCoder<HTTPHeaderMap>::decode):
13352
133532014-06-07  Alexey Proskuryakov  <ap@apple.com>
13354
13355        [iOS] Fix a path used for sandbox profiles
13356        https://bugs.webkit.org/show_bug.cgi?id=133602
13357        <rdar://problem/17212011>
13358
13359        Reviewed by David Kilzer.
13360
13361        * WebKit2.xcodeproj/project.pbxproj:
13362
133632014-06-06  Enrica Casucci  <enrica@apple.com>
13364
13365        REGRESSION (iOS WebKit2): backspace key does not repeat beyond a single word.
13366        https://bugs.webkit.org/show_bug.cgi?id=133593
13367        <rdar://problem/16352228>
13368
13369        Reviewed by Benjamin Poulain.
13370
13371        We need to provide a way for the keyboard layer to select from
13372        the current position to the beginning of the word moving backwards
13373        and implement the method to know when we have reached the beginning of the document.
13374
13375        * UIProcess/WebPageProxy.h:
13376        * UIProcess/ios/WKContentViewInteraction.mm:
13377        (-[WKContentView selectWordBackward]):
13378        (-[WKContentView _selectionAtDocumentStart]):
13379        * UIProcess/ios/WebPageProxyIOS.mm:
13380        (WebKit::WebPageProxy::selectWordBackward):
13381        * WebProcess/WebPage/WebPage.h:
13382        * WebProcess/WebPage/WebPage.messages.in:
13383        * WebProcess/WebPage/ios/WebPageIOS.mm:
13384        (WebKit::WebPage::selectWordBackward):
13385
133862014-06-06  Enrica Casucci  <enrica@apple.com>
13387
13388        Adopt the new UIAlertController API to replace UIActionSheet.
13389        https://bugs.webkit.org/show_bug.cgi?id=133582
13390        <rdar://problem/16845223>
13391
13392        Reviewed by Joseph Pecoraro.
13393
13394        UIActionSheet is deprecated. We need to move out action sheets
13395        implementation to UIAlertView.
13396
13397        * UIProcess/API/Cocoa/_WKElementAction.h:
13398        * UIProcess/API/Cocoa/_WKElementAction.mm:
13399        * UIProcess/ios/WKActionSheet.h:
13400        * UIProcess/ios/WKActionSheet.mm:
13401        (-[WKActionSheet presentSheetFromRect:]):
13402        (-[WKActionSheet doneWithSheet]):
13403        (-[WKActionSheet willRotate]):
13404        (-[WKActionSheet updateSheetPosition]):
13405        (-[WKActionSheet _didRotateAndLayout]):
13406        (-[WKActionSheet didRotate]):
13407        * UIProcess/ios/WKActionSheetAssistant.h:
13408        * UIProcess/ios/WKActionSheetAssistant.mm:
13409        (-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]):
13410        (-[WKActionSheetAssistant showImageSheet]):
13411        (-[WKActionSheetAssistant showLinkSheet]):
13412        (-[WKActionSheetAssistant showDataDetectorsSheet]):
13413        (-[WKActionSheetAssistant cleanupSheet]):
13414        (-[WKActionSheetAssistant actionSheet:clickedButtonAtIndex:]): Deleted.
13415        * UIProcess/ios/WKContentViewInteraction.mm:
13416        (-[WKContentView _longPressRecognized:]):
13417
134182014-06-06  Gavin Barraclough  <baraclough@apple.com>
13419
13420        Should boost ChildProcesses on iOS
13421        https://bugs.webkit.org/show_bug.cgi?id=133583
13422
13423        Reviewed by Sam Weinig.
13424
13425        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
13426        (WebKit::connectToService):
13427            - boost all child processes on iOS.
13428
134292014-06-06  Alexey Proskuryakov  <ap@apple.com>
13430
13431        Build fix after <http://trac.webkit.org/changeset/169655>.
13432
13433        The SPIs used do not exist on Mac, limit the code to iOS.
13434
13435        * Shared/Authentication/mac/AuthenticationManager.mac.mm:
13436        * Shared/WebCoreArgumentCoders.cpp:
13437        (IPC::ArgumentCoder<Credential>::encode):
13438        (IPC::ArgumentCoder<Credential>::decode):
13439        * Shared/cf/ArgumentCodersCF.cpp:
13440        (IPC::typeFromCFTypeRef):
13441        (IPC::encode):
13442        (IPC::decode):
13443        * Shared/cf/ArgumentCodersCF.h:
13444
134452014-06-06  Dan Bernstein  <mitz@apple.com>
13446
13447        <rdar://problem/17095692> [iOS] Client-certificate authentication isn’t working
13448        https://bugs.webkit.org/show_bug.cgi?id=133527
13449
13450        Reviewed by Darin Adler.
13451
13452        * Configurations/Network-iOS.entitlements: Enabled the Network process to access the keys
13453        needed to create identities to authenticate with.
13454
13455        * Shared/WebCoreArgumentCoders.cpp:
13456        (IPC::ArgumentCoder<Credential>::encode): Encode the credential type, and if it is a client
13457        certificate, encode the identity and the certificates.
13458        (IPC::ArgumentCoder<Credential>::decode): Decode the credential type. If it is a client
13459        certificate, decode the identity and the certificates and use the proper Credential
13460        constructor.
13461
13462        * Shared/cf/ArgumentCodersCF.cpp:
13463        (IPC::typeFromCFTypeRef): Handle SecIdentityRef.
13464        (IPC::encode): Encode an identity by encoding its certificate and a persistent reference to
13465        its key.
13466        (IPC::decode): Decode a certificate and a persistent reference to a key, find the key, and
13467        create an identity.
13468        * Shared/cf/ArgumentCodersCF.h:
13469
134702014-06-05  Benjamin Poulain  <bpoulain@apple.com>
13471
13472        [iOS][WK2] WebPage sometimes forces two resize events on animated resize
13473        https://bugs.webkit.org/show_bug.cgi?id=133534
13474
13475        Reviewed by Enrica Casucci.
13476
13477        When I updated the patch for resize events (r168556) to use the unobscured rect in scrollview coordinates,
13478        I forgot to update a snippet of code in dynamicViewportSizeUpdate(). Since that code was still using
13479        the scaled unobscured rect, there was sometimes a difference of 1 pixel between the size set by that
13480        call site and the others.
13481
13482        This path nukes the bad code and use the unobscured rect in scrollview coordinates given by the UIProcess.
13483
13484        * WebProcess/WebPage/ios/WebPageIOS.mm:
13485        (WebKit::WebPage::dynamicViewportSizeUpdate):
13486
134872014-06-05  Benjamin Poulain  <bpoulain@apple.com>
13488
13489        [iOS][WK2] Add device orientation
13490        https://bugs.webkit.org/show_bug.cgi?id=133530
13491        <rdar://problem/16680041>
13492
13493        Reviewed by Tim Horton.
13494
13495        Add device orientation for WebKit2.
13496
13497        For the public API, WKWebView get the updates through the notification UIWindowDidRotateNotification.
13498        We do not have any control over how the API is used, but we can expect the size will be updated before
13499        the end of rotation in most cases and the events should be sent in the right order.
13500
13501        For Safari, we use an override to support animated resize (and some tabs corner cases).
13502
13503        On the WebProcess side, we just get the new orientation directly or on DynamicViewportSizeUpdate.
13504
13505        * UIProcess/API/Cocoa/WKWebView.mm:
13506        (deviceOrientationForUIInterfaceOrientation):
13507        (deviceOrientation):
13508        (-[WKWebView initWithFrame:configuration:]):
13509        (-[WKWebView _windowDidRotate:]):
13510        (-[WKWebView _setInterfaceOrientationOverride:]):
13511        (-[WKWebView _interfaceOrientationOverride]):
13512        (-[WKWebView _beginAnimatedResizeWithUpdates:]):
13513        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
13514        * UIProcess/WebPageProxy.cpp:
13515        (WebKit::WebPageProxy::WebPageProxy):
13516        * UIProcess/WebPageProxy.h:
13517        (WebKit::WebPageProxy::deviceOrientation):
13518        * UIProcess/ios/WebPageProxyIOS.mm:
13519        (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
13520        (WebKit::WebPageProxy::setDeviceOrientation):
13521        * WebProcess/WebCoreSupport/WebChromeClient.h:
13522        * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
13523        (WebKit::WebChromeClient::deviceOrientation):
13524        * WebProcess/WebPage/WebPage.cpp:
13525        (WebKit::WebPage::WebPage):
13526        * WebProcess/WebPage/WebPage.h:
13527        (WebKit::WebPage::deviceOrientation):
13528        * WebProcess/WebPage/WebPage.messages.in:
13529        * WebProcess/WebPage/ios/WebPageIOS.mm:
13530        (WebKit::WebPage::setDeviceOrientation):
13531        (WebKit::WebPage::dynamicViewportSizeUpdate):
13532
135332014-06-05  Oliver Hunt  <oliver@apple.com>
13534
13535        Enable SANDBOX_EXTENSIONS build flag universally on cocoa
13536        https://bugs.webkit.org/show_bug.cgi?id=133556
13537
13538        Reviewed by Alexey Proskuryakov.
13539
13540        Remove unnecessary iOS exception.
13541
13542        * WebKit2Prefix.h:
13543
135442014-06-05  Alexey Proskuryakov  <ap@apple.com>
13545
13546        [Mac] Tweak plug-in sandbox profiles
13547        https://bugs.webkit.org/show_bug.cgi?id=133549
13548
13549        Fix <rdar://problem/17068055> and <rdar://problem/17148837>.
13550
13551        Reviewed by Sam Weinig and Simon Cooper.
13552
13553        * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
13554        * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb:
13555
135562014-06-05  Tanay C  <tanay.c@samsung.com>
13557
13558        Resolve compiler error (call of overloaded 'schedule' function is ambiguous) 
13559        https://bugs.webkit.org/show_bug.cgi?id=133467
13560
13561        Reviewed by Carlos Garcia Campos.
13562
13563        * Shared/Downloads/soup/DownloadSoup.cpp:
13564        (WebKit::DownloadClient::handleResponseLater): Explicitly casting second parameter to std::function<void()>
13565
135662014-06-04  Benjamin Poulain  <bpoulain@apple.com>
13567
13568        [iOS][WK2] Restore the visual scroll position instead of the dom scroll position when restoring states from the history
13569        https://bugs.webkit.org/show_bug.cgi?id=133490
13570
13571        Reviewed by Tim Horton.
13572
13573        Instead of restoring the scroll position, restore the visual position. This makes pages appear at the same position
13574        on screen ignoring changes in the obscured top inset.
13575
13576        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
13577        * WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
13578        (WebKit::WebFrameLoaderClient::saveViewStateToItem):
13579        (WebKit::WebFrameLoaderClient::restoreViewState):
13580        Save and restore userHasChangedPageScaleFactor to handle rescaling correctly.
13581        Limit the scale into valid viewport limits in case the viewport meta tag has changed or the device has rotated.
13582
13583        * WebProcess/WebPage/WebPage.cpp:
13584        (WebKit::WebPage::WebPage):
13585        * WebProcess/WebPage/WebPage.h:
13586        (WebKit::WebPage::userHasChangedPageScaleFactor):
13587        * WebProcess/WebPage/ios/WebPageIOS.mm:
13588        (WebKit::WebPage::restorePageState):
13589        (WebKit::WebPage::updateVisibleContentRects):
13590        In updateVisibleContentRects, we keep track or the current difference between the exposed rect and the unobscured rect.
13591        When restoring the page position, we use the current top inset and the saved exposed rect to restore the visual
13592        scroll position.
13593
13594        It is not very robust as it does not resolve races between the two processes, but that is not worse than what we is there now.
13595
135962014-06-03  Timothy Horton  <timothy_horton@apple.com>
13597
13598        WebKit2 View Gestures (Zoom): Can show unpainted regions when zoom-pinching-out
13599        https://bugs.webkit.org/show_bug.cgi?id=133472
13600        <rdar://problem/15686848>
13601
13602        Reviewed by Simon Fraser.
13603
13604        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
13605        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
13606        (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
13607        (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToLayers):
13608        (WebKit::TiledCoreAnimationDrawingArea::adjustTransientZoom):
13609        Use prepopulateRect() when zooming out to ensure that we have tiles for the current exposed area.
13610
13611        Factor applyTransientZoomToLayers out of adjustTransientZoom, so that
13612        flushLayers can call applyTransientZoomToLayers without ending up calling prepopulateRect()
13613        during layer flushing, which causes trouble.
13614
13615        It is OK to populate layers at the current scale even when zooming out, because the overdraw
13616        already covers most of the zoomed out area, and we're only adding a few more tiles at worst.
13617
136182014-06-03  Benjamin Poulain  <bpoulain@apple.com>
13619
13620        [iOS][WK2] Align the highlight rects with device pixels
13621        https://bugs.webkit.org/show_bug.cgi?id=133464
13622        <rdar://problem/16708861>
13623
13624        Reviewed by Enrica Casucci.
13625
13626        * UIProcess/ios/WKContentViewInteraction.mm:
13627        (-[WKContentView _showTapHighlightWithColor:WebCore::quads:WebCore::topLeftRadius:WebCore::topRightRadius:WebCore::bottomLeftRadius:WebCore::bottomRightRadius:WebCore::]):
13628
136292014-06-02  Enrica Casucci  <enrica@apple.com>
13630
13631        REGRESSION (iOS WebKit2): Single tap in pages with focus on load will clear the selection after the keyboard appears.
13632        https://bugs.webkit.org/show_bug.cgi?id=133465
13633        <rdar://problem/17059189>
13634
13635        Reviewed by Benjamin Poulain.
13636
13637        If a page focuses an input field on load we don't bring the keyboard on screen
13638        since the keyboard is only shown when the user interacts with the page with gestures.
13639        Still the WebProcess sets the focus and the selection according to the rules.
13640        We need to make sure the UI process doesn't accidentally clear this selection
13641        when the user starts the interaction with the page.
13642        This patch also improves the function that retrieves the autocorrection data
13643        to be returned to the keyboard, making sure that we always send back a reply
13644        even when we don't have a valid selection.
13645
13646        * UIProcess/ios/WKContentViewInteraction.mm:
13647        (-[WKContentView _singleTapCommited:]):
13648        * WebProcess/WebPage/ios/WebPageIOS.mm:
13649        (WebKit::WebPage::requestAutocorrectionData):
13650
136512014-05-31  Anders Carlsson  <andersca@apple.com>
13652
13653        Change DeferrableOneShotTimer to use std::function instead of being a class template
13654        https://bugs.webkit.org/show_bug.cgi?id=133423
13655
13656        Reviewed by Antti Koivisto.
13657
13658        * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
13659        (WebKit::NetworkProcess::platformSetCacheModel):
13660        * Shared/CacheModel.cpp:
13661        (WebKit::calculateCacheSizes):
13662        * Shared/CacheModel.h:
13663        * WebProcess/Plugins/PluginView.cpp:
13664        (WebKit::PluginView::pluginSnapshotTimerFired):
13665        * WebProcess/Plugins/PluginView.h:
13666        * WebProcess/cocoa/WebProcessCocoa.mm:
13667        (WebKit::WebProcess::platformSetCacheModel):
13668
136692014-06-02  Benjamin Poulain  <bpoulain@apple.com>
13670
13671        [iOS][WK2] Round the UIScrollView content size to device pixel
13672        https://bugs.webkit.org/show_bug.cgi?id=133417
13673        <rdar://problem/15922440>
13674
13675        Reviewed by Simon Fraser.
13676
13677        We should really have the scaled content size floored to device pixels, but that will be for another
13678        time.
13679        This patch ensure the content size as seen by the API is rounded to device pixels. The value is floored
13680        to avoid showing partial pixels when the content is stable.
13681
13682        * UIProcess/API/Cocoa/WKWebView.mm:
13683        (floorFloatToPixels):
13684        (roundScrollViewCountentSize):
13685        (-[WKWebView _setHasCustomContentView:loadedMIMEType:WTF::]):
13686        (-[WKWebView _didCommitLayerTree:WebKit::]):
13687        (-[WKWebView scrollView:contentSizeForZoomScale:withProposedSize:]):
13688        (-[WKWebView _beginAnimatedResizeWithUpdates:]):
13689        (-[WKWebView _endAnimatedResize]):
13690
136912014-06-02  Oliver Hunt  <oliver@apple.com>
13692
13693        Move ifdef to the right place.
13694
13695        RS=Enrica
13696
13697        * WebProcess/cocoa/WebProcessCocoa.mm:
13698        (WebKit::WebProcess::initializeSandbox):
13699
137002014-06-02  Gavin Barraclough  <barraclough@apple.com>
13701
13702        Set default voucher for XPC client processes
13703        https://bugs.webkit.org/show_bug.cgi?id=133458
13704
13705        Reviewed by Geoff Garen.
13706
13707        * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
13708        (WebKit::XPCServiceInitializer):
13709            - add voucher_replace_default_voucher.
13710        * config.h:
13711            - add HAVE_VOUCHERS.
13712
137132014-06-02  Jeremy Jones  <jeremyj@apple.com>
13714
13715        Send external playback properties to fullscreen.
13716        https://bugs.webkit.org/show_bug.cgi?id=133366
13717
13718        Reviewed by Simon Fraser.
13719
13720        Forward setExternalPlayback.
13721
13722        * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in: add setExternalPlaybackProperties
13723        * WebProcess/ios/WebVideoFullscreenManager.h: add setExternalPlaybackProperties
13724        * WebProcess/ios/WebVideoFullscreenManager.mm: add setExternalPlaybackProperties
13725        (WebKit::WebVideoFullscreenManager::setExternalPlaybackProperties): added
13726
137272014-06-02  Enrica Casucci  <enrica@apple.com>
13728
13729        Remove unintentional changes to WKContentViewInteraction.mm
13730        introduced in r169500.
13731
13732        Unreviewed.
13733
13734        * UIProcess/ios/WKContentViewInteraction.mm:
13735        (+[WKAutocorrectionContext autocorrectionContextWithData:markedText:selectedText:afterText:selectedRangeInMarkedText:]):
13736
137372014-06-02  Geoffrey Garen  <ggaren@apple.com>
13738
13739        Address some review comments on bug 133408
13740        https://bugs.webkit.org/show_bug.cgi?id=133410
13741
13742        Reviewed by Anders Carlsson.
13743
13744        * UIProcess/API/Cocoa/WKBackForwardListItem.h:
13745        * UIProcess/API/Cocoa/WKUIDelegate.h:
13746
137472014-06-02  Dan Bernstein  <mitz@apple.com>
13748
13749        [Cocoa] -[WKWebView activeURL] is unused
13750        https://bugs.webkit.org/show_bug.cgi?id=133440
13751
13752        Reviewed by Mark Rowe.
13753
13754        * UIProcess/API/Cocoa/WKWebView.mm:
13755        (-[WKWebView activeURL]): Deleted.
13756        * UIProcess/API/Cocoa/WKWebViewPrivate.h: Removed the property declaration.
13757
137582014-05-31  Oliver Hunt  <oliver@apple.com>
13759
13760        Restructure initial distinct sandbox profiles
13761        https://bugs.webkit.org/show_bug.cgi?id=133415
13762
13763        Reviewed by Alexey Proskuryakov.
13764
13765        Add support for manually instantiating the network and
13766        content process sandboxes, and add initial profiles.
13767        These profiles are completely generic so we can make sure
13768        nothing is broken by enabling them.
13769
13770        This also adds a target to the WebKit2 project to correctly
13771        process the profiles.
13772
13773        * DatabaseProcess/ios/DatabaseProcessIOS.mm:
13774        (WebKit::DatabaseProcess::initializeSandbox):
13775        * DatabaseProcess/ios/com.apple.WebKit.DatabasesIOS.sb: Removed.
13776        * NetworkProcess/ios/NetworkProcessIOS.mm:
13777        (WebKit::NetworkProcess::initializeSandbox):
13778        * Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb: Added.
13779        * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb: Added.
13780        * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: Added.
13781        * WebKit2.xcodeproj/project.pbxproj:
13782        * WebProcess/cocoa/WebProcessCocoa.mm:
13783        (WebKit::WebProcess::initializeSandbox):
13784
137852014-06-01  Sam Weinig  <sam@webkit.org>
13786
13787        [Cocoa] Add SPI to get a WebArchive of the WKWebView
13788        <rdar://problem/16748120>
13789        https://bugs.webkit.org/show_bug.cgi?id=133439
13790
13791        Reviewed by Anders Carlsson.
13792
13793        * UIProcess/API/Cocoa/WKWebView.mm:
13794        (-[WKWebView _getWebArchiveDataWithCompletionHandler:]):
13795        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
13796
137972014-05-31  Anders Carlsson  <andersca@apple.com>
13798
13799        Add a LazyNeverDestroyed class template and use it
13800        https://bugs.webkit.org/show_bug.cgi?id=133425
13801
13802        Reviewed by Darin Adler.
13803
13804        * Shared/mac/SecItemShim.cpp:
13805        (WebKit::responseMap):
13806
138072014-05-31  Timothy Horton  <timothy_horton@apple.com>
13808
13809        View snapshots are sometimes taken at the wrong scale
13810        https://bugs.webkit.org/show_bug.cgi?id=133419
13811        <rdar://problem/17087497>
13812
13813        Reviewed by Sam Weinig.
13814
13815        * UIProcess/API/mac/WKView.mm:
13816        (-[WKView _takeViewSnapshot]):
13817        Work around <rdar://problem/17084993> by re-requesting the snapshot at
13818        kCGWindowImageNominalResolution if it was captured at the wrong scale.
13819
138202014-05-31  Dan Bernstein  <mitz@apple.com>
13821
13822        [iOS] WebKit2.framework is unused
13823        https://bugs.webkit.org/show_bug.cgi?id=133424
13824
13825        Reviewed by Anders Carlsson.
13826
13827        * Configurations/WebKit2.xcconfig: Set SKIP_INSTALL to YES when targeting iOS.
13828
138292014-05-30  Benjamin Poulain  <bpoulain@apple.com>
13830
13831        [iOS][WK2] When a page does not finish rotation before the end of the animation, synchronize explicitely
13832        https://bugs.webkit.org/show_bug.cgi?id=133364
13833        <rdar://problem/17026333>
13834
13835        Reviewed by Sam Weinig.
13836
13837        When a page that does layout on rotation does not respond before the end of the animation, we end up with
13838        a completely inconsistent state on the UIProcess (because it is unware of the new states).
13839
13840        The perfect way to fix this would be to make animated resize transactional and have the WebProcess resolve
13841        conflicts. That is very complicated and the issue is uncommon, so this patch does not do that.
13842
13843        This patch force the synchronization whenever we finish the animation before we heard back
13844        from the WebProcess.
13845
13846        * UIProcess/API/Cocoa/WKWebView.mm:
13847        (-[WKWebView _endAnimatedResize]):
13848        * UIProcess/WebPageProxy.cpp:
13849        (WebKit::WebPageProxy::WebPageProxy):
13850        (WebKit::WebPageProxy::resetState):
13851        * UIProcess/WebPageProxy.h:
13852        * UIProcess/ios/WebPageProxyIOS.mm:
13853        (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
13854        (WebKit::WebPageProxy::synchronizeDynamicViewportUpdate):
13855        (WebKit::WebPageProxy::dynamicViewportUpdateChangedTarget):
13856        * WebProcess/WebPage/WebPage.h:
13857        * WebProcess/WebPage/WebPage.messages.in:
13858        * WebProcess/WebPage/ios/WebPageIOS.mm:
13859        (WebKit::WebPage::dynamicViewportSizeUpdate):
13860        (WebKit::WebPage::synchronizeDynamicViewportUpdate):
13861
138622014-05-30  Enrica Casucci  <enrica@apple.com>
13863
13864        REGRESSION (WebKit2): space space to insert period doesn't work in web forms.
13865        https://bugs.webkit.org/show_bug.cgi?id=133413
13866        <rdar://problem/16948333>
13867
13868        Reviewed by Benjamin Poulain.
13869
13870        iOS TextInput needs to know about content surrounding the
13871        current position while editing. Since we don't want to
13872        query this information synchronously when asked, we cache it
13873        as part of the EditorState. EditorState now contains a vector of
13874        three characters representing the content after, before and two
13875        position before the caret position.
13876        The patch also replaces all calls to plainText with plainTextReplacingNoBreakSpace
13877        to work well with iOS text input.
13878
13879        * Shared/EditorState.cpp:
13880        (WebKit::EditorState::encode):
13881        (WebKit::EditorState::decode):
13882        * Shared/EditorState.h:
13883        (WebKit::EditorState::EditorState):
13884        * UIProcess/ios/WKContentViewInteraction.mm:
13885        (-[WKContentView _characterInRelationToCaretSelection:]):
13886        (+[WKAutocorrectionContext autocorrectionContextWithData:markedText:selectedText:afterText:selectedRangeInMarkedText:]):
13887        * WebProcess/WebPage/WebPage.cpp:
13888        (WebKit::WebPage::editorState):
13889        * WebProcess/WebPage/ios/WebPageIOS.mm:
13890        (WebKit::WebPage::requestDictationContext):
13891        (WebKit::WebPage::replaceSelectedText):
13892        (WebKit::WebPage::replaceDictatedText):
13893        (WebKit::WebPage::requestAutocorrectionData):
13894        (WebKit::WebPage::syncApplyAutocorrection):
13895        (WebKit::computeAutocorrectionContext):
13896
138972014-05-30  Geoffrey Garen  <ggaren@apple.com>
13898
13899        Fixed the build by adding back a declaration I deleted by accident :(.
13900
13901        Unreviewed.
13902
13903        * UIProcess/API/Cocoa/WKWebView.h:
13904
139052014-05-30  Geoffrey Garen  <ggaren@apple.com>
13906
13907        Unreviewed, rolling in r169490.
13908
13909        I changed a non-ASCII apostrophe to ASCII.
13910
13911        Restored changeset:
13912
13913        "Some more copy-editing of the Modern WebKit headerdoc"
13914        https://bugs.webkit.org/show_bug.cgi?id=133408
13915        http://trac.webkit.org/changeset/169490
13916
13917        * UIProcess/API/Cocoa/WKBackForwardList.h:
13918        * UIProcess/API/Cocoa/WKBackForwardListItem.h:
13919        * UIProcess/API/Cocoa/WKFrameInfo.h:
13920        * UIProcess/API/Cocoa/WKNavigation.h:
13921        * UIProcess/API/Cocoa/WKNavigationAction.h:
13922        (NS_ENUM):
13923        * UIProcess/API/Cocoa/WKNavigationDelegate.h:
13924        (NS_ENUM):
13925        * UIProcess/API/Cocoa/WKNavigationResponse.h:
13926        * UIProcess/API/Cocoa/WKPreferences.h:
13927        * UIProcess/API/Cocoa/WKProcessPool.h:
13928        * UIProcess/API/Cocoa/WKScriptMessage.h:
13929        * UIProcess/API/Cocoa/WKScriptMessageHandler.h:
13930        * UIProcess/API/Cocoa/WKUIDelegate.h:
13931        * UIProcess/API/Cocoa/WKUserContentController.h:
13932        * UIProcess/API/Cocoa/WKWebView.h:
13933        * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
13934
139352014-05-30  Geoffrey Garen  <ggaren@apple.com>
13936
13937        Unreviewed, rolling out r169490.
13938
13939        It broke the build with a mysterious warning about ASCII.
13940
13941        Reverted changeset:
13942
13943        "Some more copy-editing of the Modern WebKit headerdoc"
13944        https://bugs.webkit.org/show_bug.cgi?id=133408
13945        http://trac.webkit.org/changeset/169490
13946
139472014-05-30  Geoffrey Garen  <ggaren@apple.com>
13948
13949        Some more copy-editing of the Modern WebKit headerdoc
13950        https://bugs.webkit.org/show_bug.cgi?id=133408
13951
13952        Reviewed by Beth Dakin.
13953
13954        A copy-editor suggested some edits to the headerdoc for clarity,
13955        style, and formatting.
13956
13957        I reviewed the edits and accepted about 80% of them.
13958
13959        * UIProcess/API/Cocoa/WKBackForwardList.h:
13960        * UIProcess/API/Cocoa/WKBackForwardListItem.h:
13961        * UIProcess/API/Cocoa/WKFrameInfo.h:
13962        * UIProcess/API/Cocoa/WKNavigation.h:
13963        * UIProcess/API/Cocoa/WKNavigationAction.h:
13964        (NS_ENUM):
13965        * UIProcess/API/Cocoa/WKNavigationDelegate.h:
13966        (NS_ENUM):
13967        * UIProcess/API/Cocoa/WKNavigationResponse.h:
13968        * UIProcess/API/Cocoa/WKPreferences.h:
13969        * UIProcess/API/Cocoa/WKProcessPool.h:
13970        * UIProcess/API/Cocoa/WKScriptMessage.h:
13971        * UIProcess/API/Cocoa/WKScriptMessageHandler.h:
13972        * UIProcess/API/Cocoa/WKUIDelegate.h:
13973        * UIProcess/API/Cocoa/WKUserContentController.h:
13974        * UIProcess/API/Cocoa/WKWebView.h:
13975        * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
13976
139772014-05-30  Timothy Horton  <timothy_horton@apple.com>
13978
13979        Crash loading skydrive.com (assertion under RemoteLayerTreeDisplayRefreshMonitor)
13980        https://bugs.webkit.org/show_bug.cgi?id=133370
13981        <rdar://problem/17061361>
13982
13983        Reviewed by Darin Adler.
13984
13985        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
13986        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
13987        (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
13988        (WebKit::RemoteLayerTreeDrawingArea::willDestroyDisplayRefreshMonitor):
13989        (WebKit::RemoteLayerTreeDrawingArea::didUpdate):
13990        Post-landing review comments from Darin noted that checking if the
13991        DrawingArea's m_displayRefreshMonitors contains the monitor in the
13992        list to notify is insufficient, because a new one could have been
13993        added with the same address. Instead, copy the HashSet, removing
13994        at random from it and firing didUpdateLayers, but *also* removing
13995        from it in the willDestroyDisplayRefreshMonitor callback.
13996        This is very similar to what DisplayRefreshMonitor itself does internally
13997        (we don't have to duplicate its code to avoid re-entry because it is
13998        already impossible to re-enter didUpdate).
13999
140002014-05-29  Anders Carlsson  <andersca@apple.com>
14001
14002        -[WKProcessPoolConfiguration setCachePartitionedURLSchemes:] should do a deep copy
14003        https://bugs.webkit.org/show_bug.cgi?id=133393
14004
14005        Reviewed by Dan Bernstein.
14006
14007        * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
14008        (-[_WKProcessPoolConfiguration setCachePartitionedURLSchemes:]):
14009
140102014-05-29  Mark Lam  <mark.lam@apple.com>
14011
14012        Restoring FloatingPointEnvironment initialization that was accidentally rolled out by r169176.
14013        <https://webkit.org/b/133389>
14014
14015        Rubber stamped by Oliver Hunt.
14016
14017        * Shared/ios/ChildProcessIOS.mm:
14018        (WebKit::ChildProcess::platformInitialize):
14019
140202014-05-29  Enrica Casucci  <enrica@apple.com>
14021
14022        Need to notify the keyboard about every KeyDown event.
14023        https://bugs.webkit.org/show_bug.cgi?id=133383
14024        <rdar://problem/16633975>
14025
14026        Reviewed by Benjamin Poulain.
14027        
14028        A key down will generate most of the time a call to the keyboard to add input or delete.
14029        But the event could be handled by JavaScript and its default prevented.
14030        We need to notify the keyboard in every case to allow updating its internal state about what has been typed.
14031
14032        * UIProcess/ios/PageClientImplIOS.mm:
14033        (WebKit::PageClientImpl::doneWithKeyEvent):
14034        * UIProcess/ios/WKContentViewInteraction.h:
14035        * UIProcess/ios/WKContentViewInteraction.mm:
14036        (-[WKContentView _didHandleKeyEvent:]):
14037
140382014-05-29  Matthew Hanson  <matthew_hanson@apple.com>
14039
14040        Roll out r169439. <rdar://problem/17069364>
14041
14042    2014-05-28  Gavin Barraclough  <baraclough@apple.com> 
14043
14044            viewStateDidChange should always fully update ViewState
14045            https://bugs.webkit.org/show_bug.cgi?id=133159
14046
14047            Reviewed by Anders Carlson.
14048
14049            Currently WebPageProxy::viewStateDidChange is passed a mask of bits to update.
14050
14051            This has the following negative consequences:
14052             – WKWebView implicitly requires more detailed knowledge of the internal implementation of the PageClient.
14053             – Updates may unnecessarily be split over multiple IPC messages.
14054             – In order to support partial updates we make multiple virtual function calls to PageClient, which then makes duplicate objc calls. 
14055
14056            Better to just always update the entire ViewState. 
14057
14058            * UIProcess/API/Cocoa/WKWebView.mm:
14059            (-[WKWebView didMoveToWindow]):
14060                - removed argument to viewStateDidChange.
14061            * UIProcess/API/gtk/PageClientImpl.cpp:
14062            (WebKit::PageClientImpl::viewState):
14063            (WebKit::PageClientImpl::isViewWindowActive): Deleted.
14064            (WebKit::PageClientImpl::isViewFocused): Deleted.
14065            (WebKit::PageClientImpl::isViewVisible): Deleted.
14066            (WebKit::PageClientImpl::isViewInWindow): Deleted.
14067            * UIProcess/API/gtk/PageClientImpl.h:
14068                - merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
14069            * UIProcess/API/mac/WKView.mm:
14070            (-[WKView becomeFirstResponder]):
14071            (-[WKView resignFirstResponder]):
14072            (-[WKView viewDidMoveToWindow]):
14073            (-[WKView _windowDidBecomeKey:]):
14074            (-[WKView _windowDidResignKey:]):
14075            (-[WKView _windowDidMiniaturize:]):
14076            (-[WKView _windowDidDeminiaturize:]):
14077            (-[WKView _windowDidOrderOffScreen:]):
14078            (-[WKView _windowDidOrderOnScreen:]):
14079            (-[WKView _windowDidChangeOcclusionState:]):
14080            (-[WKView viewDidHide]):
14081            (-[WKView viewDidUnhide]):
14082            (-[WKView _activeSpaceDidChange:]):
14083            (-[WKView _setThumbnailView:]):
14084            (-[WKView endDeferringViewInWindowChanges]):
14085            (-[WKView endDeferringViewInWindowChangesSync]):
14086                - removed argument to viewStateDidChange.
14087            * UIProcess/CoordinatedGraphics/WebView.cpp:
14088            (WebKit::WebView::viewState):
14089            (WebKit::WebView::isViewWindowActive): Deleted.
14090            (WebKit::WebView::isViewFocused): Deleted.
14091            (WebKit::WebView::isViewVisible): Deleted.
14092            (WebKit::WebView::isViewInWindow): Deleted.
14093            * UIProcess/CoordinatedGraphics/WebView.h:
14094                - merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
14095            * UIProcess/PageClient.h:
14096            (WebKit::PageClient::isViewVisibleOrOccluded): Deleted.
14097            (WebKit::PageClient::isVisuallyIdle): Deleted.
14098                - merged isViewVisibleOrOccluded/isVisuallyIdle to subclass viewState methods.
14099            * UIProcess/WebPageProxy.cpp:
14100            (WebKit::WebPageProxy::WebPageProxy):
14101            (WebKit::WebPageProxy::reattachToWebProcess):
14102                - updateViewState -> PageClient::viewState
14103            (WebKit::WebPageProxy::viewStateDidChange):
14104                - argument removed; updateViewState -> PageClient::viewState.
14105            (WebKit::WebPageProxy::setCursor):
14106                - call isViewWindowActive on WebPageProxy, rather than PageClient.
14107            (WebKit::WebPageProxy::updateBackingStoreDiscardableState):
14108                - call isViewWindowActive on WebPageProxy, rather than PageClient.
14109            (WebKit::WebPageProxy::updateViewState): Deleted.
14110                - removed - viewState method moved to PageClient.
14111            * UIProcess/WebPageProxy.h:
14112            (WebKit::WebPageProxy::isViewWindowActive):
14113                - added missing implementation.
14114            (WebKit::WebPageProxy::isViewVisible):
14115                - removed argument to viewStateDidChange.
14116            * UIProcess/WebProcessProxy.cpp:
14117            (WebKit::WebProcessProxy::windowServerConnectionStateChanged):
14118                - removed argument to viewStateDidChange.
14119            * UIProcess/ios/PageClientImplIOS.h:
14120            * UIProcess/ios/PageClientImplIOS.mm:
14121            (WebKit::PageClientImpl::viewState):
14122            (WebKit::PageClientImpl::isViewWindowActive): Deleted.
14123            (WebKit::PageClientImpl::isViewFocused): Deleted.
14124            (WebKit::PageClientImpl::isViewVisible): Deleted.
14125            (WebKit::PageClientImpl::isViewInWindow): Deleted.
14126            (WebKit::PageClientImpl::isViewVisibleOrOccluded): Deleted.
14127            (WebKit::PageClientImpl::isVisuallyIdle): Deleted.
14128                - merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
14129            * UIProcess/ios/WKContentView.mm:
14130            (-[WKContentView didMoveToWindow]):
14131            (-[WKContentView _applicationDidEnterBackground:]):
14132            (-[WKContentView _applicationWillEnterForeground:]):
14133                - removed argument to viewStateDidChange.
14134            * UIProcess/mac/PageClientImpl.h:
14135            * UIProcess/mac/PageClientImpl.mm:
14136            (WebKit::PageClientImpl::viewState):
14137            (WebKit::PageClientImpl::showCorrectionPanel):
14138            (WebKit::PageClientImpl::showDictationAlternativeUI):
14139            (WebKit::PageClientImpl::isViewWindowActive): Deleted.
14140            (WebKit::PageClientImpl::isViewFocused): Deleted.
14141            (WebKit::PageClientImpl::isViewVisibleOrOccluded): Deleted.
14142            (WebKit::PageClientImpl::isVisuallyIdle): Deleted.
14143                - merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
14144
141452014-05-29  Dan Bernstein  <mitz@apple.com>
14146
14147        [Cocoa] Can’t recover from subframe load errors
14148        https://bugs.webkit.org/show_bug.cgi?id=133385
14149
14150        Reviewed by Anders Carlsson.
14151
14152        * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new delegate method.
14153        * UIProcess/Cocoa/NavigationState.h: Added flag in m_navigationDelegateMethods struct.
14154        * UIProcess/Cocoa/NavigationState.mm:
14155        (WebKit::NavigationState::setNavigationDelegate): Initialize
14156        webViewNavigationDidFailProvisionalLoadInSubframeWithError flag in the delegate methods
14157        struct.
14158        (WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame): If the
14159        error occurred in a subframe, invoke the new delegate method.
14160
141612014-05-29  Geoffrey Garen  <ggaren@apple.com>
14162
14163        Added a missing @result to WKPreferences headerdoc
14164        https://bugs.webkit.org/show_bug.cgi?id=133381
14165
14166        Reviewed by Dan Bernstein.
14167
14168        * UIProcess/API/Cocoa/WKPreferences.h:
14169
141702014-05-29  Alexey Proskuryakov  <ap@apple.com>
14171
14172        [Mac] Always use plug-in sandbox with sandboxed clients
14173        https://bugs.webkit.org/show_bug.cgi?id=133358
14174        <rdar://problem/15637695>
14175
14176        Reviewed by Anders Carlsson.
14177
14178        * PluginProcess/mac/PluginProcessMac.mm: (WebKit::PluginProcess::initializeSandbox):
14179        Refuse to start if parent process is sandboxed, and plug-in process is not going to be.
14180        None of this should run in normal case, because there are also checks on UI process side.
14181        
14182        * Shared/Plugins/PluginModuleInfo.h:
14183        * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
14184        (WebKit::NetscapePluginModule::getPluginInfo):
14185        Added a member to PluginModuleInfo, telling whether the plug-in has a sandbox profile.
14186
14187        * Shared/Plugins/Netscape/mac/PluginInformationMac.mm:
14188        (WebKit::getPlatformPluginModuleInformation): Use the new PluginModuleInfo member,
14189        we no longer need to check the file system here.
14190
14191        * WebKit2.xcodeproj/project.pbxproj:
14192        * Shared/mac/SandboxUtilities.h: Added.
14193        * Shared/mac/SandboxUtilities.cpp: Added. (WebKit::processIsSandboxed):
14194        This code is simple, but include magic is not. Moved it to a separate file to
14195        avoid repeating.
14196
14197        * UIProcess/API/C/mac/WKContextPrivateMac.mm: Removed an unused include.
14198
14199        * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
14200        (WebKit::PluginInfoStore::shouldUsePlugin): Don't use unsandboxed plug-ins in
14201        sandboxed applications.
14202
14203        * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
14204        (WebKit::PluginProcessProxy::platformGetLaunchOptions): Don't ever pass disable-sandbox
14205        from sandboxed processes.
14206
14207        * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
14208        (WebKit::XPCServiceInitializerDelegate::isClientSandboxed):
14209        Use the new shared code in SandboxUtilities.h.
14210
142112014-05-29  Timothy Horton  <timothy_horton@apple.com>
14212
14213        Crash loading skydrive.com (assertion under RemoteLayerTreeDisplayRefreshMonitor)
14214        https://bugs.webkit.org/show_bug.cgi?id=133370
14215        <rdar://problem/17061361>
14216
14217        Reviewed by Anders Carlsson.
14218
14219        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
14220        (WebKit::RemoteLayerTreeDrawingArea::didUpdate):
14221        Copy the set of refresh monitors so that we don't try to mutate the list we're iterating,
14222        and don't try to fire refresh monitors that were removed in a previous iteration of the loop.
14223
142242014-05-29  Timothy Horton  <timothy_horton@apple.com>
14225
14226        REGRESSION (iOS WebKit2): Find-in-Page doesn't work in subframes
14227        https://bugs.webkit.org/show_bug.cgi?id=133372
14228        <rdar://problem/17045070>
14229
14230        Reviewed by Simon Fraser.
14231
14232        * WebProcess/WebPage/ios/FindControllerIOS.mm:
14233        (WebKit::FindController::willFindString):
14234        (WebKit::FindController::didFailToFindString):
14235        (WebKit::FindController::didHideFindIndicator):
14236        Flip ignoreCompositionSelectionChange and updateAppearanceEnabled on all
14237        frames, not just the main frame, because the found string can be in a subframe.
14238        Ideally we would flip it on/off for each frame as we move the selection between them,
14239        but would require a lot of work (and the overhead of touching each frame shouldn't be significant).
14240
142412014-05-29  Dan Bernstein  <mitz@apple.com>
14242
14243        WKBundleActivateMacFontAscentHack is unused
14244        https://bugs.webkit.org/show_bug.cgi?id=133379
14245
14246        Reviewed by Anders Carlsson.
14247
14248        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
14249        (WKBundleActivateMacFontAscentHack): Deleted.
14250        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
14251        * WebProcess/InjectedBundle/InjectedBundle.h:
14252        * WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp:
14253        (WebKit::InjectedBundle::activateMacFontAscentHack): Deleted.
14254        * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
14255        (WebKit::InjectedBundle::activateMacFontAscentHack): Deleted.
14256        * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
14257        (WebKit::InjectedBundle::activateMacFontAscentHack): Deleted.
14258
142592014-05-29  Alexey Proskuryakov  <ap@apple.com>
14260
14261        Add a sandbox profile for com.apple.appstore.CodeRedeemerNetscapePlugin
14262        https://bugs.webkit.org/show_bug.cgi?id=133360
14263
14264        Reviewed by Sam Weinig.
14265
14266        * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: Looks like
14267        anyone using camera would need access to CoreMedia preferences.
14268
14269        * Resources/PlugInSandboxProfiles/com.apple.appstore.CodeRedeemerNetscapePlugin.sb: Added.
14270
14271        * WebKit2.xcodeproj/project.pbxproj: Added the profile.
14272
142732014-05-29  Carlos Garcia Campos  <cgarcia@igalia.com>
14274
14275        [GTK] Add support for HiDPI icons
14276        https://bugs.webkit.org/show_bug.cgi?id=133377
14277
14278        Reviewed by Martin Robinson.
14279
14280        * PlatformGTK.cmake: Compile also the @2x versions for the builtin icons.
14281
142822014-05-29  Owen Taylor  <otaylor@redhat.com>
14283
14284        [GTK] Add HighDPI support for non-accelerated compositing contents
14285        https://bugs.webkit.org/show_bug.cgi?id=131562
14286
14287        Reviewed by Anders Carlsson.
14288
14289        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
14290        (deviceScaleFactorChanged): Added this callback to pass scale changes to the page proxy.
14291        (webkitWebViewBaseCreateWebPage): Attach the callback to the notify signal.
14292        * UIProcess/WebPageProxy.cpp:
14293        * UIProcess/cairo/BackingStoreCairo.cpp:
14294        (WebKit::WebPageProxy::setCustomDeviceScaleFactor): Do not set a
14295        custom device scale factor for cairo when it's not supported.
14296        (WebKit::createBackingStoreForGTK): Pass the scale factor to the WebCore backing store.
14297        (WebKit::BackingStore::incorporateUpdate): Ditto.
14298
142992014-05-28  Carlos Garcia Campos  <cgarcia@igalia.com>
14300
14301        [GTK] Use GMainLoopSource for idle and timeout sources in WebKit2
14302        https://bugs.webkit.org/show_bug.cgi?id=130081
14303
14304        Reviewed by Martin Robinson.
14305
14306        * Platform/WorkQueue.h:
14307        * Platform/gtk/WorkQueueGtk.cpp:
14308        (WorkQueue::registerSocketEventHandler): Stop pretending it's
14309        possible to register a socket event handler for more than one
14310        descriptor.
14311        (WorkQueue::unregisterSocketEventHandler):
14312        (WorkQueue::dispatch):
14313        (WorkQueue::dispatchAfter):
14314        * Shared/Downloads/soup/DownloadSoup.cpp:
14315        (WebKit::DownloadClient::DownloadClient):
14316        (WebKit::DownloadClient::~DownloadClient):
14317        (WebKit::DownloadClient::didReceiveData):
14318        (WebKit::DownloadClient::handleResponse):
14319        (WebKit::DownloadClient::handleResponseLater):
14320        * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
14321        (WebKit::PluginInfoCache::PluginInfoCache):
14322        (WebKit::PluginInfoCache::~PluginInfoCache):
14323        (WebKit::PluginInfoCache::saveToFile):
14324        (WebKit::PluginInfoCache::updatePluginInfo):
14325        * UIProcess/Plugins/gtk/PluginInfoCache.h:
14326        * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
14327        (WebKit::LayerTreeHostGtk::LayerTreeHostGtk):
14328        (WebKit::LayerTreeHostGtk::layerFlushTimerFired):
14329        (WebKit::LayerTreeHostGtk::scheduleLayerFlush):
14330        (WebKit::LayerTreeHostGtk::cancelPendingLayerFlush):
14331        * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
14332
143332014-05-28  Gavin Barraclough  <baraclough@apple.com>
14334
14335        viewStateDidChange should always fully update ViewState
14336        https://bugs.webkit.org/show_bug.cgi?id=133159
14337
14338        Reviewed by Anders Carlson.
14339
14340        Currently WebPageProxy::viewStateDidChange is passed a mask of bits to update.
14341
14342        This has the following negative consequences:
14343         – WKWebView implicitly requires more detailed knowledge of the internal implementation of the PageClient.
14344         – Updates may unnecessarily be split over multiple IPC messages.
14345         – In order to support partial updates we make multiple virtual function calls to PageClient, which then makes duplicate objc calls.
14346
14347        Better to just always update the entire ViewState.
14348
14349        * UIProcess/API/Cocoa/WKWebView.mm:
14350        (-[WKWebView didMoveToWindow]):
14351            - removed argument to viewStateDidChange.
14352        * UIProcess/API/gtk/PageClientImpl.cpp:
14353        (WebKit::PageClientImpl::viewState):
14354        (WebKit::PageClientImpl::isViewWindowActive): Deleted.
14355        (WebKit::PageClientImpl::isViewFocused): Deleted.
14356        (WebKit::PageClientImpl::isViewVisible): Deleted.
14357        (WebKit::PageClientImpl::isViewInWindow): Deleted.
14358        * UIProcess/API/gtk/PageClientImpl.h:
14359            - merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
14360        * UIProcess/API/mac/WKView.mm:
14361        (-[WKView becomeFirstResponder]):
14362        (-[WKView resignFirstResponder]):
14363        (-[WKView viewDidMoveToWindow]):
14364        (-[WKView _windowDidBecomeKey:]):
14365        (-[WKView _windowDidResignKey:]):
14366        (-[WKView _windowDidMiniaturize:]):
14367        (-[WKView _windowDidDeminiaturize:]):
14368        (-[WKView _windowDidOrderOffScreen:]):
14369        (-[WKView _windowDidOrderOnScreen:]):
14370        (-[WKView _windowDidChangeOcclusionState:]):
14371        (-[WKView viewDidHide]):
14372        (-[WKView viewDidUnhide]):
14373        (-[WKView _activeSpaceDidChange:]):
14374        (-[WKView _setThumbnailView:]):
14375        (-[WKView endDeferringViewInWindowChanges]):
14376        (-[WKView endDeferringViewInWindowChangesSync]):
14377            - removed argument to viewStateDidChange.
14378        * UIProcess/CoordinatedGraphics/WebView.cpp:
14379        (WebKit::WebView::viewState):
14380        (WebKit::WebView::isViewWindowActive): Deleted.
14381        (WebKit::WebView::isViewFocused): Deleted.
14382        (WebKit::WebView::isViewVisible): Deleted.
14383        (WebKit::WebView::isViewInWindow): Deleted.
14384        * UIProcess/CoordinatedGraphics/WebView.h:
14385            - merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
14386        * UIProcess/PageClient.h:
14387        (WebKit::PageClient::isViewVisibleOrOccluded): Deleted.
14388        (WebKit::PageClient::isVisuallyIdle): Deleted.
14389            - merged isViewVisibleOrOccluded/isVisuallyIdle to subclass viewState methods.
14390        * UIProcess/WebPageProxy.cpp:
14391        (WebKit::WebPageProxy::WebPageProxy):
14392        (WebKit::WebPageProxy::reattachToWebProcess):
14393            - updateViewState -> PageClient::viewState
14394        (WebKit::WebPageProxy::viewStateDidChange):
14395            - argument removed; updateViewState -> PageClient::viewState.
14396        (WebKit::WebPageProxy::setCursor):
14397            - call isViewWindowActive on WebPageProxy, rather than PageClient.
14398        (WebKit::WebPageProxy::updateBackingStoreDiscardableState):
14399            - call isViewWindowActive on WebPageProxy, rather than PageClient.
14400        (WebKit::WebPageProxy::updateViewState): Deleted.
14401            - removed - viewState method moved to PageClient.
14402        * UIProcess/WebPageProxy.h:
14403        (WebKit::WebPageProxy::isViewWindowActive):
14404            - added missing implementation.
14405        (WebKit::WebPageProxy::isViewVisible):
14406            - removed argument to viewStateDidChange.
14407        * UIProcess/WebProcessProxy.cpp:
14408        (WebKit::WebProcessProxy::windowServerConnectionStateChanged):
14409            - removed argument to viewStateDidChange.
14410        * UIProcess/ios/PageClientImplIOS.h:
14411        * UIProcess/ios/PageClientImplIOS.mm:
14412        (WebKit::PageClientImpl::viewState):
14413        (WebKit::PageClientImpl::isViewWindowActive): Deleted.
14414        (WebKit::PageClientImpl::isViewFocused): Deleted.
14415        (WebKit::PageClientImpl::isViewVisible): Deleted.
14416        (WebKit::PageClientImpl::isViewInWindow): Deleted.
14417        (WebKit::PageClientImpl::isViewVisibleOrOccluded): Deleted.
14418        (WebKit::PageClientImpl::isVisuallyIdle): Deleted.
14419            - merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
14420        * UIProcess/ios/WKContentView.mm:
14421        (-[WKContentView didMoveToWindow]):
14422        (-[WKContentView _applicationDidEnterBackground:]):
14423        (-[WKContentView _applicationWillEnterForeground:]):
14424            - removed argument to viewStateDidChange.
14425        * UIProcess/mac/PageClientImpl.h:
14426        * UIProcess/mac/PageClientImpl.mm:
14427        (WebKit::PageClientImpl::viewState):
14428        (WebKit::PageClientImpl::showCorrectionPanel):
14429        (WebKit::PageClientImpl::showDictationAlternativeUI):
14430        (WebKit::PageClientImpl::isViewWindowActive): Deleted.
14431        (WebKit::PageClientImpl::isViewFocused): Deleted.
14432        (WebKit::PageClientImpl::isViewVisibleOrOccluded): Deleted.
14433        (WebKit::PageClientImpl::isVisuallyIdle): Deleted.
14434            - merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
14435
144362014-05-28  Jeffrey Pfau  <jpfau@apple.com>
14437
14438        Add Obj-C API for cache partitioned URL schemes
14439        https://bugs.webkit.org/show_bug.cgi?id=133361
14440        <rdar://problem/17035415>
14441
14442        Reviewed by Anders Carlsson.
14443
14444        * UIProcess/API/Cocoa/WKProcessPool.mm:
14445        (-[WKProcessPool _initWithConfiguration:]):
14446        * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
14447        * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
14448        (-[_WKProcessPoolConfiguration cachePartitionedURLSchemes]):
14449        (-[_WKProcessPoolConfiguration setCachePartitionedURLSchemes:]):
14450        (-[_WKProcessPoolConfiguration copyWithZone:]):
14451
144522014-05-28  Sam Weinig  <sam@webkit.org>
14453
14454        [iOS WebKit2] Sometimes Safari gets into a limbo state after web process crash
14455        <rdar://problem/17029526>
14456        https://bugs.webkit.org/show_bug.cgi?id=133362
14457
14458        Reviewed by Dan Bernstein.
14459
14460        * UIProcess/WebPageProxy.cpp:
14461        (WebKit::WebPageProxy::WebPageProxy):
14462        Remove unnecessary initialization of a unique_ptr.
14463
14464        (WebKit::WebPageProxy::reattachToWebProcess):
14465        Move calls to update the view state and activity tokens to after we have swapped in the new process.
14466
14467        (WebKit::WebPageProxy::resetStateAfterProcessExited):
14468        Clear the activity token on process exit.
14469
144702014-05-28  Timothy Horton  <timothy_horton@apple.com>
14471
14472        Add WKWebView SPI to forcefully kill the associated Web process
14473        https://bugs.webkit.org/show_bug.cgi?id=133357
14474
14475        Reviewed by Anders Carlsson.
14476
14477        * UIProcess/API/Cocoa/WKWebView.mm:
14478        (-[WKWebView _killWebContentProcess]):
14479        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
14480
144812014-05-28  Dan Bernstein  <mitz@apple.com>
14482
14483        [Cocoa] Crash when trying to decode an instance of a class inheriting from WKObject
14484        https://bugs.webkit.org/show_bug.cgi?id=133355
14485
14486        Reviewed by Anders Carlsson.
14487
14488        * Shared/Cocoa/WKObject.mm:
14489        (-[WKObject classForCoder]): Override this NSObject method to forward to the
14490        target object.
14491        (-[WKObject classForKeyedArchiver]): Ditto.
14492
144932014-05-28  Simon Fraser  <simon.fraser@apple.com>
14494
14495        [iOS WK2] Improve behavior of position:fixed inside accelerated overflow-scroll
14496        https://bugs.webkit.org/show_bug.cgi?id=133352
14497
14498        Reviewed by Tim Horton.
14499
14500        Pass the correct delta down to descendant nodes.
14501
14502        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
14503        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateChildNodesAfterScroll):
14504
145052014-05-28  Andy Estes  <aestes@apple.com>
14506
14507        [iOS] REGRESSION (r168388): DidNotHandleTapAsClick not sent when commitPotentialTap() fails
14508        https://bugs.webkit.org/show_bug.cgi?id=133349
14509
14510        Reviewed by Benjamin Poulain.
14511
14512        WebPage::commitPotentialTap() fails when a recognized single tap cannot be sent as a synthetic click event.
14513        We should send WebPageProxy::DidNotHandleTapAsClick in these cases.
14514
14515        * WebProcess/WebPage/WebPage.h:
14516        * WebProcess/WebPage/ios/WebPageIOS.mm:
14517        (WebKit::WebPage::commitPotentialTap):
14518        (WebKit::WebPage::commitPotentialTapFailed):
14519
145202014-05-28  Commit Queue  <commit-queue@webkit.org>
14521
14522        Unreviewed, rolling out r169423.
14523        https://bugs.webkit.org/show_bug.cgi?id=133348
14524
14525        It makes a lot of tests crash in assert (Requested by KaL on
14526        #webkit).
14527
14528        Reverted changeset:
14529
14530        "[GTK] Use GMainLoopSource for idle and timeout sources in
14531        WebKit2"
14532        https://bugs.webkit.org/show_bug.cgi?id=130081
14533        http://trac.webkit.org/changeset/169423
14534
145352014-05-28  Carlos Garcia Campos  <cgarcia@igalia.com>
14536
14537        [GTK] Use GMainLoopSource for idle and timeout sources in WebKit2
14538        https://bugs.webkit.org/show_bug.cgi?id=130081
14539
14540        Reviewed by Martin Robinson.
14541
14542        * Platform/WorkQueue.h:
14543        * Platform/gtk/WorkQueueGtk.cpp:
14544        (WorkQueue::registerSocketEventHandler): Stop pretending it's
14545        possible to register a socket event handler for more than one
14546        descriptor.
14547        (WorkQueue::unregisterSocketEventHandler):
14548        (WorkQueue::dispatch):
14549        (WorkQueue::dispatchAfter):
14550        * Shared/Downloads/soup/DownloadSoup.cpp:
14551        (WebKit::DownloadClient::DownloadClient):
14552        (WebKit::DownloadClient::~DownloadClient):
14553        (WebKit::DownloadClient::didReceiveData):
14554        (WebKit::DownloadClient::handleResponse):
14555        (WebKit::DownloadClient::handleResponseLater):
14556        * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
14557        (WebKit::PluginInfoCache::PluginInfoCache):
14558        (WebKit::PluginInfoCache::~PluginInfoCache):
14559        (WebKit::PluginInfoCache::saveToFile):
14560        (WebKit::PluginInfoCache::updatePluginInfo):
14561        * UIProcess/Plugins/gtk/PluginInfoCache.h:
14562        * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
14563        (WebKit::LayerTreeHostGtk::LayerTreeHostGtk):
14564        (WebKit::LayerTreeHostGtk::layerFlushTimerFired):
14565        (WebKit::LayerTreeHostGtk::scheduleLayerFlush):
14566        (WebKit::LayerTreeHostGtk::cancelPendingLayerFlush):
14567        * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
14568
145692014-05-28  Dan Bernstein  <mitz@apple.com>
14570
14571        [Cocoa] Can't use bundle-defined classes for bundle parameters
14572        https://bugs.webkit.org/show_bug.cgi?id=133339
14573
14574        Reviewed by Anders Carlsson.
14575
14576        Ensure that bundle parameters are decoded only after the injected bundle is loaded.
14577
14578        * WebProcess/InjectedBundle/InjectedBundle.cpp:
14579        (WebKit::InjectedBundle::create): Moved the definition from the header to here, added the
14580        lagacy initializationUserData as a parameter, and made this function set the sandbox
14581        extension and load the bundle.
14582        (WebKit::InjectedBundle::InjectedBundle): Removed call to platformInitialize.
14583        * WebProcess/InjectedBundle/InjectedBundle.h:
14584        (WebKit::InjectedBundle::setSandboxExtension): Deleted.
14585        * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
14586        (WebKit::InjectedBundle::initialize): Renamed the load function to this, and added the
14587        creation parameters as a parameter. Moved code to initialize the bundle paramters from
14588        platformInitialize to here. Changed the class passed to -decodeObjectOfClass:forKey: to
14589        NSObject, to allow arbitrary types in the values, and added an assertion that the
14590        top-level object is a dictionary.
14591        (WebKit::InjectedBundle::platformInitialize): Deleted.
14592        * WebProcess/WebProcess.cpp:
14593        (WebKit::WebProcess::initializeWebProcess): Changed to pass the legacy initialization user
14594        data to InjectedBundle::create() and removed code to separately set the sandbox extension
14595        and load the bundle, which is now done by create().
14596
145972014-05-28  Alberto Garcia  <berto@igalia.com>
14598
14599        Unreviewed. Fix warning: unused parameter 'frame'
14600
14601        * WebProcess/WebPage/WebPage.cpp:
14602        (WebKit::WebPage::didFinishDocumentLoad):
14603
146042014-05-27  Simon Fraser  <simon.fraser@apple.com>
14605
14606        [iOS WK2] Fix behavior of position:sticky inside accelerated overflow-scroll
14607        https://bugs.webkit.org/show_bug.cgi?id=133334
14608        <rdar://problem/16462535>
14609
14610        Reviewed by Tim Horton.
14611
14612        When the scroll position changes in an accelerated overflow-scroll element, we have
14613        to update child nodes in the scrolling tree for position:sticky. That requires a
14614        more generic ability to update the scrolling tree after some arbitrary zoom or
14615        scroll. To do this, we need to know the current fixed position rect, rather than
14616        having it passed in.
14617        
14618        So make the fixed position rect available from ScrollingTree, and make it possible
14619        to get the current scrollPosition() from any ScrollingTreeScrollingNode.
14620        
14621        Also, implement updateLayersAfterDelegatedScroll() in ScrollingTreeOverflowScrollingNodeIOS,
14622        and have it update descendant layers.
14623        
14624        Finally, fix ScrollingTreeOverflowScrollingNode to use the correct rectangle for its
14625        constraints math, using the scroll position of the parent node if appropriate.
14626
14627        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
14628        * UIProcess/Scrolling/RemoteScrollingTree.cpp:
14629        (WebKit::RemoteScrollingTree::fixedPositionRect):
14630        * UIProcess/Scrolling/RemoteScrollingTree.h:
14631        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
14632        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
14633        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateLayersAfterDelegatedScroll):
14634        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateChildNodesAfterScroll):
14635        * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
14636        (WebKit::RemoteScrollingCoordinatorProxy::customFixedPositionRect):
14637
146382014-05-27  Simon Fraser  <simon.fraser@apple.com>
14639
14640        Do some renaming in the scrolling tree
14641        https://bugs.webkit.org/show_bug.cgi?id=133333
14642
14643        Reviewed by Tim Horton.
14644        
14645        Rename ScrollingTreeNode::parentScrollPositionDidChange() to updateLayersAfterAncestorChange()
14646        since this goes deep and to indicate that it's about layer updating.
14647        
14648        Also rename the "viewportRect" parameter to "fixedPositionRect", since on iOS
14649        this is the custom fixed-position rect that changes on zooming.
14650
14651        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
14652        (WebKit::RemoteScrollingCoordinatorProxy::viewportChangedViaDelegatedScrolling):
14653        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
14654        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
14655        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateLayersAfterViewportChange):
14656
146572014-05-27  Geoffrey Garen  <ggaren@apple.com>
14658
14659        Some proof-reading of the WebKit2 API headerdoc
14660        https://bugs.webkit.org/show_bug.cgi?id=133328
14661
14662        Reviewed by Anders Carlsson.
14663
14664        Consistently say "item" to reference back-forward list items.
14665
14666        Consistently say "webpage" instead of "page" or "web page".
14667
14668        Consistently say "navigation" instead of "load".
14669
14670        Plus a few fix-ups for run-on sentences, mismatched verb tense, and
14671        mismatched singular vs plural.
14672
14673        * UIProcess/API/Cocoa/WKBackForwardList.h:
14674        * UIProcess/API/Cocoa/WKBackForwardListItem.h:
14675        * UIProcess/API/Cocoa/WKBrowsingContextController.h:
14676        * UIProcess/API/Cocoa/WKBrowsingContextGroup.h:
14677        * UIProcess/API/Cocoa/WKFrameInfo.h:
14678        * UIProcess/API/Cocoa/WKNavigation.h:
14679        * UIProcess/API/Cocoa/WKNavigationAction.h:
14680        * UIProcess/API/Cocoa/WKNavigationDelegate.h:
14681        * UIProcess/API/Cocoa/WKProcessPool.h:
14682        * UIProcess/API/Cocoa/WKUIDelegate.h:
14683        * UIProcess/API/Cocoa/WKWebView.h:
14684
146852014-05-27  Timothy Horton  <timothy_horton@apple.com>
14686
14687        [wk2] PDFPlugin snapshots are misplaced
14688        https://bugs.webkit.org/show_bug.cgi?id=133323
14689
14690        Reviewed by Simon Fraser.
14691
14692        * WebProcess/Plugins/PDF/PDFPlugin.mm:
14693        (WebKit::PDFPlugin::paintControlForLayerInContext):
14694        (WebKit::PDFPlugin::snapshot):
14695        Include the scroll offset in the snapshot translation,
14696        and use the whole document size instead of just the view size.
14697
146982014-05-27  Sam Weinig  <sam@webkit.org>
14699
14700        [WebKit2] Move WebPreferences macro definitions and key names into their own files
14701        https://bugs.webkit.org/show_bug.cgi?id=133315
14702
14703        Reviewed by Anders Carlsson.
14704
14705        * CMakeLists.txt:
14706        * Shared/WebPreferencesDefinitions.h: Copied from Source/WebKit2/Shared/WebPreferencesStore.h.
14707        * Shared/WebPreferencesKeys.cpp: Copied from Source/WebKit2/Shared/WebPreferencesStore.cpp.
14708        * Shared/WebPreferencesKeys.h: Copied from Source/WebKit2/Shared/WebPreferencesStore.h.
14709        * Shared/WebPreferencesStore.cpp:
14710        * Shared/WebPreferencesStore.h:
14711        * UIProcess/WebPreferences.cpp:
14712        * UIProcess/WebPreferences.h:
14713        * UIProcess/mac/WebContextMac.mm:
14714        * UIProcess/mac/WebPreferencesMac.mm:
14715        * UIProcess/mac/WebProcessProxyMac.mm:
14716        * WebKit2.xcodeproj/project.pbxproj:
14717        * WebProcess/InjectedBundle/InjectedBundle.cpp:
14718        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
14719        * WebProcess/WebPage/WebPage.cpp:
14720        * WebProcess/WebProcess.cpp:
14721
147222014-05-27  Gavin Barraclough  <baraclough@apple.com>
14723
14724        Add UI process watchdog on iOS to ensure WebProcess connections close
14725        https://bugs.webkit.org/show_bug.cgi?id=133200
14726        <rdar://problem/16997983>
14727
14728        Mountain Lion build fix
14729
14730        * Platform/IPC/mac/ConnectionMac.mm:
14731        (IPC::ConnectionTerminationWatchdog::watchdogTimerFired):
14732
147332014-05-27  Gavin Barraclough  <baraclough@apple.com>
14734
14735        importance_assertion -> denap_assertion
14736        https://bugs.webkit.org/show_bug.cgi?id=133294
14737
14738        iOS build fix
14739
14740        * Platform/IPC/mac/ConnectionMac.mm:
14741        (IPC::Connection::open):
14742
147432014-05-27  Gavin Barraclough  <baraclough@apple.com>
14744
14745        Add UI process watchdog on iOS to ensure WebProcess connections close
14746        https://bugs.webkit.org/show_bug.cgi?id=133200
14747        <rdar://problem/16997983>
14748
14749        Reviewed by Darin Adler.
14750
14751        When the WebProcessProxy wants to disconnect from a WebContent process it just drops the connection,
14752        and hopes the connection closes. There is a watchdog thread in the ChildProcess to try to ensure this
14753        happens.
14754
14755        On iOS the process may not be runnable at the time, preventing termination. Instead add a watchdog in
14756        the UI process to make the process runnable, and to terminate if it doesn't quit in a timely fashion.
14757
14758        * Platform/IPC/Connection.h:
14759            - added terminateSoon.
14760        * Platform/IPC/mac/ConnectionMac.mm:
14761        (IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog):
14762            - take an assertion to make the process runnable, and start a watchdog timer.
14763        (IPC::ConnectionTerminationWatchdog::watchdogTimerFired):
14764            - if the process hasn't quit by the timer the watchdog fires, kill it.
14765        (IPC::Connection::terminateSoon):
14766            - create a ConnectionTerminationWatchdog.
14767        * UIProcess/WebProcessProxy.cpp:
14768        (WebKit::WebProcessProxy::removeWebPage):
14769            - when disconnecting from a process, first tell it to terminateSoon.
14770
147712014-05-26  Gavin Barraclough  <barraclough@apple.com>
14772
14773        importance_assertion -> denap_assertion
14774        https://bugs.webkit.org/show_bug.cgi?id=133294
14775
14776        Reviewed by Sam Weinig.
14777
14778        Update in accordance with API change. The importance assertion is used on
14779        Mavericks & newer to ensure the WebContent process wakes from AppNap.
14780
14781        * Platform/IPC/mac/ConnectionMac.mm:
14782        (IPC::Connection::open):
14783            - MACH_PORT_IMPORTANCE_RECEIVER -> MACH_PORT_DENAP_RECEIVER
14784        * Platform/IPC/mac/ImportanceAssertion.h:
14785        (IPC::ImportanceAssertion::ImportanceAssertion):
14786        (IPC::ImportanceAssertion::~ImportanceAssertion):
14787            - proc_importance_assertion -> proc_denap_assertion
14788
147892014-05-27  Jessie Berlin  <jberlin@apple.com>
14790
14791        Revert r169362 since it broke the ML build.
14792
14793        * Platform/IPC/Connection.h:
14794        * Platform/IPC/mac/ConnectionMac.mm:
14795        (IPC::ConnectionTerminationWatchdog::createConnectionTerminationWatchdog): Deleted.
14796        (IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog): Deleted.
14797        (IPC::ConnectionTerminationWatchdog::watchdogTimerFired): Deleted.
14798        (IPC::Connection::terminateSoon): Deleted.
14799        * UIProcess/WebProcessProxy.cpp:
14800        (WebKit::WebProcessProxy::removeWebPage):
14801
148022014-05-27  Jon Lee  <jonlee@apple.com>
14803
14804        Update ENABLE(MEDIA_SOURCE) on Mac
14805        https://bugs.webkit.org/show_bug.cgi?id=133141
14806
14807        Reviewed by Darin Adler.
14808
14809        * Configurations/FeatureDefines.xcconfig:
14810
148112014-05-27  Tibor Meszaros  <tmeszaros.u-szeged@partner.samsung.com>
14812
14813        Remove BLOB guards
14814        https://bugs.webkit.org/show_bug.cgi?id=132863
14815
14816        Reviewed by Csaba Osztrogonác.
14817
14818        * Configurations/FeatureDefines.xcconfig:
14819        * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
14820        * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
14821        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
14822        (WebKit::NetworkConnectionToWebProcess::didClose):
14823        (WebKit::NetworkConnectionToWebProcess::blobSize):
14824        * NetworkProcess/NetworkConnectionToWebProcess.h:
14825        * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
14826        * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
14827        * NetworkProcess/NetworkProcessPlatformStrategies.h:
14828        * NetworkProcess/NetworkResourceLoader.cpp:
14829        (WebKit::NetworkResourceLoader::NetworkResourceLoader):
14830        * WebProcess/FileAPI/BlobRegistryProxy.cpp:
14831        * WebProcess/FileAPI/BlobRegistryProxy.h:
14832        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
14833        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
14834        * WebProcess/WebPage/WebPage.cpp:
14835        (WebKit::WebPage::canHandleRequest):
14836
148372014-05-26  Tim Horton  <timothy_horton@apple.com>
14838
14839        [wk2] RemoteLayerBackingStore front buffers should be purgeable when unparented
14840        https://bugs.webkit.org/show_bug.cgi?id=133020
14841        <rdar://problem/16521736>
14842
14843        Reviewed by Simon Fraser.
14844
14845        * Shared/mac/RemoteLayerBackingStore.mm:
14846        (WebKit::RemoteLayerBackingStore::display):
14847        Let the context know whenever a RemoteLayerBackingStore is displayed, so that
14848        RemoteLayerBackingStoreCollection can (if needed) note that the backing store
14849        is active once again (because we only display parented backing store).
14850
14851        (WebKit::RemoteLayerBackingStore::setBufferVolatility):
14852        Ensure that we never have live contexts attached to any buffers when
14853        marking them volatile, because checking isInUse() with live contexts is futile.
14854
14855        * Shared/mac/RemoteLayerBackingStoreCollection.h:
14856        * Shared/mac/RemoteLayerBackingStoreCollection.mm:
14857        (WebKit::RemoteLayerBackingStoreCollection::RemoteLayerBackingStoreCollection):
14858        (WebKit::RemoteLayerBackingStoreCollection::willFlushLayers):
14859        (WebKit::RemoteLayerBackingStoreCollection::willCommitLayerTree):
14860        (WebKit::RemoteLayerBackingStoreCollection::didFlushLayers):
14861        (WebKit::RemoteLayerBackingStoreCollection::backingStoreWillBeDestroyed):
14862        (WebKit::RemoteLayerBackingStoreCollection::backingStoreWillBeDisplayed):
14863        (WebKit::RemoteLayerBackingStoreCollection::markBackingStoreVolatileImmediately):
14864        (WebKit::RemoteLayerBackingStoreCollection::markBackingStoreVolatile):
14865        (WebKit::RemoteLayerBackingStoreCollection::backingStoreBecameUnreachable):
14866        (WebKit::RemoteLayerBackingStoreCollection::volatilityTimerFired):
14867        (WebKit::RemoteLayerBackingStoreCollection::scheduleVolatilityTimer):
14868        (WebKit::RemoteLayerBackingStoreCollection::purgeabilityTimerFired): Deleted.
14869        (WebKit::RemoteLayerBackingStoreCollection::schedulePurgeabilityTimer): Deleted.
14870        Rename purgeable->volatile for accuracy.
14871        Keep track of two sets of backing store: those which are active/parented, and
14872        those which are not. Backing store is moved to the inactive set after building
14873        the transaction in which its owning layer is unparented.
14874        When backing store is unparented, try to mark it volatile immediately. Also,
14875        mark the backing store property as dirty on the owning layer so that when
14876        said layer is reparented, we encode the backing store in the commit that reparents it,
14877        as the UI process will throw away its reference to the backing store when
14878        the layer is unparented. Mark the front buffers of unparented layers as volatile,
14879        in addition to the others.
14880
14881        * Shared/mac/RemoteLayerTreeTransaction.h:
14882        (WebKit::RemoteLayerTreeTransaction::layerIDsWithNewlyUnreachableBackingStore):
14883        * Shared/mac/RemoteLayerTreeTransaction.mm:
14884        (WebKit::RemoteLayerTreeTransaction::encode):
14885        (WebKit::RemoteLayerTreeTransaction::decode):
14886        (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore):
14887        Include the list of layers (by ID) with backing store which just became unreachable in the transaction.
14888
14889        * UIProcess/mac/RemoteLayerTreeHost.mm:
14890        (WebKit::RemoteLayerTreeHost::updateLayerTree):
14891        Clear the contents of layers which now have unreachable backing store.
14892        Otherwise, the UI process would hold a 'use' on the IOSurface, and prevent
14893        the Web process from marking it volatile.
14894
14895        * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
14896        * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
14897        (WebKit::RemoteLayerTreeContext::backingStoreWillBeDisplayed):
14898        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
14899        (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
14900        Give RemoteLayerBackingStoreCollection a shot at the RemoteLayerTreeTransaction,
14901        so that it can fill in layerIDsWithNewlyUnreachableBackingStore.
14902        Also, let it know when the flush begins and ends, so that it can keep track
14903        of which layers were reached in the flush.
14904
149052014-05-26  Shivakumar JM  <shiva.jm@samsung.com>
14906
14907        [EFL][WK2] Fix EWK2BackForwardListTest test fails.
14908        https://bugs.webkit.org/show_bug.cgi?id=133171
14909
14910        Reviewed by Gyuyoung Kim.
14911
14912        Use local test html pages instead of EWK2UnitTestServer, call ewk_view_url_set() to load test html pages.
14913        Since even after setting no_proxy="localhost,127.0.0.1", still test server was unable to load the test 
14914        html pages for ewk2_back_forward_list tests, so changed to use local html pages.
14915
14916        * UIProcess/API/efl/tests/test_ewk2_back_forward_list.cpp:
14917        (TEST_F):
14918
149192014-05-26  Shivakumar JM  <shiva.jm@samsung.com>
14920
14921        [EFL][WK2] Fix code style check errors in EFL API tests.
14922        https://bugs.webkit.org/show_bug.cgi?id=133170
14923
14924        Reviewed by Gyuyoung Kim.
14925
14926        Omit int when using unsigned modifier, as per coding style rules.
14927
14928        * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
14929        (EWK2UnitTest::EWK2UnitTestBase::SetUp):
14930        * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h:
14931        (EWK2UnitTest::EWK2UnitTestEnvironment::defaultWidth):
14932        (EWK2UnitTest::EWK2UnitTestEnvironment::defaultHeight):
14933
149342014-05-22  Gavin Barraclough  <baraclough@apple.com>
14935
14936        Add UI process watchdog on iOS to ensure WebProcess connections close
14937        https://bugs.webkit.org/show_bug.cgi?id=133200
14938        <rdar://problem/16997983>
14939
14940        Reviewed by Darin Adler.
14941
14942        When the WebProcessProxy wants to disconnect from a WebContent process it just drops the connection,
14943        and hopes the connection closes. There is a watchdog thread in the ChildProcess to try to ensure this
14944        happens.
14945
14946        On iOS the process may not be runnable at the time, preventing termination. Instead add a watchdog in
14947        the UI process to make the process runnable, and to terminate if it doesn't quit in a timely fashion.
14948
14949        * Platform/IPC/Connection.h:
14950            - added terminateSoon.
14951        * Platform/IPC/mac/ConnectionMac.mm:
14952        (IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog):
14953            - take an assertion to make the process runnable, and start a watchdog timer.
14954        (IPC::ConnectionTerminationWatchdog::watchdogTimerFired):
14955            - if the process hasn't quit by the timer the watchdog fires, kill it.
14956        (IPC::Connection::terminateSoon):
14957            - create a ConnectionTerminationWatchdog.
14958        * UIProcess/WebProcessProxy.cpp:
14959        (WebKit::WebProcessProxy::removeWebPage):
14960            - when disconnecting from a process, first tell it to terminateSoon.
14961
149622014-05-26  Sam Weinig  <sam@webkit.org>
14963
14964        [WebKit2] Add better default preferences while keeping backward compatibility for the C-SPI
14965        https://bugs.webkit.org/show_bug.cgi?id=133289
14966
14967        Reviewed by Anders Carlsson.
14968
14969        * Shared/WebPreferencesStore.h:
14970        Change a few defaults:
14971        - PluginsEnabled -> false
14972        - JavaEnabled -> false
14973        - JavaEnabledForLocalFiles -> false
14974        - StorageBlockingPolicy -> BlockThirdPartyStorage
14975
14976        * UIProcess/API/C/WKPreferences.cpp:
14977        (WKPreferencesCreate):
14978        (WKPreferencesCreateWithIdentifier):
14979        * UIProcess/WebPageGroup.cpp:
14980        (WebKit::WebPageGroup::WebPageGroup):
14981        Switch to using WebPreferences::createWithLegacyDefaults().
14982
14983        * UIProcess/WebPreferences.cpp:
14984        (WebKit::WebPreferences::create):
14985        (WebKit::WebPreferences::createWithLegacyDefaults):
14986        * UIProcess/WebPreferences.h:
14987        Move create functions to the cpp file and add createWithLegacyDefaults() which keeps
14988        the old defaults;
14989
14990        * UIProcess/API/C/WKPreferencesRef.h:
14991        Fix the comment.
14992
14993        * UIProcess/API/Cocoa/WKPreferences.h:
14994        Update the comment to reflect the new defaults.
14995
14996        * WebProcess/WebPage/WebPage.cpp:
14997        (WebKit::WebPage::updatePreferences):
14998        Unconditionally set setShouldDispatchJavaScriptWindowOnErrorEvents() to true. This setting only
14999        exists for legacy WebKit.
15000
150012014-05-26  Dan Bernstein  <mitz@apple.com>
15002
15003        [Cocoa] Rewrite WK_DESIGNATED_INITIALIZER in installed headers
15004        https://bugs.webkit.org/show_bug.cgi?id=133290
15005
15006        Reviewed by Anders Carlsson.
15007
15008        * Shared/API/Cocoa/WKFoundation.h: When WK_API_AVAILABILITY_ENABLED is defined, don’t
15009        provide definitions of WK_DESIGNATED_INITIALIZER and WK_UNAVAILABLE, since those macros will
15010        be rewritten out of the headers. When WK_API_AVAILABILITY_ENABLED isn’t defined, provide
15011        definitions of the other two macros as appropriate for the target OS.
15012        * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: Removed WK_DESIGNATED_INITIALIZER from a
15013        category method declaration.
15014        * UIProcess/API/Cocoa/WKWebView.h: Mark the superclass designated initializer
15015        -initWithCoder: as unavailable.
15016        * UIProcess/API/Cocoa/WKWebView.mm:
15017        (-[WKWebView initWithCoder:]): Override this designated initializer of the superclass by
15018        returning nil.
15019        * mac/rewrite-availability-macros.sh: Rewrite WK_DESIGNATED_INITIALIZER to
15020        NS_DESIGNATED_INITIALIZER and WK_UNAVAILABLE to NS_UNAVAILABLE. Also make sure to process
15021        all headers if the script has changed since the last time it was run.
15022
150232014-05-26  Commit Queue  <commit-queue@webkit.org>
15024
15025        Unreviewed, rolling out r169122.
15026        https://bugs.webkit.org/show_bug.cgi?id=133288
15027
15028        Broke CJK font fallback (Requested by ap on #webkit).
15029
15030        Reverted changeset:
15031
15032        "[Mac] WebProcess doesn't follow localization of UI process
15033        when run as a service"
15034        https://bugs.webkit.org/show_bug.cgi?id=133126
15035        http://trac.webkit.org/changeset/169122
15036
150372014-05-26  Anders Carlsson  <andersca@apple.com>
15038
15039        Convert a couple of loops over to range-based for
15040        https://bugs.webkit.org/show_bug.cgi?id=133287
15041
15042        Reviewed by Simon Fraser.
15043
15044        * UIProcess/Plugins/PluginInfoStore.cpp:
15045        (WebKit::PluginInfoStore::findPluginForMIMEType):
15046        (WebKit::PluginInfoStore::findPluginForExtension):
15047        (WebKit::PluginInfoStore::infoForPluginWithPath):
15048        * UIProcess/Plugins/mac/PluginProcessManagerMac.mm:
15049        (WebKit::PluginProcessManager::setProcessSuppressionEnabled):
15050
150512014-05-26  Carlos Garcia Campos  <cgarcia@igalia.com>
15052
15053        [GTK] WebProcess leaked when closing pages with network process enabled
15054        https://bugs.webkit.org/show_bug.cgi?id=129684
15055
15056        Reviewed by Anders Carlsson.
15057
15058        The problem is that the web process is not notified when the UI
15059        process closes the connection, because when close() is called on
15060        the socket by the UI process, the socket is shared by another web
15061        process launched later, preventing the connection from being
15062        shut down. We need to set the CLOEXEC flag on the sockets file
15063        descriptor to make sure they are not exposed to other processes.
15064
15065        * Platform/IPC/Connection.h: Add ConnectionOptions parameter to
15066        createPlatformConnection() with a default value compatible with
15067        existing callers.
15068        * Platform/IPC/unix/ConnectionUnix.cpp:
15069        (IPC::Connection::createPlatformConnection): Set the CLOEXEC flag
15070        on the client and server socket file descriptors depending on the
15071        options passed.
15072        * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
15073        (WebKit::ProcessLauncher::launchProcess): Use
15074        IPC::Connection::createPlatformConnection() instead of
15075        socketpair() directly, setting the CLOEXEC flag on the server
15076        before spawning the new process and on the client right after
15077        spawning the new process.
15078
150792014-05-25  Anders Carlsson  <andersca@apple.com>
15080
15081        Initialize WKWebViewConfiguration ivars lazily
15082        https://bugs.webkit.org/show_bug.cgi?id=133270
15083        <rdar://problem/17027606>
15084
15085        Reviewed by Sam Weinig.
15086
15087        Create a LazyInitialized class template and use it to lazily initialize WKWebViewConfiguration properties.
15088
15089        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
15090        (LazyInitialized::get):
15091        Initialize m_value with the given function if it hasn't been initialized already.
15092
15093        (LazyInitialized::set):
15094        Update m_value and set m_isInitialized to true.
15095
15096        (LazyInitialized::peek):
15097        Return m_value without initializing it.
15098
15099        (-[WKWebViewConfiguration description]):
15100        Use getters so we'll initialize variables if needed.
15101
15102        (-[WKWebViewConfiguration copyWithZone:]):
15103        Ditto.
15104
15105        (-[WKWebViewConfiguration processPool]):
15106        (-[WKWebViewConfiguration setProcessPool:]):
15107        (-[WKWebViewConfiguration preferences]):
15108        (-[WKWebViewConfiguration setPreferences:]):
15109        (-[WKWebViewConfiguration userContentController]):
15110        (-[WKWebViewConfiguration setUserContentController:]):
15111        (-[WKWebViewConfiguration _visitedLinkProvider]):
15112        (-[WKWebViewConfiguration _setVisitedLinkProvider:]):
15113        (-[WKWebViewConfiguration _websiteDataStore]):
15114        (-[WKWebViewConfiguration _setWebsiteDataStore:]):
15115        (-[WKWebViewConfiguration _contentProviderRegistry]):
15116        (-[WKWebViewConfiguration _setContentProviderRegistry:]):
15117        Pass initialization code to all getters.
15118
15119        (-[WKWebViewConfiguration _validate]):
15120        Use getters.
15121
15122        (-[WKWebViewConfiguration init]): Deleted.
15123
151242014-05-26  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
15125
15126        Remove WebKit2 framework from generate-forwarding-headers.pl
15127        https://bugs.webkit.org/show_bug.cgi?id=133214
15128
15129        Since renaming WebKit2.framework to WebKit.framework is done and all WebKit2/*.h includes
15130        were renamed to WebKit/*.h, generating forwarding headers for WebKit2/*.h framework style
15131        headers is not necessary anymore.
15132
15133        Reviewed by Darin Adler.
15134
15135        * Scripts/generate-forwarding-headers.pl:
15136
151372014-05-26  Zan Dobersek  <zdobersek@igalia.com>
15138
15139        WebPage::setComposition(), WebPageProxy::didFindStringMatches() should take Vector parameters by const reference
15140        https://bugs.webkit.org/show_bug.cgi?id=133264
15141
15142        Reviewed by Darin Adler.
15143
15144        Taking the Vector parameters in the two methods (invoked through the IPC message handling)
15145        by value causes unnecessary copies. The methods don't modify the objects and don't want
15146        or need fresh copies, hence they should take in const references to Vector objects.
15147
15148        * UIProcess/WebPageProxy.cpp:
15149        (WebKit::WebPageProxy::didFindStringMatches):
15150        * UIProcess/WebPageProxy.h:
15151        * WebProcess/WebPage/WebPage.cpp:
15152        (WebKit::WebPage::setComposition):
15153        * WebProcess/WebPage/WebPage.h:
15154
151552014-05-25  Benjamin Poulain  <benjamin@webkit.org>
15156
15157        [iOS][WK2] Fix some state reset on crash on the WKWebView
15158        https://bugs.webkit.org/show_bug.cgi?id=133039
15159
15160        Reviewed by Sam Weinig.
15161
15162        This is in no way complete, but this should reduce the undefined states on crash.
15163
15164        * UIProcess/API/Cocoa/WKWebView.mm:
15165        (-[WKWebView _processDidExit]):
15166        If the view is animating, nuke the resize animation. That should be invisible to the user
15167        because the background color is reset to white below.
15168
15169        Reset the contentView frame and scrollview state.
15170
15171        Reset the runtime states. We do not strictly need to reset _needsResetViewStateAfterCommitLoadForMainFrame,
15172        _delayUpdateVisibleContentRects and _hadDelayedUpdateVisibleContentRects but it seems better to have
15173        a clean slate.
15174
15175        (-[WKWebView _beginAnimatedResizeWithUpdates:]):
15176        (-[WKWebView _endAnimatedResize]):
15177        We could have crashes during rotation. To simplify the reset code, the animated resize code
15178        no longer change any state when WKWebView is using a custom content view.
15179
15180        * UIProcess/API/Cocoa/WKWebViewInternal.h:
15181        * UIProcess/ios/PageClientImplIOS.mm:
15182        (WebKit::PageClientImpl::processDidExit):
15183        Send a _processDidExit on the WKWebView too.
15184
151852014-05-25  Anders Carlsson  <andersca@apple.com>
15186
15187        Use the right paths for website data
15188        https://bugs.webkit.org/show_bug.cgi?id=133267
15189        <rdar://problem/17027698>
15190
15191        Reviewed by Sam Weinig.
15192
15193        * UIProcess/API/Cocoa/WKProcessPool.mm:
15194        (-[WKProcessPool _initWithConfiguration:]):
15195        Get the path of the absolute URL.
15196
15197        * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
15198        (WebKit::LocalStorageDatabaseTracker::databasePath):
15199        Fix spelling error.
15200
15201        * WebProcess/Network/NetworkProcessConnection.cpp:
15202        (WebKit::NetworkProcessConnection::didCacheResource):
15203        Ditto.
15204
152052014-05-25  Benjamin Poulain  <bpoulain@apple.com>
15206
15207        [iOS][WK2] Use ScrollView's scrollOffset as the unobscuredContentRect
15208        https://bugs.webkit.org/show_bug.cgi?id=133262
15209
15210        Reviewed by Simon Fraser.
15211
15212        * WebProcess/WebPage/ios/WebPageIOS.mm:
15213        (WebKit::WebPage::dynamicViewportSizeUpdate):
15214        (WebKit::WebPage::viewportConfigurationChanged):
15215        (WebKit::WebPage::updateVisibleContentRects):
15216
152172014-05-25  Sam Weinig  <sam@webkit.org>
15218
15219        Build fix 2.
15220
15221        * UIProcess/API/Cocoa/WKPreferences.h:
15222
152232014-05-25  Sam Weinig  <sam@webkit.org>
15224
15225        Fix build.
15226
15227        * UIProcess/API/Cocoa/WKPreferences.h:
15228
152292014-05-24  Sam Weinig  <sam@webkit.org>
15230
15231        [WebKit2] Rework WebPreferencesStore to allow easier overriding of defaults
15232        https://bugs.webkit.org/show_bug.cgi?id=133258
15233
15234        Reviewed by Anders Carlsson.
15235
15236        To support changing default values of preferences based on which API you are using (either
15237        the legacy C-SPI or the Objective-C API), overhaul the WebPreferencesStore to use a single
15238        HashMap of String -> Value (where Value is new type that can be a String, bool, uint32_t or double)
15239        instead of four HashMaps.  This allows us to use two of these new HashMaps, one for the actual
15240        set values, and one for overridden defaults. This new Value class will also allow easier incremental
15241        updating of preferences in the future.
15242        
15243        Other notable changes:
15244        - Removed Float kind of preferences. There were none.
15245        - Move StorageBlockingPolicy preference to the correct group, it's a uint32_t, not bool.
15246
15247        * Shared/WebPreferencesStore.cpp:
15248        * Shared/WebPreferencesStore.h:
15249
152502014-05-25  David Kilzer  <ddkilzer@apple.com>
15251
15252        Add type-checked casts for TransformOperations
15253        <http://webkit.org/b/133217>
15254
15255        Reviewed by Simon Fraser.
15256
15257        * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
15258        (IPC::ArgumentCoder<TransformOperations>::encode):
15259        - Switch to type-checked casts.
15260
152612014-05-25  David Kilzer  <ddkilzer@apple.com>
15262
15263        Use type-checking FilterOperation casts in CoordinatedGraphicsArgumentCoders.cpp
15264        <http://webkit.org/b/133203>
15265
15266        Reviewed by Simon Fraser.
15267
15268        * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
15269        (IPC::ArgumentCoder<WebCore::FilterOperations>::encode):
15270        - Replace static_cast<>() operators with type-checking
15271          FilterOperation casts.
15272        - Replace 'default' statement with 'case' statements so new
15273          filters added later require an explicit decision to be made.
15274        (IPC::ArgumentCoder<WebCore::FilterOperations>::decode):
15275        - Replace 'default' statement with 'case' statements so new
15276          filters added later require an explicit decision to be made.
15277
152782014-05-24  Jon Honeycutt  <jhoneycutt@apple.com>
15279
15280        Potential null dereference in
15281        WebFrameLoaderClient::dispatchDidFailProvisionalLoad()
15282        <https://bugs.webkit.org/show_bug.cgi?id=133193>
15283
15284        WebFrameLoaderClient::dispatchDidFailProvisionalLoad() calls the
15285        InjectedBundleLoaderClient's didFailProvisionalLoadWithErrorForFrame()
15286        before sending a message to the UI process that a provisional load has
15287        failed. It's possible for the provisional document loader to become
15288        null while calling into the InjectedBundleLoaderClient (as is the case
15289        with the WebKitTestRunner's injected bundle), leading to a null
15290        dereference when trying to send the DidFailProvisionalLoadForFrame
15291        message.
15292
15293        Reviewed by Darin Adler.
15294
15295        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
15296        (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
15297        Get the navigation ID before calling into the injected bundle.
15298
152992014-05-23  Simon Fraser  <simon.fraser@apple.com>
15300
15301        Rename ScrollingTreeScrollingNode's m_scrollPosition to make it clear that it's the value committed from the state tree
15302        https://bugs.webkit.org/show_bug.cgi?id=133254
15303
15304        Reviewed by Tim Horton.
15305        
15306        Override scrollPosition() on ScrollingTreeOverflowScrollingNodeIOS.
15307
15308        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
15309        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
15310        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollPosition):
15311
153122014-05-24  Chris Fleizach  <cfleizach@apple.com>
15313
15314        AX: fix coordinate mapping for iOS accessibility
15315        https://bugs.webkit.org/show_bug.cgi?id=133188
15316
15317        Reviewed by Sam Weinig.
15318
15319        Add in accessibility conversion methods that will check if the methods are present 
15320        (if accessibility is not on, they won't be)
15321        and use those to convert points into the right coordinate space that VoiceOver is expecting.
15322
15323        * UIProcess/PageClient.h:
15324        * UIProcess/WebPageProxy.cpp:
15325        (WebKit::WebPageProxy::accessibilityScreenToRootView):
15326        (WebKit::WebPageProxy::rootViewToAccessibilityScreen):
15327        * UIProcess/WebPageProxy.h:
15328        * UIProcess/WebPageProxy.messages.in:
15329        * UIProcess/ios/PageClientImplIOS.h:
15330        * UIProcess/ios/PageClientImplIOS.mm:
15331        (WebKit::PageClientImpl::accessibilityScreenToRootView):
15332        (WebKit::PageClientImpl::rootViewToAccessibilityScreen):
15333        * UIProcess/mac/PageClientImpl.h:
15334        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
15335        (WebKit::WebChromeClient::accessibilityScreenToRootView):
15336        (WebKit::WebChromeClient::rootViewToAccessibilityScreen):
15337        * WebProcess/WebCoreSupport/WebChromeClient.h:
15338        * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:
15339        (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
15340        * WebProcess/WebPage/WebPage.cpp:
15341        (WebKit::WebPage::accessibilityScreenToRootView):
15342        (WebKit::WebPage::rootViewToAccessibilityScreen):
15343        * WebProcess/WebPage/WebPage.h:
15344
153452014-05-24  Carlos Garcia Campos  <cgarcia@igalia.com>
15346
15347        REGRESSION(r165841): Messages sent before the child process is launched are never sent after r165841
15348        https://bugs.webkit.org/show_bug.cgi?id=131675
15349
15350        Reviewed by Anders Carlsson.
15351
15352        Since r165841 the connection is opened after the pending messages
15353        are sent, because connectionWillOpen might send messages that we
15354        want to happen after the ones already pending. The problem is that
15355        Connection::canSendOutgoingMessages() returns false when
15356        connection hasn't been opened. We should ensure no messages are
15357        sent by connectionWillOpen.
15358
15359        * Shared/ChildProcessProxy.cpp:
15360        (WebKit::ChildProcessProxy::didFinishLaunching): Open the
15361        connection before sending pending messages.
15362        * UIProcess/WebPageProxy.cpp:
15363        (WebKit::WebPageProxy::connectionWillOpen): Do not call
15364        VisitedLinkProvider::addProcess() here because it tries to send a
15365        message to the web process, but the connection hasn't be opened yet.
15366        (WebKit::WebPageProxy::processDidFinishLaunching): Call
15367        VisitedLinkProvider::addProcess() here instead.
15368        * UIProcess/WebPageProxy.h:
15369        * UIProcess/WebProcessProxy.cpp:
15370        (WebKit::WebProcessProxy::didFinishLaunching): Call
15371        WebPageProxy::processDidFinishLaunching() for every web page.
15372
153732014-05-23  Ian Henderson  <ianh@apple.com>
15374
15375        REGRESSION: Rubberbanding out jumps to top left corner on google.com
15376        https://bugs.webkit.org/show_bug.cgi?id=133253
15377        <rdar://problem/17025664>
15378
15379        Reviewed by Benjamin Poulain.
15380
15381        * UIProcess/API/Cocoa/WKWebView.mm:
15382        (-[WKWebView scrollViewWillEndDragging:withVelocity:targetContentOffset:]):
15383        Avoid deceleration during zooming to work around a UIKit bug.
15384
153852014-05-23  Benjamin Poulain  <bpoulain@apple.com>
15386
15387        [iOS][WK2] Avoid updating the view from the viewport configuration unnecessarily
15388        https://bugs.webkit.org/show_bug.cgi?id=133255
15389        <rdar://problem/16890926>
15390
15391        Reviewed by Simon Fraser.
15392
15393        All the updates were mostly harmless since they are pretty cheap, but they can be
15394        very annoying for debugging.
15395
15396        This patch skips viewportUpdates in the trivial cases.
15397
15398        * UIProcess/API/Cocoa/WKWebView.mm:
15399        (-[WKWebView _setMinimumLayoutSizeOverride:]):
15400        (-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]):
15401        * WebProcess/WebPage/WebPage.cpp:
15402        (WebKit::WebPage::mainFrameDidLayout):
15403        * WebProcess/WebPage/ios/WebPageIOS.mm:
15404        (WebKit::WebPage::viewportPropertiesDidChange):
15405
154062014-05-23  Benjamin Poulain  <bpoulain@apple.com>
15407
15408        [iOS][WK2] The page scale factor randomly resets to initial scale when editing
15409        https://bugs.webkit.org/show_bug.cgi?id=133244
15410
15411        Reviewed by Enrica Casucci.
15412
15413        We were never telling the WebProcess that zoom is used triggered. As a result, the ViewportConfiguration was free
15414        to reset the scale whenever it felt like it. The fix is to call willStartUserTriggeredZoom before changing the scale.
15415
15416        This patch also split _willStartUserTriggeredScrollingOrZooming from willStartUserTriggeredZoom
15417        and rename it to willStartPanOrPinchGesture. This is just a tiny cleanup since the only thing left in _willStartUserTriggeredScrollingOrZooming
15418        was gesture related.
15419
15420        * UIProcess/API/Cocoa/WKWebView.mm:
15421        (-[WKWebView _zoomToFocusRect:WebCore::selectionRect:WebCore::fontSize:minimumScale:maximumScale:allowScaling:forceScroll:]):
15422        (-[WKWebView scrollViewWillBeginZooming:withView:]):
15423        (-[WKWebView scrollViewWillBeginDragging:]):
15424        * UIProcess/API/Cocoa/WKWebViewInternal.h:
15425        * UIProcess/API/ios/WKViewIOS.mm:
15426        (-[WKView scrollViewWillBeginDragging:]):
15427        * UIProcess/ios/WKContentView.h:
15428        * UIProcess/ios/WKContentView.mm:
15429        (-[WKContentView willStartUserTriggeredZoom]):
15430        (-[WKContentView willStartUserTriggeredScroll]): Deleted.
15431        * UIProcess/ios/WKContentViewInteraction.h:
15432        * UIProcess/ios/WKContentViewInteraction.mm:
15433        (-[WKContentView willStartPanOrPinchGesture]):
15434        (-[WKContentView _willStartUserTriggeredScrollingOrZooming]): Deleted.
15435
154362014-05-23  Tim Horton  <timothy_horton@apple.com>
15437
15438        REGRESSION (iOS WebKit2): requestAnimationFrame fires more than once between layer tree commits
15439        https://bugs.webkit.org/show_bug.cgi?id=132794
15440        <rdar://problem/16877909>
15441
15442        Reviewed by Simon Fraser.
15443
15444        * WebKit2.xcodeproj/project.pbxproj:
15445        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
15446        (WebKit::WebChromeClient::createDisplayRefreshMonitor):
15447        * WebProcess/WebCoreSupport/WebChromeClient.h:
15448        * WebProcess/WebPage/DrawingArea.h:
15449        (WebKit::DrawingArea::graphicsLayerFactory):
15450        (WebKit::DrawingArea::createDisplayRefreshMonitor):
15451        Plumb the DisplayRefreshMonitor request through to the DrawingArea.
15452        RemoteLayerTreeDrawingArea will implement and return a RemoteLayerTreeDisplayRefreshMonitor.
15453
15454        * WebProcess/WebPage/Cocoa/RemoteLayerTreeDisplayRefreshMonitor.h: Added.
15455        (WebKit::RemoteLayerTreeDisplayRefreshMonitor::create):
15456        * WebProcess/WebPage/Cocoa/RemoteLayerTreeDisplayRefreshMonitor.mm: Added.
15457        (WebKit::RemoteLayerTreeDisplayRefreshMonitor::RemoteLayerTreeDisplayRefreshMonitor):
15458        (WebKit::RemoteLayerTreeDisplayRefreshMonitor::~RemoteLayerTreeDisplayRefreshMonitor):
15459        (WebKit::RemoteLayerTreeDisplayRefreshMonitor::requestRefreshCallback):
15460        When requesting a display refresh callback, schedule a layer commit.
15461        It may end up being empty, but will still call us back with a didUpdate,
15462        upon which we'll fire the callback.
15463
15464        (WebKit::RemoteLayerTreeDisplayRefreshMonitor::didUpdateLayers):
15465
15466        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
15467        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
15468        (WebKit::RemoteLayerTreeDrawingArea::createDisplayRefreshMonitor):
15469        (WebKit::RemoteLayerTreeDrawingArea::willDestroyDisplayRefreshMonitor):
15470        Keep track of the set of DisplayRefreshMonitors.
15471
15472        (WebKit::RemoteLayerTreeDrawingArea::didUpdate):
15473        Fire requestAnimationFrame callbacks once the UI process commits the new layer tree.
15474
154752014-05-23  Jeremy Jones  <jeremyj@apple.com>
15476
15477        Hide fullscreen immediately when switching tabs.
15478        https://bugs.webkit.org/show_bug.cgi?id=133239
15479
15480        Reviewed by Eric Carlson.
15481
15482        Renamed a function to better describe it's new functionality.
15483
15484        * UIProcess/WebPageProxy.cpp:
15485        (WebKit::WebPageProxy::viewStateDidChange):
15486        now calls: requestHideAndExitFullscreen
15487
154882014-05-23  Enrica Casucci  <enrica@apple.com>
15489
15490        REGRESSION (WebKit2): Keyboard disappears/appears automatically between text boxes.
15491        https://bugs.webkit.org/show_bug.cgi?id=133243
15492        <rdar://problem/16761913>
15493
15494        Reviewed by Benjamin Poulain.
15495
15496        We need to ensure that when an element loses focus and another one gets it,
15497        this is handled in one single message in the UI process to avoid seeing
15498        the keyboard animating in and out.
15499        This is accomplished by always postponing the blur notification until all events
15500        have been processed.
15501        If a new node is focused before the delayed blur notification is sent to the UI
15502        process, the message we send includes both blur and focus notification. In this case,
15503        the postponed blur notification is not sent.
15504
15505        * UIProcess/PageClient.h:
15506        * UIProcess/WebPageProxy.h:
15507        * UIProcess/WebPageProxy.messages.in:
15508        * UIProcess/ios/PageClientImplIOS.h:
15509        * UIProcess/ios/PageClientImplIOS.mm:
15510        (WebKit::PageClientImpl::startAssistingNode):
15511        * UIProcess/ios/WKContentViewInteraction.h:
15512        * UIProcess/ios/WKContentViewInteraction.mm:
15513        (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
15514        (-[WKContentView _startAssistingNode:userIsInteracting:userObject:]): Deleted.
15515        * UIProcess/ios/WebPageProxyIOS.mm:
15516        (WebKit::WebPageProxy::startAssistingNode):
15517        * WebProcess/WebPage/WebPage.cpp:
15518        (WebKit::WebPage::WebPage):
15519        * WebProcess/WebPage/WebPage.h:
15520        * WebProcess/WebPage/ios/WebPageIOS.mm:
15521        (WebKit::WebPage::elementDidFocus):
15522        (WebKit::WebPage::elementDidBlur):
15523
155242014-05-23  Anders Carlsson  <andersca@apple.com>
15525
15526        Remove an assertion.
15527
15528        * WebProcess/WebPage/WebPage.cpp:
15529        (WebKit::WebPage::loadRequest):
15530
155312014-05-23  Tim Horton  <timothy_horton@apple.com>
15532
15533        [iOS] WKPDFView should have a page indicator
15534        https://bugs.webkit.org/show_bug.cgi?id=133109
15535        <rdar://problem/16383003>
15536
15537        Reviewed by Anders Carlsson.
15538
15539        * UIProcess/API/Cocoa/WKWebView.mm:
15540        (-[WKWebView _setHasCustomContentView:loadedMIMEType:WTF::]):
15541        (-[WKWebView _setObscuredInsets:]):
15542        Forward obscured insets changes to the custom content view.
15543
15544        (-[WKWebView _updateScrollViewBackground]):
15545        If we have a custom content view, use its background instead of the
15546        (likely nonexistent) page's when updaing the scroll view's background color.
15547
15548        * UIProcess/API/Cocoa/WKWebViewInternal.h:
15549        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
15550        * UIProcess/Cocoa/WKWebViewContentProvider.h:
15551        * UIProcess/Cocoa/WKWebViewContentProviderDelegate.h: Added.
15552        * UIProcess/API/Cocoa/WKWebView.mm:
15553        (-[WKWebView _setInsetForOverlaidAccessoryViews:]):
15554        Add SPI for clients to inform us about potential overlaid accessory views
15555        which should be taken into account e.g. for positioning the page indicator.
15556
15557        Add a view that sits fixed on top of the WKWebView, ignores interaction,
15558        but provides the WKWebViewContentProvider a place to install views
15559        that don't scroll along with the content.
15560
15561        * UIProcess/ios/WKPDFPageNumberIndicator.h: Added.
15562        * UIProcess/ios/WKPDFPageNumberIndicator.mm: Added.
15563        (-[WKPDFPageNumberIndicator initWithFrame:]):
15564        (-[WKPDFPageNumberIndicator dealloc]):
15565        (-[WKPDFPageNumberIndicator setCurrentPageNumber:]):
15566        (-[WKPDFPageNumberIndicator setPageCount:]):
15567        (-[WKPDFPageNumberIndicator show]):
15568        (-[WKPDFPageNumberIndicator hide:]):
15569        (-[WKPDFPageNumberIndicator moveToPoint:animated:]):
15570        (-[WKPDFPageNumberIndicator sizeThatFits:]):
15571        (-[WKPDFPageNumberIndicator _updateLabel]):
15572        (-[WKPDFPageNumberIndicator _makeRoundedCorners]):
15573        Add a page number indicator.
15574
15575        * UIProcess/ios/WKPDFView.mm:
15576        (-[WKPDFView dealloc]):
15577        (-[WKPDFView web_setScrollView:]):
15578        (-[WKPDFView _revalidateViews]):
15579        (-[WKPDFView _offsetForPageNumberIndicator]):
15580        (-[WKPDFView _updatePageNumberIndicator]):
15581        (-[WKPDFView web_setObscuredInsets:]):
15582        (-[WKPDFView web_setInsetForOverlaidAccessoryViews:]):
15583        (-[WKPDFView web_setFixedOverlayView:]):
15584        (-[WKPDFView _computePageAndDocumentFrames]):
15585        Update the page number indicator when the topmost visible page changes.
15586        Move the page number indicator around when the obscured insets change.
15587
15588        * WebKit2.xcodeproj/project.pbxproj:
15589
155902014-05-23  Anders Carlsson  <andersca@apple.com>
15591
15592        Fix test failures on the bot.
15593
15594        * UIProcess/API/Cocoa/WKProcessPool.mm:
15595        (websiteDataDirectoryURL):
15596        If we have no bundle identifier, use the process name.
15597
155982014-05-23  Enrica Casucci  <enrica@apple.com>
15599
15600        REGRESSION (iOS WebKit2): Autocorrection is not accurate when changing selection.
15601        https://bugs.webkit.org/show_bug.cgi?id=133237
15602        <rdar://problem/16655776>
15603
15604        Reviewed by Ryosuke Niwa.
15605
15606        * UIProcess/ios/WKContentViewInteraction.mm:
15607        (-[WKContentView beginSelectionChange]):
15608        (-[WKContentView endSelectionChange]):
15609
15610        When the selection is changed with a gesture in an editable element,
15611        we must notify the keyboard to make sure the autocorrection engine 
15612        updates its typing context. WKContentView must implement
15613        beginSelectionChange and endSelectionChange to call into
15614        the keyboard layer.
15615
156162014-05-22  Brent Fulgham  <bfulgham@apple.com>
15617
15618        [iOS] WK2: Provide implementation for windowFrame
15619        https://bugs.webkit.org/show_bug.cgi?id=133205
15620        <rdar://problem/16894890>
15621
15622        Reviewed by Benjamin Poulain.
15623
15624        * UIProcess/Cocoa/UIDelegate.h:
15625        * UIProcess/Cocoa/UIDelegate.mm:
15626        (WebKit::UIDelegate::UIClient::windowFrame): Added.
15627        * UIProcess/ios/PageClientImplIOS.mm:
15628        (WebKit::PageClientImpl::convertToUserSpace): Added.
15629
156302014-05-20  Anders Carlsson  <andersca@apple.com>
15631
15632        Use a per app directory structure for website data
15633        https://bugs.webkit.org/show_bug.cgi?id=133125
15634        <rdar://problem/16830143>
15635
15636        Reviewed by Dan Bernstein, Sam Weinig and Tim Horton.
15637
15638        Put website data in subdirectories of ~/Library/WebKit/<bundle ID>/WebsiteData.
15639        We use "LocalStorage", "WebSQL", and "IndexedDB" subdirectories.
15640
15641        * UIProcess/API/Cocoa/WKProcessPool.mm:
15642        (websiteDataDirectoryURL):
15643        (-[WKProcessPool _initWithConfiguration:]):
15644
156452014-05-23  Dan Bernstein  <mitz@apple.com>
15646
15647        [Cocoa] WKNavigationResponsePrivate.h is internal
15648        https://bugs.webkit.org/show_bug.cgi?id=133218
15649
15650        Reviewed by Dean Jackson.
15651
15652        * WebKit2.xcodeproj/project.pbxproj: Promote WKNavigationResponsePrivate.h to private.
15653
156542014-05-23  Carlos Garcia Campos  <cgarcia@igalia.com>
15655
15656        [UNIX] Reorganize and cleanup main functions of GTK and EFL ports
15657        https://bugs.webkit.org/show_bug.cgi?id=131024
15658
15659        Reviewed by Gustavo Noronha Silva.
15660
15661        Move main function implementation files to <process-dir>/EntryPoint/unix/<ProcessName>Main.cpp
15662        files that are now shared by GTK and EFL ports. These files call a
15663        main method that wraps a new method ChildProcessMain that contains
15664        the common code and uses a helper class for the platform specific
15665        code. GTK+ and EFL ports implement that helper class for every process type.
15666
15667        * NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp: Renamed from Source/WebKit2/efl/MainEfl.cpp.
15668        (main):
15669        * NetworkProcess/efl/NetworkProcessMainEfl.cpp: Renamed from Source/WebKit2/unix/NetworkMainUnix.cpp.
15670        (WebKit::NetworkProcessMainUnix):
15671        * NetworkProcess/gtk/NetworkProcessMainGtk.cpp: Renamed from Source/WebKit2/NetworkProcess/unix/NetworkProcessMainUnix.cpp.
15672        (WebKit::NetworkProcessMainUnix):
15673        * NetworkProcess/unix/NetworkProcessMainUnix.h:
15674        * PlatformEfl.cmake:
15675        * PlatformGTK.cmake:
15676        * PluginProcess/EntryPoint/unix/PluginProcessMain.cpp: Renamed from Source/WebKit2/unix/PluginMainUnix.cpp.
15677        (main):
15678        * PluginProcess/unix/PluginProcessMainUnix.cpp:
15679        (WebKit::webkitXError):
15680        (WebKit::PluginProcessMainUnix):
15681        * PluginProcess/unix/PluginProcessMainUnix.h:
15682        * Shared/unix/ChildProcessMain.cpp: Copied from Source/WebKit2/WebProcess/efl/WebProcessMainEfl.h.
15683        (WebKit::ChildProcessMainBase::parseCommandLine):
15684        * Shared/unix/ChildProcessMain.h: Renamed from Source/WebKit2/WebProcess/gtk/WebProcessMainGtk.h.
15685        (WebKit::ChildProcessMainBase::platformInitialize):
15686        (WebKit::ChildProcessMainBase::platformFinalize):
15687        (WebKit::ChildProcessMainBase::initializationParameters):
15688        (WebKit::ChildProcessMain):
15689        * WebProcess/EntryPoint/unix/WebProcessMain.cpp: Renamed from Source/WebKit2/gtk/MainGtk.cpp.
15690        (main):
15691        * WebProcess/efl/WebProcessMainEfl.cpp:
15692        (WebKit::WebProcessMainUnix):
15693        (dummyExtensionErrorHandler): Deleted.
15694        * WebProcess/gtk/WebProcessMainGtk.cpp:
15695        (WebKit::WebProcessMainUnix):
15696        * WebProcess/unix/WebProcessMainUnix.h: Renamed from Source/WebKit2/WebProcess/efl/WebProcessMainEfl.h.
15697
156982014-05-22  Zan Dobersek  <zdobersek@igalia.com>
15699
15700        Have the decoded element in VectorArgumentCoder::decode() moved into Vector::append()
15701        https://bugs.webkit.org/show_bug.cgi?id=133082
15702
15703        Reviewed by Andreas Kling.
15704
15705        * Platform/IPC/ArgumentCoders.h: Move the decoded element into the Vector::append() call.
15706        This enforces a move instead of a copy if the decoded element's type is move-constructible.
15707
157082014-05-22  Zan Dobersek  <zdobersek@igalia.com>
15709
15710        Move the passed-in Vector<Attachment> in MessageDecoder constructor down into ArgumentDecoder
15711        https://bugs.webkit.org/show_bug.cgi?id=133080
15712
15713        Reviewed by Andreas Kling.
15714
15715        * Platform/IPC/MessageDecoder.cpp:
15716        (IPC::MessageDecoder::MessageDecoder): The Vector<Attachment> object was passed in by value.
15717        Move it into the ArgumentDecoder constructor as it is not used elsewhere in this constructor
15718        and produces a copy otherwise.
15719
157202014-05-22  Benjamin Poulain  <bpoulain@apple.com>
15721
15722        [iOS][WK2] Add support for minimal-ui viewports
15723        https://bugs.webkit.org/show_bug.cgi?id=133162
15724
15725        Reviewed by Simon Fraser.
15726
15727        In the WebKit2 layers, we have two parts to minimal-ui.
15728        -In WebPage, we need to get the values from the UIProcess and setup the ViewportConfiguration.
15729         Another part is freezing the state on page load.
15730        -In the UIProcess, we need to get the right information for layout and styling, and we need to tell
15731         the UI clients about minimal-ui changes.
15732
15733        * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
15734        * UIProcess/API/Cocoa/WKWebView.mm:
15735        (-[WKWebView _setUsesMinimalUI:]):
15736        (-[WKWebView _usesMinimalUI]):
15737        (-[WKWebView _didCommitLayerTree:WebKit::]):
15738        (-[WKWebView _frameOrBoundsChanged]):
15739        (-[WKWebView _minimumLayoutSizeOverride]):
15740        (-[WKWebView _setMinimumLayoutSizeOverride:]):
15741        (-[WKWebView _minimumLayoutSizeOverrideForMinimalUI]):
15742        (-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]):
15743        (-[WKWebView _largestUnobscuredSizeOverride]):
15744        (-[WKWebView _setMaximumUnobscuredSizeOverride:]):
15745        (-[WKWebView _beginAnimatedResizeWithUpdates:]):
15746        (setViewportConfigurationMinimumLayoutSize): Deleted.
15747        * UIProcess/API/Cocoa/WKWebViewInternal.h:
15748        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
15749        * UIProcess/PageClient.h:
15750        * UIProcess/WebPageProxy.h:
15751        * UIProcess/WebPageProxy.messages.in:
15752        * UIProcess/ios/PageClientImplIOS.h:
15753        * UIProcess/ios/PageClientImplIOS.mm:
15754        (WebKit::PageClientImpl::setUsesMinimalUI):
15755        * UIProcess/ios/WebPageProxyIOS.mm:
15756        (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
15757        (WebKit::WebPageProxy::setViewportConfigurationMinimumLayoutSizeForMinimalUI):
15758        (WebKit::WebPageProxy::setMaximumUnobscuredSize):
15759        (WebKit::WebPageProxy::setUsesMinimalUI):
15760        (WebKit::WebPageProxy::setMinimumLayoutSizeForMinimalUI): Deleted.
15761        * WebProcess/WebPage/WebPage.cpp:
15762        (WebKit::WebPage::WebPage):
15763        (WebKit::WebPage::didCommitLoad):
15764        * WebProcess/WebPage/WebPage.h:
15765        * WebProcess/WebPage/WebPage.messages.in:
15766        * WebProcess/WebPage/ios/WebPageIOS.mm:
15767        (WebKit::WebPage::setViewportConfigurationMinimumLayoutSizeForMinimalUI):
15768        (WebKit::WebPage::setMaximumUnobscuredSize):
15769        (WebKit::WebPage::willFlushLayers):
15770        (WebKit::WebPage::dynamicViewportSizeUpdate):
15771        (WebKit::WebPage::viewportConfigurationChanged):
15772        (WebKit::WebPage::updateViewportSizeForCSSViewportUnits):
15773        (WebKit::WebPage::setMinimumLayoutSizeForMinimalUI): Deleted.
15774        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
15775        (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
15776
157772014-05-22  Benjamin Poulain  <bpoulain@apple.com>
15778
15779        [iOS][WK2] Reset the special action-target of WKSyntheticClickTapGestureRecognizer on destruction
15780        https://bugs.webkit.org/show_bug.cgi?id=133165
15781        <rdar://problem/16283914>
15782
15783        Reviewed by Andy Estes.
15784
15785        It is unclear why, but the WKSyntheticClickTapGestureRecognizer sometimes survives its own view
15786        and is reset after WKContentView was destructed.
15787        This patch cleans up the target-action on destruction to avoid accessing a destructed object.
15788
15789        * UIProcess/ios/WKContentViewInteraction.mm:
15790        (-[WKContentView cleanupInteraction]):
15791
157922014-05-22  Benjamin Poulain  <bpoulain@apple.com>
15793
15794        Do not force a layout when changing the FixedLayoutSize in WebPage
15795        https://bugs.webkit.org/show_bug.cgi?id=133167
15796
15797        Reviewed by Andreas Kling.
15798
15799        WebPage::setFixedLayoutSize was forcing a layout immediately after changing the layout size on FrameView.
15800        This is forcing plenty of extra layouts since the fixed layout size is one of many properties updated on the FrameView.
15801
15802        FrameView marks that layout is needed. It is not clear why a layout was performed immediately.
15803
15804        * WebProcess/WebPage/WebPage.cpp:
15805        (WebKit::WebPage::setFixedLayoutSize):
15806
158072014-05-22  Andreas Kling  <akling@apple.com>
15808
15809        [iOS WebKit2] Web process should try to shrink its memory footprint when going into background.
15810        <https://webkit.org/b/133197>
15811        <rdar://problem/17011561>
15812
15813        Try to free up as much memory as possible before going into background.
15814
15815        Reviewed by Gavin Barraclough.
15816
15817        * WebProcess/WebProcess.cpp:
15818        (WebKit::WebProcess::processWillSuspend):
15819
158202014-05-22  Andreas Kling  <akling@apple.com>
15821
15822        Hook up a setting for showing detailed logging during memory pressure relief.
15823        <https://webkit.org/b/133194>
15824
15825        Plumb through the same setting that we used for detailed logging in WK1.
15826
15827        Reviewed by Gavin Barraclough.
15828
15829        * Shared/WebProcessCreationParameters.cpp:
15830        (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
15831        (WebKit::WebProcessCreationParameters::encode):
15832        (WebKit::WebProcessCreationParameters::decode):
15833        * Shared/WebProcessCreationParameters.h:
15834        * UIProcess/mac/WebContextMac.mm:
15835        (WebKit::WebContext::platformInitializeWebProcess):
15836        * WebProcess/cocoa/WebProcessCocoa.mm:
15837        (WebKit::WebProcess::platformInitializeWebProcess):
15838
158392014-05-22  Andy Estes  <aestes@apple.com>
15840
15841        [iOS] Send shareable resources to QuickLook if enabled
15842        https://bugs.webkit.org/show_bug.cgi?id=133189
15843        <rdar://problem/17003995>
15844
15845        Reviewed by Brady Eidson.
15846
15847        Like we do for didReceiveData(), we need to pass an incoming ShareableResource to QuickLook if a QuickLook
15848        handle exists.
15849
15850        * Shared/ShareableResource.cpp:
15851        (WebKit::ShareableResource::Handle::tryWrapInCFData): Return the shared resource in a CFDataRef.
15852        (WebKit::ShareableResource::Handle::tryWrapInSharedBuffer): Implemented in terms of tryWrapInCFData().
15853        * Shared/ShareableResource.h:
15854        * WebProcess/Network/WebResourceLoader.cpp:
15855        (WebKit::WebResourceLoader::didReceiveResource): If a QuickLook handle exists, send the shareable resource to
15856        it via a CFDataRef.
15857
158582014-05-22  Martin Hock  <mhock@apple.com>
15859
15860        [iOS] Enable -apple-system- styled elements to respond to system font size changes.
15861        https://bugs.webkit.org/show_bug.cgi?id=133186
15862        <rdar://problem/16583782>
15863
15864        Reviewed by Enrica Casucci.
15865
15866        * UIProcess/API/Cocoa/WKWebView.mm:
15867        (-[WKWebView initWithFrame:configuration:]):
15868        (-[WKWebView _contentSizeCategoryDidChange:]):
15869        (-[WKWebView _contentSizeCategory]):
15870        * UIProcess/WebPageProxy.h:
15871        * UIProcess/ios/WebPageProxyIOS.mm:
15872        (WebKit::WebPageProxy::contentSizeCategoryDidChange):
15873        * WebProcess/WebPage/WebPage.h:
15874        * WebProcess/WebPage/WebPage.messages.in:
15875        * WebProcess/WebPage/ios/WebPageIOS.mm:
15876        (WebKit::WebPage::contentSizeCategoryDidChange):
15877
158782014-05-22  Alexey Proskuryakov  <ap@apple.com>
15879
15880        [iOS] Add CFBundleAllowMixedLocalizations to WebContentService
15881        https://bugs.webkit.org/show_bug.cgi?id=133187
15882        <rdar://problem/16561084>
15883
15884        Reviewed by Tim Horton.
15885
15886        * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist:
15887        We already had it in WebContentService.Development, just not here.
15888
158892014-05-22  Alexey Proskuryakov  <ap@apple.com>
15890
15891        [iOS][WK2] Application cache is broken
15892        https://bugs.webkit.org/show_bug.cgi?id=133172
15893        <rdar://problem/16994593>
15894
15895        Reviewed by Andy Estes.
15896
15897        * UIProcess/mac/WebContextMac.mm:
15898        (WebKit::WebContext::platformDefaultApplicationCacheDirectory): Use a proper
15899        path for application cache database (same as WebKit1).
15900
159012014-05-22  Enrica Casucci  <enrica@apple.com>
15902
15903        REGRESSION (WebKit2): Keyboard should have Search button in duckduckgo.com.
15904        https://bugs.webkit.org/show_bug.cgi?id=133183
15905        <rdar://problem/17004207>
15906
15907        Reviewed by Geoff Garen.
15908
15909        The keyboard type should be search if the input type is search
15910        or if it is text and it is inside a form with an action and either
15911        name, id or title contain the word search. This matches the
15912        heuristics we have in WK1 for iOS.
15913
15914        * WebProcess/WebPage/ios/WebPageIOS.mm:
15915        (WebKit::WebPage::getAssistedNodeInformation):
15916
159172014-05-21  Oliver Hunt  <oliver@apple.com>
15918
15919        Only enable sandbox extensions on mac.
15920
15921        RS = Alexey.
15922
15923        * WebKit2Prefix.h:
15924
159252014-05-21  Oliver Hunt  <oliver@apple.com>
15926
15927        [iOS] Enable sandboxing for the database process
15928        https://bugs.webkit.org/show_bug.cgi?id=132963
15929
15930        Reviewed by Alexey Proskuryakov.
15931
15932        Simply ensure that the database process is running in a tight
15933        sandbox. As part of this i've separated out ChildProcessIOS
15934        and ensures that the database process loads a custom sandbox.
15935
15936        * Configurations/WebKit.xcconfig:
15937        * DatabaseProcess/ios/DatabaseProcessIOS.mm:
15938        (WebKit::DatabaseProcess::initializeSandbox):
15939        * DatabaseProcess/ios/com.apple.WebKit.DatabasesIOS.sb: Added.
15940        * Shared/ios/ChildProcessIOS.mm: Added.
15941        Essentially cloned from the Mac version, only all the OSX
15942        specific logic has been stripped.
15943        (WebKit::ChildProcess::setApplicationIsDaemon):
15944        (WebKit::ChildProcess::platformInitialize):
15945        (WebKit::ChildProcess::initializeSandbox):
15946        (WebKit::ChildProcess::setQOS):
15947        * Shared/mac/ChildProcessMac.mm:
15948        Remove all the IOS ifdefs.
15949        (WebKit::ChildProcess::setApplicationIsDaemon):
15950        (WebKit::ChildProcess::platformInitialize):
15951        (WebKit::ChildProcess::initializeSandbox):
15952        (WebKit::ChildProcess::setQOS):
15953        * WebKit2.xcodeproj/project.pbxproj:
15954
159552014-05-21  Andy Estes  <aestes@apple.com>
15956
15957        [iOS] Create a UIPrintFormatter for WKWebView
15958        https://bugs.webkit.org/show_bug.cgi?id=133005
15959
15960        Reviewed by Tim Horton.
15961
15962        Implemented a UIPrintFormatter subclass to support printing WKWebViews using UIPrintInteractionController.
15963        Overrode -_recalcPageCount: to synchronously ask the web process to lay out for printing and return the number
15964        of page rects. The web process returns the page rects immediately and then starts rendering the page to a PDF,
15965        returning the PDF data to the UI process asynchronously. When UIPrintInteractionController later calls our
15966        overridden -drawInRect:forPageAtIndex:, we block and wait for the PDF data to be returned. Since
15967        UIPrintInteractionController draws each page after a delay, it's possible that the web process has already
15968        returned the PDF data to us by the time we print the first page.
15969
15970        * Shared/WebPreferencesStore.h: Correctly initialized shouldPrintBackgrounds for iOS.
15971        * UIProcess/API/Cocoa/WKWebView.mm:
15972        (-[WKWebView _dataForDisplayedPDF]): Now that WKPDFView vends its CGPDFDocument directly, extract its data here.
15973        (-[WKWebView _printFormatterClass]): Tell UIView which UIPrintFormatter to alloc.
15974        (-[WKWebView _computePageCountAndStartDrawingToPDFWithPrintInfo:WebKit::firstPage:computedTotalScaleFactor:]):
15975        If we're displaying a PDF, return its page count directly. Otherwise, synchronously ask the web process to
15976        compute page rects for printing and then return the number of rects.
15977        (-[WKWebView _endPrinting]): Cleared state and sent the WebPage::EndPrinting message to the web process.
15978        (-[WKWebView _printedDocument]): If we're displaying a PDF, return its data directly. Otherwise, if we haven't
15979        received PDF data from the web process yet, wait for it indefinitely (there's no sensible timeout to use here
15980        since failing to receive the data results in printing some number of blank pages).
15981        (-[WKWebView _setPrintedDocument:]): Set the CGPDFDocument received from the web process.
15982        * UIProcess/API/Cocoa/WKWebViewInternal.h: Declared methods called by WKWebViewPrintFormatter.
15983        * UIProcess/PageClient.h: Declared didFinishDrawingPagesToPDF.
15984        * UIProcess/WKWebViewPrintFormatter.h: Added.
15985        * UIProcess/WKWebViewPrintFormatter.mm: Added.
15986        (-[WKWebViewPrintFormatter dealloc]): Cleared state and called -[WKWebView _endPrinting].
15987        (-[WKWebViewPrintFormatter webView]): Returned the WKWebView for this print formatter.
15988        (-[WKWebViewPrintFormatter _recalcPageCount]): Set up a PrintInfo object given the formatter's content rect
15989        and called -_computePageCountAndStartDrawingToPDFWithPrintInfo:...
15990        (-[WKWebViewPrintFormatter rectForPageAtIndex:]): Called -_recalcIfNecessary and then returned the rect from
15991        -_pageContentRect.
15992        (-[WKWebViewPrintFormatter drawInRect:forPageAtIndex:]): Taught to draw the given page of the printed PDF
15993        document into the given rect and context provided to us.
15994        * UIProcess/WebPageProxy.h: Declared didFinishDrawingPagesToPDF.
15995        * UIProcess/WebPageProxy.messages.in: Added DidFinishDrawingPagesToPDF. Made this a delayed syncrhonous message
15996        so that additoinal work could be performed after sending the response.
15997        * UIProcess/ios/PageClientImplIOS.h:
15998        * UIProcess/ios/PageClientImplIOS.mm:
15999        (WebKit::PageClientImpl::didFinishDrawingPagesToPDF): Created a CGPDFDocument from the data sent to us by the
16000        web process and called -[WKWebView _setPrintedDocument:].
16001        * UIProcess/ios/WKPDFView.h:
16002        * UIProcess/ios/WKPDFView.mm:
16003        (-[WKPDFView pdfDocument]): Returned the underlying CGPDFDocument.
16004        (-[WKPDFView documentData]): Deleted.
16005        * UIProcess/ios/WebPageProxyIOS.mm:
16006        (WebKit::WebPageProxy::didFinishDrawingPagesToPDF):
16007        * WebKit2.xcodeproj/project.pbxproj:
16008        * WebProcess/WebPage/WebPage.cpp:
16009        (WebKit::WebPage::computePagesForPrinting): Changed to call computePagesForPrintingImpl.
16010        (WebKit::WebPage::computePagesForPrintingImpl): Moved the common logic of computePagesForPrinting to here so it
16011        could be called by computePagesForPrintingAndStartDrawingToPDF.
16012        (WebKit::WebPage::drawPagesToPDF): Changed to call drawPagesToPDFImpl
16013        (WebKit::WebPage::drawPagesToPDFImpl): Moved the common logic of drawPagesToPDF to here so it could be called
16014        by computePagesForPrintingAndStartDrawingToPDF.
16015        * WebProcess/WebPage/WebPage.h:
16016        * WebProcess/WebPage/WebPage.messages.in:
16017        * WebProcess/WebPage/ios/WebPageIOS.mm:
16018        (WebKit::WebPage::computePagesForPrintingAndStartDrawingToPDF): Computed page rects and returned them as a
16019        synchronous response. Afterwards called drawPagesToPDFImpl() and returned the PDF data by sending
16020        WebPageProxy::DidFinishDrawingPagesToPDF.
16021
160222014-05-21  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
16023
16024        [EFL] Turn on ENABLE_CSS_FILTERS
16025        https://bugs.webkit.org/show_bug.cgi?id=133153
16026
16027        Reviewed by Gyuyoung Kim.
16028
16029        Make WebKit2 compile after r166741 when CSS_FILTERS are enabled.
16030
16031        * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
16032        (IPC::ArgumentCoder<WebCore::FilterOperations>::decode):
16033
160342014-05-21  Brady Eidson  <beidson@apple.com>
16035
16036        Special handling of telephone number detection menu.
16037        <rdar://problem/16967971> and https://bugs.webkit.org/show_bug.cgi?id=133143
16038
16039        Reviewed by Geoff Garen.
16040
16041        Add a bool to ContextMenuContextData to represent telephone number menus:
16042        * Shared/ContextMenuContextData.cpp:
16043        (WebKit::ContextMenuContextData::ContextMenuContextData):
16044        (WebKit::ContextMenuContextData::operator=):
16045        (WebKit::ContextMenuContextData::encode):
16046        (WebKit::ContextMenuContextData::decode):
16047        * Shared/ContextMenuContextData.h:
16048        (WebKit::ContextMenuContextData::ContextMenuContextData):
16049        (WebKit::ContextMenuContextData::isTelephoneNumberContext):
16050
16051        * UIProcess/mac/WebContextMenuProxyMac.mm:
16052        (WebKit::WebContextMenuProxyMac::showContextMenu): If the menu is a telephone
16053          number menu then display it using a specific AppKit API.
16054
16055        * UIProcess/mac/WebPageProxyMac.mm:
16056        (WebKit::WebPageProxy::showTelephoneNumberMenu): Filter the array of menu items
16057          through a new WKSI call, and then show it using a telephone number context.
16058
160592014-05-21  Alexey Proskuryakov  <ap@apple.com>
16060
16061        [Mac] REGRESSION (Async text input): Asian text input doesn't work in Flash
16062        https://bugs.webkit.org/show_bug.cgi?id=133128
16063        <rdar://problem/16890920>
16064
16065        Reviewed by Anders Carlsson.
16066
16067        * UIProcess/API/mac/WKView.mm:
16068        (-[WKView _interpretKeyEvent:completionHandler:]): Added a separate code path for
16069        plug-in input. Before async text input, we used to provide a nil input context due
16070        to having _data->_interpretKeyEventsParameters while this function was executing,
16071        and thus took a shortcut. The new behavior is different from pre-async in that
16072        we don't collect commands at all, but I couldn't find any case where that mattered.
16073        (-[WKView inputContext]): The _collectedKeypressCommands check was not a correct
16074        replacement for _interpretKeyEventsParameters one, because this variable is not
16075        always set within -_interpretKeyEvent:completionHandler:.
16076
16077        * UIProcess/mac/WKTextInputWindowController.mm:
16078        (-[WKTextInputPanel _interpretKeyEvent:usingLegacyCocoaTextInput:string:]):
16079        While at it, fixed a separate issue with Cangjie predictive input. We shouldn't
16080        keep prediction pop-up on screen after hiding the bottom input window.
16081
160822014-05-16  Martin Robinson  <mrobinson@igalia.com>
16083
16084        [CMake] Improve handling of LIB_INSTALL_DIR, EXEC_INSTALL_DIR, and LIBEXEC_INSTALL_DIR
16085        https://bugs.webkit.org/show_bug.cgi?id=132819
16086
16087        Reviewed by Carlos Garcia Campos.
16088
16089        * PlatformEfl.cmake: No need to prefix EXEC_INSTALL_DIR with the prefix any longer.
16090        * PlatformGtk.cmake: No longer use CMAKE_INSTALL_FULL_FOO variables, instead using the WebKit-specific ones.
16091        * efl/EWebKit2Config.cmake.in: Ditto.
16092        * efl/ewebkit2.pc.in: Instead of hard-coding the path to the library installation directory use LIB_INSTALL_DIR.
16093        * webkit2gtk-web-extension.pc.in: No longer use the pkg-config only variables. Instead use
16094        the common CMake ones.
16095        * webkit2gtk.pc.in: Ditto.
16096
160972014-05-21  Carlos Garcia Campos  <cgarcia@igalia.com>
16098
16099        REGRESSION(r168625): [GTK] Assertion failure in LocalStorageDatabaseTracker
16100        https://bugs.webkit.org/show_bug.cgi?id=133118
16101
16102        Reviewed by Philippe Normand.
16103
16104        Call WebContext::applyPlatformSpecificConfigurationDefaults() to
16105        initialize the WebContextConfiguration before creating the default WebContext.
16106
16107        * UIProcess/API/gtk/WebKitWebContext.cpp:
16108        (createDefaultWebContext):
16109
161102014-05-21  Shivakumar JM  <shiva.jm@samsung.com>
16111
16112        [WebKit2] Cleanup the build from unused variable in WebProcess module
16113        https://bugs.webkit.org/show_bug.cgi?id=133062
16114
16115        Reviewed by Csaba Osztrogonác.
16116
16117        Fix unused parameter by using UNUSED_PARAM macro
16118
16119        * WebProcess/UserContent/WebUserContentController.cpp:
16120        (WebKit::WebUserContentController::addUserScriptMessageHandlers):
16121        (WebKit::WebUserContentController::removeUserScriptMessageHandler):
16122
161232014-05-20  Enrica Casucci  <enrica@apple.com>
16124
16125        REGRESSION (WK2): Tapping on the input field in duckduckgo.com shows the keyboard but not the caret.
16126        https://bugs.webkit.org/show_bug.cgi?id=133140
16127        <rdar://problem/16980898>
16128
16129        Reviewed by Benjamin Poulain.
16130
16131        When a page focuses a field on load, we receive the call to startAssistingNode
16132        but we don't create a text interaction assistant if the focus is not originated
16133        by a user action. Upon receiving the selection change notification we don't
16134        call the text interaction assistant, since we don't have one, but we do call
16135        the web selection assistant. We don't have any valid rects for web selection
16136        and we clear the selection on the page, causing the caret not to appear and
16137        the typing to have no effect.
16138
16139        * UIProcess/ios/WKContentViewInteraction.mm:
16140        (-[WKContentView _updateChangedSelection]):
16141
161422014-05-20  Dean Jackson  <dino@apple.com>
16143
16144        [Mac] Allow popup menus to override default appearance
16145        https://bugs.webkit.org/show_bug.cgi?id=133129
16146
16147        Reviewed by Tim Horton.
16148
16149        Add an extra "hideArrows" flag to PlatformPopupMenuData
16150        and replace the call to WKPopupMenuWithSize with WKPopupMenu.
16151
16152        * Shared/PlatformPopupMenuData.cpp: Encode and decode the new data value.
16153        (WebKit::PlatformPopupMenuData::encode):
16154        (WebKit::PlatformPopupMenuData::decode):
16155        * Shared/PlatformPopupMenuData.h: Add hideArrows boolean.
16156        * UIProcess/mac/WebPopupMenuProxyMac.mm:
16157        (WebKit::WebPopupMenuProxyMac::showPopupMenu):
16158        * WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
16159        (WebKit::WebPopupMenu::setUpPlatformData): The hideArrows flag is
16160        true if we don't have the default appearance.
16161
161622014-05-20  Eric Carlson  <eric.carlson@apple.com>
16163
16164        [Mac] do not deactivate an audio session that has running I/O
16165        https://bugs.webkit.org/show_bug.cgi?id=133127
16166
16167        Reviewed by Jer Noble.
16168
16169        * WebProcess/WebPage/WebPage.cpp:
16170        (WebKit::WebPage::WebPage): Settings::setShouldManageAudioSession renamed to 
16171            setShouldManageAudioSessionCategory, deal with it.
16172
161732014-05-19  Simon Fraser  <simon.fraser@apple.com>
16174
16175        REGRESSION (r169063) Fixed and sticky nodes misplaced on scrolling sometimes
16176        https://bugs.webkit.org/show_bug.cgi?id=133106
16177        <rdar://problem/16967648>
16178
16179        Reviewed by Sam Weinig.
16180
16181        Fix regression from r169063. That commit removed scrolledContentsLayers from 
16182        frame scrolling nodes, but they do actually use them.
16183        
16184        So put them back; not in the base class, because they have a somewhat different
16185        meaning for overflow scrolling and frame scrolling.
16186
16187        * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
16188        (ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
16189        (ArgumentCoder<ScrollingStateFrameScrollingNode>::decode):
16190        (WebKit::RemoteScrollingTreeTextStream::dump):
16191        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
16192        (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
16193
161942014-05-20  Alexey Proskuryakov  <ap@apple.com>
16195
16196        [Mac] WebProcess doesn't follow localization of UI process when run as a service
16197        https://bugs.webkit.org/show_bug.cgi?id=133126
16198        <rdar://problem/13396515>
16199        <rdar://problem/16561084>
16200
16201        Reviewed by Sam Weinig and Tim Horton.
16202
16203        * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
16204        (WebKit::handleXPCBootstrap):
16205        (main):
16206        * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
16207        (WebKit::handleXPCBootstrap):
16208        (main):
16209        Set localization very early in process lifetime (in development builds, that's
16210        even before WebKit framework is loaded).
16211
16212        * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::connectToService):
16213        Pass UI process localization to the service, computing it in the same way we do
16214        for child processes.
16215
162162014-05-20  Anders Carlsson  <andersca@apple.com>
16217
16218        Fix a header comment
16219        https://bugs.webkit.org/show_bug.cgi?id=133123
16220        <rdar://problem/16973783>
16221
16222        Reviewed by Geoffrey Garen.
16223
16224        * UIProcess/API/Cocoa/WKUserContentController.h:
16225
162262014-05-20  Carlos Garcia Campos  <cgarcia@igalia.com>
16227
16228        [GTK] WebKitWebPage::send-request always pass a valid pointer for redirected response
16229        https://bugs.webkit.org/show_bug.cgi?id=133119
16230
16231        Reviewed by Sergio Villar Senin.
16232
16233        The problem is that we were checking whether the passed in
16234        WKURLResponseRef is NULL or not, but it's always a valid object
16235        that can contain a NULL WebCore::ResourceResponse.
16236
16237        * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
16238        (willSendRequestForFrame): Pass NULL as redirect-response
16239        parameter of WebKitWebPage::send-request signal when the
16240        WebCore::ResourceResponse of the passed in WKURLResponseRef is NULL.
16241
162422014-05-20  Antti Koivisto  <antti@apple.com>
16243
16244        Double-tap zoom does not take obscuring insets into account
16245        https://bugs.webkit.org/show_bug.cgi?id=133116
16246        <rdar://problem/16765604>
16247
16248        Reviewed by Anders Carlsson.
16249
16250        * UIProcess/API/Cocoa/WKWebView.mm:
16251        (-[WKWebView _zoomToRect:WebCore::atScale:origin:WebCore::]):
16252        
16253            Compute the zoom target taking insets into account.
16254
162552014-05-19  Gavin Barraclough  <baraclough@apple.com>
16256
16257        WebKit2/iOS: parented view should be considered hidden if app is backgrounded
16258        https://bugs.webkit.org/show_bug.cgi?id=133099
16259        radar://16942183
16260
16261        Reviewed by Simon Fraser.
16262
16263        * UIProcess/ios/PageClientImplIOS.mm:
16264        (WebKit::PageClientImpl::isViewWindowActive):
16265            - implemented in terms of isViewVisible.
16266            - FIXME: https://bugs.webkit.org/show_bug.cgi?id=133098
16267        (WebKit::PageClientImpl::isViewFocused):
16268            - implemented in terms of isViewWindowActive.
16269            - FIXME: https://bugs.webkit.org/show_bug.cgi?id=133098
16270        (WebKit::PageClientImpl::isViewVisible):
16271            - take UIApplication applicationState into account in determining visibility.
16272        (WebKit::PageClientImpl::isViewVisibleOrOccluded):
16273            - implemented in terms of isViewVisible.
16274        (WebKit::PageClientImpl::isVisuallyIdle):
16275            - implemented in terms of isViewVisible.
16276        * UIProcess/ios/WKContentView.mm:
16277        (-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::webView:]):
16278            - register for UIApplicationDidEnterBackgroundNotification.
16279        (-[WKContentView _applicationDidEnterBackground:]):
16280        (-[WKContentView _applicationWillEnterForeground:]):
16281            - when the application state changes all flags except IsInWindow may be affected.
16282
162832014-05-19  Enrica Casucci  <enrica@apple.com>
16284
16285        WK2 iOS: Pressing the form navigation button causes the keyboard to be dismissed.
16286        https://bugs.webkit.org/show_bug.cgi?id=133100
16287        <rdar://problem/16808673>
16288
16289        Reviewed by Benjamin Poulain.
16290
16291        The call to focusNextAssistedNode is the result of a user action, since
16292        it is called when the user pressed the form navigation buttons.
16293        Therefore we must set m_userIsInteracting to true before changing the focus
16294        to make sure the focus change is honored.
16295
16296        * WebProcess/WebPage/ios/WebPageIOS.mm:
16297        (WebKit::WebPage::focusNextAssistedNode):
16298
162992014-05-19  Beth Dakin  <bdakin@apple.com>
16300
16301        TelephoneNumberOverlayController should use a modern loop for text quad bounding 
16302        boxes
16303        https://bugs.webkit.org/show_bug.cgi?id=133096
16304
16305        Reviewed by Anders Carlsson.
16306
16307        * WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
16308        (WebKit::textQuadsToBoundingRectForRange):
16309
163102014-05-19  Jeremy Jones  <jeremyj@apple.com>
16311
16312        PlatformCALayerRemoteCustom properties aren't initialized to match the PlatformLayer
16313        https://bugs.webkit.org/show_bug.cgi?id=133025
16314
16315        Reviewed by Simon Fraser.
16316
16317        * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
16318        (WebKit::PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
16319        Initialize PlatformCALayerRemote properties from the PlatformLayer.
16320
163212014-05-19  Benjamin Poulain  <bpoulain@apple.com>
16322
16323        [iOS][WK2] When a page relayout on dynamic resize, keep the same relative width in view
16324        https://bugs.webkit.org/show_bug.cgi?id=133026
16325        <rdar://problem/16833971>
16326
16327        Reviewed by Simon Fraser.
16328
16329        When a page does not relayout, we keep the same width in view.
16330        When a page relayout, we should keep the same relative width in view.
16331
16332        * WebProcess/WebPage/ios/WebPageIOS.mm:
16333        (WebKit::isResponsiveDesignWithContentLargerThanLayout):
16334        (WebKit::WebPage::dynamicViewportSizeUpdate):
16335
163362014-05-19  Benjamin Poulain  <benjamin@webkit.org>
16337
16338        [WK2] Add some missing state reset on crash
16339        https://bugs.webkit.org/show_bug.cgi?id=133036
16340
16341        Reviewed by Sam Weinig.
16342
16343        * UIProcess/WebPageProxy.cpp:
16344        (WebKit::WebPageProxy::resetState):
16345        The missing reset for m_isTrackingTouchEvents would cause the WebPageProxy to send
16346        touch events when it shouldn't. That would only be for an active touch sequence.
16347
16348        The missing reset m_lastVisibleContentRectUpdate would prevent pushing the new UI state
16349        to the new page on reload, that is very bad.
16350
16351        Also moved m_videoFullscreenManager to be in the same order as initialization, and invalidate
16352        the callbacks for dictation.
16353
163542014-05-19  Benjamin Poulain  <bpoulain@apple.com>
16355
16356        [iOS][WK2] Move scale noise filtering to the WebProcess
16357        https://bugs.webkit.org/show_bug.cgi?id=133021
16358
16359        Reviewed by Darin Adler.
16360
16361        Filtering in the UIProcess was stupid. It forces to handle a third kind of scale just for updates.
16362
16363        The WebProcess already adjusts the input scale based on the viewport. Changing the input scale at that level
16364        is already supported. It is a better place to have the filtering.
16365
16366        * UIProcess/ios/WKContentView.mm:
16367        (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
16368        * WebProcess/WebPage/ios/WebPageIOS.mm:
16369        (WebKit::WebPage::updateVisibleContentRects):
16370
163712014-05-19  Simon Fraser  <simon.fraser@apple.com>
16372
16373        Split scrolling tree ScrollingNodes into FrameScrollingNodes and OverflowScrollingNodes
16374        https://bugs.webkit.org/show_bug.cgi?id=133022
16375
16376        Reviewed by Sam Weinig.
16377        
16378        In both the scrolling state tree and the scrolling tree, split the "scrolling nodes"
16379        into FrameScrolling and OverflowScrolling nodes.
16380        
16381        Move what was the "viewportSize" property onto the base class for the scrolling
16382        nodes, calling it "scrollableAreaSize".
16383        
16384        Make minimum/maximumScrollPosition() virtual so we can share more code (and there
16385        is more code sharing to be done in future).
16386
16387        * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
16388        (ArgumentCoder<ScrollingStateScrollingNode>::encode):
16389        (ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
16390        (ArgumentCoder<ScrollingStateOverflowScrollingNode>::encode):
16391        (ArgumentCoder<ScrollingStateScrollingNode>::decode):
16392        (ArgumentCoder<ScrollingStateFrameScrollingNode>::decode):
16393        (ArgumentCoder<ScrollingStateOverflowScrollingNode>::decode):
16394        (WebKit::encodeNodeAndDescendants):
16395        (WebKit::RemoteScrollingCoordinatorTransaction::decode):
16396        (WebKit::RemoteScrollingTreeTextStream::dump):
16397        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
16398        (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
16399        * UIProcess/Scrolling/RemoteScrollingTree.cpp:
16400        (WebKit::RemoteScrollingTree::createNode):
16401        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
16402        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollLayer):
16403        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateLayersAfterViewportChange):
16404        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
16405        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::ScrollingTreeOverflowScrollingNodeIOS):
16406        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateBeforeChildren):
16407        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren):
16408        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::setScrollLayerPosition):
16409        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateChildNodesAfterScroll):
16410        * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
16411        (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
16412
164132014-05-19  Alexey Proskuryakov  <ap@apple.com>
16414
16415        [Mac] Fix a typo in plug-in sandbox
16416        https://bugs.webkit.org/show_bug.cgi?id=133074
16417
16418        Reviewed by Anders Carlsson.
16419
16420        * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
16421
164222014-05-16  Andy Estes  <aestes@apple.com>
16423
16424        [WebKit2] Wake up threads blocked in waitForAndDispatchImmediately() if we lose our connection
16425        https://bugs.webkit.org/show_bug.cgi?id=133010
16426
16427        Reviewed by Geoffrey Garen.
16428
16429        If a thread is blocked on m_waitForMessageCondition and we lose our connection, treat that like we do a timeout.
16430
16431        * Platform/IPC/Connection.cpp:
16432        (IPC::Connection::Connection):
16433        (IPC::Connection::waitForMessage):
16434        (IPC::Connection::connectionDidClose):
16435        * Platform/IPC/Connection.h:
16436
164372014-05-19  Mark Rowe  <mrowe@apple.com>
16438
16439        Build fix after r169023.
16440
16441        * Shared/API/Cocoa/WebKitPrivate.h: Stop including headers that no longer exist.
16442        I hope for weinig's sake that no-one was relying on them.
16443
164442014-05-18  Anders Carlsson  <andersca@apple.com>
16445
16446        Relax an assertion when creating document loaders
16447        https://bugs.webkit.org/show_bug.cgi?id=133058
16448
16449        Reviewed by Sam Weinig.
16450
16451        When navigating back/forward items recursively, createDocumentLoader will be called
16452        for subframes before main frames so only associate the navigation with main frames.
16453
16454        * WebProcess/WebPage/WebPage.cpp:
16455        (WebKit::WebPage::createDocumentLoader):
16456
164572014-05-18  Zsolt Borbely  <zsborbely.u-szeged@partner.samsung.com>
16458
16459        CMake Buildfix after r169023.
16460
16461        Reviewed by Csaba Osztrogonác.
16462
16463        * CMakeLists.txt: Add new files after r168994.
16464
164652014-05-18  Sam Weinig  <sam@webkit.org>
16466
16467        [WebKit2] Implement ScriptMessageHandlers
16468        https://bugs.webkit.org/show_bug.cgi?id=133053
16469
16470        Reviewed by Anders Carlsson.
16471
16472        * DerivedSources.make:
16473        * Scripts/webkit2/messages.py:
16474        (struct_or_class):
16475        (argument_coder_headers_for_type):
16476        (headers_for_type):
16477        * UIProcess/API/Cocoa/WKScriptMessage.mm:
16478        (-[WKScriptMessage _initWithBody:webView:name:]):
16479        (-[WKScriptMessage body]):
16480        (-[WKScriptMessage webView]):
16481        (-[WKScriptMessage name]):
16482        (-[WKScriptMessage _scriptWorld]): Deleted.
16483        * UIProcess/API/Cocoa/WKScriptMessageInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKScriptMessagePrivate.h.
16484        * UIProcess/API/Cocoa/WKScriptMessagePrivate.h: Removed.
16485        * UIProcess/API/Cocoa/WKUserContentController.mm:
16486        (-[WKUserContentController addScriptMessageHandler:name:]):
16487        (-[WKUserContentController removeScriptMessageHandlerForName:]):
16488        (-[WKUserContentController _addScriptMessageHandler:name:world:]): Deleted.
16489        (-[WKUserContentController _removeScriptMessageHandlerForName:world:]): Deleted.
16490        * UIProcess/API/Cocoa/WKUserContentControllerInternal.h:
16491        * UIProcess/API/Cocoa/WKUserContentControllerPrivate.h: Removed.
16492        * UIProcess/API/Cocoa/WKWebView.mm:
16493        (pageToViewMap):
16494        (fromWebPageProxy):
16495        (-[WKWebView initWithFrame:configuration:]):
16496        (-[WKWebView dealloc]):
16497        * UIProcess/API/Cocoa/WKWebViewInternal.h:
16498        * UIProcess/UserContent/WebScriptMessageHandler.cpp: Added.
16499        (WebKit::WebScriptMessageHandlerHandle::encode):
16500        (WebKit::WebScriptMessageHandlerHandle::decode):
16501        (WebKit::generateIdentifier):
16502        (WebKit::WebScriptMessageHandler::create):
16503        (WebKit::WebScriptMessageHandler::WebScriptMessageHandler):
16504        (WebKit::WebScriptMessageHandler::~WebScriptMessageHandler):
16505        * UIProcess/UserContent/WebScriptMessageHandler.h: Added.
16506        (WebKit::WebScriptMessageHandler::Client::~Client):
16507        (WebKit::WebScriptMessageHandler::handle):
16508        (WebKit::WebScriptMessageHandler::identifier):
16509        (WebKit::WebScriptMessageHandler::name):
16510        (WebKit::WebScriptMessageHandler::client):
16511        * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
16512        (WebKit::WebUserContentControllerProxy::addProcess):
16513        (WebKit::WebUserContentControllerProxy::removeProcess):
16514        (WebKit::WebUserContentControllerProxy::addUserScriptMessageHandler):
16515        (WebKit::WebUserContentControllerProxy::removeUserMessageHandlerForName):
16516        (WebKit::WebUserContentControllerProxy::didPostMessage):
16517        * UIProcess/UserContent/WebUserContentControllerProxy.h:
16518        * UIProcess/UserContent/WebUserContentControllerProxy.messages.in: Added.
16519        * WebKit2.xcodeproj/project.pbxproj:
16520        * WebProcess/UserContent/WebUserContentController.cpp:
16521        (WebKit::WebUserMessageHandlerDescriptorProxy::create):
16522        (WebKit::WebUserMessageHandlerDescriptorProxy::~WebUserMessageHandlerDescriptorProxy):
16523        (WebKit::WebUserMessageHandlerDescriptorProxy::didPostMessage):
16524        (WebKit::WebUserMessageHandlerDescriptorProxy::descriptor):
16525        (WebKit::WebUserMessageHandlerDescriptorProxy::identifier):
16526        (WebKit::WebUserMessageHandlerDescriptorProxy::WebUserMessageHandlerDescriptorProxy):
16527        (WebKit::WebUserContentController::addUserScriptMessageHandlers):
16528        (WebKit::WebUserContentController::removeUserScriptMessageHandler):
16529        * WebProcess/UserContent/WebUserContentController.h:
16530        * WebProcess/UserContent/WebUserContentController.messages.in:
16531
165322014-05-18  Rik Cabanier  <cabanier@adobe.com>
16533
16534        support for navigator.hardwareConcurrency
16535        https://bugs.webkit.org/show_bug.cgi?id=132588
16536
16537        Reviewed by Filip Pizlo.
16538
16539        * Configurations/FeatureDefines.xcconfig:
16540
165412014-05-18  Anders Carlsson  <andersca@apple.com>
16542
16543        Implement Navigations for all methods declared returning one
16544        https://bugs.webkit.org/show_bug.cgi?id=133048
16545        <rdar://problem/16830064>
16546
16547        Reviewed by Sam Weinig.
16548
16549        * UIProcess/API/Cocoa/WKWebView.mm:
16550        (-[WKWebView goToBackForwardListItem:]):
16551        (-[WKWebView goBack]):
16552        (-[WKWebView goForward]):
16553        (-[WKWebView reload]):
16554        (-[WKWebView reloadFromOrigin]):
16555        Create and return navigations.
16556
16557        (-[WKWebView _reload]):
16558        Call -[WKWebView reload].
16559
16560        * UIProcess/Cocoa/NavigationState.h:
16561        * UIProcess/Cocoa/NavigationState.mm:
16562        (WebKit::NavigationState::createBackForwardNavigation):
16563        Create a back/forward navigation.
16564
16565        (WebKit::NavigationState::createReloadNavigation):
16566        Create a reload navigation.
16567
16568        * UIProcess/WebPageProxy.cpp:
16569        (WebKit::WebPageProxy::reattachToWebProcessWithItem):
16570        Generate a navigation ID and send it with the GoToBackForwardItem message.
16571
16572        (WebKit::WebPageProxy::reload):
16573        Return a navigation ID.
16574
16575        (WebKit::WebPageProxy::goForward):
16576        Generate a navigation ID and send it with the GoForward message.
16577        
16578        (WebKit::WebPageProxy::goBack):
16579        Generate a navigation ID and send it with the GoBack message.
16580
16581        (WebKit::WebPageProxy::goToBackForwardItem):
16582        Generate a navigation ID and send it with the GoToBackForwardItem message.
16583
16584        * UIProcess/WebPageProxy.h:
16585        Return navigation IDs where appropriate.
16586
16587        * UIProcess/cf/WebPageProxyCF.cpp:
16588        (WebKit::WebPageProxy::restoreFromSessionStateData):
16589        Generate a navigation ID and send it with the RestoreSessionAndNavigateToCurrentItem message.
16590        
16591        * WebProcess/WebPage/WebPage.cpp:
16592        (WebKit::WebPage::goForward):
16593        (WebKit::WebPage::goBack):
16594        (WebKit::WebPage::goToBackForwardItem):
16595        Set up the pending navigation ID.
16596
16597        (WebKit::WebPage::restoreSessionAndNavigateToCurrentItem):
16598        Call goToBackForwardItem with a navigation ID.
16599
16600        * WebProcess/WebPage/WebPage.h:
16601        Add navigation IDs.
16602
16603        * WebProcess/WebPage/WebPage.messages.in:
16604        Add navigation IDs.
16605
166062014-05-18  Commit Queue  <commit-queue@webkit.org>
16607
16608        Unreviewed, rolling out r169001.
16609        https://bugs.webkit.org/show_bug.cgi?id=133050
16610
16611        We can't expose the C SPI from WKWebView (Requested by
16612        andersca on #webkit).
16613
16614        Reverted changeset:
16615
16616        "Need a way to get a WKPageRef from a WKWebView"
16617        https://bugs.webkit.org/show_bug.cgi?id=133015
16618        http://trac.webkit.org/changeset/169001
16619
166202014-05-18  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
16621
16622        [WK2][GTK] Buildfix after r168999.
16623
16624        Reviewed by Csaba Osztrogonác.
16625
16626        * UIProcess/gtk/WebContextGtk.cpp:
16627        (WebKit::WebContext::platformDefaultWebSQLDatabaseDirectory): Renamed from WebKit::WebContext::platformDefaultDatabaseDirectory().
16628        (WebKit::WebContext::platformDefaultIndexedDBDatabaseDirectory): Added.
16629
166302014-05-18  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
16631
16632        [WK2][EFL] Buildfix after r168999.
16633
16634        Reviewed by Csaba Osztrogonác.
16635
16636        * UIProcess/efl/WebContextEfl.cpp:
16637        (WebKit::WebContext::platformDefaultWebSQLDatabaseDirectory): Renamed from WebKit::WebContext::platformDefaultDatabaseDirectory().
16638        (WebKit::WebContext::platformDefaultIndexedDBDatabaseDirectory): Added.
16639
166402014-05-18  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
16641
16642        [WK2][cmake] Buildfix after r168994.
16643
16644        Reviewed by Csaba Osztrogonác.
16645
16646        * CMakeLists.txt: Added new files to the build system introduced in r168994.
16647
166482014-05-17  Alexey Proskuryakov  <ap@apple.com>
16649
16650        REGRESSION (NetworkProcess): Trying to use appcache fallback crashes in ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache
16651        https://bugs.webkit.org/show_bug.cgi?id=133007
16652        <rdar://problem/13702706>
16653
16654        appcache tests often fail on the Mac WebKit2 bot
16655        https://bugs.webkit.org/show_bug.cgi?id=82061
16656
16657        Reviewed by Maciej Stachowiak.
16658
16659        * WebProcess/Network/WebResourceLoader.cpp:
16660        (WebKit::WebResourceLoader::willSendRequest):
16661        (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
16662        (WebKit::WebResourceLoader::didFailResourceLoad):
16663        Perform the same appcache checks that ResourceHandleClient implementation in ResourceLoader
16664        does. We should eventually come up with a way to share the code. Perhaps add a class that
16665        isolates ResourceLoader from networking details? But ResourceLoader was itself supposed
16666        to be the class that isolates DocumentLoader from networking details. So, unsure.
16667
166682014-05-17  Jae Hyun Park  <jaepark@webkit.org>
16669
16670        [EFL] Remove m_contentPosition from PageViewportControllerClientEfl
16671        https://bugs.webkit.org/show_bug.cgi?id=132774
16672
16673        Reviewed by Anders Carlsson.
16674
16675        m_contentPosition is not used anywhere. So, this patch removes
16676        m_contentPosition and reduces one unnecessary assignment in
16677        setViewportPosition. Also, it renames contentsPoint to contentsPosition.
16678
16679        * UIProcess/PageViewportControllerClient.h:
16680        * UIProcess/efl/PageViewportControllerClientEfl.cpp:
16681        (WebKit::PageViewportControllerClientEfl::setViewportPosition):
16682        * UIProcess/efl/PageViewportControllerClientEfl.h:
16683
166842014-05-17  David Kilzer  <ddkilzer@apple.com>
16685
16686        Need a way to get a WKPageRef from a WKWebView
16687        <http://webkit.org/b/133015>
16688
16689        Reviewed by Benjamin Poulain.
16690
16691        * UIProcess/API/Cocoa/WKWebView.mm:
16692        (-[WKWebView _pageRef]): Added.
16693        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
16694        (-[WKWebView _pageRef]): Added declaration.
16695
166962014-05-17  Anders Carlsson  <andersca@apple.com>
16697
16698        Give user scripts custom URLs
16699        https://bugs.webkit.org/show_bug.cgi?id=133035
16700
16701        Reviewed by Beth Dakin.
16702
16703        * UIProcess/API/Cocoa/WKUserContentController.mm:
16704        (-[WKUserContentController addUserScript:]):
16705        Create a user-script:<number> URL for user scripts.
16706
16707        * UIProcess/API/Cocoa/WKUserScript.h:
16708        Move the init method after the properties.
16709
167102014-05-17  Anders Carlsson  <andersca@apple.com>
16711
16712        Replace WKContextSetDatabaseDirectory with two WKContextConfiguration parameters
16713        https://bugs.webkit.org/show_bug.cgi?id=133033
16714        <rdar://problem/16830143>
16715
16716        Reviewed by Sam Weinig.
16717
16718        * Shared/WebProcessCreationParameters.cpp:
16719        (WebKit::WebProcessCreationParameters::encode):
16720        (WebKit::WebProcessCreationParameters::decode):
16721        * Shared/WebProcessCreationParameters.h:
16722        Rename databaseDirectory to webSQLDatabaseDirectory to better indicate the directory type.
16723
16724        * UIProcess/API/C/WKContext.cpp:
16725        (WKContextSetDatabaseDirectory): Deleted.
16726        This is no longer needed.
16727
16728        * UIProcess/API/C/WKContextConfigurationRef.cpp:
16729        (WKContextConfigurationCopyIndexedDBDatabaseDirectory):
16730        (WKContextConfigurationSetIndexedDBDatabaseDirectory):
16731        (WKContextConfigurationCopyWebSQLDatabaseDirectory):
16732        (WKContextConfigurationSetWebSQLDatabaseDirectory):
16733        * UIProcess/API/C/WKContextConfigurationRef.h:
16734        Add setters and getters.
16735
16736        * UIProcess/API/C/WKContextPrivate.h:
16737        Remove WKContextSetDatabaseDirectory.
16738
16739        * UIProcess/APIContextConfiguration.cpp:
16740        (API::ContextConfiguration::webContextConfiguration):
16741        Set m_indexedDBDatabaseDirectory and m_webSQLDatabaseDirectory on the configuration.
16742
16743        * UIProcess/APIContextConfiguration.h:
16744        (API::ContextConfiguration::indexedDBDatabaseDirectory):
16745        (API::ContextConfiguration::setIndexedDBDatabaseDirectory):
16746        (API::ContextConfiguration::webSQLDatabaseDirectory):
16747        (API::ContextConfiguration::setWebSQLDatabaseDirectory):
16748        Add getters and setters to the C++ part of WKContextConfigurationRef.
16749
16750        * UIProcess/WebContext.cpp:
16751        (WebKit::WebContext::applyPlatformSpecificConfigurationDefaults):
16752        Set webSQLDatabaseDirectory and indexedDBDatabaseDirectory.
16753
16754        (WebKit::WebContext::WebContext):
16755        Initialize m_webSQLDatabaseDirectory and m_indexedDBDatabaseDirectory.
16756
16757        (WebKit::WebContext::ensureDatabaseProcess):
16758        Set parameters.indexedDatabaseDirectory from m_indexedDBDatabaseDirectory.
16759
16760        (WebKit::WebContext::createNewWebProcess):
16761        Set parameters.webSQLDatabaseDirectory from m_webSQLDatabaseDirectory.
16762
16763        * UIProcess/mac/WebContextMac.mm:
16764        (WebKit::WebContext::platformDefaultWebSQLDatabaseDirectory):
16765        Rename this to indicate that it's about WebSQL databases.
16766
16767        (WebKit::WebContext::platformDefaultIndexedDBDatabaseDirectory):
16768        Add this.
16769
16770        * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
16771        (WebKit::WebDatabaseManager::initialize):
16772        Update for WebProcessCreationParameters rename.
16773
16774        * WebProcess/cocoa/WebProcessCocoa.mm:
16775        (WebKit::WebProcess::platformInitializeWebProcess):
16776        Update for WebProcessCreationParameters rename.
16777
167782014-05-17  Brent Fulgham  <bfulgham@apple.com>
16779
16780        [Phone Number Detection] drop-down menu in the phone number detection box doesn't appear.
16781        https://bugs.webkit.org/show_bug.cgi?id=133024
16782
16783        Reviewed by Sam Weinig.
16784
16785        * WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
16786        (WebKit::TelephoneNumberOverlayController::drawRect): Don't clear the set of found phone numbers each
16787        time we call drawRect. This gets called ~9 times per screen refresh, so end up with no active
16788        phone numbers to interact with.
16789
167902014-05-17  Alexey Proskuryakov  <ap@apple.com>
16791
16792        NetworkProcess can repeatedly crash handling Blob messages after any unrelated crash
16793        https://bugs.webkit.org/show_bug.cgi?id=133032
16794        <rdar://problem/16951630>
16795
16796        Reviewed by Geoffrey Garen.
16797
16798        Replaced assertions with runtime checks. This can happen if NetworkProcess previously
16799        crashed for any unrelated reason.
16800
16801        * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
16802        (WebKit::NetworkBlobRegistry::registerBlobURL):
16803        (WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
16804        (WebKit::NetworkBlobRegistry::unregisterBlobURL):
16805
168062014-05-17  Anders Carlsson  <andersca@apple.com>
16807
16808        -[WKWebView dealloc] should close the page
16809        https://bugs.webkit.org/show_bug.cgi?id=133031
16810        <rdar://problem/16929815>
16811
16812        Reviewed by Simon Fraser.
16813
16814        * UIProcess/API/Cocoa/WKWebView.mm:
16815        (-[WKWebView dealloc]):
16816
168172014-05-16  Anders Carlsson  <andersca@apple.com>
16818
16819        Expose WKUserScript as API
16820        https://bugs.webkit.org/show_bug.cgi?id=133017
16821        <rdar://problem/16948059>
16822
16823        Reviewed by Sam Weinig.
16824
16825        * DerivedSources.make:
16826        Add WebUserContentController.
16827
16828        * Shared/API/Cocoa/WebKit.h:
16829        Add WKUserScript.h
16830
16831        * Shared/API/c/WKSharedAPICast.h:
16832        (WebKit::toUserScriptInjectionTime):
16833        Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
16834
16835        * Shared/API/c/WKUserScriptInjectionTime.h:
16836        Rename WKUserScriptInjectionTime to _WKUserScriptInjectionTime to free up the name for the Objective-C API
16837
16838        * Shared/WebPageCreationParameters.cpp:
16839        (WebKit::WebPageCreationParameters::encode):
16840        Encode the user content controller ID.
16841
16842        (WebKit::WebPageCreationParameters::decode):
16843        Decode the user content controller ID.
16844
16845        * Shared/WebPageCreationParameters.h:
16846        Add userContentControllerID.
16847
16848        * UIProcess/API/C/WKPageGroup.cpp:
16849        (WKPageGroupAddUserScript):
16850        Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
16851
16852        * UIProcess/API/C/WKPageGroup.h:
16853        Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
16854
16855        * UIProcess/API/Cocoa/WKBrowsingContextGroup.h:
16856        Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
16857
16858        * UIProcess/API/Cocoa/WKBrowsingContextGroup.mm:
16859        (-[WKBrowsingContextGroup addUserScript:baseURL:whitelistedURLPatterns:blacklistedURLPatterns:injectionTime:mainFrameOnly:]):
16860        Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
16861
16862        * UIProcess/API/Cocoa/WKUserContentController.h:
16863        Add new methods.
16864
16865        * UIProcess/API/Cocoa/WKUserContentController.mm:
16866        (-[WKUserContentController init]):
16867        Create the WebUserContentControllerProxy object and user scripts array.
16868
16869        (-[WKUserContentController userScripts]):
16870        Return the user scripts array.
16871
16872        (toWebCoreUserScriptInjectionTime):
16873        Helper for converting from a WKUserScriptInjectionTime enum to WebCore::UserScriptInjectionTime.
16874
16875        (-[WKUserContentController addUserScript:]):
16876        Call through to the _userContentControllerProxy object.
16877
16878        (-[WKUserContentController removeAllUserScripts]):
16879        Call through to the _userContentControllerProxy object.
16880        
16881        * UIProcess/API/Cocoa/WKUserContentControllerInternal.h: Added.
16882        Add WebUserContentControllerProxy ivar.
16883
16884        * UIProcess/API/Cocoa/WKUserScript.h: Added.
16885        Add new header.
16886
16887        * UIProcess/API/Cocoa/WKUserScript.mm:
16888        (-[WKUserScript initWithSource:injectionTime:forMainFrameOnly:]):
16889        Initialize the WKUserScript object.
16890
16891        (-[WKUserScript source]):
16892        (-[WKUserScript injectionTime]):
16893        (-[WKUserScript isForMainFrameOnly]):
16894        Add getters.
16895
16896        (-[WKUserScript copyWithZone:]):
16897        Since WKUserScript is immutable, just return a retained object.
16898
16899        * UIProcess/API/Cocoa/WKUserScriptInternal.h:
16900        Add ivars.
16901
16902        * UIProcess/API/Cocoa/WKWebView.mm:
16903        (-[WKWebView initWithFrame:configuration:]):
16904        Set the user content controller from the configuration.
16905
16906        * UIProcess/UserContent/WebUserContentControllerProxy.cpp: Added.
16907        (WebKit::generateIdentifier):
16908        Return a unique identifier.
16909
16910        (WebKit::WebUserContentControllerProxy::create):
16911        Return a new WebUserContentControllerProxy object.
16912
16913        (WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
16914        Initialize m_identifier.
16915
16916        (WebKit::WebUserContentControllerProxy::~WebUserContentControllerProxy):
16917        Add destructor.
16918
16919        (WebKit::WebUserContentControllerProxy::addProcess):
16920        Add the process to the m_processes set. If it's the first time doing so, add the user scripts we know about.
16921
16922        (WebKit::WebUserContentControllerProxy::removeProcess):
16923        Remove the process from m_processes.
16924
16925        (WebKit::WebUserContentControllerProxy::addUserScript):
16926        Add the user script and let all the web processes know that it was added.
16927
16928        (WebKit::WebUserContentControllerProxy::removeAllUserScripts):
16929        Remove all user scripts and tell all the web processes about it.
16930        
16931        * UIProcess/UserContent/WebUserContentControllerProxy.h:
16932        Add new class.
16933
16934        * UIProcess/WebPageProxy.cpp:
16935        (WebKit::WebPageProxy::WebPageProxy):
16936        If the process is already running, add it to the user content controller.
16937
16938        (WebKit::WebPageProxy::close):
16939        If the process is running, remove it from the user content controller.
16940
16941        (WebKit::WebPageProxy::connectionWillOpen):
16942        Add the process to the user content controller.
16943
16944        (WebKit::WebPageProxy::resetStateAfterProcessExited):
16945        Remove the process from the user content controller.
16946
16947        (WebKit::WebPageProxy::creationParameters):
16948        Pass along the user content controller ID when creating the web page.
16949
16950        * UIProcess/WebPageProxy.h:
16951        Add a WebUserContentControllerProxy object to the web page configuration.
16952
16953        * WebKit2.xcodeproj/project.pbxproj:
16954        Add new files.
16955
16956        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
16957        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
16958        Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
16959        
16960        * WebProcess/UserContent/WebUserContentController.cpp: Added.
16961        New class that manages a WebCore::UserContentController object.
16962
16963        (WebKit::WebUserContentController::getOrCreate):
16964        Look up (or create) a WebUserContentController object given its identifier.
16965
16966        (WebKit::WebUserContentController::WebUserContentController):
16967        Add ourselves as a message receiver.
16968
16969        (WebKit::WebUserContentController::~WebUserContentController):
16970        Remove ourselves as a message receiver.
16971
16972        (WebKit::WebUserContentController::addUserScripts):
16973        Add all passed in user scripts to the WebCore user content controller object.
16974
16975        (WebKit::WebUserContentController::removeAllUserScripts):
16976        Remove all user scripts from the WebCore user content controller object.
16977
16978        * WebProcess/UserContent/WebUserContentController.messages.in: Added.
16979        Add new messages file.
16980
16981        * WebProcess/WebPage/WebPage.cpp:
16982        (WebKit::WebPage::WebPage):
16983        Get a WebUserContentController object and pass it along to WebCore.
16984
16985        * WebProcess/WebPage/WebPage.h:
16986        Add WebUserContentController member.
16987
169882014-05-16  Piotr Grad  <p.grad@samsung.com>
16989
16990        [GTK] Build break after 168978.
16991        https://bugs.webkit.org/show_bug.cgi?id=133012.
16992
16993        Reviewed by Simon Fraser.
16994
16995        * UIProcess/API/gtk/WebKitSettings.cpp:
16996        (webKitSettingsConstructed):
16997
169982014-05-16  Simon Fraser  <simon.fraser@apple.com>
16999
17000        Put back a symbol removed in r168978 that Safari needs, but deprecate it.
17001
17002        Reviewed by Anders Carlsson.
17003
17004        * Shared/API/c/WKDeprecatedFunctions.cpp:
17005        (WKPreferencesSetRegionBasedColumnsEnabled):
17006        (WKPreferencesGetRegionBasedColumnsEnabled):
17007
170082014-05-16  Oliver Hunt  <oliver@apple.com>
17009
17010        Separate enabling sandbox extensions from the WEB_PROCESS_SANDBOX flag
17011        https://bugs.webkit.org/show_bug.cgi?id=133016
17012
17013        Reviewed by Alexey Proskuryakov.
17014
17015        Add a distinct SANDBOX_EXTENSIONS flag to guard sandbox extensions
17016        and switch over to it in the places that extensions are used.
17017
17018        * Shared/SandboxExtension.h:
17019        * Shared/mac/SandboxExtensionMac.mm:
17020        * UIProcess/WebPageProxy.cpp:
17021        (WebKit::WebPageProxy::didChooseFilesForOpenPanel):
17022        * WebKit2Prefix.h:
17023        * WebProcess/WebPage/WebPage.cpp:
17024        * WebProcess/WebPage/WebPage.h:
17025        * WebProcess/WebPage/WebPage.messages.in:
17026        * WebProcess/cocoa/WebProcessCocoa.mm:
17027        (WebKit::WebProcess::platformInitializeWebProcess):
17028
170292014-05-16  Benjamin Poulain  <bpoulain@apple.com>
17030
17031        [iOS][WK2] Add a heuristic to set the right horizontal offset on rotation for responsive websites
17032        https://bugs.webkit.org/show_bug.cgi?id=132937
17033        <rdar://problem/16710097>
17034
17035        Reviewed by Simon Fraser.
17036
17037        When responsive websites have the content size lay out larger than the minimal layout size,
17038        we should not keep the relative horizontal position into view,
17039        many of those websites have all the content on the left.
17040
17041        * WebProcess/WebPage/ios/WebPageIOS.mm:
17042        (WebKit::WebPage::dynamicViewportSizeUpdate):
17043
170442014-05-16  Benjamin Poulain  <bpoulain@apple.com>
17045
17046        [iOS][WK2] On dynamic resize, the content offset is contrained to the old content size
17047        https://bugs.webkit.org/show_bug.cgi?id=132972
17048
17049        Reviewed by Simon Fraser.
17050
17051        When we set the content offset, UIScrollView limits the value to the current valid range for
17052        content size. Since the content size was only updated after the animation, when the first frame
17053        comes in, the content offset would sometimes be limited to a smaller rect that the actual content.
17054
17055        To fix this, set the expected future content size before changing the offset.
17056
17057        During the animation, the content size could have changed arbitrarily. At the end of the animation,
17058        we take the actual frame and set the definite content size.
17059        Any update after that will be regular updates through didCommitLayer. 
17060
17061        * UIProcess/API/Cocoa/WKWebView.mm:
17062        (-[WKWebView _beginAnimatedResizeWithUpdates:]):
17063        (-[WKWebView _endAnimatedResize]):
17064
170652014-05-16  Simon Fraser  <simon.fraser@apple.com>
17066
17067        Remove "region-based columns" prefs
17068        https://bugs.webkit.org/show_bug.cgi?id=133006
17069        <rdar://problem/16945824>
17070
17071        Reviewed by Dave Hyatt.
17072
17073        Remove "region-based columns" prefs and related code, since this is only
17074        way to render columns now.
17075
17076        * Shared/WebPreferencesStore.h:
17077        * UIProcess/API/C/WKPreferences.cpp:
17078        (WKPreferencesSetRegionBasedColumnsEnabled): Deleted.
17079        (WKPreferencesGetRegionBasedColumnsEnabled): Deleted.
17080        * UIProcess/API/C/WKPreferencesRefPrivate.h:
17081        * WebProcess/WebPage/WebPage.cpp:
17082        (WebKit::WebPage::updatePreferences):
17083
170842014-05-16  Brent Fulgham  <bfulgham@apple.com>
17085
17086        Work around bug in Silverlight
17087        https://bugs.webkit.org/show_bug.cgi?id=133004
17088
17089        Reviewed by Anders Carlsson.
17090
17091        * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm:
17092        (WebKit::PluginProcessMainDelegate::doPreInitializationWork): Add low-resolution flag
17093        to user defaults prior to NSApplication invocation. This code was moved from
17094        PluginProcess::platformInitializeProcess.
17095        * PluginProcess/mac/PluginProcessMac.mm:
17096        (WebKit::PluginProcess::platformInitializeProcess): Move low-resolution flag
17097        setting to PluginProcessMainDelegate.
17098
170992014-05-16  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
17100
17101        [WK2] Change the remaining framework includes from WebKit2 to WebKit
17102        https://bugs.webkit.org/show_bug.cgi?id=132956
17103
17104        Reviewed by Sam Weinig.
17105
17106        * NetworkProcess/unix/NetworkProcessMainUnix.cpp:
17107        * NetworkProcess/unix/NetworkProcessMainUnix.h:
17108        * PluginProcess/unix/PluginProcessMainUnix.h:
17109        * Shared/API/c/cairo/WKImageCairo.h:
17110        * Shared/API/c/cf/WKURLRequestCF.h:
17111        * Shared/API/c/cf/WKURLResponseCF.h:
17112        * Shared/API/c/efl/WKArrayEfl.cpp:
17113        * Shared/API/c/efl/WKArrayEfl.h:
17114        * UIProcess/API/C/CoordinatedGraphics/WKView.h:
17115        * UIProcess/API/C/WKBatteryManager.h:
17116        * UIProcess/API/C/WKBatteryStatus.h:
17117        * UIProcess/API/C/WKGrammarDetail.h:
17118        * UIProcess/API/C/WKTextChecker.h:
17119        * UIProcess/API/C/WKVibration.h:
17120        * UIProcess/API/C/WKViewportAttributes.h:
17121        * UIProcess/API/C/cairo/WKIconDatabaseCairo.h:
17122        * UIProcess/API/C/efl/WKAPICastEfl.h:
17123        * UIProcess/API/C/efl/WKColorPickerResultListener.h:
17124        * UIProcess/API/C/efl/WKEventEfl.h:
17125        * UIProcess/API/C/efl/WKPageEfl.h:
17126        * UIProcess/API/C/efl/WKPopupItem.h:
17127        * UIProcess/API/C/efl/WKPopupMenuListener.h:
17128        * UIProcess/API/C/efl/WKViewEfl.cpp:
17129        * UIProcess/API/C/efl/WKViewEfl.h:
17130        * UIProcess/API/C/gtk/WKFullScreenClientGtk.h:
17131        * UIProcess/API/C/gtk/WKInspectorClientGtk.h:
17132        * UIProcess/API/C/gtk/WKView.h:
17133        * UIProcess/API/C/gtk/WKViewPrivate.h:
17134        * UIProcess/API/C/soup/WKContextSoup.h:
17135        * UIProcess/API/C/soup/WKCookieManagerSoup.h:
17136        * UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.h:
17137        * UIProcess/API/C/soup/WKSoupRequestManager.h:
17138        * UIProcess/API/Cocoa/WKErrorRecoveryAttempting.h:
17139        * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.h:
17140        * UIProcess/API/cpp/efl/WKEinaSharedString.cpp:
17141        * UIProcess/API/cpp/efl/WKEinaSharedString.h:
17142        * UIProcess/API/efl/EwkView.cpp:
17143        * UIProcess/API/efl/EwkView.h:
17144        * UIProcess/API/efl/EwkViewCallbacks.h:
17145        * UIProcess/API/efl/GestureRecognizer.h:
17146        * UIProcess/API/efl/ewk_application_cache_manager_private.h:
17147        * UIProcess/API/efl/ewk_auth_request_private.h:
17148        * UIProcess/API/efl/ewk_back_forward_list_item_private.h:
17149        * UIProcess/API/efl/ewk_back_forward_list_private.h:
17150        * UIProcess/API/efl/ewk_context_menu_item.cpp:
17151        * UIProcess/API/efl/ewk_context_private.h:
17152        * UIProcess/API/efl/ewk_cookie_manager_private.h:
17153        * UIProcess/API/efl/ewk_database_manager_private.h:
17154        * UIProcess/API/efl/ewk_error_private.h:
17155        * UIProcess/API/efl/ewk_favicon_database_private.h:
17156        * UIProcess/API/efl/ewk_file_chooser_request_private.h:
17157        * UIProcess/API/efl/ewk_page_group_private.h:
17158        * UIProcess/API/efl/ewk_popup_menu_item_private.h:
17159        * UIProcess/API/efl/ewk_popup_menu_private.h:
17160        * UIProcess/API/efl/ewk_security_origin_private.h:
17161        * UIProcess/API/efl/ewk_settings_private.h:
17162        * UIProcess/API/efl/ewk_storage_manager_private.h:
17163        * UIProcess/API/efl/ewk_view.cpp:
17164        * UIProcess/API/efl/ewk_view_private.h:
17165        * UIProcess/API/efl/ewk_window_features_private.h:
17166        * UIProcess/API/efl/tests/InjectedBundle/injected_bundle_sample.cpp:
17167        * UIProcess/API/efl/tests/test_ewk2_eina_shared_string.cpp:
17168        * UIProcess/API/gtk/WebKitDownloadClient.cpp:
17169        * UIProcess/API/gtk/WebKitPrivate.h:
17170        * UIProcess/CoordinatedGraphics/WKCoordinatedSceneAPICast.h:
17171        * UIProcess/efl/BatteryProvider.h:
17172        * UIProcess/efl/ContextHistoryClientEfl.h:
17173        * UIProcess/efl/DownloadManagerEfl.h:
17174        * UIProcess/efl/FindClientEfl.h:
17175        * UIProcess/efl/FormClientEfl.h:
17176        * UIProcess/efl/PageLoadClientEfl.h:
17177        * UIProcess/efl/PagePolicyClientEfl.h:
17178        * UIProcess/efl/PageUIClientEfl.h:
17179        * UIProcess/efl/RequestManagerClientEfl.h:
17180        * UIProcess/efl/TextCheckerClientEfl.h:
17181        * UIProcess/efl/VibrationClientEfl.h:
17182        * UIProcess/efl/ViewClientEfl.cpp:
17183        * UIProcess/efl/ViewClientEfl.h:
17184        * UIProcess/efl/WebInspectorProxyEfl.cpp:
17185        * WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:
17186        * WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp:
17187        * WebProcess/efl/SeccompFiltersWebProcessEfl.cpp:
17188        * WebProcess/efl/SeccompFiltersWebProcessEfl.h:
17189        * WebProcess/efl/WebProcessMainEfl.cpp:
17190        * WebProcess/efl/WebProcessMainEfl.h:
17191        * WebProcess/gtk/WebGtkInjectedBundleMain.cpp:
17192        * WebProcess/gtk/WebProcessMainGtk.cpp:
17193        * WebProcess/gtk/WebProcessMainGtk.h:
17194        * mac/WKPreferences.h:
17195
171962014-05-15  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
17197
17198        [EFL][WK2] Skip failing unit tests
17199        https://bugs.webkit.org/show_bug.cgi?id=132979
17200
17201        Reviewed by Daniel Bates.
17202
17203        * PlatformEfl.cmake: Skip failing unit tests for now.
17204
172052014-05-15  Simon Fraser  <simon.fraser@apple.com>
17206
17207        [iOS WK2] When zoomed, fixed elements jump at the start of a scroll, and jump back at the end.
17208        https://bugs.webkit.org/show_bug.cgi?id=132978
17209        <rdar://problem/16894428>
17210
17211        Reviewed by Benjamin Poulain.
17212        
17213        Move the static function fixedPositionRectFromExposedRect() to a member function on
17214        WebPageProxy so we can call it from more places. Also never give WebCore a customFixedPosition
17215        rect that extends past the document bounds, but allow rubber-banding/pinching in the UI process to
17216        move fixed elements outside the document.
17217        
17218        * UIProcess/PageClient.h: Need to expose minimumZoomScale() and contentsSize() to WebPageProxy.
17219        * UIProcess/WebPageProxy.h:
17220        * UIProcess/ios/PageClientImplIOS.h:
17221        * UIProcess/ios/PageClientImplIOS.mm:
17222        (WebKit::PageClientImpl::minimumZoomScale):
17223        (WebKit::PageClientImpl::contentsSize):
17224        * UIProcess/ios/WKContentView.mm:
17225        (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
17226        Pass the computeCustomFixedPositionRect(ConstrainedToDocumentRect) to WebCore, but use computeCustomFixedPositionRect()
17227        for the ScrollingCoordinator update.
17228        (adjustedUnexposedEdge): Deleted.
17229        (adjustedUnexposedMaxEdge): Deleted.
17230        (fixedPositionRectFromExposedRect): Deleted.
17231        * UIProcess/ios/WebPageProxyIOS.mm:
17232        (WebKit::adjustedUnexposedEdge):
17233        (WebKit::adjustedUnexposedMaxEdge):
17234        (WebKit::WebPageProxy::computeCustomFixedPositionRect):
17235        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
17236        (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree): This fixes some flashing when the scrolling tree
17237        was being updated while scrolling; we now pass the correct rect.
17238
172392014-05-15  Mark Rowe  <mrowe@apple.com>
17240
17241        <https://webkit.org/b/132976> Move discovery of sharing services off the main thread
17242
17243        Discovery of sharing services can require disk access and IPC. Since the interface to
17244        ServicesController is already asynchronous, we can easily perform the discovery on a
17245        background queue. This can eliminate tens to hundreds of milliseconds worth of work
17246        from the main thread when creating the first web process.
17247
17248        Reviewed by Brady Eidson.
17249
17250        * UIProcess/mac/ServicesController.h:
17251        * UIProcess/mac/ServicesController.mm:
17252        (WebKit::ServicesController::ServicesController):
17253        (WebKit::ServicesController::refreshExistingServices): Bail out early if we're already
17254        in the process of refreshing the services. Kick the discovery over to a background queue,
17255        with it hopping back to the main queue to update the actual state and notify any contexts
17256        that were interested.
17257
172582014-05-15  Dan Bernstein  <mitz@apple.com>
17259
17260        Fixed a typo in a comment and updated previous change log entry.
17261
17262        * WebProcess/WebPage/ios/WebPageIOS.mm:
17263        (WebKit::WebPage::elementDidFocus):
17264
172652014-05-15  Dan Bernstein  <mitz@apple.com>
17266
17267        <rdar://problem/16844952> [iOS] www.wikipedia.org is loading much slower due to FormClient::willBeginInputSession
17268        https://bugs.webkit.org/show_bug.cgi?id=132974
17269
17270        Reviewed by Enrica Casucci.
17271
17272        * WebProcess/WebPage/ios/WebPageIOS.mm:
17273        (WebKit::WebPage::elementDidFocus): Don’t call FormClient::willBeginInputSession if the
17274        focus isn’t user-initiated, because in that case the UI process will bail out of
17275        -_startAssistingNode:userIsInteracting:userObject: before creating an input session and
17276        calling the -_webView:didStartInputSession:.
17277
172782014-05-15  Benjamin Poulain  <bpoulain@apple.com>
17279
17280        [iOS][WK2] WKWebView sends invalid content offsets at the end of animated resize
17281        https://bugs.webkit.org/show_bug.cgi?id=132941
17282        <rdar://problem/16921557>
17283
17284        Reviewed by Tim Horton.
17285
17286        Since we cannot change the scale and content inset simultaneously while accounting for the obscured insets,
17287        we end up with invalid contentOffsets.
17288
17289        To work around the problem, change the content scale outside of UIScrollView to ensure none of the side effect
17290        happens.
17291
17292        * UIProcess/API/Cocoa/WKWebView.mm:
17293        (-[WKWebView _endAnimatedResize]):
17294
172952014-05-15  Tim Horton  <timothy_horton@apple.com>
17296
17297        WebKit2 View Gestures (Zoom): Document size changes during zoom gesture cause erratic scrolling
17298        https://bugs.webkit.org/show_bug.cgi?id=132944
17299        <rdar://problem/15769454>
17300
17301        Reviewed by Simon Fraser.
17302
17303        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
17304        (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
17305        If a layer flush occurs and we have an active transient zoom,
17306        re-apply the transient zoom to the relevant platform layers, because
17307        WebCore might have overwritten the relevant layer properties.
17308
17309        (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
17310        Reset m_transientZoomScale before flushLayers() so that we don't
17311        re-apply the transient zoom when we're actually trying to commit it.
17312
173132014-05-15  Alex Christensen  <achristensen@webkit.org>
17314
17315        Add pointer lock to features without enabling it.
17316        https://bugs.webkit.org/show_bug.cgi?id=132961
17317
17318        Reviewed by Sam Weinig.
17319
17320        * Configurations/FeatureDefines.xcconfig:
17321        Added ENABLE_POINTER_LOCK to list of features.
17322
173232014-05-15  Simon Fraser  <simon.fraser@apple.com>
17324
17325        [UI-side compositing] Fix copying animations between layers, and pausing them
17326        https://bugs.webkit.org/show_bug.cgi?id=132943
17327        <rdar://problem/16906369&16906541>
17328
17329        Reviewed by Tim Horton.
17330        
17331        Fix PlatformCAAnimationRemote to support animation copying, and to record
17332        the beginTime for implicitly started animations. This fixes animation pausing,
17333        and copying of animations between layers when they go between tiled and non-tiled.
17334        
17335        This requires sending the animation key back through animationDidStart() so that
17336        we can record this beginTime on the PlatformCAAnimationRemote in the web process.
17337        This path doesn't set the "hasExplicitBeginTime" flag.
17338        
17339        PlatformCAAnimationRemote also now stores a hash of active animations, so that
17340        it can implement animationForKey(), and record the beginTime.
17341
17342        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
17343        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
17344        (WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidStart):
17345        * UIProcess/mac/RemoteLayerTreeHost.h:
17346        * UIProcess/mac/RemoteLayerTreeHost.mm:
17347        (WebKit::RemoteLayerTreeHost::animationDidStart): Grovel for the key for this
17348        animation; sadly CA doesn't give us an easier way.
17349        * WebProcess/WebPage/DrawingArea.h:
17350        (WebKit::DrawingArea::acceleratedAnimationDidStart):
17351        * WebProcess/WebPage/DrawingArea.messages.in:
17352        * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
17353        * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
17354        (-[WKAnimationDelegate animationDidStart:]):
17355        (WebKit::PlatformCAAnimationRemote::copy):
17356        (WebKit::PlatformCAAnimationRemote::copyTimingFunctionFrom):
17357        (WebKit::PlatformCAAnimationRemote::copyFromValueFrom):
17358        (WebKit::PlatformCAAnimationRemote::copyToValueFrom):
17359        (WebKit::PlatformCAAnimationRemote::copyValuesFrom):
17360        (WebKit::PlatformCAAnimationRemote::copyKeyTimesFrom):
17361        (WebKit::PlatformCAAnimationRemote::copyTimingFunctionsFrom):
17362        (WebKit::addAnimationToLayer):
17363        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
17364        (WebKit::PlatformCALayerRemote::addAnimationForKey):
17365        (WebKit::PlatformCALayerRemote::removeAnimationForKey):
17366        (WebKit::PlatformCALayerRemote::animationForKey):
17367        (WebKit::PlatformCALayerRemote::animationStarted):
17368        * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
17369        * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
17370        * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
17371        (WebKit::RemoteLayerTreeContext::animationDidStart):
17372        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
17373        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
17374        (WebKit::RemoteLayerTreeDrawingArea::acceleratedAnimationDidStart):
17375
173762014-05-14  Simon Fraser  <simon.fraser@apple.com>
17377
17378        Clean up "has non-zero begin time" terminology in animations
17379        https://bugs.webkit.org/show_bug.cgi?id=132942
17380
17381        Reviewed by Tim Horton.
17382
17383        Change the "non-zero beginTime" terminology in the platform CA animations
17384        code to "explicit beginTime": this flag really means that we explicitly set
17385        the beginTime of the animation, rather than let CA set the beginTime when
17386        committing the animation. This flag is used for animations with negative
17387        delay, and when pausing.
17388
17389        * Shared/mac/RemoteLayerTreeTransaction.mm:
17390        (WebKit::RemoteLayerTreeTextStream::operator<<):
17391        * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
17392        * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
17393        (-[WKAnimationDelegate animationDidStart:]):
17394        (WebKit::PlatformCAAnimationRemote::Properties::encode):
17395        (WebKit::PlatformCAAnimationRemote::Properties::decode):
17396        (WebKit::PlatformCAAnimationRemote::setBeginTime):
17397        (WebKit::addAnimationToLayer):
17398
173992014-05-15  Tim Horton  <timothy_horton@apple.com>
17400
17401        [iOS] Incremental updates during scroll-to-top shouldn’t count as “stable” updates
17402        https://bugs.webkit.org/show_bug.cgi?id=132934
17403
17404        Reviewed by Simon Fraser.
17405
17406        * UIProcess/API/Cocoa/WKWebView.mm:
17407        (-[WKWebView _updateVisibleContentRects]):
17408        If we're in a scroll-to-top programmatic scroll, the update is not stable.
17409        The last event comes in with _isScrollingToTop false, so we do our stable update.
17410
174112014-05-15  Carlos Garcia Campos  <cgarcia@igalia.com>
17412
17413        [GTK] Compile all installed resources as GResources
17414        https://bugs.webkit.org/show_bug.cgi?id=131099
17415
17416        Reviewed by Philippe Normand.
17417
17418        It avoids conflicts with old WebKit versions, and resources are
17419        always found even without installing or using environment variables.
17420
17421        * PlatformGTK.cmake: Add rules to write the xml file with the
17422        resources depending on the configure options and to generate and
17423        build the GResources file.
17424
174252014-05-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
17426
17427        [EFL][WK2] Fix an unit test of ewk_context_url_scheme_register()
17428        https://bugs.webkit.org/show_bug.cgi?id=132902
17429
17430        Reviewed by Anders Carlsson.
17431
17432        This test can be run when CUSTOM_PROTOCOL is enabled. Besides the test needs 
17433        to check if registered callback function works well.
17434
17435        * UIProcess/API/efl/tests/test_ewk2_context.cpp:
17436        (EWK2ContextTest::schemeRequestCallback):
17437        (TEST_F):
17438
174392014-05-14  Ryuan Choi  <ryuan.choi@samsung.com>
17440
17441        [EFL][WK2] Use default context for ewk_view_add
17442        https://bugs.webkit.org/show_bug.cgi?id=132936
17443
17444        Reviewed by Gyuyoung Kim.
17445
17446        Since r146265, ewk_view_add created new context and it's regression.
17447        This patch restores the behavior of ewk_view_add to original one.
17448
17449        * UIProcess/API/efl/ewk_view.cpp:
17450        (ewk_view_add):
17451        * UIProcess/API/efl/tests/test_ewk2_view.cpp:
17452        (TEST_F):
17453
174542014-05-14  Maciej Stachowiak  <mjs@apple.com>
17455
17456        Database Process crashes after loading html5test.com
17457        https://bugs.webkit.org/show_bug.cgi?id=132938
17458        <rdar://problem/16241419>
17459
17460        Reviewed by Ryosuke Niwa.
17461
17462        * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
17463        (WebKit::DatabaseProcessIDBConnection::disconnectedFromWebProcess): Expand comment
17464        about the null check.
17465        (WebKit::DatabaseProcessIDBConnection::deleteDatabase): Call disconnectedFromWebProcess
17466        to pick up its null check and to avoid duplicating code.
17467
174682014-05-14  Benjamin Poulain  <bpoulain@apple.com>
17469
17470        [iOS][WK2] The top/bottom edges should not be sticky when restoring the scroll position from the dynamic size update history
17471        https://bugs.webkit.org/show_bug.cgi?id=132931
17472
17473        Reviewed by Sam Weinig.
17474
17475        The goal of dynamicSizeUpdateHistory is to make dynamic resize completely reversible.
17476        Because of the stick-to-edges heuristics, this was not true near the top and bottom edges.
17477
17478        For example, start in landscape, scroll the page a bit, then rotate to portrait. Now you have
17479        a lot more vertical space, and the top edge of the document is at the edge of the scrollview.
17480        Rotate back to landscape: the position is restored  correct, but it is then overriden by
17481        the stick-to-edges branch.
17482
17483        When we restore the position from history, we should only put it back in the valid bounds, skipping
17484        stick-to-edges entirely.
17485
17486        * WebProcess/WebPage/ios/WebPageIOS.mm:
17487        (WebKit::WebPage::dynamicViewportSizeUpdate):
17488
174892014-05-14  Tim Horton  <timothy_horton@apple.com>
17490
17491        Enable IOSurface view snapshots for 10.9+
17492        https://bugs.webkit.org/show_bug.cgi?id=132932
17493        <rdar://problem/16900619>
17494
17495        Reviewed by Dean Jackson.
17496
17497        * UIProcess/mac/ViewSnapshotStore.h:
17498        r166005 unintentionally worked around <rdar://problem/16734031>.
17499        r168689 fixed another bug that caused sometimes randomly white snapshots.
17500        It's safe to turn on IOSurface view snapshots where purgeability is supported.
17501
175022014-05-14  Alexey Proskuryakov  <ap@apple.com>
17503
17504        Use the correct client in WebPageProxy::unwrapCryptoKey
17505        https://bugs.webkit.org/show_bug.cgi?id=132924
17506
17507        Reviewed by Darin Adler.
17508
17509        * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::unwrapCryptoKey): Match what
17510        we now do in wrapCryptoKey().
17511
175122014-05-14  Zalan Bujtas  <zalan@apple.com>
17513
17514        Subpixel layout: Change Element.offset* client* scroll* return type to double.
17515        https://bugs.webkit.org/show_bug.cgi?id=132895
17516
17517        Reviewed by Simon Fraser.
17518
17519        This patch changes Element.offset*, Element.client* and Element.scroll* APIs return
17520        type from long to double to match the latest CSSOM View Module spec[1].
17521        Element.offset* and Element.client* do return subpixel values from now on.
17522        Element.scroll* still return integral values as the scrolling code hasn't adopted to subpixel rendering yet.
17523
17524        subpixelCSSOMElementMetricsEnabled setting is added to be able to turn this feature on/off
17525        from WK2 preferences. It toggles the return value from subpixel to floored integral.
17526        It does not change layout/rendering behavior.
17527
17528        Reference list of what other browsers do:
17529        IE: http://blogs.msdn.com/b/ie/archive/2012/02/17/sub-pixel-rendering-and-the-css-object-model.aspx
17530        Blink: http://www.chromestatus.com/features/5497402177880064
17531        Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=825607
17532
17533        [1] http://www.w3.org/TR/2013/WD-cssom-view-20131217/
17534
17535        * Shared/WebPreferencesStore.h:
17536        * UIProcess/API/C/WKPreferences.cpp:
17537        (WKPreferencesSetSubpixelCSSOMElementMetricsEnabled):
17538        (WKPreferencesGetSubpixelCSSOMElementMetricsEnabled):
17539        * UIProcess/API/C/WKPreferencesRefPrivate.h:
17540        * WebProcess/WebPage/WebPage.cpp:
17541        (WebKit::WebPage::updatePreferences):
17542
175432014-05-14  Benjamin Poulain  <bpoulain@apple.com>
17544
17545        [iOS][WK2] Expose the viewport meta tag width on the UIProcess
17546        https://bugs.webkit.org/show_bug.cgi?id=132926
17547        <rdar://problem/16892115>
17548
17549        Reviewed by Sam Weinig.
17550
17551        Safari requires the viewport meta tag width for legacy stuff on WebApps. Just send it
17552        over to the UIProcess when it changes.
17553
17554        * UIProcess/API/Cocoa/WKWebView.mm:
17555        (-[WKWebView initWithFrame:configuration:]):
17556        (-[WKWebView _setViewportMetaTagWidth:]):
17557        (-[WKWebView _viewportMetaTagWidth]):
17558        * UIProcess/API/Cocoa/WKWebViewInternal.h:
17559        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
17560        * UIProcess/PageClient.h:
17561        * UIProcess/WebPageProxy.h:
17562        * UIProcess/WebPageProxy.messages.in:
17563        * UIProcess/ios/PageClientImplIOS.h:
17564        * UIProcess/ios/PageClientImplIOS.mm:
17565        (WebKit::PageClientImpl::didChangeViewportMetaTagWidth):
17566        * UIProcess/ios/WebPageProxyIOS.mm:
17567        (WebKit::WebPageProxy::viewportMetaTagWidthDidChange):
17568        * WebProcess/WebPage/ios/WebPageIOS.mm:
17569        (WebKit::WebPage::viewportPropertiesDidChange):
17570
175712014-05-13  Simon Fraser  <simon.fraser@apple.com>
17572
17573        [iOS WK2] Make view debugging easier
17574        https://bugs.webkit.org/show_bug.cgi?id=132892
17575
17576        Reviewed by Tim Horton.
17577        
17578        Enhance -[WKCompositingView description] to show WebKit-related information
17579        which is useful when dumping a window's UIView hierarchy.
17580        
17581        Also have WKTransformView and WKRemoteView inherit from WKCompositingView,
17582        and thereby get the hitTest:withEvent: override for free, as well as better dumping.
17583
17584        * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
17585        (-[WKCompositingView description]):
17586        (-[WKTransformView hitTest:withEvent:]): Deleted.
17587        (-[WKRemoteView hitTest:withEvent:]): Deleted.
17588
175892014-05-14  Benjamin Poulain  <bpoulain@apple.com>
17590
17591        [iOS][WK2] Fixed positioned element must relayout correctly before sending resize events to the page
17592        https://bugs.webkit.org/show_bug.cgi?id=132920
17593        <rdar://problem/16836866>
17594
17595        Reviewed by Simon Fraser.
17596
17597        During the dynamic resize operation, we do not update the fixed position elements because
17598        it is a very hard problem on the UI Process side.
17599
17600        When the animation finishes, the fixed positioned rect is recomputed on the UIProcess and pushed
17601        to the WebProcess.
17602
17603        The problem is sending the rect after the animation is too late, the content can observe the fixed
17604        elements layout through JavaScript and would get the old size.
17605
17606        This patch fixes the issue updating the CustomFixedPositionLayoutRect on the WebProcess before
17607        notifying the content of the resize.
17608        First, we layout the content to the new fixed layout size to get the new content size.
17609        Then, we compute the new FixedPositionedLayoutRect with FrameView's viewportConstrainedObjectsRect(),
17610        this use the real content size and our estimated unobscured content rect.
17611
17612        * WebProcess/WebPage/ios/WebPageIOS.mm:
17613        (WebKit::WebPage::dynamicViewportSizeUpdate):
17614
176152014-05-14  Enrica Casucci  <enrica@apple.com>
17616
17617        REGRESSION(WK2): Many pages have very wrong text size after rotating.
17618        https://bugs.webkit.org/show_bug.cgi?id=132893
17619        <rdar://problem/16806958>
17620
17621        Reviewed by Benjamin Poulain.
17622
17623        Whenever our viewport width changes we must reset text autosizing
17624        on the renderer.
17625
17626        * WebProcess/WebPage/WebPage.h:
17627        * WebProcess/WebPage/ios/WebPageIOS.mm:
17628        (WebKit::WebPage::setViewportConfigurationMinimumLayoutSize):
17629        (WebKit::WebPage::setMinimumLayoutSizeForMinimalUI):
17630        (WebKit::WebPage::resetTextAutosizingBeforeLayoutIfNeeded):
17631        (WebKit::WebPage::dynamicViewportSizeUpdate):
17632
176332014-05-14  Alex Christensen  <achristensen@webkit.org>
17634
17635        Use references instead of pointers with ResourceLoadTiming.
17636        https://bugs.webkit.org/show_bug.cgi?id=132846
17637
17638        Reviewed by Alexey Proskuryakov.
17639
17640        * Shared/WebCoreArgumentCoders.cpp:
17641        (IPC::ArgumentCoder<ResourceResponse>::encode):
17642        (IPC::ArgumentCoder<ResourceResponse>::decode):
17643        Use references instead of pointers and null checks.
17644
176452014-05-14  Tibor Meszaros  <tmeszaros.u-szeged@partner.samsung.com>
17646
17647        Remove CSS_STICKY_POSITION guards
17648        https://bugs.webkit.org/show_bug.cgi?id=132676
17649
17650        Reviewed by Simon Fraser.
17651
17652        * Configurations/FeatureDefines.xcconfig:
17653
176542014-05-13  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
17655
17656        [EFL][WK2] Add ewk_view_fixed_layout_size_set|get()
17657        https://bugs.webkit.org/show_bug.cgi?id=132811
17658
17659        Reviewed by Christophe Dumez.
17660
17661        Some EFL applications need to set size of fixed layout when enabling fixed layout.
17662        This APIs can pass ownership regarding the size of fixed layout to application side.
17663
17664        * UIProcess/API/efl/ewk_view.cpp:
17665        (ewk_view_layout_fixed_size_set):
17666        (ewk_view_layout_fixed_size_get):
17667        * UIProcess/API/efl/ewk_view.h:
17668        * UIProcess/API/efl/tests/test_ewk2_view.cpp:
17669        (TEST_F):
17670
176712014-05-13  Simon Fraser  <simon.fraser@apple.com>
17672
17673        Fix "ASSERTION FAILED: m_representation == PlatformLayerRepresentation" with UI-side compositing
17674        https://bugs.webkit.org/show_bug.cgi?id=132899
17675
17676        Reviewed by Beth Dakin.
17677        
17678        The new InsetClipLayer and ContentShadowLayer members on scrolling nodes
17679        need to be correctly encoded/decoded for UI-side compositing, and dumped
17680        correctly.
17681
17682        * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
17683        (ArgumentCoder<ScrollingStateScrollingNode>::encode):
17684        (ArgumentCoder<ScrollingStateScrollingNode>::decode):
17685        (WebKit::RemoteScrollingTreeTextStream::dump):
17686        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
17687        (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
17688
176892014-05-13  Anders Carlsson  <andersca@apple.com>
17690
17691        Another build fix.
17692
17693        Reviewed by Dan Bernstein.
17694
17695        * Shared/API/Cocoa/WKFoundation.h:
17696        Make sure to include Availability.h
17697
176982014-05-13  Beth Dakin  <bdakin@apple.com>
17699
17700        REGRESSION (topContentInset): Searching through Facebook Messenger's chat causes 
17701        scrolling in News Feed
17702        https://bugs.webkit.org/show_bug.cgi?id=132889
17703        -and corresponding-
17704        <rdar://problem/16715716>
17705
17706        Reviewed by Simon Fraser.
17707
17708        Re-name scrollOffsetRelativeToDocument() to 
17709        documentScrollPositionRelativeToViewOrigin().
17710        * WebProcess/WebPage/FindController.cpp:
17711        (WebKit::FindController::rectsForTextMatches):
17712        * WebProcess/WebPage/WebPage.cpp:
17713        (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
17714
177152014-05-13  Dean Jackson  <dino@apple.com>
17716
17717        [iOS] Page scale update messages for media controls should only fire at the end of zooming
17718        https://bugs.webkit.org/show_bug.cgi?id=132857
17719        <rdar://problem/16631009>
17720
17721        Reviewed by Simon Fraser.
17722
17723        As the user was zooming, the media controls that responded
17724        to the page scale (and resized themselves) would do so
17725        slightly out of sync with the screen refreshes, and it looked
17726        terrible.
17727
17728        We already know if a pageScale change is happening inside
17729        a gesture using the inStableState property of the visibleContentRectUpdateInfo.
17730        Simply pass this along to WebCore::Page.
17731
17732        * WebProcess/WebPage/ios/WebPageIOS.mm:
17733        (WebKit::WebPage::updateVisibleContentRects): Pass inStableState onto the
17734        WebCore::Page. Note that we have to send this message even if the
17735        scale has not changed, since the last changing update might not have
17736        been stable.
17737
177382014-05-13  Benjamin Poulain  <bpoulain@apple.com>
17739
17740        [iOS][WK2] When the secondary UIScrollView delegates respond to callbacks, delay the state change until both delegates have finished
17741        https://bugs.webkit.org/show_bug.cgi?id=132849
17742        <rdar://problem/16863716>
17743
17744        Reviewed by Anders Carlsson.
17745
17746        When there are two delegates responding to UIScrollView changes, there was often an intermediate invalid
17747        state forwarded to the UIProcess.
17748
17749        For example, on scroll, WKWebView would update the state based on the current obscured insets in response to
17750        delegate callbacks.
17751        After that update, Safari would modify the insets, thus updating the state again.
17752        The first state changed by WKWebView is incomplete, and should never have been set.
17753
17754        This patch works around the issue by delaying visible update rect in those cases.
17755
17756        When the two delegates of WKScrollView respond to the same selector, WKScrollView invokes 
17757        [UIWebView _willInvokeUIScrollViewDelegateCallback] on entry, and
17758        [UIWebView _didInvokeUIScrollViewDelegateCallback] on exit.
17759
17760        Between those two calls, WKWebView does not forward the new UI state to the WebProcess.
17761
17762        * UIProcess/API/Cocoa/WKWebView.mm:
17763        (-[WKWebView _willInvokeUIScrollViewDelegateCallback]):
17764        (-[WKWebView _didInvokeUIScrollViewDelegateCallback]):
17765        (-[WKWebView _updateVisibleContentRects]):
17766        * UIProcess/API/Cocoa/WKWebViewInternal.h:
17767        * UIProcess/API/ios/WKViewIOS.mm:
17768        (-[WKView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
17769        * UIProcess/ios/WKScrollView.h:
17770        * UIProcess/ios/WKScrollView.mm:
17771        (-[WKScrollViewDelegateForwarder initWithInternalDelegate:externalDelegate:]):
17772        (-[WKScrollViewDelegateForwarder forwardInvocation:]):
17773        (-[WKScrollView setInternalDelegate:]):
17774
177752014-05-13  Benjamin Poulain  <bpoulain@apple.com>
17776
17777        [iOS][WK2] Remove the _extendedBackgroundExclusionInsets SPI
17778        https://bugs.webkit.org/show_bug.cgi?id=132848
17779        <rdar://problem/16875093>
17780
17781        Reviewed by Darin Adler.
17782
17783        The SPI is no longer needed by Safari.
17784
17785        * UIProcess/API/Cocoa/WKWebView.mm:
17786        (-[WKWebView initWithFrame:configuration:]):
17787        (-[WKWebView _updateScrollViewBackground]):
17788        (-[WKWebView _frameOrBoundsChanged]):
17789        (-[WKWebView _setObscuredInsets:]):
17790        (-[WKWebView _endAnimatedResize]):
17791        (updateTopAndBottomExtendedBackgroundExclusionIfNecessary): Deleted.
17792        (-[WKWebView _setExtendedBackgroundExclusionInsets:]): Deleted.
17793        (-[WKWebView _extendedBackgroundExclusionInsets]): Deleted.
17794        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
17795
177962014-05-13  Samuel White  <samuel_white@apple.com>
17797
17798        AX: Hit testing not accounting for top content inset.
17799        https://bugs.webkit.org/show_bug.cgi?id=132876
17800
17801        Reviewed by Chris Fleizach.
17802
17803        Updated accessibilityHitTest: to account for top content inset when converting from screen coords to WebKit coords.
17804
17805        * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
17806        (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
17807
178082014-05-13  Enrica Casucci  <enrica@apple.com>
17809
17810        REGRESSION (WebKit2): Zooming to text field leaves it partially hidden by the form assistant.
17811        https://bugs.webkit.org/show_bug.cgi?id=132879
17812        <rdar://problem/16318049>
17813
17814        Reviewed by Benjamin Poulain.
17815
17816        Adds the heuristics to zoom and scroll to ensure the element being focused
17817        is fully visible and its text readable.
17818
17819        * Shared/AssistedNodeInformation.cpp:
17820        (WebKit::AssistedNodeInformation::encode):
17821        (WebKit::AssistedNodeInformation::decode):
17822        * Shared/AssistedNodeInformation.h:
17823        (WebKit::AssistedNodeInformation::AssistedNodeInformation):
17824        * UIProcess/API/Cocoa/WKWebView.mm:
17825        (-[WKWebView _zoomToFocusRect:WebCore::selectionRect:WebCore::fontSize:minimumScale:maximumScale:allowUserScaling:forceScroll:]):
17826        (-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
17827        * UIProcess/API/Cocoa/WKWebViewInternal.h:
17828        * UIProcess/ios/WKContentView.h:
17829        * UIProcess/ios/WKContentView.mm:
17830        (-[WKContentView _zoomToFocusRect:selectionRect:fontSize:minimumScale:maximumScale:allowUserScaling:forceScroll:]):
17831        * UIProcess/ios/WKContentViewInteraction.mm:
17832        (-[WKContentView _displayFormNodeInputView]):
17833        (-[WKContentView _startAssistingNode:userIsInteracting:userObject:]):
17834        * WebProcess/WebPage/ios/WebPageIOS.mm:
17835        (WebKit::WebPage::getAssistedNodeInformation):
17836
178372014-05-13  Simon Fraser  <simon.fraser@apple.com>
17838
17839        Fix the iOS Simulator build.
17840
17841        * UIProcess/mac/ViewSnapshotStore.h:
17842
178432014-05-13  Tim Horton  <timothy_horton@apple.com>
17844
17845        Speculative build fix for iOS.
17846
17847        * UIProcess/ios/WebMemoryPressureHandlerIOS.cpp: Removed.
17848        * UIProcess/ios/WebMemoryPressureHandlerIOS.mm: Added.
17849        (WebKit::WebMemoryPressureHandler::shared):
17850        (WebKit::WebMemoryPressureHandler::WebMemoryPressureHandler):
17851        * WebKit2.xcodeproj/project.pbxproj:
17852        Make WebMemoryPressureHandlerIOS Obj-C.
17853
178542014-05-13  Anders Carlsson  <andersca@apple.com>
17855
17856        Another follow-up build fix.
17857
17858        * Shared/API/Cocoa/WKFoundation.h:
17859
178602014-05-13  Anders Carlsson  <andersca@apple.com>
17861
17862        Another follow-up build fix.
17863
17864        * Shared/API/Cocoa/WKFoundation.h:
17865
178662014-05-13  Anders Carlsson  <andersca@apple.com>
17867
17868        Follow-up fix.
17869
17870        * UIProcess/API/Cocoa/WKNavigationAction.mm:
17871        (-[WKNavigationAction _initWithNavigationActionData:WebKit::]):
17872        (-[WKNavigationAction _isUserInitiated]):
17873
178742014-05-13  Anders Carlsson  <andersca@apple.com>
17875
17876        Add -[WKNavigationAction modifierFlags] and -[WKNavigationAction buttonNumber]
17877        https://bugs.webkit.org/show_bug.cgi?id=132880
17878        <rdar://problem/16901354>
17879
17880        Reviewed by Dan Bernstein.
17881
17882        * Shared/API/Cocoa/WKFoundation.h:
17883        Add typedef for older systems.
17884
17885        * UIProcess/API/Cocoa/WKNavigationAction.h:
17886        Add -[WKNavigationAction modifierFlags] and -[WKNavigationAction buttonNumber]
17887
17888        * UIProcess/API/Cocoa/WKNavigationAction.mm:
17889        (toWKNavigationType):
17890        This can be static now.
17891
17892        (toNSEventModifierFlags):
17893        Helper to convert WebEvent::Modifiers to NSEventModifierFlags.
17894
17895        (toNSButtonNumber):
17896        Helper to convert WebMouseEvent::Button to an AppKit button number.
17897
17898        (-[WKNavigationAction initWithNavigationActionData:WebKit::]):
17899        New initializer that takes a NavigationActionData and fills in the relevant ivars from it.
17900
17901        (-[WKNavigationAction _isUserInitiated]):
17902        Return the new ivar.
17903
17904        * UIProcess/API/Cocoa/WKNavigationActionInternal.h:
17905        Remove readwrite overrides.
17906
17907        * UIProcess/Cocoa/NavigationState.mm:
17908        (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
17909        Use initWithNavigationActionData:
17910
17911        * UIProcess/Cocoa/UIDelegate.mm:
17912        (WebKit::UIDelegate::UIClient::createNewPage):
17913        Use initWithNavigationActionData:
17914
179152014-05-13  Tim Horton  <timothy_horton@apple.com>
17916
17917        WebKit2 View Gestures (Swipe): Encode snapshots as JPEG on some platforms
17918        https://bugs.webkit.org/show_bug.cgi?id=127788
17919        <rdar://problem/15928241>
17920
17921        Reviewed by Anders Carlsson.
17922
17923        Allow JPEG snapshots. Compression is done asynchronously.
17924        Enable JPEG snapshots (for now) on all PLATFORM(MAC).
17925        We'll switch back to IOSurface snapshots on 10.9+ after <rdar://problem/16734031> is resolved.
17926
17927        * UIProcess/API/Cocoa/WKWebView.mm:
17928        * UIProcess/API/mac/WKView.mm:
17929        (-[WKView _takeViewSnapshot]):
17930        Store the image size on the ViewSnapshot.
17931        Move IOSurface-related code to ViewSnapshotStore.
17932
17933        * UIProcess/ios/ViewGestureControllerIOS.mm:
17934        (WebKit::ViewGestureController::beginSwipeGesture):
17935        Adopt asLayerContents().
17936
17937        * UIProcess/mac/ViewGestureController.h:
17938        * UIProcess/mac/ViewGestureControllerMac.mm:
17939        (WebKit::ViewGestureController::retrieveSnapshotForItem):
17940        (WebKit::ViewGestureController::beginSwipeGesture):
17941        (WebKit::ViewGestureController::removeSwipeSnapshot):
17942        Adopt asLayerContents().
17943        Put the snapshot on the right layer (the parent of the snapshot image layer);
17944        if it's on the snapshot image layer itself, if there is no image, the shadow
17945        is displayed on top of the white placeholder.
17946        Only reset snapshot purgeability if we're using IOSurface snapshots.
17947
17948        * UIProcess/mac/ViewSnapshotStore.h:
17949        Add a bunch of macros to allow us to switch the snapshot backing store implementation.
17950
17951        * UIProcess/mac/ViewSnapshotStore.mm:
17952        (WebKit::ViewSnapshotStore::ViewSnapshotStore):
17953        (WebKit::ViewSnapshotStore::~ViewSnapshotStore):
17954        (WebKit::ViewSnapshotStore::recordSnapshot):
17955        If takeViewSnapshot() fails, don't remove the existing snapshot.
17956
17957        (WebKit::createIOSurfaceFromImage):
17958        (WebKit::compressImageAsJPEG):
17959        (WebKit::ViewSnapshotStore::reduceSnapshotMemoryCost):
17960        (WebKit::ViewSnapshotStore::didCompressSnapshot):
17961        (WebKit::ViewSnapshot::clearImage):
17962        (WebKit::ViewSnapshot::asLayerContents):
17963        Asynchronously compress snapshots - if we're using JPEG snapshots - for a
17964        very large memory win (~20-30x).
17965
179662014-05-12  Darin Adler  <darin@apple.com>
17967
17968        Make a few icon database improvements
17969        https://bugs.webkit.org/show_bug.cgi?id=132812
17970
17971        Reviewed by Brady Eidson.
17972
17973        * UIProcess/API/C/WKIconDatabase.cpp:
17974        (WKIconDatabaseCopyIconDataForPageURL): Moved the actual implementation of this
17975        out of the bindings into the WebIconDatabase class.
17976
17977        * UIProcess/API/C/WKIconDatabase.h: Fixed argument names that were inconsistent.
17978
17979        * UIProcess/WebIconDatabase.cpp: Removed unneeded includes.
17980        (WebKit::WebIconDatabase::create): Pass a reference instead of a pointer.
17981        (WebKit::WebIconDatabase::WebIconDatabase): Take a reference instead of a pointer.
17982        (WebKit::WebIconDatabase::invalidate): Use nullptr.
17983        (WebKit::WebIconDatabase::setDatabasePath): Use make_unique.
17984        (WebKit::WebIconDatabase::setIconDataForIconURL): Removed unneeded local variable.
17985        (WebKit::WebIconDatabase::imageForPageURL): Use nullptr.
17986        (WebKit::WebIconDatabase::nativeImageForPageURL): Ditto.
17987        (WebKit::WebIconDatabase::didFinishURLImport): Use a modern for loop.
17988        (WebKit::WebIconDatabase::iconDataForPageURL): Added. Moved this here from
17989        WKIconDatabase.cpp, but also changed to use createWithoutCopying to avoid making
17990        another copy of the data for each icon.
17991
17992        * UIProcess/WebIconDatabase.h: Removed unneeded includes. Derive from
17993        IconDatabaseClient privately. Use nullptr. Added iconDataForPageURL member
17994        function. Use a reference for the constructor argument. Use override for
17995        virtual functions. Use unique_ptr instead of OwnPtr.
17996
179972014-05-12  Mark Lam  <mark.lam@apple.com>
17998
17999        WebKit2 on iOS needs to capture the main thread's floating point environment.
18000        <https://webkit.org/b/132755>
18001
18002        Reviewed by Geoffrey Garen.
18003
18004        * Shared/mac/ChildProcessMac.mm:
18005        (WebKit::ChildProcess::platformInitialize):
18006        - Call FloatingPointEnv::enableNeededFloatingPointModes() to initialize
18007          the ARMv7 FP env to support denormalized numbers.
18008        - Call FloatingPointEnv::saveMainThreadEnvironment() to capture the main thread
18009          fp env.
18010
180112014-05-12  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
18012
18013        [EFL][WK2] Fix ewk_view_navigation test in EWK2ViewTest 
18014        https://bugs.webkit.org/show_bug.cgi?id=132817
18015
18016        Reviewed by Dirk Schulze.
18017
18018        To load test html pages, call ewk_view_uri_set() instead of EWK2UnitTestServer.
18019        Besides this patch adds test html page for ewk_view_navigation unit test.
18020
18021        * UIProcess/API/efl/tests/resources/Page1.html: Added.
18022        * UIProcess/API/efl/tests/resources/Page2.html: Added.
18023        * UIProcess/API/efl/tests/resources/Page3.html: Added.
18024        * UIProcess/API/efl/tests/test_ewk2_view.cpp:
18025        (TEST_F):
18026
180272014-05-12  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
18028
18029        Unreviewed, EFL build fix since r168625.
18030
18031        * UIProcess/efl/WebContextEfl.cpp:
18032        (WebKit::WebContext::platformDefaultLocalStorageDirectory): Remove const keyword.
18033
180342014-05-12  Simon Fraser  <simon.fraser@apple.com>
18035
18036        [iOS WK2] Fuzzy tiles on some sites on loading
18037        https://bugs.webkit.org/show_bug.cgi?id=132847
18038        <rdar://problem/16816178>
18039
18040        Reviewed by Benjamin Poulain.
18041        
18042        PlatformCALayerRemoteTiledBacking overrode setContentsScale() but not contentsScale(),
18043        causing us to early-return from GraphicsLayerCA::updateContentsScale() and leave the
18044        scale wrong. Fix by overriding contentsScale() also.
18045
18046        * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
18047        (WebKit::PlatformCALayerRemoteTiledBacking::contentsScale):
18048        * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
18049
180502014-05-12  Tim Horton  <timothy_horton@apple.com>
18051
18052        Triple-buffer RemoteLayerBackingStore
18053        https://bugs.webkit.org/show_bug.cgi?id=132786
18054        <rdar://problem/16877498>
18055
18056        Reviewed by Simon Fraser.
18057
18058        We need three buffers because we're currently unable to synchronize
18059        with the render server to swap when they're not in use, so we were
18060        throwing surfaces away far too frequently.
18061
18062        This hugely reduces time spent in IOSurface::create on various repaint benchmarks.
18063
18064        * Shared/mac/RemoteLayerBackingStore.h:
18065        (WebKit::RemoteLayerBackingStore::hasFrontBuffer):
18066        (WebKit::RemoteLayerBackingStore::volatility): Deleted.
18067        * Shared/mac/RemoteLayerBackingStore.mm:
18068        (WebKit::RemoteLayerBackingStore::RemoteLayerBackingStore):
18069        (WebKit::RemoteLayerBackingStore::clearBackingStore):
18070        (WebKit::RemoteLayerBackingStore::encode):
18071        (WebKit::RemoteLayerBackingStore::decode):
18072        (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
18073        (WebKit::RemoteLayerBackingStore::display):
18074        (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer):
18075        (WebKit::RemoteLayerBackingStore::setBufferVolatility):
18076        (WebKit::RemoteLayerBackingStore::Buffer::discard):
18077        (WebKit::RemoteLayerBackingStore::setVolatility): Deleted.
18078        * Shared/mac/RemoteLayerBackingStoreCollection.mm:
18079        (WebKit::RemoteLayerBackingStoreCollection::purgeabilityTimerFired):
18080        Put the ShareableBitmap/IOSurface and a volatility bit in a Buffer struct.
18081        Also factor out "throw away this buffer and put it in the pool" into Buffer::discard().
18082        We keep a volatility bit because querying IOSurface purgeability is expensive,
18083        and we have a guarantee that any changes will happen in the Web process
18084        and go through this class (the lack of this guarantee in most cases is why I'm not
18085        putting this bit in WebCore::IOSurface itself).
18086
18087        Make it so that each buffer's volatility can be adjusted individually
18088        by setBufferVolatility(), and adopt in RemoteLayerBackingStoreCollection.
18089
18090        Add a third buffer, m_secondaryBackBuffer, which will swap with the back buffer
18091        before swapping front and back if the back buffer (soon to be the front buffer)
18092        is still in use by the render server. This means that we will almost never
18093        have to throw away a surface because it's in use (and conversely never need
18094        to make a new surface).
18095
18096        Adjust RemoteLayerBackingStoreCollection to make secondary back surfaces purgeable
18097        more aggressively than others.
18098
180992014-05-12  Alexey Proskuryakov  <ap@apple.com>
18100
18101        REGRESSION (r165972): Can't type into text fields in Flash
18102        https://bugs.webkit.org/show_bug.cgi?id=132840
18103        <rdar://problem/16671969>
18104
18105        Reviewed by Anders Carlsson.
18106
18107        * UIProcess/API/mac/WKView.mm: (-[WKView inputContext]): Restore a function that
18108        got accidentally lost when adding async text input code.
18109
181102014-05-12  Chris Fleizach  <cfleizach@apple.com>
18111
18112        AX: .js dialogs shown in unload while AX is running crash WebKit.
18113        https://bugs.webkit.org/show_bug.cgi?id=123828
18114
18115        Reviewed by Anders Carlsson.
18116
18117        Utilize platform API to inform AX clients when the WebProcess will suspend and resume.
18118        This allows us to avoid having special behavior for accessibility when the WebProcess needs
18119        to wait on a reply.
18120
18121        * Platform/IPC/Connection.cpp:
18122        (IPC::Connection::waitForSyncReply):
18123        * Platform/IPC/Connection.h:
18124        * Platform/IPC/mac/ConnectionMac.cpp:
18125        (IPC::Connection::willSendSyncMessage):
18126        (IPC::Connection::didReceiveSyncReply):
18127        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
18128        (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
18129        (WebKit::WebChromeClient::runJavaScriptAlert):
18130        (WebKit::WebChromeClient::runJavaScriptConfirm):
18131        (WebKit::WebChromeClient::runJavaScriptPrompt):
18132        (WebKit::WebChromeClient::print):
18133        (WebKit::WebChromeClient::exceededDatabaseQuota):
18134        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
18135        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
18136
181372014-05-12  Alex Christensen  <achristensen@webkit.org>
18138
18139        Progress on web timing.
18140        https://bugs.webkit.org/show_bug.cgi?id=132574
18141
18142        Reviewed by Alexey Proskuryakov.
18143
18144        * Shared/WebCoreArgumentCoders.cpp:
18145        (IPC::ArgumentCoder<ResourceResponse>::encode):
18146        (IPC::ArgumentCoder<ResourceResponse>::decode):
18147        Transfer ResourceLoadTiming values if they exist.
18148
181492014-05-12  Dan Bernstein  <mitz@apple.com>
18150
18151        [Cocoa] Expose WebPage::usesEphemeralSession to the bundle
18152        https://bugs.webkit.org/show_bug.cgi?id=132836
18153
18154        Reviewed by Anders Carlsson.
18155
18156        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
18157        (-[WKWebProcessPlugInBrowserContextController _usesNonPersistentWebsiteDataStore]):
18158        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
18159
181602014-05-12  Carlos Alberto Lopez Perez  <clopez@igalia.com>
18161
18162        REGRESSION(168625): [GTK] build broken due to WKContextSetLocalStorageDirectory
18163        https://bugs.webkit.org/show_bug.cgi?id=132831
18164
18165        Unreviewed GTK build fix.
18166
18167        * UIProcess/gtk/WebContextGtk.cpp:
18168        (WebKit::WebContext::platformDefaultLocalStorageDirectory):
18169        This is now a static member function.
18170
181712014-05-12  Anders Carlsson  <andersca@apple.com>
18172
18173        WKWebViewConfiguration should fill in the blanks
18174        https://bugs.webkit.org/show_bug.cgi?id=132832
18175        <rdar://problem/16886408>
18176
18177        Reviewed by Dan Bernstein.
18178
18179        * UIProcess/API/Cocoa/WKWebView.mm:
18180        (-[WKWebView initWithFrame:configuration:]):
18181        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
18182        (-[WKWebViewConfiguration init]):
18183        (-[WKWebViewConfiguration _validate]):
18184        * UIProcess/API/Cocoa/WKWebViewConfigurationInternal.h:
18185
181862014-05-12  Anders Carlsson  <andersca@apple.com>
18187
18188        WKWebView should default to _backgroundExtendsBeyondPage = YES
18189        https://bugs.webkit.org/show_bug.cgi?id=132829
18190        <rdar://problem/16886364>
18191
18192        Reviewed by Beth Dakin.
18193
18194        * UIProcess/API/Cocoa/WKWebView.mm:
18195        (-[WKWebView initWithFrame:configuration:]):
18196
181972014-05-12  Anders Carlsson  <andersca@apple.com>
18198
18199        Pass local storage directory to StorageManager::create
18200        https://bugs.webkit.org/show_bug.cgi?id=132827
18201
18202        Reviewed by Tim Horton.
18203
18204        Since we know the local storage directory at creation time and we know it never changes,
18205        we can get rid of setLocalStorageDirectory and just pass the local storage directory at creation time.
18206
18207        * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
18208        (WebKit::LocalStorageDatabaseTracker::create):
18209        (WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker):
18210        (WebKit::LocalStorageDatabaseTracker::~LocalStorageDatabaseTracker):
18211        (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectory): Deleted.
18212        (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal): Deleted.
18213        * UIProcess/Storage/LocalStorageDatabaseTracker.h:
18214        * UIProcess/Storage/StorageManager.cpp:
18215        (WebKit::StorageManager::create):
18216        (WebKit::StorageManager::StorageManager):
18217        (WebKit::StorageManager::setLocalStorageDirectory): Deleted.
18218        * UIProcess/Storage/StorageManager.h:
18219        * UIProcess/WebContext.cpp:
18220        (WebKit::WebContext::WebContext):
18221
182222014-05-11  Anders Carlsson  <andersca@apple.com>
18223
18224        Replace WKContextSetLocalStorageDirectory with a context configuration getter/setter
18225        https://bugs.webkit.org/show_bug.cgi?id=132809
18226
18227        Reviewed by Dan Bernstein.
18228
18229        * UIProcess/API/C/WKContext.cpp:
18230        (WKContextSetLocalStorageDirectory): Deleted.
18231
18232        * UIProcess/API/C/WKContextConfigurationRef.cpp:
18233        (WKContextConfigurationCopyLocalStorageDirectory):
18234        (WKContextConfigurationSetLocalStorageDirectory):
18235        * UIProcess/API/C/WKContextConfigurationRef.h:
18236        Add getters and setters for the local storage directory.
18237
18238        * UIProcess/API/C/WKContextPrivate.h:
18239        Remove WKContextSetLocalStorageDirectory.
18240
18241        * UIProcess/API/Cocoa/WKProcessGroup.mm:
18242        (-[WKProcessGroup initWithInjectedBundleURL:]):
18243        Call WebContext::applyPlatformSpecificConfigurationDefaults.
18244
18245        * UIProcess/API/Cocoa/WKProcessPool.mm:
18246        (-[WKProcessPool _initWithConfiguration:]):
18247        Call WebContext::applyPlatformSpecificConfigurationDefaults (for now).
18248
18249        * UIProcess/APIContextConfiguration.cpp:
18250        (API::ContextConfiguration::webContextConfiguration):
18251        Set the local storage. Also, call WebContext::applyPlatformSpecificConfigurationDefaults.
18252
18253        * UIProcess/APIContextConfiguration.h:
18254        (API::ContextConfiguration::injectedBundlePath):
18255        This should be const.
18256
18257        (API::ContextConfiguration::localStorageDirectory):
18258        (API::ContextConfiguration::setLocalStorageDirectory):
18259        Add getter and setter.
18260
18261        * UIProcess/Storage/StorageManager.cpp:
18262        (WebKit::StorageManager::setLocalStorageDirectory):
18263        ASSERT that the path isn't null.
18264
18265        * UIProcess/WebContext.cpp:
18266        (WebKit::WebContext::applyPlatformSpecificConfigurationDefaults):
18267        New helper function that will fill in platform specific defaults for empty parameters.
18268
18269        (WebKit::WebContext::WebContext):
18270        Get the local storage directory from the configuration.
18271
18272        (WebKit::WebContext::setLocalStorageDirectory): Deleted.
18273        (WebKit::WebContext::localStorageDirectory): Deleted.
18274        These are no longer needed.
18275
18276        * UIProcess/mac/WebContextMac.mm:
18277        (WebKit::WebContext::platformDefaultLocalStorageDirectory):
18278        This should be a static member function.
18279
182802014-05-12  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
18281
18282        Typo fix in generate-forwarding-headers
18283        https://bugs.webkit.org/show_bug.cgi?id=132820
18284
18285        Reviewed by Anders Carlsson.
18286
18287        * Scripts/generate-forwarding-headers.pl:
18288        (collectFrameworkHeaderPaths):
18289        
182902014-05-12  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
18291
18292        [EFL] TLSErrors do not cause page load to fail when not ignored
18293        https://bugs.webkit.org/show_bug.cgi?id=131104
18294
18295        Reviewed by Gyuyoung Kim.
18296
18297        Added EFL unit test for the bug https://bugs.webkit.org/show_bug.cgi?id=121548
18298
18299        * UIProcess/API/efl/tests/test_ewk2_ssl.cpp: Added new test: ewk_ssl_bad_cert_redirect_https_to_http
18300
183012014-05-11  Gordon Sheridan  <gordon_sheridan@apple.com>
18302
18303        Expose a function to copy favicon data without image conversion.
18304        https://bugs.webkit.org/show_bug.cgi?id=132805
18305
18306        Reviewed by Darin Adler.
18307
18308        * UIProcess/API/C/WKIconDatabase.cpp:
18309        (WKIconDatabaseCopyIconDataForPageURL):
18310        Add a function to copy the data from the image of a favicon for an associated page url.
18311
18312        * UIProcess/API/C/WKIconDatabase.h:
18313        Declare WKIconDatabaseCopyIconDataForPageURL.
18314
183152014-05-11  Seongjun Kim  <isAir@company100.com>
18316
18317        REGRESSION(r168603): [GTK] Build broken.
18318        https://bugs.webkit.org/show_bug.cgi?id=132810
18319
18320        Reviewed by Carlos Garcia Campos.
18321
18322        * UIProcess/API/gtk/WebKitWebContext.cpp:
18323        (createDefaultWebContext):
18324        Construct a WebContextConfiguration object and pass it to WebContext::create.
18325
183262014-05-11  Anders Carlsson  <andersca@apple.com>
18327
18328        Remove local storage directory and sandbox extension from WebProcessCreationParameters
18329        https://bugs.webkit.org/show_bug.cgi?id=132808
18330
18331        Reviewed by Beth Dakin.
18332
18333        * Shared/WebProcessCreationParameters.cpp:
18334        (WebKit::WebProcessCreationParameters::encode):
18335        (WebKit::WebProcessCreationParameters::decode):
18336        * Shared/WebProcessCreationParameters.h:
18337        * UIProcess/WebContext.cpp:
18338        (WebKit::WebContext::createNewWebProcess):
18339        * WebProcess/cocoa/WebProcessCocoa.mm:
18340        (WebKit::WebProcess::platformInitializeWebProcess):
18341
183422014-05-11  Jaehun Lim  <ljaehun.lim@samsung.com>
18343
18344        Unreviewed, CMake build fix after r168603
18345
18346        Add APIContextConfiguration.cpp and WKContextConfigurationRef.cpp to the source list.
18347
18348        * CMakeLists.txt:
18349
183502014-05-11  Anders Carlsson  <andersca@apple.com>
18351
18352        Add a WKContextConfigurationRef object and make the injected bundle path part of the configuration
18353        https://bugs.webkit.org/show_bug.cgi?id=132806
18354        <rdar://problem/16830143>
18355
18356        Reviewed by Beth Dakin.
18357
18358        Many setters on WKContextRef really only make sense to set early on, so move to a pattern where we create a
18359        configuration object, a WKContextConfiguration which WKContexts can be created from. Add the injected bundle path
18360        as a configuration property. More setters will follow.
18361
18362        * Shared/API/c/WKBase.h:
18363        Add WKContextConfigurationRef.
18364
18365        * Shared/APIObject.h:
18366        Add ContextConfiguration enum declaration.
18367
18368        * UIProcess/API/C/WKAPICast.h:
18369        Handle WKContextConfigurationRef.
18370
18371        * UIProcess/API/C/WKContext.cpp:
18372        (WKContextCreate):
18373        Create an empty WKContextConfigurationRef object and pass it to WKContextCreateWithConfiguration.
18374
18375        (WKContextCreateWithInjectedBundlePath):
18376        Create a WKContextConfigurationRef object, set its bundle path and pass the configuration to WKContextCreateWithConfiguration.
18377
18378        (WKContextCreateWithConfiguration):
18379        Convert the WKContextConfigurationRef object to a WebContextConfiguration and pass it to WebContext::create.
18380
18381        * UIProcess/API/C/WKContext.h:
18382        Add WKContextCreateWithConfiguration.
18383
18384        * UIProcess/API/C/WKContextConfigurationRef.cpp: Added.
18385        (WKContextConfigurationCreate):
18386        Create an API::ContextConfiguration object.
18387
18388        (WKContextConfigurationCopyInjectedBundlePath):
18389        Return the injected bundle path.
18390
18391        (WKContextConfigurationSetInjectedBundlePath):
18392        Set the injected bundle path.
18393
18394        * UIProcess/API/C/WKContextConfigurationRef.h: Added.
18395        New C SPI header.
18396        
18397        * UIProcess/API/Cocoa/WKProcessGroup.mm:
18398        (-[WKProcessGroup initWithInjectedBundleURL:]):
18399        Construct a WebContextConfiguration object and pass it to WebContext::Create.
18400    
18401        * UIProcess/API/Cocoa/WKProcessPool.mm:
18402        (-[WKProcessPool _initWithConfiguration:]):
18403        Construct a WebContextConfiguration object and pass it to WebContext::Create.
18404
18405        * UIProcess/APIContextConfiguration.cpp: Added.
18406        New API::ContextConfiguration object.
18407
18408        (API::ContextConfiguration::webContextConfiguration):
18409        Construct a WebContextConfiguration struct from our current configuration.
18410
18411        * UIProcess/APIContextConfiguration.h: Added.
18412        
18413        * UIProcess/WebContext.cpp:
18414        (WebKit::WebContext::create):
18415        Pass the WebContextConfiguration to the constructor.
18416
18417        (WebKit::WebContext::WebContext):
18418        Set the injected bundle path from the WebContextConfiguration object.
18419
18420        * UIProcess/WebContext.h:
18421        Change the WebContext constructor and create function to take a WebContextConfiguration object.
18422
18423        * WebKit2.xcodeproj/project.pbxproj:
18424        Add new files.
18425
184262014-05-10  Csaba Osztrogonác  <ossy@webkit.org>
18427
18428        [WK2] URTBF after r168585.
18429
18430        * Platform/IPC/Connection.h:
18431        * Shared/ChildProcessProxy.cpp:
18432        (WebKit::ChildProcessProxy::terminate):
18433
184342014-05-10  Tim Horton  <timothy_horton@apple.com>
18435
18436        [WKWebView _updateScrollViewBackground] churns UI-and-CGColors while repainting
18437        https://bugs.webkit.org/show_bug.cgi?id=132793
18438        <rdar://problem/16877870>
18439
18440        Reviewed by Dan Bernstein.
18441
18442        * UIProcess/API/Cocoa/WKWebView.mm:
18443        (-[WKWebView _updateScrollViewBackground]):
18444        Don't bypass the cache and make a copy of the CGColor just to set its alpha.
18445        Cache the last color and don't bother creating a UIColor nor updating the
18446        color on our views if it hasn't changed.
18447
184482014-05-10  Tim Horton  <timothy_horton@apple.com>
18449
18450        Implement -forwardingTargetForSelector on WKScrollViewDelegateForwarder
18451        https://bugs.webkit.org/show_bug.cgi?id=132790
18452        <rdar://problem/16877802>
18453
18454        Reviewed by Dan Bernstein.
18455
18456        * UIProcess/ios/WKScrollView.mm:
18457        (-[WKScrollViewDelegateForwarder forwardingTargetForSelector:]):
18458        If only one of the delegates will respond to a selector,
18459        we can return it from forwardingTargetForSelector: to avoid
18460        NSInvocation overhead.
18461
184622014-05-10  Dan Bernstein  <mitz@apple.com>
18463
18464        [Mac] Some targets that link or soft-link WebKit.framework don't depend on it
18465        https://bugs.webkit.org/show_bug.cgi?id=132776
18466
18467        Reviewed by Darin Adler.
18468
18469        * WebKit2.xcodeproj/project.pbxproj:
18470
184712014-05-10  Ryuan Choi  <ryuan.choi@samsung.com>
18472
18473        [EFL][WK2] Move the ownership of EwkSettings from EwkView to EwkPageGroup
18474        https://bugs.webkit.org/show_bug.cgi?id=132771
18475
18476        Reviewed by Gyuyoung Kim.
18477
18478        Moved ownership of EwkSettings from EwkView to EwkPageGroup.
18479
18480        * UIProcess/API/efl/EwkView.cpp:
18481        (EwkView::EwkView):
18482        * UIProcess/API/efl/EwkView.h:
18483        (EwkView::settings): Deleted.
18484        * UIProcess/API/efl/ewk_page_group.cpp:
18485        (EwkPageGroup::EwkPageGroup):
18486        * UIProcess/API/efl/ewk_page_group_private.h:
18487        (EwkPageGroup::settings):
18488        * UIProcess/API/efl/ewk_settings_private.h:
18489        * UIProcess/API/efl/ewk_view.cpp:
18490        (ewk_view_settings_get):
18491
184922014-05-10  Tim Horton  <timothy_horton@apple.com>
18493
18494        [iOS WebKit2] REGRESSION (r168493): Canvasmark 2013 benchmark always hits the RELEASE_ASSERT in RemoteLayerTreeDrawingArea::flushLayers()
18495        https://bugs.webkit.org/show_bug.cgi?id=132783
18496        <rdar://problem/16877326>
18497
18498        Reviewed by Anders Carlsson.
18499
18500        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
18501        (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::flush):
18502        There's a race window between the BackingStoreFlusher sending the new
18503        layer tree to the UI process and updating m_hasFlushed where we can
18504        get a reply back in (on the Web process main thread) from the UI process
18505        that we committed the new layer tree (didUpdate).
18506        This will cause the RELEASE_ASSERT in flushLayers() to fire incorrectly.
18507        Since the RELEASE_ASSERT is there only to avoid painting garbage, move
18508        our code to set m_hasFlushed=true to after we finish calling CGContextFlush
18509        on all of the contexts, instead of after we send the layer tree commit message,
18510        which will remove the race entirely.
18511
185122014-05-10  Anders Carlsson  <andersca@apple.com>
18513
18514        ASSERTION FAILED: !m_connection under RunJavaScriptAlert
18515        https://bugs.webkit.org/show_bug.cgi?id=132792
18516        <rdar://problem/16691138>
18517
18518        Reviewed by Dan Bernstein.
18519
18520        Detect if someone implementing a UI delegate method with a completion handler never calls the completion
18521        handler and raise an exception instead of asserting.
18522
18523        * UIProcess/Cocoa/UIDelegate.mm:
18524        (WebKit::CompletionHandlerCallChecker::create):
18525        (WebKit::CompletionHandlerCallChecker::~CompletionHandlerCallChecker):
18526        (WebKit::CompletionHandlerCallChecker::didCallCompletionHandler):
18527        (WebKit::CompletionHandlerCallChecker::CompletionHandlerCallChecker):
18528        (WebKit::CompletionHandlerCallChecker::classImplementingDelegateMethod):
18529        (WebKit::UIDelegate::UIClient::runJavaScriptAlert):
18530        (WebKit::UIDelegate::UIClient::runJavaScriptConfirm):
18531        (WebKit::UIDelegate::UIClient::runJavaScriptPrompt):
18532
185332014-05-10  Anders Carlsson  <andersca@apple.com>
18534
18535        Use xpc_connection_kill for killing child processes where appropriate
18536        https://bugs.webkit.org/show_bug.cgi?id=132788
18537        <rdar://problem/16664185>
18538
18539        Reviewed by Sam Weinig.
18540
18541        * Platform/IPC/Connection.h:
18542        * Platform/IPC/mac/ConnectionMac.mm:
18543        (IPC::Connection::kill):
18544        * Platform/IPC/mac/XPCPtr.h:
18545        (IPC::XPCPtr::operator bool):
18546        * Shared/ChildProcessProxy.cpp:
18547        (WebKit::ChildProcessProxy::terminate):
18548
185492014-05-10  Anders Carlsson  <andersca@apple.com>
18550
18551        WebKit2 is leaking an xpc_connection per web process it creates
18552        https://bugs.webkit.org/show_bug.cgi?id=132785
18553        <rdar://problem/14912160>
18554
18555        Reviewed by Sam Weinig.
18556
18557        Introduce an IPC::XPCPtr smart pointer class and use it for XPC connections inside Connection::Identifier and Connection itself.
18558
18559        Make sure we always adopt any connections that are created.
18560
18561        * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm:
18562        (DatabaseServiceInitializer):
18563        * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
18564        (WebKit::NetworkServiceInitializerDelegate::NetworkServiceInitializerDelegate):
18565        (NetworkServiceInitializer):
18566        * Platform/IPC/Connection.h:
18567        (IPC::Connection::Identifier::Identifier):
18568        (IPC::Connection::xpcConnection):
18569        * Platform/IPC/mac/ConnectionMac.mm:
18570        (IPC::Connection::platformInvalidate):
18571        (IPC::Connection::platformInitialize):
18572        (IPC::Connection::getAuditToken):
18573        * Platform/IPC/mac/XPCPtr.h: Added.
18574        (IPC::XPCPtr::XPCPtr):
18575        (IPC::XPCPtr::~XPCPtr):
18576        (IPC::XPCPtr::get):
18577        (IPC::XPCPtr::operator!):
18578        (IPC::XPCPtr::operator=):
18579        (IPC::adoptXPC):
18580        * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
18581        (WebKit::PluginServiceInitializerDelegate::PluginServiceInitializerDelegate):
18582        (PluginServiceInitializer):
18583        * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessMain.mm:
18584        (WebKit::BootstrapMain):
18585        * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
18586        (WebKit::XPCServiceInitializerDelegate::XPCServiceInitializerDelegate):
18587        (WebKit::XPCServiceInitializer):
18588        * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
18589        (WebKit::XPCServiceInitializerDelegate::hasEntitlement):
18590        (WebKit::XPCServiceInitializerDelegate::isClientSandboxed):
18591        * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
18592        (WebKit::XPCServiceEventHandler):
18593        * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
18594        (WebKit::XPCServiceEventHandler):
18595        * UIProcess/Launcher/ProcessLauncher.cpp:
18596        (WebKit::ProcessLauncher::didFinishLaunchingProcess):
18597        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
18598        (WebKit::connectToService):
18599        * WebKit2.xcodeproj/project.pbxproj:
18600        * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
18601        (WebContentServiceInitializer):
18602
186032014-05-10  Anders Carlsson  <andersca@apple.com>
18604
18605        Simplify createDataAvailableSource
18606        https://bugs.webkit.org/show_bug.cgi?id=132782
18607        <rdar://problem/16815202>
18608
18609        Reviewed by Sam Weinig.
18610
18611        * Platform/IPC/mac/ConnectionMac.mm: Renamed from Source/WebKit2/Platform/IPC/mac/ConnectionMac.cpp.
18612        Rename to make this Objective-C++ so we get the lambda-to-block conversion.
18613
18614        (IPC::createDataAvailableSource):
18615        Make this a function template and just pass the function directly to dispatch_source_set_event_handler.
18616
18617        (IPC::Connection::open):
18618        Use lambdas instead of WTF::bind, so we'll make sure the connection is kept alive.
18619
18620        * WebKit2.xcodeproj/project.pbxproj:
18621        Update for ConnectionMac.cpp to ConnectionMac.mm rename.
18622
186232014-05-10  Anders Carlsson  <andersca@apple.com>
18624
18625        Follow-up fix.
18626
18627        Reviewed by Darin Adler.
18628
18629        * UIProcess/API/Cocoa/WKNavigationResponse.h:
18630        * UIProcess/API/Cocoa/WKNavigationResponse.mm:
18631        (-[WKNavigationResponse isForMainFrame]):
18632        Use a slightly better name.
18633
186342014-05-10  Anders Carlsson  <andersca@apple.com>
18635
18636        Make -[WKNavigationResponse frame] SPI and only expose -[WKNavigationResponse isMainFrame]
18637        https://bugs.webkit.org/show_bug.cgi?id=132781
18638        <rdar://problem/16868319>
18639
18640        Reviewed by Darin Adler.
18641
18642        * UIProcess/API/Cocoa/WKNavigationResponse.h:
18643        * UIProcess/API/Cocoa/WKNavigationResponse.mm:
18644        (-[WKNavigationResponse description]):
18645        (-[WKNavigationResponse isMainFrameNavigation]):
18646        (-[WKNavigationResponse _frame]):
18647        (-[WKNavigationResponse frame]): Deleted.
18648        (-[WKNavigationResponse setFrame:]): Deleted.
18649        * UIProcess/API/Cocoa/WKNavigationResponseInternal.h:
18650        * UIProcess/API/Cocoa/WKNavigationResponsePrivate.h: Added.
18651        * UIProcess/Cocoa/NavigationState.mm:
18652        (WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
18653        * WebKit2.xcodeproj/project.pbxproj:
18654
186552014-05-09  Dan Bernstein  <mitz@apple.com>
18656
18657        [Cocoa] Remove a deprecated bundle form delegate method now that no one implements it
18658        https://bugs.webkit.org/show_bug.cgi?id=132769
18659
18660        Reviewed by Sam Weinig.
18661
18662        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
18663        (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]):
18664
186652014-05-09  Benjamin Poulain  <bpoulain@apple.com>
18666
18667        [iOS][WK2] Fix bugs exposed by r168556
18668        https://bugs.webkit.org/show_bug.cgi?id=132768
18669
18670        Reviewed by Ryosuke Niwa.
18671
18672        Fix two bugs exposed by r168556.
18673        1) We were only changing the page scale factor when the scale was not adjusted by live
18674           resize. The idea was that the scale would either be the same (responsive content)
18675           or that it would be defined by the next viewContentRectUpdate.
18676
18677           Now that we also send resize and scroll events, we must always update the scale since
18678           it affects some APIs observable from JavaScript (like scrolling bounds).
18679
18680        2) Internally, Page's scaleFactor is stored as a float and not double. The rounding error
18681           were causing us to send DynamicViewportUpdateChangedTarget() in cases were there is no change
18682           of target.
18683
18684        * WebProcess/WebPage/ios/WebPageIOS.mm:
18685        (WebKit::withinEpsilon):
18686        (WebKit::WebPage::dynamicViewportSizeUpdate):
18687
186882014-05-09  Ryuan Choi  <ryuan.choi@samsung.com>
18689
18690        [EFL][WK2] Close icondatabase when EwkFaviconDatabase is destroyed
18691        https://bugs.webkit.org/show_bug.cgi?id=132767
18692
18693        Reviewed by Gyuyoung Kim.
18694
18695        IconDatabase should be closed explicitly.
18696
18697        * UIProcess/API/efl/ewk_favicon_database.cpp:
18698        (EwkFaviconDatabase::~EwkFaviconDatabase):
18699
187002014-05-09  Anders Carlsson  <andersca@apple.com>
18701
18702        Another build fix.
18703
18704        * mac/MigrateHeadersToWebKit2.make:
18705        Don't migrate the WKPreferences.h header, WebKit2 provides its own header.
18706
187072014-05-09  Benjamin Poulain  <benjamin@webkit.org>
18708
18709        [iOS][WK2] Reset the scroll position on the first frame after didCommitLoad
18710        https://bugs.webkit.org/show_bug.cgi?id=132765
18711
18712        Reviewed by Tim Horton.
18713
18714        Since WebCore does not update our scroll view on load, we need to do that ourself.
18715
18716        In case where we need to restore the state from the history, RemoteLayerTreeDrawingAreaProxy
18717        will always invoke the scrolling after didCommitLayerTree() (since r167916).
18718        Consequently, it is now safe again to reset the scroll position ourself on the first frame.
18719
18720        * UIProcess/API/Cocoa/WKWebView.mm:
18721        (-[WKWebView _didCommitLoadForMainFrame]):
18722        (-[WKWebView _didCommitLayerTree:WebKit::]):
18723        * UIProcess/API/Cocoa/WKWebViewInternal.h:
18724        * UIProcess/ios/WKContentView.mm:
18725        (-[WKContentView _didCommitLoadForMainFrame]):
18726
187272014-05-09  Anders Carlsson  <andersca@apple.com>
18728
18729        Update availability macros
18730        https://bugs.webkit.org/show_bug.cgi?id=132763
18731        <rdar://problem/15311800>
18732
18733        Reviewed by Dan Bernstein.
18734
18735        * Configurations/WebKit.xcconfig:
18736        * Shared/API/Cocoa/WKBrowsingContextHandle.h:
18737        * Shared/API/Cocoa/WKFoundation.h:
18738        * Shared/API/Cocoa/_WKFrameHandle.h:
18739        * Shared/API/Cocoa/_WKRemoteObjectInterface.h:
18740        * Shared/API/Cocoa/_WKRemoteObjectRegistry.h:
18741        * UIProcess/API/Cocoa/WKBackForwardList.h:
18742        * UIProcess/API/Cocoa/WKBackForwardListItem.h:
18743        * UIProcess/API/Cocoa/WKBackForwardListPrivate.h:
18744        * UIProcess/API/Cocoa/WKBrowsingContextController.h:
18745        * UIProcess/API/Cocoa/WKBrowsingContextGroup.h:
18746        * UIProcess/API/Cocoa/WKConnection.h:
18747        * UIProcess/API/Cocoa/WKFrameInfo.h:
18748        * UIProcess/API/Cocoa/WKNavigation.h:
18749        * UIProcess/API/Cocoa/WKNavigationAction.h:
18750        (NS_ENUM):
18751        * UIProcess/API/Cocoa/WKNavigationData.h:
18752        * UIProcess/API/Cocoa/WKNavigationDelegate.h:
18753        (NS_ENUM):
18754        * UIProcess/API/Cocoa/WKNavigationResponse.h:
18755        * UIProcess/API/Cocoa/WKPreferences.h:
18756        * UIProcess/API/Cocoa/WKProcessGroup.h:
18757        * UIProcess/API/Cocoa/WKProcessPool.h:
18758        * UIProcess/API/Cocoa/WKScriptMessage.h:
18759        * UIProcess/API/Cocoa/WKScriptMessageHandler.h:
18760        * UIProcess/API/Cocoa/WKTypeRefWrapper.h:
18761        * UIProcess/API/Cocoa/WKUIDelegate.h:
18762        * UIProcess/API/Cocoa/WKUserContentController.h:
18763        * UIProcess/API/Cocoa/WKWebView.h:
18764        * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
18765        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
18766        (NS_OPTIONS):
18767        (NS_ENUM):
18768        * UIProcess/API/Cocoa/WKWindowFeatures.h:
18769        * UIProcess/API/Cocoa/_WKActivatedElementInfo.h:
18770        (NS_ENUM):
18771        * UIProcess/API/Cocoa/_WKDownload.h:
18772        * UIProcess/API/Cocoa/_WKElementAction.h:
18773        (NS_ENUM):
18774        * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
18775        * UIProcess/API/Cocoa/_WKScriptWorld.h:
18776        * UIProcess/API/Cocoa/_WKThumbnailView.h:
18777        * UIProcess/API/Cocoa/_WKVisitedLinkProvider.h:
18778        * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
18779        * WebKit2.xcodeproj/project.pbxproj:
18780        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h:
18781        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInHitTestResult.h:
18782        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h:
18783        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroup.h:
18784        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.h:
18785        * WebProcess/InjectedBundle/API/mac/WKDOMDocument.h:
18786        * WebProcess/InjectedBundle/API/mac/WKDOMElement.h:
18787        * WebProcess/InjectedBundle/API/mac/WKDOMNode.h:
18788        * WebProcess/InjectedBundle/API/mac/WKDOMRange.h:
18789        * WebProcess/InjectedBundle/API/mac/WKDOMText.h:
18790        * WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.h:
18791        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h:
18792        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.h:
18793        * mac/rewrite-availability-macros.sh: Added.
18794
187952014-05-09  Joseph Pecoraro  <pecoraro@apple.com>
18796
18797        Web Inspector: Allow Remote Inspector to entitlement check UIProcess through WebProcess
18798        https://bugs.webkit.org/show_bug.cgi?id=132409
18799
18800        Reviewed by Timothy Hatcher.
18801
18802        * WebProcess/WebCoreSupport/WebInspectorClient.h:
18803        * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
18804        (WebKit::WebInspectorClient::parentProcessIdentifier): Deleted.
18805        pid per debuggable is no longer needed.
18806
18807        * WebProcess/WebProcess.cpp:
18808        (WebKit::WebProcess::initializeWebProcess):
18809        Immediately pass the parent process pid and audit_token on
18810        to the RemoteInspector singleton when the process is created
18811        so that it can be sent to webinspectord.
18812
188132014-05-09  Enrica Casucci  <enrica@apple.com>
18814
18815        REGRESSION (WebKit2): Tapping in search field at wikipedia.org doesn’t bring up the keyboard.
18816        https://bugs.webkit.org/show_bug.cgi?id=132761
18817        <rdar://problem/16857491>
18818
18819        Reviewed by Benjamin Poulain.
18820
18821        The interactionAssistant accessor should never create an instance of
18822        UIWKTextInteractionAssistant, but simply return the value of _textInteractionAssistant.
18823        The text interaction assistant should only be created when needed so that the rest of
18824        the code could reliably check if we are interacting with text or not.
18825
18826        * UIProcess/ios/WKContentViewInteraction.mm:
18827        (-[WKContentView interactionAssistant]):
18828
188292014-05-09  Simon Fraser  <simon.fraser@apple.com>
18830
18831        Fix some issues with scrolling tree logging
18832        https://bugs.webkit.org/show_bug.cgi?id=132762
18833
18834        Reviewed by Tim Horton.
18835        
18836        Only dump viewport constraints when they change, and dump the primary layer on
18837        scrolling nodes.
18838        
18839        * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
18840        (WebKit::RemoteScrollingTreeTextStream::dump): Dump the primary layer.
18841
188422014-05-09  Simon Fraser  <simon.fraser@apple.com>
18843
18844        [iOS WK2] Fixed elements can go outside the document on pinching
18845        https://bugs.webkit.org/show_bug.cgi?id=132759
18846        <rdar://problem/16870835>
18847
18848        Reviewed by Benjamin Poulain.
18849        
18850        Constrain the rect used to position fixed position objects when pinching (when
18851        the scale goes below the minimumScale). Do so in such a way that there's a smooth
18852        transition between rubber-banding and pinching.
18853
18854        * UIProcess/API/Cocoa/WKWebView.mm:
18855        (-[WKWebView _updateScrollViewBackground]): Use a nicer form for std::max<>.
18856        (-[WKWebView _updateVisibleContentRects]): Pass the minimum scale.
18857        * UIProcess/API/ios/WKViewIOS.mm:
18858        (-[WKView _updateVisibleContentRects]): Ditto.
18859        * UIProcess/ios/WKContentView.h:
18860        * UIProcess/ios/WKContentView.mm:
18861        (adjustedUnexposedEdge): Helper to adjust the left/top.
18862        (adjustedUnexposedMaxEdge): Helper to adjust the right/bottom.
18863        (fixedPositionRectFromExposedRect):
18864        (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:minimumScale:inStableState:]):
18865        (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]): Deleted.
18866
188672014-05-09  Zalan Bujtas  <zalan@apple.com>
18868
18869        Subpixel rendering[iOS]: Top bar on apple.com/support jiggles when the swoosh animates.
18870        https://bugs.webkit.org/show_bug.cgi?id=132750
18871        <rdar://problem/16803281>
18872
18873        Reviewed by Simon Fraser.
18874
18875        This patch ensures that GraphicsLayer and RemoteLayerBackingStore have the same dimensions.
18876        
18877        Remove integral enclosing when we set the size on RemoteLayerBackingStore. It makes the layer's size
18878        different from the backingstore when the passed value is fractional.
18879        We scale and integral round this value to size the shareable bitmap later. Rounding ensures that
18880        the final size value matches what we calculated at GraphicsLayerCA::updateGeometry()
18881
18882        Currently not testable.
18883
18884        * Shared/mac/RemoteLayerBackingStore.h:
18885        (WebKit::RemoteLayerBackingStore::size):
18886        * Shared/mac/RemoteLayerBackingStore.mm:
18887        (WebKit::RemoteLayerBackingStore::ensureBackingStore):
18888        (WebKit::RemoteLayerBackingStore::setNeedsDisplay): use enclosing here to ensure we cover the entire backing store.
18889        (WebKit::RemoteLayerBackingStore::display):
18890        (WebKit::RemoteLayerBackingStore::drawInContext):
18891        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
18892        (WebKit::PlatformCALayerRemote::updateBackingStore):
18893
188942014-05-09  Benjamin Poulain  <bpoulain@apple.com>
18895
18896        [iOS][WK2] Set up the resize events
18897        https://bugs.webkit.org/show_bug.cgi?id=132726
18898
18899        Reviewed by Darin Adler and Simon Fraser.
18900
18901        Wire the UI Process updates to FrameView to send the resize events appropriately.
18902
18903        * Shared/VisibleContentRectUpdateInfo.cpp:
18904        (WebKit::VisibleContentRectUpdateInfo::encode):
18905        (WebKit::VisibleContentRectUpdateInfo::decode):
18906        * Shared/VisibleContentRectUpdateInfo.h:
18907        (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
18908        (WebKit::VisibleContentRectUpdateInfo::isChangingObscuredInsetsInteractively):
18909        * UIProcess/API/Cocoa/WKWebView.mm:
18910        (-[WKWebView _updateVisibleContentRects]):
18911        * UIProcess/ios/WKContentView.h:
18912        * UIProcess/ios/WKContentView.mm:
18913        (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:isChangingObscuredInsetsInteractively:]):
18914        (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]): Deleted.
18915        Pass down the status of the content insets with the view update to main frame's FrameView
18916        when needed.
18917
18918        * WebProcess/WebPage/ios/WebPageIOS.mm:
18919        (WebKit::WebPage::dynamicViewportSizeUpdate):
18920        On live resize, send the resize event, then the scroll events (if needed).
18921
18922        Since JavaScript now gets two chances to change the content (resize event + scroll event),
18923        we query the actual scroll offset and scale for the DynamicViewportUpdateChangedTarget.
18924
18925        (WebKit::WebPage::viewportConfigurationChanged):
18926        Define the custom size on load before the app gets a chance to send different rects.
18927        If for some reason the app changes its mind about the insets, the content will be notified with a resize event.
18928
18929        (WebKit::WebPage::updateVisibleContentRects):
18930        Send the resize event when the insets are stable.
18931        Also move the scroll event after the resize event for consistency with live resize.
18932
189332014-05-09  Benjamin Poulain  <benjamin@webkit.org>
18934
18935        [iOS] Switch geolocation to an explicit authorization query model
18936        https://bugs.webkit.org/show_bug.cgi?id=132717
18937
18938        Reviewed by Sam Weinig.
18939
18940        Switch WKGeolocationProviderIOS to use the new API of WebGeolocationCoreLocationProvider.
18941
18942        On WebKit2, the whole logic to track requesters is in WebGeolocationManagerProxy.
18943
18944        Without the warmup sequence, WKGeolocationProviderIOS becomes really dumb: it just provides
18945        the two step authorization and forward the start/stop messages to the WebGeolocationCoreLocationProvider.
18946
18947        * UIProcess/ios/WKGeolocationProviderIOS.mm:
18948        (-[WKGeolocationProviderIOS _stopUpdating]):
18949        (-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:request:window:]):
18950        (-[WKGeolocationProviderIOS geolocationAuthorizationGranted]):
18951        (-[WKGeolocationProviderIOS geolocationAuthorizationDenied]):
18952        (-[WKWebAllowDenyPolicyListener initWithPermissionRequestProxy:]):
18953        (-[WKWebAllowDenyPolicyListener deny]):
18954        (-[WKGeolocationProviderIOS _stopUpdatingIfPossible]): Deleted.
18955        (-[WKGeolocationProviderIOS geolocationDelegateStarted]): Deleted.
18956        (-[WKGeolocationProviderIOS geolocationDelegateUnableToStart]): Deleted.
18957        (-[WKGeolocationProviderIOS permissionDenied:]): Deleted.
18958        (-[WKWebAllowDenyPolicyListener initWithProvider:permissionRequestProxy:]): Deleted.
18959
189602014-05-09  Gordon Sheridan  <gordon_sheridan@apple.com>
18961
18962        Expose functions necessary for copying favicon between IconDatabases.
18963        https://bugs.webkit.org/show_bug.cgi?id=132709
18964
18965        Reviewed by Brady Eidson.
18966
18967        * UIProcess/API/C/WKIconDatabase.cpp:
18968        (WKIconDatabaseSetIconURLForPageURL):
18969        Add C API wrapper for WebIconDatabase::setIconURLForPageURL().
18970
18971        (WKIconDatabaseCopyIconURLForPageURL):
18972        Add C API wrapper for WebIconDatabase::synchronousIconURLForPageURL().
18973
18974        * UIProcess/API/C/WKIconDatabase.h:
18975        Added declarations for wrapper functions above.
18976
189772014-05-09  Tim Horton  <timothy_horton@apple.com>
18978
18979        Fix the iOS DRT build by including CG headers in WKPreferences.h, which uses CGFloat.
18980
18981        * UIProcess/API/Cocoa/WKPreferences.h:
18982
189832014-05-09  Brent Fulgham  <bfulgham@apple.com>
18984
18985        {TelephoneNumber, Selection}ControllerMac implementations dosn't handle tiled drawing properly.
18986        https://bugs.webkit.org/show_bug.cgi?id=132746
18987        <rdar://problem/16789588>
18988
18989        Reviewed by Tim Horton.
18990
18991        Don't try to draw the detector UI if no part of the selection bounds are inside
18992        the current tile. Don't limit the detector UI to the bounds of this tile, or else
18993        it will attempt to squeeze itself into the possibly small space available. Let it
18994        draw as if it had the whole screen, and rely on the context clip region to
18995        avoid overdrawing.
18996
18997        * WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
18998        (WebKit::TelephoneNumberOverlayController::drawRect): Correct tiled drawing behavior.
18999        * WebProcess/WebPage/mac/SelectionOverlayControllerMac.mm:
19000        (WebKit::SelectionOverlayController::drawRect): Ditto.
19001
190022014-05-09  Anders Carlsson  <andersca@apple.com>
19003
19004        Production build fix.
19005
19006        Reviewed by Dan Bernstein.
19007
19008        * Configurations/BaseTarget.xcconfig:
19009        Add SDKROOT in front of UMBRELLA_FRAMEWORKS_DIR for OS X Production builds.
19010
190112014-05-09  Tim Horton  <timothy_horton@apple.com>
19012
19013        [iOS WebKit2] Flush RemoteLayerBackingStore contexts on a secondary queue
19014        https://bugs.webkit.org/show_bug.cgi?id=132667
19015        <rdar://problem/15349483>
19016
19017        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
19018        (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::create):
19019        Address a missed review comment about a missing std::move.
19020
190212014-05-09  Anders Carlsson  <andersca@apple.com>
19022
19023        Rename WebKit2.framework to WebKit.framework
19024        https://bugs.webkit.org/show_bug.cgi?id=132743
19025        <rdar://problem/15920046>
19026
19027        Reviewed by Dan Bernstein.
19028
19029        * Configurations/BaseLegacyProcess.xcconfig:
19030        Change INSTALL_PATH to WebKit.framework.
19031
19032        * Configurations/BaseTarget.xcconfig:
19033        Change WEBKIT2_FRAMEWORKS_DIR to WEBKIT_FRAMEWORKS_DIR and add WEBKIT_LEGACY_PRIVATE_HEADERS_DIR.
19034
19035        * Configurations/BaseXPCService.xcconfig:
19036        Change WebKit2.framework to WebKit.framework.
19037
19038        * Configurations/WebKit.xcconfig: Copied from Source/WebKit2/Configurations/WebKit2.xcconfig.
19039        New configuration file for WebKit.framework. Re-export WebKitLegacy.framework.
19040
19041        * Configurations/WebKit2.xcconfig:
19042        New configuration file for the WebKit2 shim framework. Re-export WebKit.framework.
19043
19044        * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist:
19045        Update DYLD_INSERT_LIBRARIES to refer to WebKit.framework.
19046
19047        * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
19048        Update DYLD_INSERT_LIBRARIES to refer to WebKit.framework.
19049        
19050        * Shared/API/Cocoa/WKBrowsingContextHandle.h:
19051        * Shared/API/Cocoa/WKRenderingProgressEvents.h:
19052        Update header imports.
19053
19054        * Shared/API/Cocoa/WebKit.h: Renamed from Source/WebKit/mac/WebKitLegacy/WebKit.h.
19055        New umbrella header. Imports the modern WebKit API as well as the legacy API.
19056
19057        * Shared/API/Cocoa/WebKit.m: Renamed from Source/WebKit/mac/WebKitLegacy/WebKit.m.
19058        Export install name symbols on iOS.
19059
19060        * Shared/API/Cocoa/WebKitPrivate.h: Renamed from Source/WebKit/mac/WebKitLegacy/WebKitPrivate.h.
19061        New umbrella SPI header. Imports the modern WebKit SPI.
19062
19063        * Many headers:
19064        Change WebKit2 includes to WebKit includes.
19065
19066        * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
19067        (WebKit::XPCServiceEventHandler):
19068        Change bundle identifiers from com.apple.WebKit2 to com.apple.WebKit.
19069
19070        * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
19071        (WebKit::XPCServiceEventHandler):
19072        Change bundle identifier from com.apple.WebKit2 to com.apple.WebKit.
19073        
19074        * UIProcess/API/Cocoa/WKPreferences.h:
19075        Stop including WKPreferencesRef.h, we have a WebKit2 header that handles this workaround for us now.
19076
19077        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
19078        (WebKit::addDYLDEnvironmentAdditions):
19079        (WebKit::connectToService):
19080        (WebKit::createProcess):
19081        (WebKit::ProcessLauncher::launchProcess):
19082        Change bundle identifiers from com.apple.WebKit2 to com.apple.WebKit.
19083
19084        * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
19085        (WebKit::PluginProcessProxy::createPropertyListFile):
19086        Change bundle identifiers from com.apple.WebKit2 to com.apple.WebKit.
19087
19088        * UIProcess/mac/WebContextMac.mm:
19089        (WebKit::WebContext::platformDefaultDiskCacheDirectory):
19090        Change bundle identifier from com.apple.WebKit2 to com.apple.WebKit.
19091        
19092        * WebKit2.xcodeproj/project.pbxproj:
19093        Copy the python message scripts to the WebKit2 framework.
19094        Rename WebKit2.framework to WebKit.framework everywhere.
19095        Add a new WebKit2 target that builds the shim WebKit2 framework.
19096        Move the build script phase that migrates WebKitLegacy headers to WebKit.
19097        Add a new build script phase that adds forwarding headers from WebKit2 to WebKit.
19098
19099        * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist:
19100        Update DYLD_INSERT_LIBRARIES to refer to WebKit.framework.
19101
19102        * mac/MigrateHeadersFromWebKitLegacy.make: Renamed from Source/WebKit/mac/WebKitLegacy/MigrateHeadersFromWebKitLegacy.make.
19103        Move the makefile that migrates WebKitLegacy headers here. On OS X, it copies the header contents and on iOS it creates forarding headers.
19104
19105        * mac/MigrateHeadersToWebKit2.make:
19106        New makefile that creates forwarding headers for the WebKit2 shim framework.
19107
19108        * mac/WKPreferences.h: Added.
19109        Add WebKit2/WKPreferences.h header that imports WebKit2/WKPreferencesref.h.
19110
19111        * mac/WebKit2.m:
19112        Skeleton for the WebKit2 shim framework.
19113
19114        * mac/Info-WebKit2.plist: Added.
19115        New Info.plist file for the WebKit2 shim framework.
19116
191172014-05-09  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
19118
19119        [WK2] Make generate-forwarding-headers.pl work after WebKit2.framework -> WebKit.framework rename
19120        https://bugs.webkit.org/show_bug.cgi?id=132733
19121
19122        Reviewed by Csaba Osztrogonác.
19123
19124        Rewrite framework's directory name to WebKit2 if the framework is WebKit (former WebKit2)
19125        and then collect headers inside the fixed framework directory and generate forwarding
19126        headers point to the fixed directory.
19127
19128        Leave WebKit2 in @frameworks list during the transition. It can be removed
19129        once <WebKit2/foo.h> style includes were renamed to <WebKit/foo.h> everywhere.
19130
19131        * Scripts/generate-forwarding-headers.pl:
19132        (collectFameworkHeaderPaths):
19133        (createForwardingHeadersForFramework):
19134
191352014-05-08  Alexey Proskuryakov  <ap@apple.com>
19136
19137        Automatically zip document bundles used via File API
19138        https://bugs.webkit.org/show_bug.cgi?id=132713
19139        <rdar://problem/13397892>
19140
19141        Reviewed by Anders Carlsson.
19142
19143        * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in: NetworkProcess
19144        now uses FileCoordination (WebProcess already had this allowed).
19145
19146        * Shared/BlobDataFileReferenceWithSandboxExtension.h: Added final to the class.
19147
191482014-05-08  Simon Fraser  <simon.fraser@apple.com>
19149
19150        [iOS WK2] Bottom-relative position:fixed elements are misplaced on page load
19151        https://bugs.webkit.org/show_bug.cgi?id=132719
19152        <rdar://problem/16860837>
19153
19154        Reviewed by Benjamin Poulain.
19155        
19156        If we haven't received visible rects from the web process, compute the
19157        fixed position rect, but only after scale has been set.
19158
19159        * WebProcess/WebPage/ios/WebPageIOS.mm:
19160        (WebKit::WebPage::viewportConfigurationChanged):
19161
191622014-05-08  Jer Noble  <jer.noble@apple.com>
19163
19164        [Mac, iOS] Add source application accounting to AVURLAsset.
19165        https://bugs.webkit.org/show_bug.cgi?id=132637
19166
19167        Reviewed by Eric Carlson.
19168
19169        Add accessor for sourceApplicationIdentifier.
19170
19171        * NetworkProcess/RemoteNetworkingContext.h:
19172        * NetworkProcess/mac/RemoteNetworkingContext.mm:
19173        (WebKit::RemoteNetworkingContext::sourceApplicationIdentifier):
19174        * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
19175        * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
19176        (WebKit::WebFrameNetworkingContext::sourceApplicationIdentifier):
19177
191782014-05-08  Tim Horton  <timothy_horton@apple.com>
19179
19180        [iOS WebKit2] Flush RemoteLayerBackingStore contexts on a secondary queue
19181https://bugs.webkit.org/show_bug.cgi?id=132667
19182        <rdar://problem/16861454>
19183
19184        Rubber-stamped by Simon Fraser.
19185
19186        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
19187        (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
19188        Add a null check to fix a crash on layers which lose backing store.
19189
191902014-05-08  Beth Dakin  <bdakin@apple.com>
19191
19192        REGRESSION (r168053): Phone number detection boxes are wrong when scrolled
19193        https://bugs.webkit.org/show_bug.cgi?id=132706
19194        -and corresponding-
19195        <rdar://problem/16787957>
19196
19197        Reviewed by Tim Horton.
19198
19199        We need to paint the boxes in Document coordinates. Range::boundingRect() was 
19200        giving us a point that took scroll position into account, and that’s not what we 
19201        want. Here we use Range::textQuads() instead so that we can get something in 
19202        Document coordinates, and then we need to convert that up to the main Document’s 
19203        coordinates.
19204        * WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
19205        (WebKit::textQuadsToBoundingRectForRange):
19206        (WebKit::TelephoneNumberOverlayController::drawRect):
19207
19208        The telephone click function wants a point in Window coordinates.
19209        (WebKit::TelephoneNumberOverlayController::mouseEvent):
19210
192112014-05-08  Tim Horton  <timothy_horton@apple.com>
19212
19213        [iOS WebKit2] Flush RemoteLayerBackingStore contexts on a secondary queue
19214        https://bugs.webkit.org/show_bug.cgi?id=132667
19215        <rdar://problem/15349483>
19216
19217        Reviewed by Darin Adler.
19218
19219        * Shared/mac/RemoteLayerBackingStore.h:
19220        * Shared/mac/RemoteLayerBackingStore.mm:
19221        (WebKit::RemoteLayerBackingStore::takeFrontContextPendingFlush):
19222        (WebKit::RemoteLayerBackingStore::flush): Deleted.
19223        Add takeFrontContextPendingFlush, which returns the painted-but-not-yet-flushed front context,
19224        and drops our reference to it. This needs to be called on all backing store between paints.
19225
19226        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
19227        (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::hasFlushed):
19228        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
19229        (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
19230        (WebKit::RemoteLayerTreeDrawingArea::~RemoteLayerTreeDrawingArea):
19231        (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
19232        (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::create):
19233        (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::BackingStoreFlusher):
19234        (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::flush):
19235        (WebKit::flushBackingStoreChangesInTransaction): Deleted.
19236        Flush backing store and send the layer tree commit to the UI process from a dispatch queue.
19237        We will only ever have a single commit in flight at a time, and there's a new
19238        RELEASE_ASSERT to ensure that is the case.
19239        We package up the commit on the main thread; the queue calls CGContextFlush
19240        on all of the newly painted contexts and then tosses the commit over to the UI process.
19241        This is a win in many cases because the Web process main thread can go ahead
19242        and do other non-painting tasks while the queue is blocked on painting.
19243
192442014-05-08  Tim Horton  <timothy_horton@apple.com>
19245
19246        [wk2] Don't use the XPC-based plugin process for Adobe Reader
19247        https://bugs.webkit.org/show_bug.cgi?id=132701
19248        <rdar://problem/16792692>
19249
19250        Reviewed by Anders Carlsson.
19251
19252        * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
19253        (WebKit::shouldUseXPC):
19254        Rename the debugging default to a more modern and accurate name.
19255        Don't use XPC for Adobe Reader.
19256
19257        (WebKit::PluginProcessProxy::platformGetLaunchOptions):
19258        Move the check for plugins that need an executable heap into shouldUseXPC.
19259
192602014-05-08  Benjamin Poulain  <benjamin@webkit.org>
19261
19262        [iOS][WK2] Remove an incorrect assertion on asynchronous touch dispatch
19263        https://bugs.webkit.org/show_bug.cgi?id=132660
19264
19265        Reviewed by Enrica Casucci.
19266
19267        This assertion no longer make sense after r168393. Now the asynchronous behavior is maintained
19268        until the last finger leaves the screen.
19269
19270        * UIProcess/WebPageProxy.cpp:
19271        (WebKit::WebPageProxy::handleTouchEventAsynchronously):
19272
192732014-05-08  Alexey Proskuryakov  <ap@apple.com>
19274
19275        Make BlobDataFileReference manage its sandbox extension
19276        https://bugs.webkit.org/show_bug.cgi?id=132689
19277
19278        Reviewed by Anders Carlsson.
19279
19280        * CMakeLists.txt:
19281        * PlatformGTK.cmake:
19282        * WebKit2.xcodeproj/project.pbxproj:
19283        Added BlobDataFileReferenceWithSandboxExtension.
19284
19285        * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
19286        (WebKit::NetworkBlobRegistry::registerFileBlobURL):
19287        (WebKit::NetworkBlobRegistry::registerBlobURL):
19288        (WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
19289        (WebKit::NetworkBlobRegistry::unregisterBlobURL):
19290        (WebKit::NetworkBlobRegistry::connectionToWebProcessDidClose):
19291        (WebKit::NetworkBlobRegistry::filesInBlob):
19292        (WebKit::NetworkBlobRegistry::sandboxExtensions): Deleted.
19293        * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
19294        We no longer track sandbox extensions here. Instead, provide a way to get files
19295        for a blob, which contain extensions and can allow access to themselves.
19296
19297        * NetworkProcess/NetworkResourceLoader.cpp:
19298        (WebKit::NetworkResourceLoader::NetworkResourceLoader):
19299        (WebKit::NetworkResourceLoader::consumeSandboxExtensions):
19300        (WebKit::NetworkResourceLoader::invalidateSandboxExtensions):
19301        * NetworkProcess/NetworkResourceLoader.h:
19302        Allow/revoke access to files in blob, just like we do for explicitly passed extensions.
19303
19304        * Shared/BlobDataFileReferenceWithSandboxExtension.cpp: Added.
19305        (WebKit::BlobDataFileReferenceWithSandboxExtension::BlobDataFileReferenceWithSandboxExtension):
19306        (WebKit::BlobDataFileReferenceWithSandboxExtension::~BlobDataFileReferenceWithSandboxExtension):
19307        (WebKit::BlobDataFileReferenceWithSandboxExtension::prepareForFileAccess):
19308        (WebKit::BlobDataFileReferenceWithSandboxExtension::revokeFileAccess):
19309        * Shared/BlobDataFileReferenceWithSandboxExtension.h: Added.
19310        (WebKit::BlobDataFileReferenceWithSandboxExtension::create):
19311        A subclass of BlobDataFileReference that also contains a sandbox extension. NetworkProcess
19312        always uses it in BlobRegistryImpl.
19313
19314        * WebProcess/FileAPI/BlobRegistryProxy.cpp: (WebKit::BlobRegistryProxy::registerFileBlobURL):
19315        * WebProcess/FileAPI/BlobRegistryProxy.h:
19316        Updated for BlobRegistry interface changes. BlobRegistryProxy doesn't really need
19317        a BlobDataFileReference here, as it only uses a path, but it needs to implement the same interface
19318        as BlobRegistryImpl.
19319
193202014-05-08  Brady Eidson  <beidson@apple.com>
19321
19322        "shouldKeepCurrentBackForwardListItemInList" API should pass clientInfo to the callback
19323        <rdar://problem/16855357> and https://bugs.webkit.org/show_bug.cgi?id=132692
19324
19325        Reviewed by Tim Horton.
19326
19327        * UIProcess/API/C/WKPage.cpp:
19328        (WKPageSetPageLoaderClient):
19329        * UIProcess/API/C/WKPageLoaderClient.h:
19330
193312014-05-08  Antti Koivisto  <antti@apple.com>
19332
19333        [iOS WebKit2] Can't activate text fields on Facebook
19334        https://bugs.webkit.org/show_bug.cgi?id=132682
19335
19336        Reviewed by Enrica Casucci.
19337
19338        * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
19339        (WebKit::WebChromeClient::observedContentChange):
19340        
19341            Implement content change observer callback.
19342
19343        * WebProcess/WebPage/WebPage.h:
19344        * WebProcess/WebPage/ios/WebPageIOS.mm:
19345        (WebKit::WebPage::handleSyntheticClick):
19346        
19347            If the event gets canceled by a potential change (a started short-duration timer)
19348            save the position and node so we can continue later.
19349
19350        (WebKit::WebPage::completePendingSyntheticClickForContentChangeObserver):
19351        
19352            If it turns out the observed timer changed nothing continue the click event.
19353
19354        (WebKit::WebPage::completeSyntheticClick):
19355        
19356            Factored click event dispatch part of handleSyntheticClick here.
19357
193582014-05-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
19359
19360        [CoordinatedGraphics][WK2] Scale factor and scroll position is not being restored properly in a back/forward load
19361        https://bugs.webkit.org/show_bug.cgi?id=126022
19362
19363        Reviewed by Benjamin Poulain.
19364
19365        Original author : Thiago de Barros Lacerda, and finished by Gyuyoung Kim.
19366
19367        When user is navigating back/forward to a page that has been scrolled and/or scaled, that page must be shown
19368        with its last scroll position and scale factor. However, when fixed layout was enabled with CoordinatedGraphics
19369        and TILED_BACKING_STORE, Page::setPageScaleFactor() doesn't send previous scroll position since r165652 and r165913.
19370
19371        This patch allows the Page::setPageScaleFactor() send stored position to WK2 implementation.
19372
19373        * UIProcess/CoordinatedGraphics/WebView.cpp:
19374        (WebKit::WebView::didCommitLoadForMainFrame):
19375
193762014-05-07  Simon Fraser  <simon.fraser@apple.com>
19377
19378        Put a better version of the assertion back, and add one when we ensureBackingStore.
19379
19380        Reviewed by Tim Horton.
19381
19382        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
19383        (WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
19384        (WebKit::PlatformCALayerRemote::ensureBackingStore):
19385
193862014-05-07  Simon Fraser  <simon.fraser@apple.com>
19387
19388        This assertion was wrong and fired every time. Remove it.
19389
19390        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
19391        (WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
19392
193932014-05-07  Enrica Casucci  <enrica@apple.com>
19394
19395        WK2: Programatic scroll requests during scroll or zoom animation to reveal focused element are ignored.
19396        https://bugs.webkit.org/show_bug.cgi?id=132657
19397        <rdar://problem/16468462>
19398
19399        Reviewed by Benjamin Poulain.
19400
19401        With the scrolling model we use on iOS, a programatic scroll
19402        request can be received while we are still animating to reveal
19403        the focused input element. Changing the scroll offset while animating
19404        leads to unpredictable results. We now cancel the animation if
19405        a programatic scroll request is received.
19406
19407        * UIProcess/API/Cocoa/WKWebView.mm:
19408        (-[WKWebView _scrollToContentOffset:WebCore::]):
19409        * WebProcess/WebPage/ios/WebPageIOS.mm:
19410        (WebKit::WebPage::getAssistedNodeInformation):
19411
194122014-05-07  Simon Fraser  <simon.fraser@apple.com>
19413
19414        [iOS WK2] Speculative fix for crash in PlatformCALayerRemote::recursiveBuildTransaction
19415        https://bugs.webkit.org/show_bug.cgi?id=132666
19416
19417        Reviewed by Tim Horton.
19418        
19419        Crash reports suggest that owner() can be null. Assert and protect
19420        against this.
19421
19422        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
19423        (WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
19424
194252014-05-07  Dan Bernstein  <mitz@apple.com>
19426
19427        <rdar://problem/16831276> [iOS] Unparenting a WKWebView that’s loading pauses it
19428        https://bugs.webkit.org/show_bug.cgi?id=132659
19429
19430        Reviewed by Tim Horton.
19431
19432        * UIProcess/Cocoa/NavigationState.h: Added a member variable.
19433        * UIProcess/Cocoa/NavigationState.mm:
19434        (WebKit::NavigationState::didChangeIsLoading): When transitioning into loading state,
19435        acquire a background activity token. When transitioning out of loading state, dispose of
19436        the token.
19437
194382014-05-07  Jeremy Jones  <jeremyj@apple.com>
19439
19440        HTMLMediaElement should exitFullscreen when view is removed from the window.
19441        https://bugs.webkit.org/show_bug.cgi?id=132506
19442
19443        Reviewed by Tim Horton.
19444
19445        * UIProcess/WebPageProxy.cpp:
19446        (WebKit::WebPageProxy::viewStateDidChange):
19447        Request WebVideoFUllscreenManagerProxy to exitFullscreen when removed from the window.
19448        * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
19449        Make requestExitFullscreen() public instead of private.
19450
194512014-05-07  Alexey Proskuryakov  <ap@apple.com>
19452
19453        Make blob size computation lazy
19454        https://bugs.webkit.org/show_bug.cgi?id=132653
19455
19456        Reviewed by Anders Carlsson.
19457
19458        * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
19459        (WebKit::NetworkBlobRegistry::registerBlobURL):
19460        (WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
19461        (WebKit::NetworkBlobRegistry::blobSize):
19462        * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
19463        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
19464        (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
19465        (WebKit::NetworkConnectionToWebProcess::registerBlobURLForSlice):
19466        (WebKit::NetworkConnectionToWebProcess::blobSize):
19467        * NetworkProcess/NetworkConnectionToWebProcess.h:
19468        * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
19469        * WebProcess/FileAPI/BlobRegistryProxy.cpp:
19470        (WebKit::BlobRegistryProxy::registerBlobURL):
19471        (WebKit::BlobRegistryProxy::registerBlobURLForSlice):
19472        (WebKit::BlobRegistryProxy::blobSize):
19473        * WebProcess/FileAPI/BlobRegistryProxy.h:
19474
194752014-05-06  Simon Fraser  <simon.fraser@apple.com>
19476
19477        Add scrolling tree logging to RemoteLayerTree output
19478        https://bugs.webkit.org/show_bug.cgi?id=132640
19479
19480        Reviewed by Beth Dakin.
19481        
19482        Support scrolling tree logging in the RemoteLayerTree log channel
19483        output.
19484        
19485        Encode/decode ScrollingStateTree::hasChangedProperties() so we can use
19486        it to avoid logging. Log all the things.
19487
19488        * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
19489        (WebKit::RemoteScrollingCoordinatorTransaction::encode):
19490        (WebKit::RemoteScrollingCoordinatorTransaction::decode):
19491        (WebKit::RemoteScrollingTreeTextStream::RemoteScrollingTreeTextStream):
19492        (WebKit::RemoteScrollingTreeTextStream::increaseIndent):
19493        (WebKit::RemoteScrollingTreeTextStream::decreaseIndent):
19494        (WebKit::RemoteScrollingTreeTextStream::writeIndent):
19495        (WebKit::dumpProperty):
19496        (WebKit::RemoteScrollingTreeTextStream::operator<<):
19497        (WebKit::RemoteScrollingTreeTextStream::dump):
19498        (WebKit::RemoteScrollingTreeTextStream::recursiveDumpNodes):
19499        (WebKit::RemoteScrollingCoordinatorTransaction::description):
19500        (WebKit::RemoteScrollingCoordinatorTransaction::dump):
19501        * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.h:
19502        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
19503        (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
19504
195052014-05-07  Hyowon Kim  <hw1008.kim@samsung.com>
19506
19507        GraphicsLayer::client() should return a reference.
19508        https://bugs.webkit.org/show_bug.cgi?id=126372
19509
19510        Reviewed by Simon Fraser.
19511
19512        GraphicsLayers always have a GraphicsLayerClient attached,
19513        so make client() a reference and remove some unnecessary branches.
19514        The author of the changes in the mac port is Andreas Kling <akling@apple.com>.
19515
19516        * WebProcess/WebPage/PageOverlayController.cpp:
19517        (WebKit::PageOverlayController::initialize):
19518        (WebKit::PageOverlayController::installPageOverlay):
19519        * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
19520        (WebKit::LayerTreeHostGtk::initialize):
19521        (WebKit::LayerTreeHostGtk::createPageOverlayLayer):
19522        * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
19523        * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
19524        * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
19525        (WebKit::RemoteLayerTreeContext::createGraphicsLayer):
19526        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
19527        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
19528        (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
19529
195302014-05-07  Shivakumar JM  <shiva.jm@samsung.com>
19531
19532        Cleanup the build from unused parameter in UIProcess Module
19533        https://bugs.webkit.org/show_bug.cgi?id=131969
19534
19535        Reviewed by Csaba Osztrogonác.
19536
19537        Fixed unused parameter by omitting the parameter name
19538
19539        * UIProcess/API/C/WKPage.cpp:
19540        (WKPageSetPageFindClient):
19541        * UIProcess/WebFindClient.cpp:
19542        (WebKit::WebFindClient::didFindString):
19543
195442014-05-07  Manuel Rego Casasnovas  <rego@igalia.com>
19545
19546        [CSS Grid Layout] Remove runtime feature
19547        https://bugs.webkit.org/show_bug.cgi?id=132382
19548
19549        Reviewed by Benjamin Poulain.
19550
19551        Remove cssGridLayoutEnabled setting usage.
19552
19553        * Shared/WebPreferencesStore.h:
19554        * UIProcess/API/C/WKPreferences.cpp:
19555        (WKPreferencesSetCSSGridLayoutEnabled): Deleted.
19556        (WKPreferencesGetCSSGridLayoutEnabled): Deleted.
19557        * UIProcess/API/C/WKPreferencesRefPrivate.h:
19558        * UIProcess/API/gtk/WebKitSettings.cpp:
19559        (webKitSettingsConstructed):
19560        * UIProcess/gtk/ExperimentalFeatures.cpp:
19561        * UIProcess/gtk/ExperimentalFeatures.h:
19562        * WebProcess/InjectedBundle/InjectedBundle.cpp:
19563        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
19564        * WebProcess/WebPage/WebPage.cpp:
19565        (WebKit::WebPage::updatePreferences):
19566        * mac/WebKit2.order:
19567
195682014-05-07  Csaba Osztrogonác  <ossy@webkit.org>
19569
19570        URTBF after r168393 to fix !IOS builds.
19571
19572        * Shared/WebEvent.h:
19573
195742014-05-06  Brady Eidson  <beidson@apple.com>
19575
19576        Followup to "Add WK2 SPI to prevent the previous back/forward item from remaining in the list"
19577        <rdar://problem/16248710> and https://bugs.webkit.org/show_bug.cgi?id=132636
19578
19579        Reviewed by NOBODY (My mistake while addressing previous review feedback)
19580
19581        * UIProcess/API/C/WKPage.cpp:
19582        (WKPageSetPageLoaderClient): During review feedback, this client switched from default negative to default
19583          positve, so when the client isn't implemented...  return true instead of false.
19584
19585        * UIProcess/WebBackForwardList.cpp:
19586        (WebKit::WebBackForwardList::addItem): Fix nonsensical comments while I'm at it.
19587
195882014-05-06  Brady Eidson  <beidson@apple.com>
19589
19590        Add WK2 SPI to prevent the previous back/forward item from remaining in the list
19591        <rdar://problem/16248710> and https://bugs.webkit.org/show_bug.cgi?id=132636
19592
19593        Reviewed by Sam Weinig.
19594
19595        Add new PageLoaderClient SPI to keep the current back/forward item from remaining in the list:
19596        * UIProcess/API/APILoaderClient.h:
19597        (API::LoaderClient::shouldKeepCurrentBackForwardListItemInList):
19598        * UIProcess/API/C/WKPage.cpp:
19599        (WKPageSetPageLoaderClient):
19600        * UIProcess/API/C/WKPageLoaderClient.h:
19601        * UIProcess/WebPageProxy.cpp:
19602        (WebKit::WebPageProxy::shouldKeepCurrentBackForwardListItemInList):
19603        * UIProcess/WebPageProxy.h:
19604
19605        * UIProcess/WebBackForwardList.cpp:
19606        (WebKit::WebBackForwardList::addItem): Use that SPI to determine whether we should insert the new item after
19607        the previous item, or simply replace the previous item.
19608        (WebKit::WebBackForwardList::goToItem): Use that SPI to determine whether the previous item stays or goes.
19609
196102014-05-06  Dan Bernstein  <mitz@apple.com>
19611
19612        -[WKWebView isLoading] is NO immediately after -loadRequest: until the provisional load starts
19613        https://bugs.webkit.org/show_bug.cgi?id=132639
19614
19615        Reviewed by Darin Adler.
19616
19617        * UIProcess/PageLoadState.cpp:
19618        (WebKit::PageLoadState::commitChanges): Updated for change from isLoadingState to isLoading.
19619        (WebKit::PageLoadState::isLoading): Renamed from isLoadingState, changed to take Data and
19620        check whether there is a non-null pending API request URL. If so, return true.
19621        * UIProcess/PageLoadState.h:
19622
196232014-05-06  Dean Jackson  <dino@apple.com>
19624
19625        [Mac] Allow focus rings to redraw themselves if necessary
19626        https://bugs.webkit.org/show_bug.cgi?id=132593
19627
19628        Reviewed by Simon Fraser.
19629
19630        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
19631        (InitWebCoreSystemInterface): Add DrawFocusRingAtTime and DrawCellFocusRingWithFrameAtTime.
19632
196332014-05-06  Benjamin Poulain  <benjamin@webkit.org>
19634
19635        <rdar://problem/16833442> [iOS WebKit2]: Keep the order of contentView in _scrollView after rotation
19636        https://bugs.webkit.org/show_bug.cgi?id=132634
19637
19638        Reviewed by Enrica Casucci.
19639
19640        Nice idea of Yongjun.
19641
19642        * UIProcess/API/Cocoa/WKWebView.mm:
19643        (-[WKWebView _beginAnimatedResizeWithUpdates:]):
19644        (-[WKWebView _endAnimatedResize]):
19645
196462014-05-06  Timothy Hatcher  <timothy@apple.com>
19647
19648        Take WKView's topContentInset into account when docking Web Inspector to the right.
19649
19650        https://bugs.webkit.org/show_bug.cgi?id=132631
19651
19652        Reviewed by Joseph Pecoraro.
19653
19654        * UIProcess/mac/WebInspectorProxyMac.mm:
19655        (WebKit::WebInspectorProxy::inspectedViewFrameDidChange): Subtract topContentInset
19656        from the height of the frame for the Inspector.
19657
196582014-05-06  Benjamin Poulain  <bpoulain@apple.com>
19659
19660        [iOS][WK2] WebKit2 does not set CanPreventNativeGestures on the platform events
19661        https://bugs.webkit.org/show_bug.cgi?id=132594
19662
19663        Reviewed by Simon Fraser.
19664
19665        Set CanPreventNativeGestures on the plaform event.
19666        Change the tracking of WKContentView to be similar to WebPageProxy.
19667
19668        * Shared/WebEvent.h:
19669        (WebKit::WebTouchEvent::WebTouchEvent):
19670        (WebKit::WebTouchEvent::canPreventNativeGestures):
19671        (WebKit::WebTouchEvent::setCanPreventNativeGestures):
19672        * Shared/WebEventConversion.cpp:
19673        (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
19674        * Shared/ios/WebTouchEventIOS.cpp:
19675        (WebKit::WebTouchEvent::encode):
19676        (WebKit::WebTouchEvent::decode):
19677        * UIProcess/ios/WKContentViewInteraction.mm:
19678        (-[WKContentView _webTouchEventsRecognized:]):
19679
196802014-05-06  Benjamin Poulain  <bpoulain@apple.com>
19681
19682        [iOS][WK2] Add tap highlight on the simple UITapGestureRecognizer
19683        https://bugs.webkit.org/show_bug.cgi?id=132623
19684        <rdar://problem/16709507>
19685
19686        Reviewed by Enrica Casucci.
19687
19688        Add a low latency highlight for tap/click.
19689
19690        * UIProcess/PageClient.h:
19691        * UIProcess/WebPageProxy.h:
19692        * UIProcess/WebPageProxy.messages.in:
19693        * UIProcess/ios/PageClientImplIOS.h:
19694        * UIProcess/ios/PageClientImplIOS.mm:
19695        (WebKit::PageClientImpl::commitPotentialTapFailed):
19696        * UIProcess/ios/WKContentViewInteraction.h:
19697        * UIProcess/ios/WKContentViewInteraction.mm:
19698        (-[WKContentView setupInteraction]):
19699        (-[WKContentView _showTapHighlightWithColor:WebCore::quads:WebCore::topLeftRadius:WebCore::topRightRadius:WebCore::bottomLeftRadius:WebCore::bottomRightRadius:WebCore::]):
19700        (-[WKContentView _didGetTapHighlightForRequest:color:WebCore::quads:WebCore::topLeftRadius:WebCore::topRightRadius:WebCore::bottomLeftRadius:WebCore::bottomRightRadius:WebCore::]):
19701        (-[WKContentView _finishInteraction]):
19702        (-[WKContentView _highlightLongPressRecognized:]):
19703        (-[WKContentView _singleTapRecognized:]):
19704        (-[WKContentView _singleTapDidReset:]):
19705        (-[WKContentView _commitPotentialTapFailed]):
19706        (-[WKContentView _singleTapCommited:]):
19707        (-[WKContentView _attemptClickAtLocation:]):
19708        * UIProcess/ios/WKSyntheticClickTapGestureRecognizer.h: Added.
19709        * UIProcess/ios/WKSyntheticClickTapGestureRecognizer.m: Added.
19710        (-[WKSyntheticClickTapGestureRecognizer setGestureRecognizedTarget:action:]):
19711        (-[WKSyntheticClickTapGestureRecognizer setResetTarget:action:]):
19712        (-[WKSyntheticClickTapGestureRecognizer setState:]):
19713        (-[WKSyntheticClickTapGestureRecognizer reset]):
19714        * UIProcess/ios/WebPageProxyIOS.mm:
19715        (WebKit::WebPageProxy::potentialTapAtPosition):
19716        (WebKit::WebPageProxy::commitPotentialTap):
19717        (WebKit::WebPageProxy::cancelPotentialTap):
19718        (WebKit::WebPageProxy::tapHighlightAtPosition):
19719        (WebKit::WebPageProxy::commitPotentialTapFailed):
19720        * WebKit2.xcodeproj/project.pbxproj:
19721        * WebProcess/WebPage/WebPage.h:
19722        * WebProcess/WebPage/WebPage.messages.in:
19723        * WebProcess/WebPage/ios/WebPageIOS.mm:
19724        (WebKit::WebPage::handleSyntheticClick):
19725        (WebKit::WebPage::handleTap):
19726        (WebKit::WebPage::sendTapHighlightForNodeIfNecessary):
19727        (WebKit::WebPage::potentialTapAtPosition):
19728        (WebKit::WebPage::commitPotentialTap):
19729        (WebKit::WebPage::cancelPotentialTap):
19730        (WebKit::WebPage::tapHighlightAtPosition):
19731
197322014-05-06  Anders Carlsson  <andersca@apple.com>
19733
19734        Put WebArchive and WebArchiveResource in the API namespace.
19735
19736        Rubber-stamped by Dan Bernstein.
19737
19738        * Shared/API/c/WKSharedAPICast.h:
19739        * Shared/API/c/mac/WKWebArchive.cpp:
19740        (WKWebArchiveGetTypeID):
19741        (WKWebArchiveCreate):
19742        (WKWebArchiveCreateWithData):
19743        (WKWebArchiveCreateFromRange):
19744        (WKWebArchiveCopyMainResource):
19745        * Shared/API/c/mac/WKWebArchiveResource.cpp:
19746        (WKWebArchiveResourceGetTypeID):
19747        (WKWebArchiveResourceCreate):
19748        * Shared/APIWebArchive.cpp: Renamed from Source/WebKit2/Shared/WebArchive.cpp.
19749        (API::WebArchive::create):
19750        (API::WebArchive::WebArchive):
19751        (API::WebArchive::~WebArchive):
19752        (API::WebArchive::mainResource):
19753        (API::WebArchive::subresources):
19754        (API::WebArchive::subframeArchives):
19755        (API::releaseCFData):
19756        (API::WebArchive::data):
19757        (API::WebArchive::coreLegacyWebArchive):
19758        * Shared/APIWebArchive.h: Renamed from Source/WebKit2/Shared/WebArchive.h.
19759        * Shared/APIWebArchiveResource.cpp: Renamed from Source/WebKit2/Shared/WebArchiveResource.cpp.
19760        (API::WebArchiveResource::create):
19761        (API::WebArchiveResource::WebArchiveResource):
19762        (API::WebArchiveResource::~WebArchiveResource):
19763        (API::releaseCFData):
19764        (API::WebArchiveResource::data):
19765        (API::WebArchiveResource::URL):
19766        (API::WebArchiveResource::MIMEType):
19767        (API::WebArchiveResource::textEncoding):
19768        (API::WebArchiveResource::coreArchiveResource):
19769        * Shared/APIWebArchiveResource.h: Renamed from Source/WebKit2/Shared/WebArchiveResource.h.
19770        * WebKit2.xcodeproj/project.pbxproj:
19771
197722014-05-06  Alex Christensen  <achristensen@webkit.org>
19773
19774        Removed unnecessary notImplemented.h includes.
19775        https://bugs.webkit.org/show_bug.cgi?id=132587
19776
19777        Reviewed by Anders Carlsson.
19778
19779        * UIProcess/ios/WKContentViewInteraction.mm:
19780        * UIProcess/mac/WebContextMenuProxyMac.mm:
19781        * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
19782        * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
19783        Removed notImplemented from list of includes.
19784
197852014-05-05  Jeremy Jones  <jeremyj@apple.com>
19786
19787        Implement scan backward and forward in video fullscreen.
19788        https://bugs.webkit.org/show_bug.cgi?id=132517
19789
19790        Reviewed by Simon Fraser.
19791
19792        Plumb through scanning/seeking functions.
19793
19794        * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
19795        * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
19796        (WebKit::WebVideoFullscreenManagerProxy::fastSeek):
19797        (WebKit::WebVideoFullscreenManagerProxy::beginScanningForward):
19798        (WebKit::WebVideoFullscreenManagerProxy::beginScanningBackward):
19799        (WebKit::WebVideoFullscreenManagerProxy::endScanning):
19800        * WebProcess/ios/WebVideoFullscreenManager.messages.in:
19801
198022014-05-05  Benjamin Poulain  <bpoulain@apple.com>
19803
19804        [iOS][WK2] Prefetch DNS hostnames on tap highlight
19805        https://bugs.webkit.org/show_bug.cgi?id=132509
19806
19807        Reviewed by Alexey Proskuryakov.
19808
19809        * WebProcess/WebPage/ios/WebPageIOS.mm:
19810        (WebKit::WebPage::tapHighlightAtPosition):
19811
198122014-05-05  Simon Fraser  <simon.fraser@apple.com>
19813
19814        [iOS WK2] Flickery scrolling inside overflow-scrolling: touch
19815        https://bugs.webkit.org/show_bug.cgi?id=132591
19816        <rdar://problem/16760466>
19817
19818        Reviewed by Tim Horton.
19819        
19820        Avoid triggering layer tree commits that touch the layer's boundsOrigin
19821        while the user is scrolling in the UI process.
19822        
19823        Fix the WKOverflowScrollViewDelegate to pass along an "inUserInteration"
19824        flag to the ScrollingTree to say that we're in the middle of a user interaction
19825        (and also to send a final non-interactive update). That gets passed along
19826        to the web process, and turned into "SyncScrollingLayerPosition" update.
19827        AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll() consults
19828        this, and uses it to set a flag on the ScrollableArea to say that the scroll
19829        is a user scroll.
19830        
19831        RenderLayerBacking then makes use of this (in existing code, shared with WK1)
19832        to avoid triggering layer bounds setting. Instead, it now just calls syncBoundsOrigin(),
19833        which updates the GraphicsLayer without touching platform layers. This is necessary
19834        so that GraphicsLayer geometry is up-to-date (used for tiled layer visibility
19835        computations).
19836        
19837        Finally, a hack in GraphicsLayerCA::computeVisibleRect() is conditionalized
19838        for WebKit1 by checking the type of platform layer.
19839
19840        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
19841        (WebKit::RemoteScrollingCoordinatorProxy::rootScrollingNodeID):
19842        (WebKit::RemoteScrollingCoordinatorProxy::isPointInNonFastScrollableRegion):
19843        (WebKit::RemoteScrollingCoordinatorProxy::viewportChangedViaDelegatedScrolling):
19844        (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidScroll):
19845        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
19846        * UIProcess/Scrolling/RemoteScrollingTree.cpp:
19847        (WebKit::RemoteScrollingTree::scrollingTreeNodeDidScroll):
19848        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
19849        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
19850        (-[WKOverflowScrollViewDelegate scrollViewDidScroll:]):
19851        (-[WKOverflowScrollViewDelegate scrollViewDidEndDragging:willDecelerate:]):
19852        (-[WKOverflowScrollViewDelegate scrollViewDidEndDecelerating:]):
19853        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollViewDidScroll):
19854        * WebProcess/Scrolling/RemoteScrollingCoordinator.h:
19855        * WebProcess/Scrolling/RemoteScrollingCoordinator.messages.in:
19856        * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
19857        (WebKit::RemoteScrollingCoordinator::scrollPositionChangedForNode):
19858
198592014-05-05  Alexey Proskuryakov  <ap@apple.com>
19860
19861        Stop using BlobData on client side
19862        https://bugs.webkit.org/show_bug.cgi?id=132582
19863
19864        Reviewed by Sam Weinig.
19865
19866        Update for WebCore changes.
19867
19868        * CMakeLists.txt:
19869        * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
19870        (WebKit::NetworkBlobRegistry::registerFileBlobURL):
19871        (WebKit::NetworkBlobRegistry::registerBlobURL):
19872        * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
19873        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
19874        (WebKit::NetworkConnectionToWebProcess::registerFileBlobURL):
19875        (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
19876        * NetworkProcess/NetworkConnectionToWebProcess.h:
19877        * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
19878        * Shared/FileAPI/BlobRegistrationData.cpp: Removed.
19879        * Shared/FileAPI/BlobRegistrationData.h: Removed.
19880        * Shared/WebCoreArgumentCoders.cpp:
19881        (IPC::ArgumentCoder<BlobPart>::encode):
19882        (IPC::ArgumentCoder<BlobPart>::decode):
19883        * Shared/WebCoreArgumentCoders.h:
19884        * WebKit2.xcodeproj/project.pbxproj:
19885        * WebProcess/FileAPI/BlobRegistryProxy.cpp:
19886        (WebKit::BlobRegistryProxy::registerFileBlobURL):
19887        (WebKit::BlobRegistryProxy::registerBlobURL):
19888        * WebProcess/FileAPI/BlobRegistryProxy.h:
19889
198902014-05-05  Beth Dakin  <bdakin@apple.com>
19891
19892        Need a delegate that informs the UI process when the page's pin state changes
19893        https://bugs.webkit.org/show_bug.cgi?id=132583
19894        -and corresponding-
19895        <rdar://problem/16806231>
19896
19897        Reviewed by Anders Carlsson.
19898
19899        New UIClient function pinnedStateDidChange. 
19900
19901        * UIProcess/API/APIUIClient.h:
19902        (API::UIClient::pinnedStateDidChange):
19903
19904        Create WKPageUIClientV3 to add this function.
19905        * UIProcess/API/C/WKPage.cpp:
19906        (WKPageSetPageUIClient):
19907        * UIProcess/API/C/WKPageUIClient.h:
19908
19909        Change default initialization to true instead of false, which makes more sense for 
19910        this API.
19911        * UIProcess/WebPageProxy.cpp:
19912        (WebKit::WebPageProxy::WebPageProxy):
19913        (WebKit::WebPageProxy::didCommitLoadForFrame):
19914        (WebKit::WebPageProxy::resetState):
19915        (WebKit::WebPageProxy::didChangeScrollOffsetPinningForMainFrame):
19916        * WebProcess/WebPage/WebPage.cpp:
19917        (WebKit::WebPage::WebPage):
19918
199192014-05-05  Anders Carlsson  <andersca@apple.com>
19920
19921        Add SPI to provide the WebCrypto master key
19922        https://bugs.webkit.org/show_bug.cgi?id=132586
19923        <rdar://problem/16091460>
19924
19925        Reviewed by Dan Bernstein.
19926
19927        * UIProcess/API/APILoaderClient.h:
19928        (API::LoaderClient::webCryptoMasterKey):
19929        * UIProcess/API/C/WKPage.cpp:
19930        (WKPageSetPageLoaderClient):
19931        * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
19932        * UIProcess/Cocoa/NavigationState.h:
19933        * UIProcess/Cocoa/NavigationState.mm:
19934        (WebKit::NavigationState::setNavigationDelegate):
19935        (WebKit::NavigationState::LoaderClient::webCryptoMasterKey):
19936        * UIProcess/WebPageProxy.cpp:
19937        (WebKit::WebPageProxy::wrapCryptoKey):
19938
199392014-05-05  Gavin Barraclough  <baraclough@apple.com>
19940
19941        https://bugs.webkit.org/show_bug.cgi?id=132522
19942        Clean up ProcessThrottler
19943
19944        Unreviewed: bad build fix. Will work out what the right include is asap.
19945
19946        * UIProcess/ios/WebProcessProxyIOS.mm:
19947
199482014-05-05  Sam Weinig  <sam@webkit.org>
19949
19950        [Cocoa WebKit2] Add SPI to clear all visited links in a VisitedLinkProvider
19951        https://bugs.webkit.org/show_bug.cgi?id=132573
19952
19953        Reviewed by Dan Bernstein.
19954
19955        * Shared/VisitedLinkTable.cpp:
19956        (WebKit::VisitedLinkTable::VisitedLinkTable):
19957        (WebKit::VisitedLinkTable::clear):
19958        * Shared/VisitedLinkTable.h:
19959        Add functions to clear the visited link table.
19960
19961        * UIProcess/API/Cocoa/_WKVisitedLinkProvider.h:
19962        * UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm:
19963        (-[_WKVisitedLinkProvider removeAll]):
19964        Add SPI.
19965
19966        * UIProcess/VisitedLinkProvider.cpp:
19967        (WebKit::VisitedLinkProvider::removeAll):
19968        * UIProcess/VisitedLinkProvider.h:
19969        A remove all resets the provider and notifies all the attached processes.
19970
19971        * WebProcess/WebPage/VisitedLinkTableController.cpp:
19972        (WebKit::VisitedLinkTableController::removeAllVisitedLinks):
19973        * WebProcess/WebPage/VisitedLinkTableController.h:
19974        * WebProcess/WebPage/VisitedLinkTableController.messages.in:
19975        Add message to clear the visited links for a process.
19976
199772014-05-05  Benjamin Poulain  <benjamin@webkit.org>
19978
19979        [iOS][WK2] Special case ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture() for image documents
19980        https://bugs.webkit.org/show_bug.cgi?id=132553
19981
19982        Reviewed by Tim Horton.
19983
19984        When collecting the geometry for the smart magnification gesture, always return the image of an image document
19985        on iOS. On iOS, it does not make much sense to return the whole document rect when the gesture is not over the image.
19986
19987        * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
19988        (WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
19989
199902014-05-02  Gavin Barraclough  <baraclough@apple.com>
19991
19992        https://bugs.webkit.org/show_bug.cgi?id=132522
19993        Clean up ProcessThrottler
19994
19995        Reviewed by Geoffrey Garen.
19996
19997        The initial implementation of ProcessThrottler relied on the reply from the
19998        SetViewState message to ensure the page visibility notifications have a chance
19999        to be delivered. This resulted in:
20000            - unnecessarily complicated interface to ProcessThrottler (in VisibilityState class)
20001            - complexity bleeding out into WebPageProxy (handling 'hiding' state).
20002            - for cases other than view hiding, no suspension notification in the WebContent.
20003
20004        To fix these issues add an explicit handshake from the ProcessThrottler to the WebPage.
20005        This gives us two things:
20006            - All previously posted messages (e.g. SetViewState) will be processed before suspension.
20007            - WebContent is always (bar timeout) notified before suspension.
20008
20009        Since this interlock ensures the SetViewState message will be processed, the WKContentView no
20010        longer needs to request a reply from SetViewState, and WebPageProxy can lose all the 'hiding'
20011        state tracking. In turn, we can simplify VisibilityToken to a couple of simpler types, without
20012        the interface to change state - just acquire/release to keep the process runnable or permit
20013        suspension.
20014
20015        * UIProcess/API/Cocoa/WKWebView.mm:
20016        (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
20017            - VisibilityToken -> BackgroundActivityToken
20018        * UIProcess/WebPageProxy.cpp:
20019        (WebKit::WebPageProxy::WebPageProxy):
20020            - m_visibilityToken -> m_activityToken, remove m_pendingViewStateUpdates
20021              updateVisibilityToken -> updateActivityToken
20022        (WebKit::WebPageProxy::reattachToWebProcess):
20023            - updateVisibilityToken -> updateActivityToken
20024        (WebKit::WebPageProxy::viewStateDidChange):
20025            - remove m_pendingViewStateUpdates, updateActivityToken after sending SetViewState
20026        (WebKit::WebPageProxy::updateActivityToken):
20027            - m_visibilityToken -> m_activityToken, no need to handle 'hiding' state.
20028        (WebKit::WebPageProxy::updateVisibilityToken): Deleted.
20029            - renamed to updateActivityToken
20030        (WebKit::WebPageProxy::didUpdateViewState): Deleted.
20031            - implementation moved back into header.
20032        * UIProcess/WebPageProxy.h:
20033        (WebKit::WebPageProxy::didUpdateViewState):
20034            - implementation moved back into header.
20035        * UIProcess/WebProcessProxy.cpp:
20036        (WebKit::WebProcessProxy::WebProcessProxy):
20037            - ProcessThrottler constructor now passed WebProcessProxy.
20038        * UIProcess/WebProcessProxy.h:
20039            - added ProcessWillSuspend/ProcessReadyToSuspend
20040        * UIProcess/WebProcessProxy.messages.in:
20041            - added ProcessWillSuspend/ProcessReadyToSuspend
20042        * UIProcess/ios/ProcessAssertion.h:
20043        (WebKit::ProcessAssertion::state):
20044            - accessor
20045        * UIProcess/ios/ProcessThrottler.h:
20046        (WebKit::ProcessThrottler::VisibilityToken::visibility): Deleted.
20047        (WebKit::ProcessThrottler::VisibilityToken::setVisibility): Deleted.
20048            - removed VisibilityToken class, replaced with ForegroundActivityToken/BackgroundActivityToken.
20049        (WebKit::ProcessThrottler::ProcessThrottler): Deleted.
20050        (WebKit::ProcessThrottler::visibilityToken): Deleted.
20051        (WebKit::ProcessThrottler::didConnnectToProcess): Deleted.
20052        (WebKit::ProcessThrottler::assertionState): Deleted.
20053        (WebKit::ProcessThrottler::updateAssertion): Deleted.
20054            - moved implementations to .mm.
20055        * UIProcess/ios/ProcessThrottler.mm:
20056        (WebKit::ProcessThrottler::ForegroundActivityToken::ForegroundActivityToken):
20057        (WebKit::ProcessThrottler::ForegroundActivityToken::~ForegroundActivityToken):
20058        (WebKit::ProcessThrottler::BackgroundActivityToken::BackgroundActivityToken):
20059        (WebKit::ProcessThrottler::BackgroundActivityToken::~BackgroundActivityToken):
20060            - new, simpler replacement for VisibilityToken. Instantiate to keep a processes running, release to suspend.
20061        (WebKit::ProcessThrottler::ProcessThrottler):
20062            - constructor, now initializes WebProcessProxy pointer & timer mechanism
20063        (WebKit::ProcessThrottler::assertionState):
20064            - select the appropriate AssertionState give current ActivityTokens.
20065        (WebKit::ProcessThrottler::updateAssertionNow):
20066            - update the current ProcessAssertion.
20067        (WebKit::ProcessThrottler::updateAssertion):
20068            - update the current ProcessAssertion, delay running->suspended transitions to give the process a chance to clean up.
20069        (WebKit::ProcessThrottler::didConnnectToProcess):
20070            - moved from header.
20071        (WebKit::ProcessThrottler::suspendTimerFired):
20072            - timeout to prevent processes from running in the background for too long.
20073        (WebKit::ProcessThrottler::processReadyToSuspend):
20074            - handshake from the WebContent process to acknowledge it is ready to suspend.
20075        (WebKit::ProcessThrottler::VisibilityToken::VisibilityToken): Deleted.
20076        (WebKit::ProcessThrottler::VisibilityToken::~VisibilityToken): Deleted.
20077        (WebKit::ProcessThrottler::VisibilityToken::hideTimerFired): Deleted.
20078        (WebKit::ProcessThrottler::VisibilityToken::setVisibilityInternal): Deleted.
20079            - removed VisibilityToken class, replaced with ForegroundActivityToken/BackgroundActivityToken.
20080        * UIProcess/ios/WKContentView.mm:
20081        (-[WKContentView didMoveToWindow]):
20082            - no longer necessary to request a response from SetViewState; this interlock is now managed by the ProcessThrottler.
20083        * UIProcess/ios/WebProcessProxyIOS.mm:
20084        (WebKit::WebProcessProxy::sendProcessWillSuspend):
20085        (WebKit::WebProcessProxy::processReadyToSuspend):
20086            - added ProcessWillSuspend/ProcessReadyToSuspend
20087        * WebProcess/WebProcess.cpp:
20088        (WebKit::WebProcess::processWillSuspend):
20089            - notification from the WebContent process that we will be suspended; for now just send back an ack.
20090        * WebProcess/WebProcess.h:
20091            - added ProcessWillSuspend/ProcessReadyToSuspend
20092        * WebProcess/WebProcess.messages.in:
20093            - added ProcessWillSuspend/ProcessReadyToSuspend
20094
200952014-05-05  Jeremy Jones  <jeremyj@apple.com>
20096
20097        Implement beginScrubbing and endScrubbing for video fullscreen.
20098        https://bugs.webkit.org/show_bug.cgi?id=132520
20099
20100        Reviewed by Eric Carlson.
20101
20102        Plumb through beginScrubbing and endScrubbing.
20103
20104        * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
20105        * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
20106        (WebKit::WebVideoFullscreenManagerProxy::beginScrubbing):
20107        (WebKit::WebVideoFullscreenManagerProxy::endScrubbing):
20108        * WebProcess/ios/WebVideoFullscreenManager.messages.in:
20109
201102014-05-05  Tim Horton  <timothy_horton@apple.com>
20111
20112        Use a layer delegate instead of web_disableAllActions wherever possible
20113        https://bugs.webkit.org/show_bug.cgi?id=132560
20114        <rdar://problem/16459284>
20115
20116        Reviewed by Simon Fraser.
20117
20118        * UIProcess/API/mac/WKView.mm:
20119        (-[WKView _setAcceleratedCompositingModeRootLayer:]):
20120        * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
20121        (WebKit::RemoteLayerTreeHost::createLayer):
20122        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
20123        (WebKit::RemoteLayerTreeDrawingAreaProxy::showDebugIndicator):
20124        * UIProcess/mac/RemoteLayerTreeHost.mm:
20125        (WebKit::RemoteLayerTreeHost::createLayer):
20126        * UIProcess/mac/ViewGestureControllerMac.mm:
20127        (WebKit::ViewGestureController::beginSwipeGesture):
20128        Make use of WebActionDisablingCALayerDelegate where possible.
20129        Also, UIKit disables actions for us, so don't bother doing anything on iOS.
20130
201312014-05-05  Martin Hock  <mhock@apple.com>
20132
20133        Session-aware plugin autostart data
20134        https://bugs.webkit.org/show_bug.cgi?id=131758
20135        <rdar://problem/15906540>
20136
20137        Reviewed by Alexey Proskuryakov.
20138
20139        * Shared/WebProcessCreationParameters.cpp:
20140        * Shared/WebProcessCreationParameters.h:
20141        * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
20142        (WebKit::PlugInAutoStartProvider::PlugInAutoStartProvider):
20143        (WebKit::PlugInAutoStartProvider::addAutoStartOriginHash):
20144        (WebKit::PlugInAutoStartProvider::autoStartOriginHashesCopy):
20145        (WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy):
20146        (WebKit::PlugInAutoStartProvider::setAutoStartOriginsTableWithItemsPassingTest):
20147        (WebKit::PlugInAutoStartProvider::setAutoStartOriginsArray):
20148        (WebKit::PlugInAutoStartProvider::didReceiveUserInteraction):
20149        * UIProcess/Plugins/PlugInAutoStartProvider.h:
20150        * UIProcess/WebContext.cpp:
20151        (WebKit::WebContext::addPlugInAutoStartOriginHash):
20152        (WebKit::WebContext::plugInDidReceiveUserInteraction):
20153        * UIProcess/WebContext.h:
20154        * UIProcess/WebContext.messages.in:
20155        * WebProcess/Plugins/PluginView.cpp:
20156        (WebKit::PluginView::pluginDidReceiveUserInteraction):
20157        * WebProcess/WebCoreSupport/WebPlugInClient.cpp:
20158        (WebKit::WebPlugInClient::didStartFromOrigin):
20159        * WebProcess/WebCoreSupport/WebPlugInClient.h:
20160        * WebProcess/WebProcess.cpp:
20161        (WebKit::WebProcess::WebProcess):
20162        (WebKit::WebProcess::isPlugInAutoStartOriginHash):
20163        (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin):
20164        (WebKit::WebProcess::plugInDidStartFromOrigin):
20165        (WebKit::WebProcess::didAddPlugInAutoStartOriginHash):
20166        (WebKit::WebProcess::resetPlugInAutoStartOriginDefaultHashes):
20167        (WebKit::WebProcess::resetPlugInAutoStartOriginHashes):
20168        (WebKit::WebProcess::plugInDidReceiveUserInteraction):
20169        * WebProcess/WebProcess.h:
20170        * WebProcess/WebProcess.messages.in:
20171
201722014-05-05  Andy Estes  <aestes@apple.com>
20173
20174        Another iOS build fix after r168260.
20175
20176        Removed an unnecessary 'using namespace WebCore'.
20177
20178        * UIProcess/ios/WebMemoryPressureHandlerIOS.cpp:
20179
201802014-05-05  Tim Horton  <timothy_horton@apple.com>
20181
20182        Fix the iOS build.
20183
20184        * UIProcess/API/Cocoa/WKWebView.mm:
20185
201862014-05-05  Ryuan Choi  <ryuan.choi@samsung.com>
20187
20188        [EFL][WK2] Refactor favicon database APIs
20189        https://bugs.webkit.org/show_bug.cgi?id=132519
20190
20191        Reviewed by Gyuyoung Kim.
20192
20193        ewebkit2 has two options to get favicon.
20194
20195        The first option is ewk_view_favicon_get with "favicon,changed" signal.
20196        It's simple to use but it always adds the callback to EwkView although applications does not use favicon.
20197
20198        The other option is ewk_favicon_database_icon_get with ewk_favicon_database_icon_change_callback_add API.
20199        But the callback doesn't have information about Ewk_Favicon_Database to call ewk_favicon_database_icon_get.
20200
20201        This patch removed ewk_view_favicon_get and "favicon,changed" signal.
20202        In addition, improved ewk_favicon_database_icon_change_callback.
20203
20204        * UIProcess/API/efl/EwkView.cpp: Remove ewk_favicon_database related code.
20205        (EwkView::EwkView):
20206        (EwkView::~EwkView):
20207        (EwkView::informURLChange):
20208        (EwkView::handleFaviconChanged):
20209        (EwkView::createFavicon): Deleted.
20210        * UIProcess/API/efl/EwkViewCallbacks.h:
20211        * UIProcess/API/efl/ewk_favicon_database.cpp:
20212        (EwkFaviconDatabase::iconDataReadyForPageURL):
20213        (EwkFaviconDatabase::didChangeIconForPageURL): Deleted. dead code.
20214        * UIProcess/API/efl/ewk_favicon_database.h:
20215        Refactor Ewk_Favicon_Database_Icon_Change_Cb and improve doxygen.
20216        * UIProcess/API/efl/ewk_favicon_database_private.h:
20217        * UIProcess/API/efl/ewk_view.cpp:
20218        (ewk_view_favicon_get): Deleted.
20219        * UIProcess/API/efl/ewk_view.h:
20220        * UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp:
20221        (EWK2FaviconDatabaseTest::requestFaviconData):
20222        (TEST_F):
20223
202242014-05-05  Tim Horton  <timothy_horton@apple.com>
20225
20226        [iOS WebKit2] Swipe snapshots should be taken asynchronously
20227        https://bugs.webkit.org/show_bug.cgi?id=132417
20228        <rdar://problem/16535921>
20229
20230        Reviewed by Anders Carlsson.
20231
20232        Reorganize takeViewSnapshot to return a ViewSnaphot with the image
20233        filled in (the other properties are filled in by ViewSnapshotStore).
20234
20235        Make ViewSnapshotStore use a fixed size instead of count for the snapshot cache.
20236        iOS doesn't use purgeable snapshots, so make the cache much smaller there.
20237
20238        Use CARenderServerCaptureLayerWithTransform to achieve async snapshotting.
20239
20240        Rename WebKit::ViewSnapshotStore::Snapshot to WebKit::ViewSnapshot so that
20241        it can be forward-declared in a bunch of places.
20242
20243        * UIProcess/API/Cocoa/WKWebView.mm:
20244        (-[WKWebView _takeViewSnapshot:]):
20245        Use CARenderServerCaptureLayerWithTransform.
20246
20247        * UIProcess/API/Cocoa/WKWebViewInternal.h:
20248        * UIProcess/API/mac/WKView.mm:
20249        (createIOSurfaceFromImage):
20250        (-[WKView _takeViewSnapshot:]):
20251        Adjust to the new push model.
20252
20253        * UIProcess/API/mac/WKViewInternal.h:
20254        * UIProcess/PageClient.h:
20255        * UIProcess/WebPageProxy.cpp:
20256        (WebKit::WebPageProxy::takeViewSnapshot):
20257        * UIProcess/WebPageProxy.h:
20258        * UIProcess/ios/PageClientImplIOS.h:
20259        * UIProcess/ios/PageClientImplIOS.mm:
20260        (WebKit::PageClientImpl::takeViewSnapshot):
20261        * UIProcess/mac/PageClientImpl.h:
20262        * UIProcess/mac/PageClientImpl.mm:
20263        (WebKit::PageClientImpl::takeViewSnapshot):
20264        Plumbing.
20265
20266        * UIProcess/ios/ViewGestureControllerIOS.mm:
20267        (WebKit::ViewGestureController::beginSwipeGesture):
20268        (WebKit::ViewGestureController::endSwipeGesture):
20269        Realize an object that can be used as the layer contents from the slot ID.
20270
20271        * UIProcess/ios/WebMemoryPressureHandlerIOS.cpp:
20272        (WebKit::WebMemoryPressureHandler::sharedHandler):
20273        (WebKit::WebMemoryPressureHandler::WebMemoryPressureHandler):
20274        * UIProcess/WebMemoryPressureHandlerIOS.h:
20275        Add a memory pressure handler for the UI process. This does not use
20276        WebCore's platform independent memory pressure handler because that
20277        mechanism only allows for one handler per process, and we don't want to
20278        stomp on any handlers installed by WebKit1 in a process where the WebKits coexist.
20279
20280        * UIProcess/ios/WKContentView.h:
20281        * UIProcess/ios/WKContentView.mm:
20282        (-[WKContentView _takeViewSnapshot]): Deleted.
20283        Get rid of an unnecessary bounce through WKContentView.
20284
20285        * UIProcess/mac/ViewGestureControllerMac.mm:
20286        (WebKit::ViewGestureController::retrieveSnapshotForItem):
20287        (WebKit::ViewGestureController::endSwipeGesture):
20288        Use the new name, ViewSnapshot.
20289
20290        * UIProcess/mac/ViewSnapshotStore.h:
20291        (WebKit::ViewSnapshot::ViewSnapshot):
20292        * UIProcess/mac/ViewSnapshotStore.mm:
20293        (WebKit::ViewSnapshotStore::ViewSnapshotStore):
20294        (WebKit::ViewSnapshotStore::~ViewSnapshotStore):
20295        (WebKit::ViewSnapshotStore::snapshottingContext):
20296        Use a custom CAContext for snapshotting so that snapshots don't
20297        disappear when the main context is destroyed on hibernation.
20298
20299        (WebKit::ViewSnapshotStore::removeSnapshotImage):
20300        (WebKit::ViewSnapshotStore::pruneSnapshots):
20301        (WebKit::ViewSnapshotStore::recordSnapshot):
20302        (WebKit::ViewSnapshotStore::getSnapshot):
20303        (WebKit::ViewSnapshotStore::discardSnapshots):
20304        (WebKit::ViewSnapshot::clearImage):
20305        (WebKit::ViewSnapshot::hasImage):
20306        (WebKit::createIOSurfaceFromImage): Deleted.
20307        (WebKit::ViewSnapshotStore::Snapshot::clearImage): Deleted.
20308        (WebKit::ViewSnapshotStore::Snapshot::hasImage): Deleted.
20309        Cache by image size instead of counts.
20310
20311        * WebKit2.xcodeproj/project.pbxproj:
20312
203132014-05-04  Pratik Solanki  <psolanki@apple.com>
20314
20315        Reduce calls to CFURLCacheCopySharedURLCache
20316        https://bugs.webkit.org/show_bug.cgi?id=132464
20317        <rdar://problem/16806694>
20318
20319        Address review comments by collapsing multi-line code into a single ASSERT.
20320
20321        * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
20322        (WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer):
20323
203242014-05-04  Pratik Solanki  <psolanki@apple.com>
20325
20326        Shortcircuit shouldUseCredentialStorage callback
20327        https://bugs.webkit.org/show_bug.cgi?id=132308
20328        <rdar://problem/16806708>
20329
20330        Reviewed by Alexey Proskuryakov.
20331
20332        If we are going to return true from the shouldUseCredentialStorage callback then we don't
20333        really need to have CFNetwork/Foundation call us. We can just disable the callback and
20334        CFNetwork will assume true. Add a separate subclass that implements this callback when we
20335        need to return false. We can also eliminate the corresponding async callbacks. This avoids
20336        pingponging between dispatch queue and main thread in the common case.
20337
20338        No new tests because no change in functionality.
20339
20340        * NetworkProcess/NetworkResourceLoader.cpp: Remove shouldUseCredentialStorageAsync() callbacks.
20341        * NetworkProcess/NetworkResourceLoader.h:
20342
203432014-05-04  Beth Dakin  <bdakin@apple.com>
20344
20345        Top content inset: Margin tiles should not display in the inset area when pinned 
20346        to the top of the page
20347        https://bugs.webkit.org/show_bug.cgi?id=132535
20348        -and corresponding-
20349        <rdar://problem/16613039>
20350
20351        Reviewed by Simon Fraser.
20352
20353        Encode and decode the ScrollingStateScrollingNode’s m_topContentInset even though 
20354        we don’t use it for anything yet. Since the headerLayer and footerLayer are not 
20355        encoded or decoded yet, I did not encode/decode the insetClipLayer yet, which, 
20356        like the header and footer layers, would not yet be used. 
20357        * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
20358        (ArgumentCoder<ScrollingStateScrollingNode>::encode):
20359        (ArgumentCoder<ScrollingStateScrollingNode>::decode):
20360
203612014-05-03  Commit Queue  <commit-queue@webkit.org>
20362
20363        Unreviewed, rolling out r168232.
20364        https://bugs.webkit.org/show_bug.cgi?id=132543
20365
20366        broke ~15 tests on WK2 debug (Requested by kling on #webkit).
20367
20368        Reverted changeset:
20369
20370        "Shortcircuit shouldUseCredentialStorage callback"
20371        https://bugs.webkit.org/show_bug.cgi?id=132308
20372        http://trac.webkit.org/changeset/168232
20373
203742014-05-03  Tim Horton  <timothy_horton@apple.com>
20375
20376        [iOS] REGRESSION (WebKit2): Page isn't clipped properly during back/forward swipe
20377        https://bugs.webkit.org/show_bug.cgi?id=132538
20378        <rdar://problem/16266027>
20379
20380        Reviewed by Simon Fraser.
20381
20382        * UIProcess/ios/ViewGestureControllerIOS.mm:
20383        (WebKit::ViewGestureController::beginSwipeGesture):
20384        (WebKit::ViewGestureController::endSwipeGesture):
20385        * UIProcess/mac/ViewGestureController.h:
20386        Add a clipping layer above the live swipe layer, which explicitly clips to bounds.
20387
203882014-05-02  Pratik Solanki  <psolanki@apple.com>
20389
20390        Shortcircuit shouldUseCredentialStorage callback
20391        https://bugs.webkit.org/show_bug.cgi?id=132308
20392        <rdar://problem/16806708>
20393
20394        Reviewed by Alexey Proskuryakov.
20395
20396        If we are going to return true from the shouldUseCredentialStorage callback then we don't
20397        really need to have CFNetwork/Foundation call us. We can just disable the callback and
20398        CFNetwork will assume true. Add a separate subclass that implements this callback when we
20399        need to return false. We can also eliminate the corresponding async callbacks. This avoids
20400        pingponging between dispatch queue and main thread in the common case.
20401
20402        No new tests because no change in functionality.
20403
20404        * NetworkProcess/NetworkResourceLoader.cpp: Remove shouldUseCredentialStorageAsync() callbacks.
20405        * NetworkProcess/NetworkResourceLoader.h:
20406
204072014-05-02  Pratik Solanki  <psolanki@apple.com>
20408
20409        Reduce calls to CFURLCacheCopySharedURLCache
20410        https://bugs.webkit.org/show_bug.cgi?id=132464
20411        <rdar://problem/16806694>
20412
20413        Reviewed by Alexey Proskuryakov.
20414
20415        CFURLCacheCopySharedURLCache grabs a mutex and can sometimes block. Avoid that by stashing
20416        the cache reference in a static.
20417
20418        * NetworkProcess/NetworkResourceLoader.h: Coalesce ifdef'd code.
20419        * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
20420        (WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer):
20421        (WebKit::NetworkResourceLoader::willCacheResponseAsync): Use more correct ifdef for
20422        Foundation based callback.
20423
204242014-05-03  Sam Weinig  <sam@webkit.org>
20425
20426        [Cocoa WebKit2] Add basic _WKWebsiteDataStore implementation
20427        https://bugs.webkit.org/show_bug.cgi?id=132526
20428
20429        Reviewed by Anders Carlsson.
20430
20431        - Renames WKSession to _WKWebsiteDataStore to better reflect its intended use (renaming
20432          the implementation object will come later).
20433        - Makes _WKWebsiteDataStore work as a wrapped Objective-C object.
20434        - Adds the ability to set a _WKWebsiteDataStore on the WKWebViewConfiguration.
20435
20436        * Shared/Cocoa/APIObject.mm:
20437        (API::Object::newObject):
20438        * UIProcess/API/Cocoa/WKSession.h:
20439        * UIProcess/API/Cocoa/WKSession.mm:
20440        (-[WKSession dealloc]): Deleted.
20441        (-[WKSession ephemeral]): Deleted.
20442        (-[WKSession API::]): Deleted.
20443        * UIProcess/API/Cocoa/WKSessionInternal.h:
20444        (WebKit::wrapper): Deleted.
20445        * UIProcess/API/Cocoa/WKWebView.mm:
20446        (-[WKWebView initWithFrame:configuration:]):
20447        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
20448        (-[WKWebViewConfiguration copyWithZone:]):
20449        (-[WKWebViewConfiguration _websiteDataStore]):
20450        (-[WKWebViewConfiguration _setWebsiteDataStore:]):
20451        * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
20452        * UIProcess/API/Cocoa/_WKWebsiteDataStore.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKSession.h.
20453        * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKSession.mm.
20454        (+[_WKWebsiteDataStore nonPersistentDataStore]):
20455        (-[_WKWebsiteDataStore isNonPersistentDataStore]):
20456        (-[WKSession ephemeral]): Deleted.
20457        * UIProcess/API/Cocoa/_WKWebsiteDataStoreInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKSessionInternal.h.
20458        * WebKit2.xcodeproj/project.pbxproj:
20459
204602014-05-03  Simon Fraser  <simon.fraser@apple.com>
20461
20462        [UI-side compositing] Assertion in PlatformCAFilters::setFiltersOnLayer with animated reference filter
20463        https://bugs.webkit.org/show_bug.cgi?id=132528
20464        <rdar://problem/16671660>
20465
20466        Reviewed by Tim Horton.
20467        
20468        Allow PASSTHROUGH filters to be encoded and sent to the UI process; they can be set
20469        on layers as the result of a filter animation using a reference filter, and just get
20470        ignored anyway, but encoding them maintains consistency of the filters list.
20471
20472        * Shared/WebCoreArgumentCoders.cpp:
20473        (IPC::ArgumentCoder<FilterOperation>::encode): Assert during encoding if
20474        we try to encode a NONE or REFERENCE filter (to match the decoding assertions).
20475        (IPC::decodeFilterOperation): Allow decoding of PASSTHROUGH filters. Have
20476        trying to decode a NONE or REFERENCE filter mark the message as invalid.
20477        (IPC::ArgumentCoder<IDBKeyData>::decode): Mark the message invalid when receiving
20478        unexpected key types.
20479        * Shared/mac/RemoteLayerTreeTransaction.mm:
20480        (WebKit::RemoteLayerTreeTextStream::operator<<): Have the logging not crash if
20481        a filter is null (should never happen).
20482
204832014-05-02  Dan Bernstein  <mitz@apple.com>
20484
20485        [Cocoa] Remove unused WKErrorRecoveryAttempting
20486        https://bugs.webkit.org/show_bug.cgi?id=132503
20487
20488        Reviewed by Anders Carlsson.
20489
20490        * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
20491        (didFailProvisionalLoadWithErrorForFrame):
20492        (didFailLoadWithErrorForFrame):
20493        (createErrorWithRecoveryAttempter): Deleted.
20494        (-[WKBrowsingContextController attemptRecoveryFromError:]): Deleted.
20495        * UIProcess/API/Cocoa/WKErrorRecoveryAttempting.m: Removed.
20496        * UIProcess/API/Cocoa/_WKFormDelegate.h:
20497        * WebKit2.xcodeproj/project.pbxproj:
20498
204992014-05-02  Enrica Casucci  <enrica@apple.com>
20500
20501        REGRESSION (WebKit2) Need to support reanalyze button for Chinese Traditional.
20502        https://bugs.webkit.org/show_bug.cgi?id=132504
20503        <rdar://problem/16778862>
20504
20505        Reviewed by Benjamin Poulain.
20506
20507        For traditional Chinese we support reanalyzing of the text to perform
20508        transformations on the text based on the selected language and keyboard.
20509        This is done by pressing the Reanalyze button on the system
20510        menu. This patch adds the necessary code to canPerformAction to enable
20511        the button when appropriate as well as the implementation of the action
20512        itself.
20513
20514        * UIProcess/ios/WKContentViewInteraction.mm:
20515        (-[WKContentView _reanalyze:]):
20516        (-[WKContentView canPerformAction:withSender:]):
20517
205182014-05-02  Enrica Casucci  <enrica@apple.com>
20519
20520        REGRESSION (WebKit2) Need to support transliterate chinese button (简⇄繁) for Traditional Chinese.
20521        https://bugs.webkit.org/show_bug.cgi?id=132500
20522        <rdar://problem/16778870>
20523
20524        Reviewed by Benjamin Poulain.
20525
20526        For traditional Chinese we support the transliterate to simplified Chinese.
20527        This is done by pressing the 简⇄繁 button on the system
20528        menu. This patch adds the necessary code to canPerformAction to enable
20529        the button when appropriate as well as the implementation of the action
20530        itself.
20531
20532        * UIProcess/ios/WKContentViewInteraction.mm:
20533        (-[WKContentView _transliterateChinese:]):
20534        (-[WKContentView canPerformAction:withSender:]):
20535
205362014-05-02  Jeremy Jones  <jeremyj@apple.com>
20537
20538        Fullscreen UI does not appear after WebProcess has crashed
20539        https://bugs.webkit.org/show_bug.cgi?id=132442
20540
20541        Reviewed by Darin Adler.
20542
20543        Cleanup WebVideoFullscreenManagerProxy after a WebProcess crash.
20544
20545        * UIProcess/WebPageProxy.cpp:
20546        (WebKit::WebPageProxy::reattachToWebProcess):
20547        recreate WebVideoFullscreenManagerProxy after a WebProcess crash.
20548
20549        (WebKit::WebPageProxy::resetState):
20550        invalidate and release WebVideoFullscreenManagerProxy on crash.
20551
20552        * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
20553        * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
20554        (WebKit::WebVideoFullscreenManagerProxy::~WebVideoFullscreenManagerProxy):
20555        don't assume m_page is valid.
20556
20557        (WebKit::WebVideoFullscreenManagerProxy::invalidate):
20558        do cleanup invalidation in reponse to a WebProcess crash.
20559
205602014-05-02  Benjamin Poulain  <bpoulain@apple.com>
20561
20562        [iOS][WK2] More animation madness for when the extendedBackground is modified in an animation block
20563        https://bugs.webkit.org/show_bug.cgi?id=132497
20564
20565        Reviewed by Beth Dakin.
20566
20567        * UIProcess/API/Cocoa/WKWebView.mm:
20568        (updateTopAndBottomExtendedBackgroundExclusionIfNecessary):
20569        Do not early return when _extendedBackgroundExclusionInsets.left is empty. That way, if executed in an animation block,
20570        the top of bottom view will animate from their current size to an empty width.
20571
20572        When creating the layer, set up their height without animation. Otherwise it is possible to see the height animating
20573        while the left inset is animating.
20574
20575        (-[WKWebView _setExtendedBackgroundExclusionInsets:]):
20576        When replacing the scrollview, make sure the frame and color are not animated. Otherwise the transition between
20577        scrollView and _mainExtendedBackgroundView can be visible if _setExtendedBackgroundExclusionInsets: is invoked
20578        in an animation block.
20579
20580        (-[WKWebView _endAnimatedResize]):
20581        Nuke the top and bottom insets when possible. [WKWebView _endAnimatedResize] is unfrequent, so it is a good opportunity
20582        to free the memory.
20583
205842014-05-02  Alexey Proskuryakov  <ap@apple.com>
20585
20586        Remove Blob contentDisposition handling
20587        https://bugs.webkit.org/show_bug.cgi?id=132490
20588
20589        Reviewed by Sam Weinig.
20590
20591        * Shared/FileAPI/BlobRegistrationData.cpp:
20592        (WebKit::BlobRegistrationData::encode):
20593        (WebKit::BlobRegistrationData::decode):
20594
205952014-05-02  Benjamin Poulain  <benjamin@webkit.org>
20596
20597        [iOS][WK2] Adapt the rubberband constraints when the page get smaller than the scrollview - insets
20598        https://bugs.webkit.org/show_bug.cgi?id=132457
20599
20600        Reviewed by Enrica Casucci.
20601
20602        It is quite common for us to have a WKContentView that is scalled smaller than the WKWebView, content
20603        insets included.
20604
20605        In those cases, update the constraints to fit the content properly in the view.
20606
20607        * UIProcess/ios/WKScrollView.mm:
20608        (valuesAreWithinOnePixel):
20609        (-[WKScrollView _rubberBandOffsetForOffset:maxOffset:minOffset:range:outside:]):
20610
206112014-05-02  Mark Rowe  <mrowe@apple.com>
20612
20613        -[_WKThumbnailView _requestSnapshotIfNeeded] assumes that taking a snapshot will always succeed
20614        <https://webkit.org/b/132489> / <rdar://problem/16704660>
20615
20616        Reviewed by Tim Horton.
20617
20618        * UIProcess/API/Cocoa/_WKThumbnailView.mm:
20619        (-[_WKThumbnailView _requestSnapshotIfNeeded]): Don't attempt to create a CGImageRef if we failed
20620        to create a ShareableBitmap. This handles both the callback receiving a null Handle and a failure
20621        within ShareableBitmap::create.
20622
206232014-05-02  Anders Carlsson  <andersca@apple.com>
20624
20625        Clean up FormDataElement
20626        https://bugs.webkit.org/show_bug.cgi?id=132483
20627
20628        Reviewed by Sam Weinig.
20629
20630        * NetworkProcess/NetworkResourceLoader.cpp:
20631        (WebKit::NetworkResourceLoader::NetworkResourceLoader):
20632        * Shared/Network/NetworkResourceLoadParameters.cpp:
20633        (WebKit::NetworkResourceLoadParameters::encode):
20634
206352014-05-02  Anders Carlsson  <andersca@apple.com>
20636
20637        Add and implement KeyedDecoder::decodeBytes
20638        https://bugs.webkit.org/show_bug.cgi?id=132479
20639
20640        Reviewed by Tim Horton.
20641
20642        * Shared/cf/KeyedDecoder.cpp:
20643        (WebKit::KeyedDecoder::decodeBytes):
20644        * Shared/cf/KeyedDecoder.h:
20645
206462014-05-02  Joseph Pecoraro  <pecoraro@apple.com>
20647
20648        [iOS] WebKit2 File Upload Support
20649        https://bugs.webkit.org/show_bug.cgi?id=132024
20650
20651        Reviewed by Enrica Casucci.
20652
20653        * Configurations/WebKit2.xcconfig:
20654        Include MobileCoreServices on iOS for kUTTypeImage/kUTTypeMovie.
20655
20656        * WebKit2.xcodeproj/project.pbxproj:
20657        Add new files.
20658
20659        * UIProcess/WebOpenPanelResultListenerProxy.h:
20660        * UIProcess/WebOpenPanelResultListenerProxy.cpp:
20661        (WebKit::filePathsFromFileURLs):
20662        (WebKit::WebOpenPanelResultListenerProxy::chooseFiles):
20663        * UIProcess/WebPageProxy.h:
20664        * UIProcess/WebPageProxy.cpp:
20665        (WebKit::WebPageProxy::runOpenPanel):
20666        (WebKit::WebPageProxy::didChooseFilesForOpenPanelWithDisplayStringAndIcon):
20667        * WebProcess/WebPage/WebOpenPanelResultListener.h:
20668        * WebProcess/WebPage/WebOpenPanelResultListener.cpp:
20669        (WebKit::WebOpenPanelResultListener::didChooseFilesWithDisplayStringAndIcon):
20670        * WebProcess/WebPage/WebPage.h:
20671        * WebProcess/WebPage/WebPage.messages.in:
20672        * WebProcess/WebPage/WebPage.cpp:
20673        (WebKit::WebPage::didChooseFilesForOpenPanelWithDisplayStringAndIcon):
20674        Message forwarding for choosing files and providing a display string and icon,
20675        leading down to the existing WebCore FileChooser method.
20676
20677        * UIProcess/PageClient.h:
20678        * UIProcess/ios/PageClientImplIOS.h:
20679        * UIProcess/ios/PageClientImplIOS.mm:
20680        (WebKit::PageClientImpl::handleRunOpenPanel):
20681        Add a default handler for file open panel on iOS.
20682        Forwards to the content view.
20683
20684        * UIProcess/ios/WKContentViewInteraction.h:
20685        * UIProcess/ios/WKContentViewInteraction.mm:
20686        (-[WKContentView lastInteractionLocation]):
20687        (-[WKContentView _webTouchEventsRecognized:]):
20688        (-[WKContentView _highlightLongPressRecognized:]):
20689        (-[WKContentView _longPressRecognized:]):
20690        (-[WKContentView _singleTapRecognized:]):
20691        (-[WKContentView _doubleTapRecognized:]):
20692        (-[WKContentView _twoFingerDoubleTapRecognized:]):
20693        Keep track of the last interaction location. This matches previous behavior
20694        of showing the file upload popover where the user tapped, to handle
20695        cases where the <input> is hidden.
20696
20697        (-[WKContentView _showRunOpenPanel:resultListener:]):
20698        (-[WKContentView fileUploadPanelDidDismiss:]):
20699        Handle showing the cleaning up after the file upload panel.
20700
20701        * UIProcess/ios/forms/WKFileUploadPanel.h:
20702        * UIProcess/ios/forms/WKFileUploadPanel.mm: Added.
20703        (squareCropRectForSize):
20704        (squareImage):
20705        (thumbnailSizedImageForImage):
20706        (-[_WKFileUploadItem isVideo]):
20707        (-[_WKFileUploadItem fileURL]):
20708        (-[_WKFileUploadItem displayImage]):
20709        (-[_WKImageFileUploadItem initWithFilePath:originalImage:]):
20710        (-[_WKImageFileUploadItem isVideo]):
20711        (-[_WKImageFileUploadItem fileURL]):
20712        (-[_WKImageFileUploadItem displayImage]):
20713        (-[_WKVideoFileUploadItem initWithFilePath:mediaURL:]):
20714        (-[_WKVideoFileUploadItem isVideo]):
20715        (-[_WKVideoFileUploadItem fileURL]):
20716        (-[_WKVideoFileUploadItem displayImage]):
20717        Helper class for each image picker selection. Knows how to get
20718        a file URL and thumbnail display image for the item.
20719
20720        (-[WKFileUploadPanel initWithView:]):
20721        (-[WKFileUploadPanel dealloc]):
20722        (-[WKFileUploadPanel _dispatchDidDismiss]):
20723        (-[WKFileUploadPanel _cancel]):
20724        (-[WKFileUploadPanel _chooseFiles:displayString:iconImage:]):
20725        Lifetime of the upload panel requires that either cancel or choose
20726        must happen as we go through the file picking process.
20727
20728        (-[WKFileUploadPanel presentWithParameters:WebKit::resultListener:WebKit::]):
20729        (-[WKFileUploadPanel dismiss]):
20730        API to show or dismiss the panel.
20731
20732        (-[WKFileUploadPanel _dismissDisplayAnimated:]):
20733        Helper to clean up the UI as it progresses or completes no matter the device idiom.
20734
20735        (-[WKFileUploadPanel _presentPopoverWithContentViewController:animated:]):
20736        (-[WKFileUploadPanel _presentFullscreenViewController:animated:]):
20737        UI presentation for the appropriate idiom.
20738
20739        (-[WKFileUploadPanel _mediaTypesForPickerSourceType:]):
20740        (-[WKFileUploadPanel _showMediaSourceSelectionSheet]):
20741        (-[WKFileUploadPanel _showPhotoPickerWithSourceType:]):
20742        Showing the action sheet or image picker.
20743
20744        (-[WKFileUploadPanel popoverControllerDidDismissPopover:]):
20745        (-[WKFileUploadPanel _willMultipleSelectionDelegateBeCalled]):
20746        (-[WKFileUploadPanel imagePickerController:didFinishPickingMediaWithInfo:]):
20747        (-[WKFileUploadPanel imagePickerController:didFinishPickingMultipleMediaWithInfo:]):
20748        (-[WKFileUploadPanel imagePickerControllerDidCancel:]):
20749        Action sheet or image picker handlers.
20750
20751        (-[WKFileUploadPanel _processMediaInfoDictionaries:successBlock:failureBlock:]):
20752        (-[WKFileUploadPanel _processMediaInfoDictionaries:atIndex:processedResults:processedImageCount:processedVideoCount:successBlock:failureBlock:]):
20753        (-[WKFileUploadPanel _uploadItemFromMediaInfo:successBlock:failureBlock:]):
20754        (-[WKFileUploadPanel _displayStringForPhotos:videos:]):
20755        Processing selections from the image picker to FileUploadItems.
20756
207572014-05-01  Simon Fraser  <simon.fraser@apple.com>
20758
20759        [iOS WK2] Animations on vox.com look wrong
20760        https://bugs.webkit.org/show_bug.cgi?id=132462
20761        <rdar://problem/16731884>
20762
20763        Reviewed by Sam Weinig.
20764        
20765        PlatformCALayerRemote was managing animations incorrectly; aninations
20766        would stick around in m_properties.addedAnimations and get added a second
20767        time by mistake.
20768        
20769        Animations have to be managed a little differently to other properties,
20770        since they are not steady-state things. A given commit has to send over
20771        the added and removed animations, and then clear the layer properties.
20772        
20773        Do this by adding PlatformCALayerRemote::didCommit(), which is called
20774        after the layer properties have been encoded, and have it clear the lists
20775        of added and removed animations.
20776        
20777        removeAnimationForKey() also has to remove the animation from addedAnimations
20778        so that an add/remove in the same commit doesn't send the animation to the
20779        UI process.
20780
20781        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
20782        (WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
20783        (WebKit::PlatformCALayerRemote::didCommit):
20784        (WebKit::PlatformCALayerRemote::removeAnimationForKey):
20785        * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
20786        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
20787        (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
20788
207892014-05-01  Simon Fraser  <simon.fraser@apple.com>
20790
20791        [iOS WK2] Can't scroll on gatesnotes.com 
20792        https://bugs.webkit.org/show_bug.cgi?id=132459
20793        <rdar://problem/16770909>
20794
20795        Reviewed by Benjamin Poulain.
20796        
20797        The custom UIView hit-testing code was finding views that were created by
20798        the compositing code for clipping, above the UIScrollViews. We only ever
20799        need to find UIScrollViews here for touch overflow-scrolling, so constrain
20800        the hit-testing code to only return UIScrollViews.
20801
20802        * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
20803        (-[UIView _recursiveFindDescendantScrollViewAtPoint:withEvent:]):
20804        (-[UIView _findDescendantViewAtPoint:withEvent:]):
20805        (-[UIView _recursiveFindDescendantViewAtPoint:withEvent:]): Deleted.
20806
208072014-05-02  Carlos Alberto Lopez Perez  <clopez@igalia.com>
20808
20809        REGRESSION(r168118): [GTK] build broken due to shouldTrackVisitedLinks
20810        https://bugs.webkit.org/show_bug.cgi?id=132447
20811
20812        Unreviewed GTK build fix.
20813
20814        shouldTrackVisitedLinks was removed on r168118.
20815        Visited link coloring works as expected after this change.
20816
20817        * UIProcess/gtk/WebContextGtk.cpp:
20818        (WebKit::WebContext::platformInitializeWebProcess): Remove
20819        shouldTrackVisitedLinks parameter.
20820
208212014-05-01  Enrica Casucci  <enrica@apple.com>
20822
20823        REGRESSION (WebKit2) Need to support Learn button.
20824        https://bugs.webkit.org/show_bug.cgi?id=132454
20825        <rdar://problem/16778889>
20826
20827        Reviewed by Benjamin Poulain.
20828
20829        For traditional Chinese we support the ability to add shortcuts
20830        for typing. This is done by pressing the Learn button on the system
20831        menu. This patch adds the necessary code to canPerformAction to enable
20832        the button when appropriate as well as the implementation of the action
20833        itself.
20834        It also adds a check for the Replace button not to be shown when the
20835        selection only contains CJ characters.
20836
20837        * UIProcess/ios/WKContentViewInteraction.mm:
20838        (-[WKContentView _addShortcut:]):
20839        (-[WKContentView canPerformAction:withSender:]):
20840
208412014-05-01  Benjamin Poulain  <bpoulain@apple.com>
20842
20843        [iOS][WK2] Tweak the extended background exclusion for MobileSafari
20844        https://bugs.webkit.org/show_bug.cgi?id=132449
20845
20846        Reviewed by Beth Dakin.
20847
20848        Some tweaks for Mobile:
20849        -Use UIViews instead of CALayers to have the same animation timing as the top views.
20850        -The left extended background insets should not exclude the top and bottom insets.
20851
20852        Since this code is in the middle of 2 hot paths, also added some performance tweaks.
20853
20854        * UIProcess/API/Cocoa/WKWebView.mm:
20855        (-[WKWebView initWithFrame:configuration:]):
20856        In the normal case, we do not have extended background exclusion. To avoid creating a background view, we use
20857        the scrollview to render the background.
20858        The separate background view is created lazily if needed.
20859
20860        (-[WKWebView _updateScrollViewBackground]):
20861        (-[WKWebView _frameOrBoundsChanged]):
20862        (updateTopAndBottomExtendedBackgroundExclusionIfNecessary):
20863        This create the top and bottom extended background view as needed and update their frames for the current insets.
20864
20865        (-[WKWebView _setObscuredInsets:]):
20866        (-[WKWebView _setExtendedBackgroundExclusionInsets:]):
20867        When an exclusion inset is needed, create a view for it, transfer the color from the ScrollView, and reset the color
20868        of the scrollview.
20869
208702014-05-01  Alexey Proskuryakov  <ap@apple.com>
20871
20872        Move size computation for Blob constructor into BlobRegistryImpl
20873        https://bugs.webkit.org/show_bug.cgi?id=132439
20874
20875        Reviewed by Sam Weinig.
20876
20877        Plumbing to make this version of registerBlobURL synchronous for now.
20878        I expect to make it async again when data structures on client side are simplified.
20879
20880        * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
20881        (WebKit::NetworkBlobRegistry::registerBlobURL):
20882        * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
20883        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
20884        (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
20885        * NetworkProcess/NetworkConnectionToWebProcess.h:
20886        * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
20887        * WebProcess/FileAPI/BlobRegistryProxy.cpp:
20888        (WebKit::BlobRegistryProxy::registerBlobURL):
20889        * WebProcess/FileAPI/BlobRegistryProxy.h:
20890
208912014-05-01  Beth Dakin  <bdakin@apple.com>
20892
20893        REGRESSION(168053): Repro crash navigating to another page after selecting phone 
20894        numbers on a page
20895        https://bugs.webkit.org/show_bug.cgi?id=132444
20896        -and corresponding-
20897        <rdar://problem/16787285>
20898
20899        Reviewed by Darin Adler.
20900
20901        Missing null-check.
20902        * WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
20903        (WebKit::TelephoneNumberOverlayController::drawRect):
20904
209052014-05-01  Anders Carlsson  <andersca@apple.com>
20906
20907        Remove WKBundleSetShouldTrackVisitedLinks and associate code
20908        https://bugs.webkit.org/show_bug.cgi?id=132441
20909
20910        Reviewed by Sam Weinig.
20911
20912        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
20913        (WKBundleSetShouldTrackVisitedLinks): Deleted.
20914        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
20915        * WebProcess/InjectedBundle/InjectedBundle.cpp:
20916        (WebKit::InjectedBundle::setShouldTrackVisitedLinks): Deleted.
20917        * WebProcess/InjectedBundle/InjectedBundle.h:
20918        * WebProcess/WebPage/VisitedLinkTableController.cpp:
20919        (WebKit::VisitedLinkTableController::addVisitedLink):
20920        * WebProcess/WebProcess.cpp:
20921        (WebKit::WebProcess::WebProcess):
20922        (WebKit::WebProcess::setShouldTrackVisitedLinks): Deleted.
20923        * WebProcess/WebProcess.h:
20924        (WebKit::WebProcess::shouldTrackVisitedLinks): Deleted.
20925
209262014-05-01  Anders Carlsson  <andersca@apple.com>
20927
20928        window.testRunner.keepWebHistory() should update the UI process state
20929        https://bugs.webkit.org/show_bug.cgi?id=132440
20930
20931        Reviewed by Dan Bernstein.
20932
20933        * UIProcess/API/C/WKPage.cpp:
20934        (WKPageGetAddsVisitedLinks):
20935        (WKPageSetAddsVisitedLinks):
20936        * UIProcess/API/C/WKPagePrivate.h:
20937
209382014-05-01  Filip Pizlo  <fpizlo@apple.com>
20939
20940        Roll out r60161.
20941
20942        Rubber stamped by Mark Hahnenberg.
20943        
20944        This breaks our debugging workflow.
20945
20946        * Shared/WebProcessCreationParameters.cpp:
20947        (WebKit::WebProcessCreationParameters::decode):
20948        * UIProcess/mac/WebContextMac.mm:
20949        (WebKit::registerUserDefaultsIfNeeded):
20950        (WebKit::WebContext::platformInitializeWebProcess):
20951
209522014-05-01  Anders Carlsson  <andersca@apple.com>
20953
20954        WKWebView doesn't track visited links (for visited link coloring)
20955        https://bugs.webkit.org/show_bug.cgi?id=132438
20956        <rdar://problem/16704519>
20957
20958        Reviewed by Dan Bernstein.
20959
20960        * Shared/WebProcessCreationParameters.cpp:
20961        (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
20962        (WebKit::WebProcessCreationParameters::encode):
20963        (WebKit::WebProcessCreationParameters::decode):
20964        * Shared/WebProcessCreationParameters.h:
20965        * UIProcess/API/APIHistoryClient.h:
20966        (API::HistoryClient::addsVisitedLinks):
20967        (API::HistoryClient::shouldTrackVisitedLinks): Deleted.
20968        * UIProcess/API/C/WKContext.cpp:
20969        (WKContextSetHistoryClient):
20970        * UIProcess/API/Cocoa/WKWebView.mm:
20971        (-[WKWebView _addsVisitedLinks]):
20972        (-[WKWebView _setAddsVisitedLinks:]):
20973        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
20974        * UIProcess/API/mac/WKView.mm:
20975        (-[WKView initWithFrame:context:configuration:webView:]):
20976        * UIProcess/Cocoa/HistoryClient.h:
20977        * UIProcess/Cocoa/HistoryClient.mm:
20978        (WebKit::HistoryClient::shouldTrackVisitedLinks): Deleted.
20979        * UIProcess/VisitedLinkProvider.cpp:
20980        (WebKit::VisitedLinkProvider::addVisitedLinkHashFromPage):
20981        * UIProcess/VisitedLinkProvider.h:
20982        * UIProcess/VisitedLinkProvider.messages.in:
20983        * UIProcess/WebContext.cpp:
20984        (WebKit::WebContext::setHistoryClient):
20985        (WebKit::WebContext::createNewWebProcess):
20986        * UIProcess/WebContext.h:
20987        (WebKit::WebContext::processes):
20988        * UIProcess/WebPageProxy.cpp:
20989        (WebKit::WebPageProxy::WebPageProxy):
20990        * UIProcess/WebPageProxy.h:
20991        (WebKit::WebPageProxy::addsVisitedLinks):
20992        (WebKit::WebPageProxy::setAddsVisitedLinks):
20993        * WebProcess/WebPage/VisitedLinkTableController.cpp:
20994        (WebKit::VisitedLinkTableController::addVisitedLink):
20995        * WebProcess/WebProcess.cpp:
20996        (WebKit::WebProcess::initializeWebProcess):
20997        * WebProcess/WebProcess.h:
20998        * WebProcess/WebProcess.messages.in:
20999
210002014-05-01  Benjamin Poulain  <bpoulain@apple.com>
21001
21002        [iOS][WK2] The highlight view needs to be in WKWebView coordinates
21003        https://bugs.webkit.org/show_bug.cgi?id=132435
21004        <rdar://problem/16708861>
21005
21006        Reviewed by Tim Horton.
21007
21008        _UIHighlightView needs to be in WKWebView coordinates so that it render unscaled for any page scale factor.
21009        The view needs to be a child of WKContentView so that it moves/scales with the page.
21010
21011        To fix the issue, add an inverse transform root layer for the hightlight, and scale the coordinates to their
21012        inverse scaled counterpart.
21013
21014        The scale is not updated live with the scaling of WKContentView but that should be fine since the view disappear
21015        on any scaling operation (and I would prefer not add live painting during scaling animation).
21016
21017        * UIProcess/ios/WKContentViewInteraction.h:
21018        * UIProcess/ios/WKContentViewInteraction.mm:
21019        (-[WKContentView cleanupInteraction]):
21020        (-[WKContentView _didGetTapHighlightForRequest:color:WebCore::quads:WebCore::topLeftRadius:WebCore::topRightRadius:WebCore::bottomLeftRadius:WebCore::bottomRightRadius:WebCore::]):
21021        (-[WKContentView _cancelInteraction]):
21022
210232014-05-01  Ryuan Choi  <ryuan.choi@samsung.com>
21024
21025        [EFL] There are many warnings with software backend
21026        https://bugs.webkit.org/show_bug.cgi?id=132422
21027
21028        Reviewed by Gyuyoung Kim.
21029
21030        * UIProcess/API/efl/EwkView.cpp:
21031        (EwkView::updateCursor):
21032        (EwkView::transformToScreen):
21033
210342014-04-30  Alexey Proskuryakov  <ap@apple.com>
21035
21036        Roll out fix for https://bugs.webkit.org/show_bug.cgi?id=131637:
21037        Clean up unnecessary methods in the BackForwardClient interface
21038
21039        It broke a regression test and an API test.
21040
21041        * WebKit2.xcodeproj/project.pbxproj:
21042        * WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp:
21043        (WebKit::InjectedBundleBackForwardList::clear):
21044        * WebProcess/WebPage/WebBackForwardListProxy.cpp:
21045        (WebKit::WebBackForwardListProxy::WebBackForwardListProxy):
21046        (WebKit::WebBackForwardListProxy::addItem):
21047        (WebKit::WebBackForwardListProxy::goToItem):
21048        (WebKit::WebBackForwardListProxy::itemAtIndex):
21049        (WebKit::WebBackForwardListProxy::backListCount):
21050        (WebKit::WebBackForwardListProxy::forwardListCount):
21051        (WebKit::WebBackForwardListProxy::close):
21052        (WebKit::WebBackForwardListProxy::clear):
21053        * WebProcess/WebPage/WebBackForwardListProxy.h:
21054        (WebKit::WebBackForwardListProxy::create):
21055        * WebProcess/WebPage/WebPage.cpp:
21056        (WebKit::WebPage::WebPage):
21057        * WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm: Copied from Source/WebKit2/WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm.
21058
210592014-04-30  Brady Eidson  <beidson@apple.com>
21060
21061        Only reveal selection service UI after a short delay.
21062        <rdar://problem/16777346> and https://bugs.webkit.org/show_bug.cgi?id=132418
21063
21064        Reviewed by Sam Weinig.
21065
21066        * WebProcess/WebPage/SelectionOverlayController.cpp:
21067        (WebKit::SelectionOverlayController::SelectionOverlayController):
21068        (WebKit::SelectionOverlayController::destroyOverlay): Also stop the hover timer.
21069        (WebKit::SelectionOverlayController::selectionRectsDidChange): Mark the highlight as dirty.
21070        (WebKit::SelectionOverlayController::hoverTimerFired): If the mouse is still over the highlight,
21071          set the visible flag and setNeedsDisplay().
21072        * WebProcess/WebPage/SelectionOverlayController.h:
21073
21074        * WebProcess/WebPage/mac/SelectionOverlayControllerMac.mm:
21075        (WebKit::SelectionOverlayController::drawRect): Recreate the highlight if it exists but
21076          is marked as dirty. After doing that, possibly reset the hover timer.
21077          Also, only performing the actual drawing if the visible flag is set.
21078        (WebKit::SelectionOverlayController::mouseEvent): If the mouse moves on or off the highlight,
21079          start or stop the hover timer accordingly.
21080        (WebKit::SelectionOverlayController::mouseHoverStateChanged): Handle starting/stopping the
21081          hover timer.
21082        (WebKit::SelectionOverlayController::clearHighlight): Deleted.
21083
210842014-04-30  Benjamin Poulain  <benjamin@webkit.org>
21085
21086        [iOS][WK2] Animated resize incorrectly assumes the layout width is the same as the view width
21087        https://bugs.webkit.org/show_bug.cgi?id=132373
21088        <rdar://problem/16762178>
21089
21090        Reviewed by Tim Horton.
21091
21092        * UIProcess/API/Cocoa/WKWebView.mm:
21093        (-[WKWebView _beginAnimatedResizeWithUpdates:]):
21094        Fix a couple of bugs when the left/right obscured insets change, and/or when the minimum layout size
21095        is narrower than the view itself.
21096
21097        In order:
21098        -We need to perfom and update if the insets change since the unobscuredRect will also change.
21099        -The min/max zoom scale should be based on the minimum layout size, that's the definition of minimum layout size
21100         in scrollview coordinate :)
21101        -The old web view width in content coordinate could be narrower than the old view bounds if there are left or right
21102         insets.
21103
211042014-04-30  Simon Fraser  <simon.fraser@apple.com>
21105
21106        Remove ENABLE_PLUGIN_PROXY_FOR_VIDEO
21107        https://bugs.webkit.org/show_bug.cgi?id=132396
21108
21109        Reviewed by Eric Carlson.
21110        
21111        Remove ENABLE_PLUGIN_PROXY_FOR_VIDEO and related code.
21112
21113        * Configurations/FeatureDefines.xcconfig:
21114        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
21115        (WebKit::WebFrameLoaderClient::createMediaPlayerProxyPlugin): Deleted.
21116        (WebKit::WebFrameLoaderClient::hideMediaPlayerProxyPlugin): Deleted.
21117        (WebKit::WebFrameLoaderClient::showMediaPlayerProxyPlugin): Deleted.
21118        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
21119        * WebProcess/WebPage/WebPage.cpp:
21120        (WebKit::WebPage::updatePreferences):
21121
211222014-04-30  Brady Eidson  <beidson@apple.com>
21123
21124        If there are no services available, do not show the service controls UI
21125        <rdar://problem/16735665> and https://bugs.webkit.org/show_bug.cgi?id=132410
21126
21127        Reviewed by Tim Horton.
21128
21129        Add a lightweight class that lazily polls the appropriate APIs for whether or not appropriate services
21130        are installed and usable on the system:
21131        * UIProcess/mac/ServicesController.h: Added.
21132        (WebKit::ServicesController::imageServicesExist):
21133        (WebKit::ServicesController::selectionServicesExist):
21134        * UIProcess/mac/ServicesController.mm: Added.
21135        (WebKit::ServicesController::shared):
21136        (WebKit::ServicesController::ServicesController):
21137        (WebKit::ServicesController::refreshExistingServices):
21138        (WebKit::ServicesController::refreshExistingServicesTimerFired):
21139
21140        Add "image services exist" and "selection services exist" parameters:
21141        * Shared/WebProcessCreationParameters.cpp:
21142        (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
21143        (WebKit::WebProcessCreationParameters::encode):
21144        (WebKit::WebProcessCreationParameters::decode):
21145        * Shared/WebProcessCreationParameters.h:
21146
21147        * UIProcess/WebContext.cpp:
21148        (WebKit::WebContext::createNewWebProcess):
21149        (WebKit::WebContext::refreshExistingServices): Called when the context menu proxy realizes that
21150          services no longer exist.
21151        * UIProcess/WebContext.h:
21152
21153        Each WebProcess hangs on to its own copy of the flags for whether or not the services exist:
21154        * WebProcess/WebProcess.cpp:
21155        (WebKit::WebProcess::WebProcess):
21156        (WebKit::WebProcess::initializeWebProcess):
21157        (WebKit::WebProcess::setEnabledServices):
21158        * WebProcess/WebProcess.h:
21159        (WebKit::WebProcess::imageServicesExist):
21160        (WebKit::WebProcess::selectionServicesExist):
21161
21162        * UIProcess/mac/WebContextMenuProxyMac.mm:
21163        (WebKit::WebContextMenuProxyMac::setupServicesMenu): If the menu creation failed, the set of services
21164          on the system must have changed. So ask the WebContext to refresh them.
21165
21166        * WebProcess/WebPage/SelectionOverlayController.cpp:
21167        (WebKit::SelectionOverlayController::selectionRectsDidChange): If services don't exist, don't create an
21168          overlay (and destroy any existing overlay!)
21169
21170        * WebProcess/WebPage/mac/SelectionOverlayControllerMac.mm:
21171        (WebKit::SelectionOverlayController::drawRect): If services don't exist, don't draw, and destroy the overlay.
21172
21173        * WebProcess/WebProcess.messages.in:
21174        * WebKit2.xcodeproj/project.pbxproj:
21175
211762014-04-30  Gavin Barraclough  <baraclough@apple.com>
21177
21178        https://bugs.webkit.org/show_bug.cgi?id=132415
21179        Fix snapshotting on WebKit2
21180
21181        Reviewed by Geoff Garen
21182
21183        * UIProcess/API/Cocoa/WKWebView.mm:
21184        (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
21185            - Use a VisibilityToken to keep the process runnable.
21186
211872014-04-30  Gavin Barraclough  <baraclough@apple.com>
21188
21189        Fix PageVisibility on iOS
21190        https://bugs.webkit.org/show_bug.cgi?id=132393
21191
21192        Rubber stamped by Tim Horton
21193
21194        * UIProcess/ios/PageClientImplIOS.mm:
21195        (WebKit::PageClientImpl::isViewWindowActive):
21196        (WebKit::PageClientImpl::isViewFocused):
21197        (WebKit::PageClientImpl::isViewVisible):
21198        (WebKit::PageClientImpl::isViewVisibleOrOccluded):
21199        (WebKit::PageClientImpl::isVisuallyIdle):
21200            - m_contentView -> m_webView
21201
212022014-04-30  Benjamin Poulain  <benjamin@webkit.org>
21203
21204        [iOS][WK2] Add a SPI to exclude the extended background from some areas of WKWebView
21205        https://bugs.webkit.org/show_bug.cgi?id=132406
21206        <rdar://problem/16762197>
21207
21208        Reviewed by Beth Dakin.
21209
21210        Move the extended background to a separate layer bellow the UIScrollView.
21211
21212        The geometry of that layer is then changed based on ExtendedBackgroundExclusionInsets
21213        as needed.
21214
21215        * UIProcess/API/Cocoa/WKWebView.mm:
21216        (-[WKWebView initWithFrame:configuration:]):
21217        (-[WKWebView _updateScrollViewBackground]):
21218        (-[WKWebView _frameOrBoundsChanged]):
21219        (-[WKWebView _setExtendedBackgroundExclusionInsets:]):
21220        (-[WKWebView _extendedBackgroundExclusionInsets]):
21221        (-[WKWebView pageExtendedBackgroundColor]): Deleted.
21222        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
21223
212242014-04-30  Simon Fraser  <simon.fraser@apple.com>
21225
21226        Fix build error when building for iOS simulator.
21227
21228        * UIProcess/ios/ProcessAssertion.mm:
21229
212302014-04-30  Alexey Proskuryakov  <ap@apple.com>
21231
21232        Move Blob.slice() implementation into BlobRegistryImpl
21233        https://bugs.webkit.org/show_bug.cgi?id=132402
21234
21235        Reviewed by Anders Carlsson.
21236
21237        * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
21238        (WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
21239        * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
21240        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
21241        (WebKit::NetworkConnectionToWebProcess::registerBlobURLForSlice):
21242        * NetworkProcess/NetworkConnectionToWebProcess.h:
21243        * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
21244        * WebProcess/FileAPI/BlobRegistryProxy.cpp:
21245        (WebKit::BlobRegistryProxy::registerBlobURLForSlice):
21246        * WebProcess/FileAPI/BlobRegistryProxy.h:
21247
212482014-04-30  Beth Dakin  <bdakin@apple.com>
21249
21250        Phone number data detection UI is offset for iframes, pages with topContentInset
21251        https://bugs.webkit.org/show_bug.cgi?id=132372
21252        -and corresponding-
21253        <rdar://problem/16651235>
21254
21255        Reviewed by Tim Horton.
21256
21257        Make the overlay an OverlayType::Document, which will keep everything relative to 
21258        the main Document’s coordinates. 
21259        * WebProcess/WebPage/TelephoneNumberOverlayController.cpp:
21260        (WebKit::TelephoneNumberOverlayController::createOverlayIfNeeded):
21261
21262        Make frames work by converting to the main  document’s coordinate space.
21263        * WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
21264        (WebKit::TelephoneNumberOverlayController::drawRect):
21265
212662014-04-30  Roger Fong  <roger_fong@apple.com>
21267
21268        Unreviewed. Unnecessary explicit initialization of LayoutUnit from r167985.
21269
21270        * WebProcess/WebPage/WebPage.cpp:
21271        (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
21272        Darin points out that I can just use “/2” instead of “/LayoutUnit(2.0)”.
21273
212742014-04-30 David Hyatt  <hyatt@apple.com>
21275
21276        [New Multicolumn] Enable new multi-column mode
21277        https://bugs.webkit.org/show_bug.cgi?id=131825
21278
21279        Reviewed by Simon Fraser.
21280
21281        * Shared/WebPreferencesStore.h:
21282
212832014-04-30  Brian J. Burg  <burg@cs.washington.edu>
21284
21285        Clean up unnecessary methods in the BackForwardClient interface
21286        https://bugs.webkit.org/show_bug.cgi?id=131637
21287
21288        Reviewed by Andreas Kling.
21289
21290        Remove stubs for iOS-specific methods in the BackForwardClient interface.
21291
21292        Construct a WebBackForwardListProxy directly, and make the WebCore page
21293        own the BackForwardClient instance. Convert uses of backForward().client()
21294        to accept references instead of raw pointers.
21295
21296        * WebKit2.xcodeproj/project.pbxproj:
21297        * WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp:
21298        (WebKit::InjectedBundleBackForwardList::clear):
21299        * WebProcess/WebPage/WebBackForwardListProxy.cpp: Store a reference to
21300        WebCore::Page instead of a pointer.
21301        (WebKit::WebBackForwardListProxy::WebBackForwardListProxy):
21302        (WebKit::WebBackForwardListProxy::create): Deleted.
21303        (WebKit::WebBackForwardListProxy::addItem):
21304        (WebKit::WebBackForwardListProxy::goToItem):
21305        (WebKit::WebBackForwardListProxy::itemAtIndex):
21306        (WebKit::WebBackForwardListProxy::backListCount):
21307        (WebKit::WebBackForwardListProxy::forwardListCount):
21308        (WebKit::WebBackForwardListProxy::close):
21309        (WebKit::WebBackForwardListProxy::clear):
21310        (WebKit::WebBackForwardListProxy::isActive):
21311        * WebProcess/WebPage/WebBackForwardListProxy.h:
21312        * WebProcess/WebPage/WebPage.cpp:
21313        (WebKit::WebPage::WebPage):
21314        * WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm: Removed.
21315
213162014-04-30  Gavin Barraclough  <baraclough@apple.com>
21317
21318        Fix PageVisibility on iOS
21319        https://bugs.webkit.org/show_bug.cgi?id=132393
21320
21321        Reviewed by Andreas Kling.
21322
21323        Currently page visibility API doesn't work correctly on WK2 iOS for a few reasons,
21324        the most significant of which being that the moment a WKWebView leaves the window
21325        we'll suspend the content process, which removes the possibility for any notification
21326        to be delivered. This patch addresses this issue, by allowing the process to run for
21327        long enough for the notification to be delivered.
21328
21329        1) Introduce a new class, ProcessThrottler, to encapsulate the process suspension logic.
21330        2) WebPageProxy uses ProcessThrottler::VisibilityToken to communicate visibility to the throttler.
21331        3) WebPageProxy tracks pending didUpdateViewState messages to detect when the view state update in
21332           the web content process has completed.
21333        4) Distiguish between 'Background' and 'Suspended' states in the ProcessAssertion.
21334
21335        * Shared/ChildProcessProxy.h:
21336            - moved m_assertion to NetworkProcessProxy / WebProcessProxy.
21337        * UIProcess/Network/NetworkProcessProxy.h:
21338            - added m_assertion.
21339        * UIProcess/WebPageProxy.cpp:
21340        (WebKit::WebPageProxy::WebPageProxy):
21341            - initialize VisibilityToken state.
21342        (WebKit::WebPageProxy::reattachToWebProcess):
21343            - reinitialize VisibilityToken state.
21344        (WebKit::WebPageProxy::viewStateDidChange):
21345            - update VisibilityToken, increment m_pendingViewStateUpdates as necessary.
21346        (WebKit::WebPageProxy::updateVisibilityToken):
21347            - update the VisibiliyToken based on page visibility, and whether an update is still pending.
21348        (WebKit::WebPageProxy::didUpdateViewState):
21349            - detect when a view state change has completed in the web process, and update throttle state as necessary.
21350        * UIProcess/WebPageProxy.h:
21351        (WebKit::WebPageProxy::didUpdateViewState): Deleted.
21352            - moved to .cpp.
21353        * UIProcess/WebProcessProxy.cpp:
21354        (WebKit::WebProcessProxy::WebProcessProxy):
21355            - initialize m_throttler.
21356        (WebKit::WebProcessProxy::didFinishLaunching):
21357            - notify the PageThrottler of the new connection.
21358        * UIProcess/WebProcessProxy.h:
21359        (WebKit::WebProcessProxy::throttler):
21360            - added accessor.
21361        (WebKit::WebProcessProxy::updateProcessState): Deleted.
21362            - moved trottling login to ProcessThrottler.
21363        * UIProcess/ios/PageClientImplIOS.h:
21364        * UIProcess/ios/PageClientImplIOS.mm:
21365        (WebKit::PageClientImpl::isViewWindowActive):
21366        (WebKit::PageClientImpl::isViewFocused):
21367        (WebKit::PageClientImpl::isViewVisible):
21368        (WebKit::PageClientImpl::isViewVisibleOrOccluded):
21369            - these should only be true when the view is in a window.
21370        (WebKit::PageClientImpl::isVisuallyIdle):
21371            - this should only be true when the view is not in a window.
21372        * UIProcess/ios/ProcessAssertion.h:
21373        * UIProcess/ios/ProcessAssertion.mm:
21374        (WebKit::flagsForState):
21375            - map from enum -> BKSAssertion flags values.
21376        (WebKit::ProcessAssertion::ProcessAssertion):
21377            - use flagsForState (add support for Suspended state).
21378        (WebKit::ProcessAssertion::setState):
21379            - use flagsForState (add support for Suspended state).
21380        * UIProcess/ios/ProcessThrottler.h: Added.
21381        (WebKit::ProcessThrottler::VisibilityToken::visibility):
21382            - accessor.
21383        (WebKit::ProcessThrottler::VisibilityToken::setVisibility):
21384            - update Visibility value; update the token as necessary.
21385        (WebKit::ProcessThrottler::ProcessThrottler):
21386            - constructor; does not take an assention until didConnnectToProcess is called.
21387        (WebKit::ProcessThrottler::visibilityToken):
21388            - create a VisibilityToken.
21389        (WebKit::ProcessThrottler::didConnnectToProcess):
21390            - take an assertion.
21391        (WebKit::ProcessThrottler::weakPtr):
21392            - create a weak pointer, used for references from VisibilityToken to the throttler.
21393        (WebKit::ProcessThrottler::assertionState):
21394            - determine the correct AssertionState for the process, based on current visibility.
21395        (WebKit::ProcessThrottler::updateAssertion):
21396            - update assertion, called in response to visibility change.
21397        * UIProcess/ios/ProcessThrottler.mm: Added.
21398        (WebKit::ProcessThrottler::VisibilityToken::VisibilityToken):
21399            - constructor.
21400        (WebKit::ProcessThrottler::VisibilityToken::~VisibilityToken):
21401            - set visibility to hidden to reset.
21402        (WebKit::ProcessThrottler::VisibilityToken::hideTimerFired):
21403            - automatically decay from Hiding -> Hidden on a timeout.
21404        (WebKit::ProcessThrottler::VisibilityToken::setVisibilityInternal):
21405            - update counters tracking visibility in ProcessThrottler.
21406        * UIProcess/ios/WKContentView.mm:
21407        (-[WKContentView didMoveToWindow]):
21408            - This affects all view state flags, not just the 'InWindow' state.
21409              If the view moves out of a window request a reply from the WebContent - we use this
21410              to detect when the page visibility event has completed.
21411        * UIProcess/ios/WebProcessProxyIOS.mm:
21412        (WebKit::WebProcessProxy::updateProcessState): Deleted.
21413            - removed.
21414        * WebKit2.xcodeproj/project.pbxproj:
21415            - added new files.
21416
214172014-04-30  Anders Carlsson  <andersca@apple.com>
21418
21419        Preemptive header fixes for when WebKit.framework is going to provide the modern API
21420        https://bugs.webkit.org/show_bug.cgi?id=132394
21421
21422        Reviewed by Dan Bernstein.
21423
21424        * UIProcess/API/Cocoa/WKBrowsingContextPolicyDelegate.h:
21425        (NS_ENUM):
21426        Delete WKNavigationType for now. Ultimately the entire delegate should be removed.
21427
21428        * UIProcess/API/Cocoa/WKPreferences.h:
21429        Add a header guard so we can avoid importing WKPreferences.h more than once.
21430
21431        * WebKit2.xcodeproj/project.pbxproj:
21432        _WKScriptWorld.h should be private, not public.
21433        WKScriptMessagePrivate.h and WKUserContentControllerPrivate.h should be private, not project.
21434
214352014-04-30  Joseph Pecoraro  <pecoraro@apple.com>
21436
21437        Web Inspector: Ensure UIProcess checks in to webinspectord after spawning a WebProcess
21438        https://bugs.webkit.org/show_bug.cgi?id=132389
21439
21440        Reviewed by Timothy Hatcher.
21441
21442        We aggregate WebProcess WebView's under the UIProcess. If the UIProcess
21443        didn't connect to webinspectord these WebViews would have remained
21444        hidden. Always have the UIProcess connect to webinspectord when it
21445        spawns a WebProcess and may have a child process holding views that
21446        it ultimately owns and should display under the UIProcess name.
21447
21448        * UIProcess/WebContext.cpp:
21449        (WebKit::WebContext::createNewWebProcess):
21450
214512014-04-30  Zalan Bujtas  <zalan@apple.com>
21452
21453        [iOS]Subpixel rendering: Extra line of pixels next to the YouTube loading indicator.
21454        https://bugs.webkit.org/show_bug.cgi?id=132391
21455
21456        Reviewed by Simon Fraser.
21457
21458        CG and GraphicsContext clipping should use the same coordinates. Snapping either one
21459        while leaving the other unsnapped results in clipping mismatch and that may produce
21460        unpainted areas.
21461
21462        Not testable.
21463
21464        * Shared/mac/RemoteLayerBackingStore.mm:
21465        (WebKit::RemoteLayerBackingStore::drawInContext):
21466
214672014-04-30  Alexey Proskuryakov  <ap@apple.com>
21468
21469        https://bugs.webkit.org/show_bug.cgi?id=132363
21470        Make Blob RawData immutable
21471
21472        Reviewed by Anders Carlsson.
21473
21474        * Shared/FileAPI/BlobRegistrationData.cpp: (WebKit::BlobRegistrationData::decode):
21475        Create RawData in one step.
21476
214772014-04-30  Brady Eidson  <beidson@apple.com>
21478
21479        Followup to: Handle selection services menu.
21480        <rdar://problem/16727798> and https://bugs.webkit.org/show_bug.cgi?id=132362
21481
21482        * UIProcess/mac/WebContextMenuProxyMac.mm:
21483        (WebKit::WebContextMenuProxyMac::setupServicesMenu): Remove an ASSERT from previous version of the patch
21484          that landed. I’d forgotten to add this stray change to my staging area.
21485
214862014-04-30  Manuel Rego Casasnovas  <rego@igalia.com>
21487
21488        [CSS Grid Layout] Enable runtime feature by default
21489        https://bugs.webkit.org/show_bug.cgi?id=132189
21490
21491        Reviewed by Benjamin Poulain.
21492
21493        * Shared/WebPreferencesStore.h: Remove unneeded changes that
21494        enable/disable the runtime feature depending on the compilation flag.
21495        And set it to true by default.
21496        * UIProcess/gtk/ExperimentalFeatures.cpp: Set it to true by default.
21497
214982014-04-30  Roger Fong  <roger_fong@apple.com>
21499
21500        Unreviewed. Wrong units used in offset calculation from r167961.
21501
21502        * WebProcess/WebPage/WebPage.cpp:
21503        (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
21504        I accidentally mixed and matches LayoutUnits with Ints in offset calculation here.
21505        It should all just be in LayoutUnits.
21506
215072014-04-29  Benjamin Poulain  <bpoulain@apple.com>
21508
21509        [iOS][WK2] When pageScaleFactor * deviceScaleFactor = 1, the tile grid is completely messed up
21510        https://bugs.webkit.org/show_bug.cgi?id=132368
21511
21512        Reviewed by Simon Fraser.
21513
21514        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
21515        (WebKit::PlatformCALayerRemote::PlatformCALayerRemote):
21516        PlatformCALayerRemote always initialized the content scale to 1. Since contentsScale is supposed to reflect
21517        zoomScale * deviceScaleFactor, the value should be 2.
21518
21519        This was causing bugs whenever the page scale factor was 1/2 on retina device (device scale factor = 2).
21520
21521        When the page is initialized, GraphicsLayerCA::updateContentsScale(0.5) computes a contentsScale of 1. There is an early
21522        return on if (contentsScale == m_layer->contentsScale()). Since PlatformCALayerRemote->contentsScale() was incorreclty
21523        returning one, we were leaving the tile backing unmodified.
21524
21525        Later, when the transaction is commited, the tile backing would still be default initialized and would render everything
21526        at the wrong scale.
21527
215282014-04-29  Eric Carlson  <eric.carlson@apple.com>
21529
21530        [Mac] tag the video layers with descriptive name to aid debugging
21531        https://bugs.webkit.org/show_bug.cgi?id=132371
21532
21533        Reviewed by Darin Adler.
21534
21535        * WebProcess/ios/WebVideoFullscreenManager.mm:
21536        (WebKit::WebVideoFullscreenManager::enterFullscreenForNode): Set the 
21537            fullscreen host layer name in a debug build.
21538
215392014-04-29  Brady Eidson  <beidson@apple.com>
21540
21541        Handle selection services menu.
21542        <rdar://problem/16727798> and https://bugs.webkit.org/show_bug.cgi?id=132362
21543
21544        Reviewed by Tim Horton.
21545
21546        Add members for the relevant info for showing a service menu for a selection:
21547        * Shared/ContextMenuContextData.cpp:
21548        (WebKit::ContextMenuContextData::ContextMenuContextData):
21549        (WebKit::ContextMenuContextData::controlledDataIsEditable):
21550        * Shared/ContextMenuContextData.h:
21551        (WebKit::ContextMenuContextData::ContextMenuContextData):
21552        (WebKit::ContextMenuContextData::controlledSelectionData):
21553        (WebKit::ContextMenuContextData::needsServicesMenu):
21554
21555        * UIProcess/WebPageProxy.h:
21556        * UIProcess/WebPageProxy.messages.in:
21557        * UIProcess/mac/WebPageProxyMac.mm:
21558        (WebKit::WebPageProxy::replaceSelectionWithPasteboardData): Changed to allow for multiple types on the overridden pasteboard.
21559        (WebKit::WebPageProxy::showSelectionServiceMenu):
21560
21561        Update the services menu code to know the difference between an image service and a selection service:
21562        * UIProcess/mac/WebContextMenuProxyMac.h:
21563        * UIProcess/mac/WebContextMenuProxyMac.mm:
21564        (-[WKSharingServicePickerDelegate sharingServicePicker:sharingServicesForItems:mask:proposedSharingServices:]):
21565        (-[WKSharingServicePickerDelegate sharingService:willShareItems:]):
21566        (-[WKSharingServicePickerDelegate sharingService:didShareItems:]):
21567        (WebKit::WebContextMenuProxyMac::contextMenuItemSelected):
21568        (WebKit::WebContextMenuProxyMac::setupServicesMenu):
21569        (WebKit::WebContextMenuProxyMac::clearServicesMenu):
21570        (WebKit::WebContextMenuProxyMac::populate):
21571        (WebKit::WebContextMenuProxyMac::showContextMenu):
21572        (WebKit::WebContextMenuProxyMac::setupImageServicesMenu): Deleted.
21573        (WebKit::WebContextMenuProxyMac::clearImageServicesMenu): Deleted.
21574
21575        * WebProcess/WebCoreSupport/WebPasteboardOverrides.cpp:
21576        (WebKit::WebPasteboardOverrides::getDataForOverride):
21577
21578        * WebProcess/WebPage/WebPage.h:
21579        * WebProcess/WebPage/WebPage.messages.in:
21580        * WebProcess/WebPage/mac/WebPageMac.mm:
21581        (WebKit::WebPage::replaceSelectionWithPasteboardData): Changed to allow for multiple types on the overridden pasteboard.
21582        (WebKit::WebPage::handleSelectionServiceClick): Pass the relevant selection data through to the UIProcess as RTFD data.
21583
21584        * WebProcess/WebPage/mac/SelectionOverlayControllerMac.mm:
21585        (WebKit::SelectionOverlayController::handleClick): Notify the WebPage of the click.
21586
215872014-04-29  Dan Bernstein  <mitz@apple.com>
21588
21589        <rdar://problem/16745596> [Cocoa] Crash when invoking a method with an unsigned parameter on a remote object
21590        https://bugs.webkit.org/show_bug.cgi?id=132366
21591
21592        Reviewed by Anders Carlsson.
21593
21594        * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
21595        (encodeInvocation): Handle the 'I' type code. Interpret the 'q' and 'Q' type codes in an
21596        architecture-independent manner.
21597        (decodeInvocationArguments): Ditto.
21598
215992014-04-29  Roger Fong  <roger_fong@apple.com>
21600
21601        Don't immediately snapshot plugin to allow for proper dominant plugin detection.
21602        https://bugs.webkit.org/show_bug.cgi?id=132294.
21603        <rdar://problem/16745679>
21604
21605        Reviewed by Dean Jackson.
21606
21607        * WebProcess/Plugins/PluginView.cpp:
21608        (WebKit::PluginView::didInitializePlugin):
21609        Instead of immediately setting the display state to DisplaySnapshot,
21610        put it on a timer to let the page fully layout and get hit test properly.
21611
216122014-04-28  Roger Fong  <roger_fong@apple.com>
21613
21614        Plugins hidden by images should autoplay.
21615        https://bugs.webkit.org/show_bug.cgi?id=132222.
21616        <rdar://problem/16653536>
21617
21618        Reviewed by Jon Lee and Darin Adler.
21619
21620        * WebProcess/WebPage/WebPage.cpp:
21621        (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
21622        If the image on top of the plugin is similarly sized and similarly positioned as the plugin rect,
21623        set the plugin to autoplay. This is assuming that the previous snapshot checks have passed as well.
21624
216252014-04-29  Filip Pizlo  <fpizlo@apple.com>
21626
21627        Use LLVM as a backend for the fourth-tier DFG JIT (a.k.a. the FTL JIT)
21628        https://bugs.webkit.org/show_bug.cgi?id=112840
21629
21630        Rubber stamped by Geoffrey Garen.
21631
21632        * Configurations/FeatureDefines.xcconfig:
21633
216342014-04-29  Brady Eidson  <beidson@apple.com>
21635
21636        Change Image Controls replacement to use selection and paste
21637        <rdar://problem/16302722> and https://bugs.webkit.org/show_bug.cgi?id=131992
21638
21639        Reviewed by Tim Horton.
21640
21641        Add a "pasteboard override" mechanism which allows WebKit to keep pasteboard content local
21642        to the WebProcess and access it there without having to message up to the UI process:
21643        * WebProcess/WebCoreSupport/WebPasteboardOverrides.cpp: Added.
21644        (WebKit::WebPasteboardOverrides::sharedPasteboardOverrides):
21645        (WebKit::WebPasteboardOverrides::WebPasteboardOverrides):
21646        (WebKit::WebPasteboardOverrides::addOverride):
21647        (WebKit::WebPasteboardOverrides::removeOverride):
21648        (WebKit::WebPasteboardOverrides::overriddenTypes):
21649        (WebKit::WebPasteboardOverrides::getDataForOverride):
21650        * WebProcess/WebCoreSupport/WebPasteboardOverrides.h: Added.
21651
21652        Change the pasteboard strategy to consult the pasteboard overrides before consulting the native pasteboard:
21653        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
21654        (WebKit::WebPlatformStrategies::getTypes):
21655        (WebKit::WebPlatformStrategies::bufferForType):
21656
21657        Add "replaceSelectionWithPasteboardData" which uses the new pasteboard overrides mechanism
21658        and then has WebCore perform the replacement:
21659        * WebProcess/WebPage/WebPage.h:
21660        * WebProcess/WebPage/WebPage.messages.in:
21661        * WebProcess/WebPage/mac/WebPageMac.mm:
21662        (WebKit::replaceSelectionPasteboardName):
21663        (WebKit::WebPage::replaceSelectionWithPasteboardData):
21664
21665        * UIProcess/mac/WebPageProxyMac.mm:
21666        (WebKit::WebPageProxy::replaceSelectionWithPasteboardData):
21667
21668        * UIProcess/mac/WebContextMenuProxyMac.h:
21669        (WebKit::WebContextMenuProxyMac::page):
21670        * UIProcess/mac/WebContextMenuProxyMac.mm:
21671        (-[WKSharingServicePickerDelegate sharingService:didShareItems:]): Use "replaceSelectionWithPasteboardData".
21672        (WebKit::WebContextMenuProxyMac::WebContextMenuProxyMac):
21673        (WebKit::WebContextMenuProxyMac::replaceControlledImage): Deleted.
21674
21675        Remain other remnants of "replaceControlledImage":
21676        * UIProcess/WebPageProxy.cpp:
21677        (WebKit::WebPageProxy::replaceControlledImage): Deleted.
21678        * UIProcess/WebPageProxy.h:
21679        * WebProcess/WebPage/WebContextMenu.cpp:
21680        (WebKit::WebContextMenu::replaceControlledImage): Deleted.
21681        * WebProcess/WebPage/WebContextMenu.h:
21682        * WebProcess/WebPage/WebPage.cpp:
21683        (WebKit::WebPage::replaceControlledImage): Deleted.
21684
21685        * WebKit2.xcodeproj/project.pbxproj:
21686
216872014-04-29  Tim Horton  <timothy_horton@apple.com>
21688
21689        Build fix.
21690
21691        * DatabaseProcess/ios/DatabaseProcessIOS.mm:
21692
216932014-04-29  Alexey Proskuryakov  <ap@apple.com>
21694
21695        [WK2] DatabaseProcess should be sandboxed
21696        https://bugs.webkit.org/show_bug.cgi?id=132324
21697        <rdar://problem/15961708>
21698
21699        Reviewed by Darin Adler.
21700
21701        * Configurations/WebKit2.xcconfig: Added the profile to the list of files skipped
21702        on iOS.
21703
21704        * DatabaseProcess/DatabaseProcess.cpp: (WebKit::DatabaseProcess::initializeDatabaseProcess):
21705        Consume a sandbox extension for IndexedDB directory (which we get with initialization
21706        message after entering sandbox).
21707
21708        * DatabaseProcess/ios: Added.
21709        * DatabaseProcess/ios/DatabaseProcessIOS.mm: Copied from Source/WebKit2/DatabaseProcess/mac/DatabaseProcessMac.mm.
21710        Separated from Mac version to match how other processes are implemented.
21711
21712        * DatabaseProcess/mac/DatabaseProcessMac.mm: (WebKit::DatabaseProcess::initializeProcessName):
21713        Removed ifdefs.
21714
21715        * DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in: Added.
21716
21717        * DerivedSources.make: Generate the profile from .sb.in.
21718
21719        * Shared/Databases/DatabaseProcessCreationParameters.cpp:
21720        (WebKit::DatabaseProcessCreationParameters::encode):
21721        (WebKit::DatabaseProcessCreationParameters::decode):
21722        * Shared/Databases/DatabaseProcessCreationParameters.h:
21723        Added a sandbox extension for indexedDatabaseDirectory.
21724
21725        * Shared/SecurityOriginData.h: Added an unrelated FIXME.
21726
21727        * UIProcess/WebContext.cpp: (WebKit::WebContext::ensureDatabaseProcess): Create
21728        a sandbox extension for indexedDatabaseDirectory.
21729
21730        * WebKit2.xcodeproj/project.pbxproj: Added new files.
21731
217322014-04-28  Andy Estes  <aestes@apple.com>
21733
21734        [iOS] Introduce -didNotHandleTapAsClickAtPoint: to WKUIDelegatePrivate
21735        https://bugs.webkit.org/show_bug.cgi?id=132316
21736
21737        Reviewed by Darin Adler.
21738
21739        One WebKit2 client is interested to know if a tap was not handled by an element that responds to clicks.
21740        Introduce a new, private WKUIDelegate method telling it that a tap at a location was not handled as a click on
21741        an element.
21742
21743        * UIProcess/API/APIUIClient.h:
21744        (API::UIClient::didNotHandleTapAsClick):
21745        * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
21746        * UIProcess/Cocoa/UIDelegate.h:
21747        * UIProcess/Cocoa/UIDelegate.mm:
21748        (WebKit::UIDelegate::setDelegate):
21749        (WebKit::UIDelegate::UIClient::didNotHandleTapAsClick):
21750        * UIProcess/WebPageProxy.h:
21751        * UIProcess/WebPageProxy.messages.in:
21752        * UIProcess/ios/WebPageProxyIOS.mm:
21753        (WebKit::WebPageProxy::didNotHandleTapAsClick):
21754        * WebProcess/WebPage/ios/WebPageIOS.mm:
21755        (WebKit::WebPage::handleTap): Sent Messages::WebPageProxy::DidNotHandleTapAsClick if the tap wasn't handled, no
21756        node responded to the click event, or the responding node wasn't an element.
21757
217582014-04-29  Zan Dobersek  <zdobersek@igalia.com>
21759
21760        [GTK][WK2] Avoid Vector copies in WebViewBaseInputMethodFilter::setPreedit()
21761        https://bugs.webkit.org/show_bug.cgi?id=132323
21762
21763        Reviewed by Carlos Garcia Campos.
21764
21765        * UIProcess/API/gtk/WebViewBaseInputMethodFilter.cpp:
21766        (WebKit::WebViewBaseInputMethodFilter::setPreedit): Inline the Vector object construction into
21767        the WebPageProxy::setComposition() call to avoid extra Vector copies and moves.
21768
217692014-04-28  Dan Bernstein  <mitz@apple.com>
21770
21771        <rdar://problem/16750708> REGRESSION (r159358): Crash in InjectedBundleHitTestResult::frame
21772        https://bugs.webkit.org/show_bug.cgi?id=132318
21773
21774        Reviewed by Andy Estes.
21775
21776        * UIProcess/Cocoa/NavigationState.mm:
21777        (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction): Fixed a typo: set
21778        the source frame, not the destination frame.
21779
21780        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
21781        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Changed to get the
21782        frame for the action not from a hit test result, because some link activation actions are
21783        not mouse events, but rather from the event’s target.
21784
217852014-04-28  Benjamin Poulain  <bpoulain@apple.com>
21786
21787        [iOS][WK2] Restore the scroll position and scale from the HistoryItem (mostly)
21788        https://bugs.webkit.org/show_bug.cgi?id=132307
21789        <rdar://problem/16031704>
21790
21791        Reviewed by Simon Fraser.
21792
21793        Restore the scroll position and scale on back-forward by restoring the values from HistoryItem.
21794        This covers the common cases, see <rdar://problem/16031704>.
21795
21796        * UIProcess/API/Cocoa/WKWebView.mm:
21797        (-[WKWebView _didCommitLayerTree:WebKit::]):
21798        (-[WKWebView _didCommitLoadForMainFrame]): Deleted.
21799        * UIProcess/API/Cocoa/WKWebViewInternal.h:
21800        * UIProcess/ios/WKContentView.mm:
21801        (-[WKContentView _didCommitLoadForMainFrame]):
21802        Get rid of the old code restoring the scroll position. This is now done by the WebProcess.
21803
21804        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
21805        (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
21806        Update the scrolling tree after invoking didCommitLayerTree() on the WebPageProxy.
21807
21808        WKContentView and WKWebView states are updated in response to didCommitLayerTree(), the content size
21809        and scale in particular are set there.
21810
21811        After that, the content size/scale is in the same state as the layerTree update, and we can scroll
21812        the content as needed.
21813
21814        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
21815        * WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
21816        (WebKit::WebFrameLoaderClient::restoreViewState):
21817        iOS WebKit1 uses a custom restoreViewState(), do the same for WebKit2 since the generic code is #ifdefed out.
21818        This is also necessary for the main frame's state update.
21819
21820        * WebProcess/WebPage/WebPage.h:
21821        * WebProcess/WebPage/ios/WebPageIOS.mm:
21822        (WebKit::WebPage::restorePageState):
21823        Restore the scale and position of the main frame. For now, we assume m_userHasChangedPageScaleFactor is set otherwise
21824        the initial-scale would override the restored value. We will need to fix that, the value should probably be saved with
21825        the history.
21826
218272014-04-28  Benjamin Poulain  <bpoulain@apple.com>
21828
21829        [iOS][WK2] iOS fix after r167867
21830        https://bugs.webkit.org/show_bug.cgi?id=132302
21831
21832        Reviewed by Simon Fraser.
21833
21834        iOS Touch Points uses "phase" for describing the touch points state for historical reasons.
21835        This patch adds state() as a synonym for phase, and revert r167893.
21836
21837        * Shared/WebEvent.h:
21838        (WebKit::WebPlatformTouchPoint::state):
21839        * UIProcess/WebPageProxy.cpp:
21840        (WebKit::areAllTouchPointsReleased):
21841
218422014-04-28  Andy Estes  <aestes@apple.com>
21843
21844        Fix a transcription error from r167901.
21845
21846        When addressing Darin's review feedback, I moved the iteration of dataArray from
21847        QuickLookDocumentData::append() to WebQuickLookHandleClient::didReceiveDataArray(),
21848        but I forgot to update the context argument to CFArrayApplyFunction() accordingly.
21849
21850        * WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.cpp:
21851        (WebKit::WebQuickLookHandleClient::didReceiveDataArray):
21852
218532014-04-28  Enrica Casucci  <enrica@apple.com>
21854
21855        [WK2 iOS] Need to show title in the action sheet for images not inside an anchor element.
21856        https://bugs.webkit.org/show_bug.cgi?id=132304
21857        <rdar://problem/16535227>
21858
21859        Reviewed by Benjamin Poulain.
21860
21861        If the image in not inside an anchor tag, we must use the title attribute as
21862        title for the action sheet.
21863
21864        * UIProcess/ios/WKActionSheetAssistant.mm:
21865        (-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]):
21866
218672014-04-28  Tim Horton  <timothy_horton@apple.com>
21868
21869        WebKit2 View Gestures (Swipe): Discard snapshots made with a different view size/pixel density
21870        https://bugs.webkit.org/show_bug.cgi?id=132115
21871
21872        Reviewed by Simon Fraser.
21873
21874        We shouldn't try to use snapshots if they no longer match the destination view size.
21875        To do this, we need an accurate understanding of the topContentInset, both for the Web view,
21876        and for any custom views, because we don't want to include the inset area in the snapshot,
21877        and we don't want to reject snapshots that differ from the current view only because they have an inset or not.
21878
21879        * UIProcess/API/Cocoa/WKViewPrivate.h:
21880        * UIProcess/API/mac/WKView.mm:
21881        (-[WKView _takeViewSnapshot]):
21882        (-[WKView _setCustomSwipeViewsTopContentInset:]):
21883        Add and plumb through a topContentInset property to apply to the custom swipe views.
21884        For simplicitly's sake in the multi-view case, it is applied in window coordinates,
21885        so clients will have to do conversions if necessary.
21886        Don't include the top content inset in the snapshot that is taken.
21887
21888        * UIProcess/mac/ViewGestureController.h:
21889        (WebKit::ViewGestureController::setCustomSwipeViewsTopContentInset):
21890        * UIProcess/mac/ViewGestureControllerMac.mm:
21891        (WebKit::ViewGestureController::ViewGestureController):
21892        (WebKit::ViewGestureController::windowRelativeBoundsForCustomSwipeViews):
21893        Apply the aforementioned custom swipe view top content inset.
21894
21895        (WebKit::ViewGestureController::determineSnapshotLayerParent):
21896        (WebKit::ViewGestureController::determineLayerAdjacentToSnapshotForParent):
21897        Factor these out of beginSwipeGesture.
21898
21899        (WebKit::ViewGestureController::retrieveSnapshotForItem):
21900        Don't return a snapshot if the current deviceScaleFactor doesn't match that
21901        at which the snapshot was taken, or if the size of the snapshot doesn't match
21902        the unobscured part of the snapshot layer (the layer's size sans top content inset).
21903
21904        (WebKit::layerGeometryFlippedToRoot): Added.
21905        Determine whether geometry flipping occurs between a layer and the root of the tree it is in.
21906
21907        (WebKit::ViewGestureController::applyDebuggingPropertiesToSwipeViews):
21908        Factor out debugging layer properties, and add some borders and backgrounds to our layers.
21909        I switched to invert instead of blur because blur makes the borders hard to use.
21910
21911        (WebKit::ViewGestureController::beginSwipeGesture):
21912        Add an additional layer, the swipeLayer, which is the parent of the swipeSnapshotLayer.
21913        We use this layer to compensate for geometry flipping, since we don't necessarily
21914        know the structure of the layer tree ahead of time when inserting snapshots into the
21915        client's layer tree, in the custom swipe view case.
21916        The swipe layer is always the full size of the view, including topContentInset, and
21917        has a white background in order to fill in that space. The snapshot layer is the size
21918        of the view *excluding* the topContentInset, which should match the size of the snapshot image
21919        itself (and we reject the image and just paint white if this is not the case).
21920
21921        (WebKit::ViewGestureController::handleSwipeGesture):
21922        (WebKit::ViewGestureController::removeSwipeSnapshot):
21923        Move and remove the new swipeLayer.
21924
21925        * UIProcess/mac/ViewSnapshotStore.h:
21926        * UIProcess/mac/ViewSnapshotStore.mm:
21927        (WebKit::ViewSnapshotStore::recordSnapshot):
21928        Store the deviceScaleFactor at the time the snapshot was taken.
21929        Fix a bug where the count of snapshots with live images was too high
21930        because we were failing to decrement it when replacing a snapshot of
21931        an existing item with a fresh one.
21932
219332014-04-28  Enrica Casucci  <enrica@apple.com>
21934
21935        WK2 iOS: crash when handling a synthetic keyboard event.
21936        https://bugs.webkit.org/show_bug.cgi?id=132296
21937        <rdar://problem/16469726>
21938
21939        Reviewed by Benjamin Poulain.
21940
21941        Adding a null check, since synthetic keyboard events do not
21942        have a corresponding platform event. We already do this on OS X.
21943
21944        * WebProcess/WebPage/ios/WebPageIOS.mm:
21945        (WebKit::WebPage::handleEditingKeyboardEvent):
21946
219472014-04-24  Andy Estes  <aestes@apple.com>
21948
21949        [iOS] Implement WebQuickLookHandleClient for WebKit2
21950        https://bugs.webkit.org/show_bug.cgi?id=132157
21951
21952        Reviewed by Darin Adler.
21953
21954        * Shared/API/Cocoa/_WKNSFileManagerExtras.h: Added.
21955        * Shared/API/Cocoa/_WKNSFileManagerExtras.mm: Added.
21956        (+[NSFileManager _web_createTemporaryFileForQuickLook:]): Called WebCore::createTemporaryFileForQuickLook().
21957        * Shared/ios/QuickLookDocumentData.cpp: Added.
21958        (WebKit::QuickLookDocumentData::QuickLookDocumentData):
21959        (WebKit::QuickLookDocumentData::append): Appened each CFDataRef to m_data and added their sizes to m_size.
21960        (WebKit::QuickLookDocumentData::decodedData): Returned the combined CFDataRef created by decode().
21961        Named this method 'decodedData' to indicate that it should only be called on objects populated by decode().
21962        (WebKit::QuickLookDocumentData::clear): Cleared m_data and reset m_size to 0.
21963        (WebKit::QuickLookDocumentData::encode): Implemented a custom encoding function to avoid having to combine
21964        m_data into contiguous memory at encoding time. Encoded m_size then sequentially encoded each member of m_data.
21965        (WebKit::QuickLookDocumentData::decode): Decoded the byte stream into a single CFDataRef. Eagerly copied the
21966        decoded data rather than using a DataReference since we know this will outlive the decoder.
21967        * Shared/ios/QuickLookDocumentData.h: Added.
21968        * UIProcess/API/APILoaderClient.h:
21969        (API::LoaderClient::didStartLoadForQuickLookDocumentInMainFrame):
21970        (API::LoaderClient::didFinishLoadForQuickLookDocumentInMainFrame):
21971        * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
21972        * UIProcess/Cocoa/NavigationState.h:
21973        * UIProcess/Cocoa/NavigationState.mm:
21974        (WebKit::NavigationState::setNavigationDelegate):
21975        (WebKit::NavigationState::LoaderClient::didStartLoadForQuickLookDocumentInMainFrame):
21976        (WebKit::NavigationState::LoaderClient::didFinishLoadForQuickLookDocumentInMainFrame):
21977        * UIProcess/WebPageProxy.h:
21978        * UIProcess/WebPageProxy.messages.in:
21979        * UIProcess/ios/WebPageProxyIOS.mm:
21980        (WebKit::WebPageProxy::didStartLoadForQuickLookDocumentInMainFrame):
21981        (WebKit::WebPageProxy::didFinishLoadForQuickLookDocumentInMainFrame):
21982        * WebKit2.xcodeproj/project.pbxproj:
21983        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
21984        * WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
21985        (WebKit::WebFrameLoaderClient::didCreateQuickLookHandle):
21986        * WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.cpp: Added.
21987        (WebKit::WebQuickLookHandleClient::WebQuickLookHandleClient): Sent DidStartLoadForQuickLookDocumentInMainFrame
21988        to WebPageProxy.
21989        (WebKit::WebQuickLookHandleClient::didReceiveDataArray): Appended dataArray to m_data.
21990        (WebKit::WebQuickLookHandleClient::didFinishLoading): Sent DidFinishLoadForQuickLookDocumentInMainFrame to
21991        WebPageProxy and then cleared m_data.
21992        (WebKit::WebQuickLookHandleClient::didFail): Cleared m_data.
21993        * WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.h: Added.
21994        (WebKit::WebQuickLookHandleClient::create):
21995
219962014-04-28  Brady Eidson  <beidson@apple.com>
21997
21998        Hide service controls for selection behind a runtime switch
21999        <rdar://problem/16736616> and https://bugs.webkit.org/show_bug.cgi?id=132291
22000
22001        Reviewed by Tim Horton.
22002
22003        * Shared/WebPreferencesStore.h:
22004
22005        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
22006        (WebKit::WebEditorClient::selectionRectsDidChange): Do nothing if the UI is disabled.
22007
22008        * WebProcess/WebPage/WebPage.cpp:
22009        (WebKit::WebPage::WebPage):
22010        (WebKit::WebPage::updatePreferences):
22011
22012        * WebProcess/WebPage/WebPage.h:
22013        (WebKit::WebPage::serviceControlsEnabled):
22014
220152014-04-28  Commit Queue  <commit-queue@webkit.org>
22016
22017        Unreviewed, rolling out r167853.
22018        https://bugs.webkit.org/show_bug.cgi?id=132288
22019
22020        caused crashes+timeouts+layout test failures described in the
22021        bug (Requested by thorton on #webkit).
22022
22023        Reverted changeset:
22024
22025        "Coalesce responses on network process side"
22026        https://bugs.webkit.org/show_bug.cgi?id=132229
22027        http://trac.webkit.org/changeset/167853
22028
220292014-04-28  Simon Fraser  <simon.fraser@apple.com>
22030
22031        Fix the iOS buld.
22032
22033        * UIProcess/WebPageProxy.cpp:
22034        (WebKit::areAllTouchPointsReleased):
22035
220362014-04-24  Simon Fraser  <simon.fraser@apple.com>
22037
22038        [iOS WK2] Make subview rebuilding more incremental
22039        https://bugs.webkit.org/show_bug.cgi?id=132162
22040        <rdar://problem/16718916>
22041
22042        Reviewed by Sam Weinig.
22043        
22044        Previously we did bulk replacement of subviews, but that triggers
22045        UIKit to send spurious will/DidMoveToWindow messages, which can
22046        interfere with UIScrollView scrolling.
22047        
22048        Make _web_setSubviews more incremental, only removing
22049        deleted subviews, adding new ones, and moving existing ones
22050        into the correct order.
22051
22052        * Shared/mac/RemoteLayerTreePropertyApplier.mm:
22053        (-[UIView _web_setSubviews:]):
22054
220552014-04-24  Simon Fraser  <simon.fraser@apple.com>
22056
22057        [iOS WK2] flickery scrolling with overflow-scrolling:touch
22058        https://bugs.webkit.org/show_bug.cgi?id=132150
22059        <rdar://problem/16683006>
22060
22061        Reviewed by Tim Horton.
22062        
22063        Maintain a flag that tells us if the user is interacting
22064        with the UIScrollView, and while set, don't clobber the contentOffset
22065        via scrolling tree updates.
22066
22067        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
22068        (-[WKOverflowScrollViewDelegate initWithScrollingTreeNode:WebKit::]):
22069        (-[WKOverflowScrollViewDelegate scrollViewWillBeginDragging:]):
22070        (-[WKOverflowScrollViewDelegate scrollViewDidEndDragging:willDecelerate:]):
22071        (-[WKOverflowScrollViewDelegate scrollViewDidEndDecelerating:]): We need this one,
22072        not scrollViewDidEndScrollingAnimation:, to detect the end of decleration.
22073        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren):
22074        (-[WKOverflowScrollViewDelegate scrollViewDidEndScrollingAnimation:]): Deleted.
22075
220762014-04-28  Krzysztof Wolanski  <k.wolanski@samsung.com>
22077
22078        [X11] Add missing case for mime type application/x-webkit-test-netscape
22079        https://bugs.webkit.org/show_bug.cgi?id=132278
22080
22081        Reviewed by Darin Adler.
22082
22083        Case for x-webkit-test-netscape has been omitted along with r167759.
22084
22085        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
22086        (WebKit::NetscapePlugin::initialize):
22087
220882014-04-28  Zan Dobersek  <zdobersek@igalia.com>
22089
22090        [WK2][X11] NetscapePluginModule::scanPlugin() should write UTF-8 strings to stdout
22091        https://bugs.webkit.org/show_bug.cgi?id=132245
22092
22093        Reviewed by Carlos Garcia Campos.
22094
22095        NetscapePluginModule::scanPlugin(), in the helper writeLine function, takes each character
22096        of the given string and writes it out as a UChar, doing two fputc calls for each byte of the
22097        16-bit type.
22098
22099        This fails badly with characters with integer value less than 256 as the most significant byte
22100        of the UChar is written out as a null character. This effectively chops the output that's gathered
22101        in the UIProcess and is parsed in PluginProcessProxy::scanPlugin().
22102
22103        To avoid all this, the UTF-8 encoding of the string is written out in the PluginProcess, and
22104        String::fromUTF8() is called in the UIProcess to properly decode the received string.
22105
22106        * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
22107        (WebKit::writeCharacter):
22108        (WebKit::writeLine):
22109        (WebKit::writeByte): Deleted.
22110        * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
22111        (WebKit::PluginProcessProxy::scanPlugin):
22112
221132014-04-28  Zan Dobersek  <zdobersek@igalia.com>
22114
22115        [GTK][WK2] Missing return statement in webkit_plugin_get_description()
22116        https://bugs.webkit.org/show_bug.cgi?id=132263
22117
22118        Reviewed by Carlos Garcia Campos.
22119
22120        * UIProcess/API/gtk/WebKitPlugin.cpp:
22121        (webkit_plugin_get_description): Actually return the data of the cached
22122        plugin description CString.
22123
221242014-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
22125
22126        [GTK] Crash in debug build with removing windowed plugin child widgets from the view
22127        https://bugs.webkit.org/show_bug.cgi?id=132252
22128
22129        Reviewed by Philippe Normand.
22130
22131        It crashes due to an assert in HashTable that checks the iterators
22132        validity. The problem is that we are iterating the children map
22133        and the callback called on every iteration might modify the map,
22134        making the iterators invalid. This happens when the WebView is
22135        destroyed, GtkContainer calls gtk_container_foreach() with
22136        gtk_widget_destroy as callback. When a widget inside a container
22137        is destroyed, it's removed from the container, and in our case,
22138        the child widget is removed from the map. This fixes several
22139        crashes when running layout tests in debug bot.
22140
22141        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
22142        (webkitWebViewBaseContainerForall): Use copyKeysToVector() instead
22143        of using a range iterator for the map keys and check in every
22144        iteration that the child widget from the keys vector is still
22145        present in the map before calling the callback.
22146
221472014-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
22148
22149        [GTK] GObject introspection links to installed libs when using jhbuild
22150        https://bugs.webkit.org/show_bug.cgi?id=132220
22151
22152        Reviewed by Martin Robinson.
22153
22154        The problem is that gobject-introspection is linking the temporary
22155        binaries adding the library paths present LDFLAGS environment
22156        variable first, taking precedence over the libraries in the build
22157        dir. Since the libraries paths of the dependencies are already
22158        correctly deduced by gobject-introspection using ldd, we can
22159        just unset the LDFLAGS variable before calling g-ir-scanner to
22160        make sure the libraries in the build dir take predence.
22161
22162        * PlatformGTK.cmake:
22163
221642014-04-27  Tim Horton  <timothy_horton@apple.com>
22165
22166        REGRESSION (r164702): Double tap doesn't stay under the new element once the animation finishes
22167        https://bugs.webkit.org/show_bug.cgi?id=132239
22168        <rdar://problem/16192842>
22169
22170        Reviewed by Darin Adler.
22171
22172        * WebProcess/WebPage/WebPage.cpp:
22173        (WebKit::WebPage::scalePage):
22174        The change in r167864 broke iOS animated resize, because it was depending on
22175        the dynamic size update code not running if the scale wasn't going to change.
22176        So, as a band-aid we should bail from doing that work if the scales aren't different.
22177        In the long term we should try to untangle this code and make it less platform dependent.
22178
221792014-04-27  Eunmi Lee  <eunmi15.lee@samsung.com>
22180
22181        TouchEvent is not handled after releasing any point among touched points.
22182        https://bugs.webkit.org/show_bug.cgi?id=132043
22183
22184        Reviewed by Benjamin Poulain.
22185
22186        Handle TouchEvent until all touched points are released by setting
22187        trackingTouchEvents variable to false when all points are released.
22188
22189        * UIProcess/WebPageProxy.cpp:
22190        (WebKit::areAllTouchPointsReleased):
22191        (WebKit::WebPageProxy::handleTouchEventSynchronously):
22192        (WebKit::WebPageProxy::handleTouchEventAsynchronously):
22193        (WebKit::WebPageProxy::handleTouchEvent):
22194
221952014-04-27  Alexey Proskuryakov  <ap@apple.com>
22196
22197        Don't use DispatchMessageEvenWhenWaitingForSyncReply for messages from NetworkProcess
22198        https://bugs.webkit.org/show_bug.cgi?id=132144
22199
22200        Reviewed by Darin Adler.
22201
22202        * NetworkProcess/AsynchronousNetworkLoaderClient.cpp:
22203        (WebKit::AsynchronousNetworkLoaderClient::willSendRequest):
22204        (WebKit::AsynchronousNetworkLoaderClient::canAuthenticateAgainstProtectionSpace):
22205        Dont use the IPC::DispatchMessageEvenWhenWaitingForSyncReply flag. It's not needed,
22206        almost never works in NetworkProcess, but may cause trouble if it did.
22207
22208        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
22209        (WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess): Removed
22210        setOnlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage()
22211        function call, because there are no more any messages in NetworkProcess it could affect.
22212
22213        * Platform/IPC/Connection.cpp: (IPC::Connection::dispatchMessage): Added a FIXME
22214        for an unrelated bug Anders and myself noticed while looking into this.
22215
222162014-04-27  Dan Bernstein  <mitz@apple.com>
22217
22218        [Cocoa] -[WKWebProcessPlugInController parameters] returns nil if no parameters have been set yet
22219        https://bugs.webkit.org/show_bug.cgi?id=132223
22220
22221        Reviewed by Sam Weinig.
22222
22223        * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
22224        (WebKit::InjectedBundle::bundleParameters): Create the WKWebProcessBundleParameters if
22225        needed.
22226
222272014-04-27  Tim Horton  <timothy_horton@apple.com>
22228
22229        REGRESSION (r164702): Double tap doesn't stay under the new element once the animation finishes
22230        https://bugs.webkit.org/show_bug.cgi?id=132239
22231        <rdar://problem/16192842>
22232
22233        Reviewed by Sam Weinig.
22234
22235        * WebProcess/WebPage/WebPage.cpp:
22236        (WebKit::WebPage::scalePage):
22237        The early-return added to WebPage::scalePage breaks callers who depend
22238        on being able to call scalePage() with the same scale but a different
22239        origin and having that change take effect.
22240
22241        Page::setPageScaleFactor already has the requisite logic, so move
22242        the early return down after that call, and guard only notification
22243        of page scale changes.
22244
222452014-04-25  Andy Estes  <aestes@apple.com>
22246
22247        [iOS] Stop creating a WKWebResourceQuickLookDelegate for every WebResourceLoader
22248        https://bugs.webkit.org/show_bug.cgi?id=132215
22249
22250        Reviewed by Dan Bernstein.
22251
22252        * WebKit2.xcodeproj/project.pbxproj:
22253        * WebProcess/Network/WebResourceLoader.cpp:
22254        (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo): Called QuickLookHandle::create() directly.
22255        * WebProcess/Network/WebResourceLoader.h:
22256        * WebProcess/ios/WebResourceLoaderIOS.mm: Removed.
22257
222582014-04-27  Sam Weinig  <sam@webkit.org>
22259
22260        [iOS WebKit2] Add support for text autosizing
22261        <rdar://problem/16545245>
22262        https://bugs.webkit.org/show_bug.cgi?id=132237
22263
22264        Reviewed by Tim Horton.
22265
22266        * Shared/WebPageCreationParameters.cpp:
22267        (WebKit::WebPageCreationParameters::encode):
22268        (WebKit::WebPageCreationParameters::decode):
22269        * Shared/WebPageCreationParameters.h:
22270        * UIProcess/WebPageProxy.cpp:
22271        (WebKit::WebPageProxy::creationParameters):
22272        * UIProcess/WebPageProxy.h:
22273        * UIProcess/ios/WebPageProxyIOS.mm:
22274        (WebKit::WebPageProxy::textAutosizingWidth):
22275        * WebProcess/WebPage/WebPage.cpp:
22276        (WebKit::WebPage::WebPage):
22277        Pass the text autosizing width from the UIProcess to WebProcess.
22278
222792014-04-27  Tim Horton  <timothy_horton@apple.com>
22280
22281        WebKit2 View Gestures (Zoom): Pages with 'background-attachment: fixed' don't behave correctly when zoomed
22282        https://bugs.webkit.org/show_bug.cgi?id=132225
22283        <rdar://problem/15729975>
22284
22285        Reviewed by Darin Adler.
22286
22287        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
22288        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
22289        (WebKit::TiledCoreAnimationDrawingArea::layerForTransientZoom):
22290        (WebKit::TiledCoreAnimationDrawingArea::shadowLayerForTransientZoom):
22291        (WebKit::TiledCoreAnimationDrawingArea::adjustTransientZoom):
22292        (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
22293        (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
22294        Factor out code to choose which layer (and shadow layer) to apply the transient zoom to.
22295        If we have a contentsContainmentLayer (because we have composited background-attachment: fixed),
22296        it applies page scale, so we should apply the transient zoom to that layer
22297        instead of the RenderView's main GraphicsLayer.
22298
222992014-04-27  Pratik Solanki  <psolanki@apple.com>
22300
22301        Unreviewed. iOS build fix.
22302
22303        * UIProcess/ios/SmartMagnificationController.h:
22304
223052014-04-27  Zan Dobersek  <zdobersek@igalia.com>
22306
22307        Move cross-port WebKit2 code to std::unique_ptr
22308        https://bugs.webkit.org/show_bug.cgi?id=129670
22309
22310        Reviewed by Darin Adler.
22311
22312        Replace uses of OwnPtr, PassOwnPtr in cross-port WebKit2 code with std::unique_ptr.
22313
22314        * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
22315        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createIndex):
22316        * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
22317        * NetworkProcess/NetworkProcess.h:
22318        (WebKit::NetworkProcess::addSupplement):
22319        * NetworkProcess/SynchronousNetworkLoaderClient.cpp:
22320        (WebKit::SynchronousNetworkLoaderClient::didReceiveBuffer):
22321        * NetworkProcess/SynchronousNetworkLoaderClient.h:
22322        * Platform/IPC/Connection.cpp:
22323        (IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
22324        * Platform/IPC/Connection.h:
22325        * Platform/IPC/MessageReceiver.h:
22326        * Platform/Module.h:
22327        * Platform/WorkQueue.h:
22328        * Platform/efl/ModuleEfl.cpp:
22329        (WebKit::Module::load):
22330        * Platform/mac/LayerHostingContext.mm:
22331        * Shared/APIURL.h:
22332        * Shared/Network/CustomProtocols/CustomProtocolManager.h:
22333        * Shared/Plugins/NPRemoteObjectMap.cpp:
22334        * Shared/ShareableBitmap.h:
22335        * UIProcess/DrawingAreaProxyImpl.h:
22336        * UIProcess/InspectorServer/WebSocketServer.cpp:
22337        (WebKit::WebSocketServer::didAcceptConnection):
22338        (WebKit::WebSocketServer::didCloseWebSocketServerConnection):
22339        * UIProcess/InspectorServer/WebSocketServer.h:
22340        * UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp:
22341        (WebKit::connectionCallback):
22342        * UIProcess/Network/NetworkProcessProxy.cpp:
22343        (WebKit::NetworkProcessProxy::createDownloadProxy):
22344        * UIProcess/Network/NetworkProcessProxy.h:
22345        * UIProcess/Notifications/WebNotificationManagerProxy.h:
22346        * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
22347        (WebKit::WebPluginSiteDataManager::getSitesWithData):
22348        (WebKit::WebPluginSiteDataManager::clearSiteData):
22349        (WebKit::WebPluginSiteDataManager::didGetSitesWithDataForAllPlugins):
22350        (WebKit::WebPluginSiteDataManager::didClearSiteDataForAllPlugins):
22351        * UIProcess/Plugins/WebPluginSiteDataManager.h:
22352        * UIProcess/Storage/StorageManager.cpp:
22353        (WebKit::callCallbackFunction):
22354        (WebKit::StorageManager::getOriginsInternal):
22355        * UIProcess/WebPageProxy.cpp:
22356        (WebKit::ExceededDatabaseQuotaRecords::areBeingProcessed):
22357        (WebKit::ExceededDatabaseQuotaRecords::createRecord):
22358        (WebKit::ExceededDatabaseQuotaRecords::add):
22359        (WebKit::ExceededDatabaseQuotaRecords::next):
22360        (WebKit::WebPageProxy::handleMouseEvent):
22361        (WebKit::WebPageProxy::handleWheelEvent):
22362        (WebKit::WebPageProxy::processNextQueuedWheelEvent):
22363        (WebKit::WebPageProxy::internalShowContextMenu):
22364        * UIProcess/WebPageProxy.h:
22365        * UIProcess/WebProcessProxy.cpp:
22366        (WebKit::WebProcessProxy::createDownloadProxy):
22367        * UIProcess/WebProcessProxy.h:
22368        * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
22369        (WebKit::PluginDestructionProtector::PluginDestructionProtector):
22370        * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
22371        (WebKit::NetscapePluginStream::deliverData):
22372        * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
22373        * WebProcess/Plugins/PluginProcessConnectionManager.h:
22374        * WebProcess/Plugins/PluginProxy.cpp:
22375        (WebKit::PluginProxy::initialize):
22376        (WebKit::PluginProxy::didCreatePluginInternal):
22377        (WebKit::PluginProxy::didFailToCreatePluginInternal):
22378        * WebProcess/Plugins/PluginProxy.h:
22379        * WebProcess/Plugins/PluginView.cpp:
22380        (WebKit::PluginView::createWebEvent):
22381        (WebKit::PluginView::handleEvent):
22382        * WebProcess/Plugins/PluginView.h:
22383        * WebProcess/WebCoreSupport/WebPopupMenu.h:
22384        * WebProcess/WebPage/EventDispatcher.cpp:
22385        (WebKit::EventDispatcher::EventDispatcher):
22386        * WebProcess/WebPage/EventDispatcher.h:
22387        * WebProcess/WebPage/WebPage.cpp:
22388        (WebKit::WebPage::WebPage):
22389        (WebKit::WebPage::beginPrinting):
22390        * WebProcess/WebPage/WebPage.h:
22391        * WebProcess/WebProcess.h:
22392        (WebKit::WebProcess::addSupplement):
22393
223942014-04-27  Antti Koivisto  <antti@apple.com>
22395
22396        Coalesce responses on network process side
22397        https://bugs.webkit.org/show_bug.cgi?id=132229
22398
22399        Reviewed by Andreas Kling.
22400        
22401        To reduce IPC we should coalesce response data in the network process and send it over with single IPC call.
22402
22403        * NetworkProcess/AsynchronousNetworkLoaderClient.cpp:
22404        (WebKit::AsynchronousNetworkLoaderClient::AsynchronousNetworkLoaderClient):
22405        (WebKit::AsynchronousNetworkLoaderClient::didReceiveResponse):
22406        (WebKit::AsynchronousNetworkLoaderClient::didReceiveBuffer):
22407        (WebKit::AsynchronousNetworkLoaderClient::didFinishLoading):
22408        (WebKit::AsynchronousNetworkLoaderClient::didFail):
22409        (WebKit::AsynchronousNetworkLoaderClient::dispatchPartialCoalescedResponse):
22410        (WebKit::AsynchronousNetworkLoaderClient::clearCoalescedResponse):
22411        (WebKit::AsynchronousNetworkLoaderClient::responseCoalesceTimerFired):
22412        
22413            Coalesce the response. Completed response is sent on didFinishLoading. If the coalesce timer fires
22414            before that the data accumulated so far is dispatched.
22415
22416        * NetworkProcess/AsynchronousNetworkLoaderClient.h:
22417        * NetworkProcess/NetworkResourceLoader.h:
22418        * WebProcess/Network/WebResourceLoader.cpp:
22419        (WebKit::WebResourceLoader::didReceiveCompleteResponse):
22420        * WebProcess/Network/WebResourceLoader.h:
22421        * WebProcess/Network/WebResourceLoader.messages.in:
22422        
22423            Add a new message type that covers didReceiveResponse, didReceiveBuffer and didFinishLoading in a single message.
22424
224252014-04-26  Tim Horton  <timothy_horton@apple.com>
22426
22427        REGRESSION (r167775): Safari crashes in ViewSnapshotStore::pruneSnapshots after loading 20 pages
22428        https://bugs.webkit.org/show_bug.cgi?id=132204
22429        <rdar://problem/16735622>
22430
22431        Reviewed by Dan Bernstein and Sam Weinig.
22432
22433        * UIProcess/mac/ViewSnapshotStore.mm:
22434        (WebKit::ViewSnapshotStore::pruneSnapshots):
22435        (WebKit::ViewSnapshotStore::recordSnapshot):
22436        Fix a bug where the count of snapshots with live images was too high
22437        because we were failing to decrement it when replacing a snapshot of
22438        an existing item with a fresh one.
22439
224402014-04-26  Dan Bernstein  <mitz@apple.com>
22441
22442        [Cocoa] Rename a bundle form delegate method
22443        https://bugs.webkit.org/show_bug.cgi?id=132221
22444
22445        Reviewed by Adele Peterson.
22446
22447        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Renamed.
22448        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
22449        (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Check for the method
22450        under the old (“new”) name and under the new name.
22451
224522014-04-25  Dan Bernstein  <mitz@apple.com>
22453
22454        [Cocoa] Synthesized getter for WKNavigationAction's _userInitiated property has the wrong name
22455        https://bugs.webkit.org/show_bug.cgi?id=132219
22456
22457        Reviewed by Sam Weinig.
22458
22459        * UIProcess/API/Cocoa/WKNavigationActionInternal.h:
22460
224612014-04-25  Simon Fraser  <simon.fraser@apple.com>
22462
22463        [iOS] getAssistedNodeInformation crashes getting the bounding box if it doesn't have a renderer
22464        https://bugs.webkit.org/show_bug.cgi?id=132217
22465        <rdar://problem/16671662>
22466
22467        Reviewed by Dean Jackson.
22468
22469        * WebProcess/WebPage/ios/WebPageIOS.mm:
22470        (WebKit::WebPage::getAssistedNodeInformation): Check that m_assistedNode has
22471        a renderer before asking for its bounding box.
22472
224732014-04-25  Benjamin Poulain  <bpoulain@apple.com>
22474
22475        [iOS][WK2] Add an intermediary view to do the target transform and adjustment transform
22476        https://bugs.webkit.org/show_bug.cgi?id=132175
22477
22478        Reviewed by Enrica Casucci.
22479
22480        Some utility views of WKContentView account for the transforms between the content view
22481        and the utility view.
22482
22483        Since the dynamic resize relies on setting subLayerTransforms, it is getting in the way.
22484
22485        This patch adds a layer in between for the animation. That way the content view remains
22486        unscaled.
22487
22488        * UIProcess/API/Cocoa/WKWebView.mm:
22489        (-[WKWebView _didCommitLayerTree:WebKit::]):
22490        (-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:]):
22491        (-[WKWebView _beginAnimatedResizeWithUpdates:]):
22492        (-[WKWebView _endAnimatedResize]):
22493
224942014-04-25  Enrica Casucci  <enrica@apple.com>
22495
22496        REGRESSION (iOS WebKit2): Selection is not being repainted during live resize.
22497        https://bugs.webkit.org/show_bug.cgi?id=132216
22498        <rdar://problem/16628819>
22499
22500        Reviewed by Benjamin Poulain.
22501
22502        Since the selection is drawn in the UIProcess on iOS,
22503        we need to update the selection rects and force a repaint
22504        during a live resize.
22505
22506        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
22507        (WebKit::WebFrameLoaderClient::dispatchDidLayout):
22508        * WebProcess/WebPage/WebPage.h:
22509        * WebProcess/WebPage/ios/WebPageIOS.mm:
22510        (WebKit::WebPage::updateSelectionAppearance):
22511
225122014-04-25  Brady Eidson  <beidson@apple.com>
22513
22514        Add a selection overlay.
22515        <rdar://problem/16727797> and https://bugs.webkit.org/show_bug.cgi?id=132200
22516
22517        Reviewed by David Hyatt.
22518
22519        * WebKit2.xcodeproj/project.pbxproj:
22520
22521        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
22522        (WebKit::WebEditorClient::selectionRectsDidChange): Pass the new selection rects on
22523          to the selection overlay controller.
22524        * WebProcess/WebCoreSupport/WebEditorClient.h:
22525
22526        * WebProcess/WebPage/SelectionOverlayController.cpp: Added.
22527        (WebKit::SelectionOverlayController::SelectionOverlayController):
22528        (WebKit::SelectionOverlayController::createOverlayIfNeeded):
22529        (WebKit::SelectionOverlayController::destroyOverlay):
22530        (WebKit::SelectionOverlayController::pageOverlayDestroyed):
22531        (WebKit::SelectionOverlayController::willMoveToWebPage):
22532        (WebKit::SelectionOverlayController::didMoveToWebPage):
22533        (WebKit::SelectionOverlayController::selectionRectsDidChange):
22534        (WebKit::SelectionOverlayController::drawRect):
22535        (WebKit::SelectionOverlayController::mouseEvent):
22536        * WebProcess/WebPage/SelectionOverlayController.h: Added.
22537        (WebKit::SelectionOverlayController::create):
22538        * WebProcess/WebPage/mac/SelectionOverlayControllerMac.mm: Added.
22539        (WebKit::SelectionOverlayController::drawRect):
22540        (WebKit::SelectionOverlayController::mouseEvent):
22541        (WebKit::SelectionOverlayController::handleClick):
22542        (WebKit::SelectionOverlayController::clearHighlight):
22543
22544        * WebProcess/WebPage/WebPage.cpp:
22545        (WebKit::WebPage::selectionOverlayController):
22546        * WebProcess/WebPage/WebPage.h:
22547
225482014-04-25  Enrica Casucci  <enrica@apple.com>
22549
22550        Remove duplicate member variable in WKAutocorrectionRects and WKAutocorrectionContext.
22551        https://bugs.webkit.org/show_bug.cgi?id=132206
22552
22553        Reviewed by Benjamin Poulain.
22554
22555        * UIProcess/ios/WKContentViewInteraction.mm:
22556
225572014-04-25  Dean Jackson  <dino@apple.com>
22558
22559        Allow a platform-specific size enumeration to be passed into popup-menu display
22560        https://bugs.webkit.org/show_bug.cgi?id=132195
22561
22562        Reviewed by Brent Fulgham. With some in-person review comments from Sam Weinig.
22563
22564        Platforms like OS X use a set of predefined sizes for built-in controls
22565        used for <select>: normal, small and mini. Expose that information to
22566        the PopupMenuClient via the PopupMenuStyle, allowing it to be passed
22567        into the platform code in WebKitSystemInterface.
22568
22569        * Shared/PlatformPopupMenuData.cpp: Encode and decode the PopupMenuSize enum.
22570        (WebKit::PlatformPopupMenuData::encode):
22571        (WebKit::PlatformPopupMenuData::decode):
22572        * Shared/PlatformPopupMenuData.h: Add PopupMenuSize member variable.
22573        * UIProcess/mac/WebPopupMenuProxyMac.mm:
22574        (WebKit::WebPopupMenuProxyMac::showPopupMenu): Convert the PopupMenuSize
22575        into a WKControlSize, and pass that into WKPopupMenu.
22576        * WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
22577        (WebKit::WebPopupMenu::setUpPlatformData): Add the PopupMenuSize to
22578        the PlatformPopupMenuData.
22579
225802014-04-25  Tim Horton  <timothy_horton@apple.com>
22581
22582        REGRESSION (r167775): Safari crashes in ViewSnapshotStore::pruneSnapshots after loading 20 pages
22583        https://bugs.webkit.org/show_bug.cgi?id=132204
22584        <rdar://problem/16729123>
22585
22586        Reviewed by Anders Carlsson.
22587
22588        * UIProcess/mac/ViewSnapshotStore.h:
22589        * UIProcess/mac/ViewSnapshotStore.mm:
22590        (WebKit::ViewSnapshotStore::ViewSnapshotStore):
22591        (WebKit::ViewSnapshotStore::pruneSnapshots):
22592        (WebKit::ViewSnapshotStore::recordSnapshot):
22593        Keep track of the number of snapshots that actually have live images; the
22594        size of the snapshot map no longer represents that.
22595        Also, fix the crash by using the UUID from the current item instead of from
22596        the (potentially null) most distant item; r167775 accidentally typo'd this.
22597
225982014-04-25  Carlos Garcia Campos  <cgarcia@igalia.com>
22599
22600        [GTK] Plugin process crashes with GTK2 windowed plugins
22601        https://bugs.webkit.org/show_bug.cgi?id=132127
22602
22603        Reviewed by Martin Robinson.
22604
22605        It happens sometimes because the socket is used before the plug
22606        has been added. A runtime critical warnings is shown and it
22607        sometimes ends up crashing.
22608
22609        * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
22610        (WebKit::NetscapePlugin::platformPostInitializeWindowed): Do not
22611        show the plug widget until the socket is connected.
22612
226132014-04-24  Andreas Kling  <akling@apple.com>
22614
22615        [iOS WebKit2] Enable optimization to mmap downloaded resources once they become file-backed.
22616        <https://webkit.org/b/132171>
22617        <rdar://problem/16720733>
22618
22619        Implement a CFNetwork-based version of NetworkResourceLoader::willCacheResponseAsync()
22620        and activate the DiskCacheMonitor code path. This means that once resources go into
22621        file system cache, we get notified and mmap them from disk, saving heaps of memory.
22622
22623        Reviewed by Antti Koivisto.
22624
22625        * NetworkProcess/NetworkResourceLoader.h:
22626        * NetworkProcess/mac/DiskCacheMonitor.mm:
22627        * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
22628        (WebKit::NetworkResourceLoader::willCacheResponseAsync):
22629
226302014-04-24  Andreas Kling  <akling@apple.com>
22631
22632        [iOS WebKit2] RemoteLayerTreeDrawingArea should force CA to garbage collect surfaces.
22633        <https://webkit.org/b/132160>
22634        <rdar://problem/16110687>
22635
22636        Do an empty CATransaction at the end of RemoteLayerTreeDrawingArea::flushLayers()
22637        to get CA to garbage collect its IOSurfaces. This helps clean up unused surfaces
22638        that we'd otherwise end up hanging on to for a long time.
22639
22640        Reviewed by Tim Horton.
22641
22642        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
22643        (WebKit::RemoteLayerTreeDrawingArea::didUpdate):
22644
226452014-04-24  Commit Queue  <commit-queue@webkit.org>
22646
22647        Unreviewed, rolling out r167700.
22648        https://bugs.webkit.org/show_bug.cgi?id=132142
22649
22650        Incorrectly reverted the change in r167547 for
22651        webkit.org/b/131898 (Requested by rniwa on #webkit).
22652
22653        Reverted changeset:
22654
22655        "Cursor doesn't change back to pointer when leaving the Safari
22656        window"
22657        https://bugs.webkit.org/show_bug.cgi?id=132038
22658        http://trac.webkit.org/changeset/167700
22659
226602014-04-24  Brady Eidson  <beidson@apple.com>
22661
22662        Rename "IMAGE_CONTROLS" feature to "SERVICE_CONTROLS"
22663        https://bugs.webkit.org/show_bug.cgi?id=132155
22664
22665        Reviewed by Tim Horton.
22666
22667        * Configurations/FeatureDefines.xcconfig:
22668        * Shared/ContextMenuContextData.cpp:
22669        (WebKit::ContextMenuContextData::ContextMenuContextData):
22670        (WebKit::ContextMenuContextData::operator=):
22671        (WebKit::ContextMenuContextData::encode):
22672        (WebKit::ContextMenuContextData::decode):
22673        * Shared/ContextMenuContextData.h:
22674        * UIProcess/WebPageProxy.cpp:
22675        (WebKit::WebPageProxy::internalShowContextMenu):
22676        * UIProcess/WebPageProxy.h:
22677        * UIProcess/mac/WebContextMenuProxyMac.h:
22678        * UIProcess/mac/WebContextMenuProxyMac.mm:
22679        (WebKit::WebContextMenuProxyMac::contextMenuItemSelected):
22680        (WebKit::WebContextMenuProxyMac::populate):
22681        (WebKit::WebContextMenuProxyMac::showContextMenu):
22682        * WebProcess/InjectedBundle/InjectedBundle.cpp:
22683        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
22684        * WebProcess/WebPage/WebContextMenu.cpp:
22685        * WebProcess/WebPage/WebContextMenu.h:
22686        * WebProcess/WebPage/WebPage.cpp:
22687        (WebKit::WebPage::updatePreferences):
22688        * WebProcess/WebPage/WebPage.h:
22689        * WebProcess/WebPage/WebPage.messages.in:
22690
226912014-04-24  Joseph Pecoraro  <pecoraro@apple.com>
22692
22693        [iOS] Add some missing overrides and remove unnecessary virtuals
22694        https://bugs.webkit.org/show_bug.cgi?id=132153
22695
22696        Reviewed by Darin Adler.
22697
22698        * UIProcess/ios/PageClientImplIOS.h:
22699        * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
22700
227012014-04-24  Tim Horton  <timothy_horton@apple.com>
22702
22703        WebKit2 View Gestures: Use a single struct for the snapshot, and pass it around
22704        https://bugs.webkit.org/show_bug.cgi?id=132114
22705
22706        Reviewed by Simon Fraser.
22707
22708        Have only a single map in ViewSnapshotStore, from back-forward item
22709        to ViewSnapshotStore::Snapshot, and return the Snapshot struct when looking
22710        up snapshots (via getSnapshot()), so that future patches can persist additional
22711        information along with the snapshot.
22712
22713        * UIProcess/ios/ViewGestureControllerIOS.mm:
22714        (WebKit::ViewGestureController::beginSwipeGesture):
22715        (WebKit::ViewGestureController::endSwipeGesture):
22716        * UIProcess/mac/ViewGestureController.h:
22717        * UIProcess/mac/ViewGestureControllerMac.mm:
22718        (WebKit::ViewGestureController::retrieveSnapshotForItem):
22719        (WebKit::ViewGestureController::beginSwipeGesture):
22720        (WebKit::ViewGestureController::endSwipeGesture):
22721        Adopt getSnapshot() instead of snapshotAndRenderTreeSize().
22722        Move retrieveSnapshotForItem out into a separate function (for future use).
22723
22724        * UIProcess/mac/ViewSnapshotStore.h:
22725        (WebKit::ViewSnapshotStore::disableSnapshotting):
22726        (WebKit::ViewSnapshotStore::enableSnapshotting):
22727        * UIProcess/mac/ViewSnapshotStore.mm:
22728        (WebKit::ViewSnapshotStore::pruneSnapshots):
22729        (WebKit::ViewSnapshotStore::recordSnapshot):
22730        (WebKit::ViewSnapshotStore::getSnapshot):
22731        (WebKit::ViewSnapshotStore::snapshotAndRenderTreeSize): Deleted.
22732        Make Snapshot struct public.
22733        Get rid of the separate map of back-forward items to render tree sizes.
22734        When evicting, instead of removing the entry, clear out its snapshot image;
22735        this way, we can keep other snapshot metadata around.
22736
227372014-04-24  Enrica Casucci  <enrica@apple.com>
22738
22739        [iOS WebKit2] Should properly handle focus redirect (keyboard state changes when focus changes).
22740        https://bugs.webkit.org/show_bug.cgi?id=132136
22741        <rdar://problem/16238336>
22742
22743        Reviewed by Benjamin Poulain.
22744
22745        Focusing a field from JavaScript should not make the keyboard or the select picker
22746        appear unless the user has already started interacting with one of the fields in the page.
22747        Adding a parameter to StartAssistingNode to indicate whether the focus change is a result
22748        of a user action.
22749
22750        * UIProcess/PageClient.h:
22751        * UIProcess/WebPageProxy.h:
22752        * UIProcess/WebPageProxy.messages.in:
22753        * UIProcess/ios/PageClientImplIOS.h:
22754        * UIProcess/ios/PageClientImplIOS.mm:
22755        (WebKit::PageClientImpl::startAssistingNode):
22756        * UIProcess/ios/WKContentViewInteraction.h:
22757        * UIProcess/ios/WKContentViewInteraction.mm:
22758        (-[WKContentView _startAssistingNode:userIsInteracting:userObject:]):
22759        * UIProcess/ios/WebPageProxyIOS.mm:
22760        (WebKit::WebPageProxy::startAssistingNode):
22761        * WebProcess/WebPage/WebPage.cpp:
22762        (WebKit::WebPage::WebPage):
22763        (WebKit::WebPage::dispatchTouchEvent):
22764        * WebProcess/WebPage/WebPage.h:
22765        * WebProcess/WebPage/ios/WebPageIOS.mm:
22766        (WebKit::WebPage::handleTap):
22767        (WebKit::WebPage::elementDidFocus):
22768
227692014-04-24  Myles C. Maxfield  <mmaxfield@apple.com>
22770
22771        FontCache::fontCache() never returns nullptr so it can be made to return a reference instead
22772        https://bugs.webkit.org/show_bug.cgi?id=132110
22773
22774        Reviewed by Tim Horton.
22775
22776        Updates callers to use '.' instead of '->'.
22777
22778        No new tests are necessary because there should be no behavior change.
22779
22780        * WebProcess/WebProcess.cpp:
22781        (WebKit::WebProcess::terminate):
22782        (WebKit::WebProcess::didClose):
22783        (WebKit::WebProcess::getWebCoreStatistics):
22784
227852014-04-24  Eric Carlson  <eric.carlson@apple.com>
22786
22787        [iOS] Manage AudioSession category according to media type
22788        https://bugs.webkit.org/show_bug.cgi?id=132096
22789
22790        Reviewed by Jer Noble.
22791
22792        * WebProcess/WebPage/WebPage.cpp:
22793        (WebKit::WebPage::WebPage): Tell WebCore to manage the AudioSession.
22794
227952014-04-24  Tim Horton  <timothy_horton@apple.com>
22796
22797        [wk2] Provide SPI allowing clients to hand events directly to swipe code, bypassing scrolling
22798        https://bugs.webkit.org/show_bug.cgi?id=132092
22799        <rdar://problem/15948244>
22800
22801        Reviewed by Darin Adler.
22802
22803        * UIProcess/API/Cocoa/WKViewPrivate.h:
22804        * UIProcess/API/mac/WKView.mm:
22805        (-[WKView _tryToSwipeWithEvent:ignoringPinnedState:]):
22806        Added. Hand the event directly to ViewGestureController, optionally
22807        ignoring whether or not the WKView is scrollable (always pretending that it is not).
22808
22809        * UIProcess/mac/ViewGestureController.h:
22810        (WebKit::ViewGestureController::shouldIgnorePinnedState):
22811        (WebKit::ViewGestureController::setShouldIgnorePinnedState):
22812        * UIProcess/mac/ViewGestureControllerMac.mm:
22813        (WebKit::ViewGestureController::ViewGestureController):
22814        (WebKit::ViewGestureController::scrollEventCanBecomeSwipe):
22815        (WebKit::ViewGestureController::handleScrollWheelEvent):
22816        (WebKit::ViewGestureController::wheelEventWasNotHandledByWebCore):
22817        (WebKit::scrollEventCanBecomeSwipe):
22818        If we're ignoring the view's pinned state, pretend that we're always pinned,
22819        and don't worry about sending events to WebCore.
22820
228212014-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>
22822
22823        [GTK] wmode='transparent' for flash plugin doesn't work
22824        https://bugs.webkit.org/show_bug.cgi?id=120055
22825
22826        Reviewed by Gustavo Noronha Silva.
22827
22828        Force opaque window mode for flash plugin when wmode='transparent',
22829        since X11 backend doesn't support transparency. We should add
22830        proper transparency support because forcing opaque window mode
22831        doesn't really work. Handle this as a plugin quirk instead of
22832        adding X11 specific code to WebFrameLoaderClient::createPlugin().
22833
22834        * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
22835        (WebKit::NetscapePluginModule::determineQuirks): Add
22836        ForceFlashWindowlessMode quirk for flash in case of EFL platform
22837        because EFL port doesn't support windowed plugins.
22838        * Shared/Plugins/PluginQuirks.h: Add ForceFlashWindowlessMode X11
22839        plugin quirk.
22840        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
22841        (WebKit::NetscapePlugin::initialize): Modify or add wmode
22842        parameter for flash plugin, to force opaque window mode when
22843        transparent mode is specified or when ForceFlashWindowlessMode
22844        quirk is present.
22845        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
22846        (WebKit::WebFrameLoaderClient::createPlugin): Remove X11 specific code.
22847
228482014-04-23  Simon Fraser  <simon.fraser@apple.com>
22849
22850        [iOS WK2] Missing content inside long overflow-scrolling:touch 
22851        https://bugs.webkit.org/show_bug.cgi?id=132105
22852
22853        Reviewed by Tim Horton.
22854        
22855        PlatformCALayerRemote needs to track bounds origin as well as size,
22856        since iOS uses bounds origin for overflow scrolling.
22857
22858        * Shared/mac/RemoteLayerTreePropertyApplier.mm:
22859        (WebKit::applyPropertiesToLayer):
22860        * Shared/mac/RemoteLayerTreeTransaction.h:
22861        * Shared/mac/RemoteLayerTreeTransaction.mm:
22862        (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
22863        (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
22864        (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
22865        (WebKit::dumpChangedLayers):
22866        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
22867        (WebKit::PlatformCALayerRemote::updateBackingStore):
22868        (WebKit::PlatformCALayerRemote::bounds):
22869        (WebKit::PlatformCALayerRemote::setBounds):
22870
228712014-04-23  Andreas Kling  <akling@apple.com>
22872
22873        Remove unused WKPageSetMemoryCacheClientCallsEnabled API.
22874        <https://webkit.org/b/132098>
22875
22876        This API was added to WK2 back in 2011 but never actually used.
22877
22878        Reviewed by Anders Carlsson.
22879
22880        * Shared/WebPageCreationParameters.cpp:
22881        (WebKit::WebPageCreationParameters::encode):
22882        (WebKit::WebPageCreationParameters::decode):
22883        * Shared/WebPageCreationParameters.h:
22884        * UIProcess/API/C/WKPage.cpp:
22885        (WKPageSetMemoryCacheClientCallsEnabled): Deleted.
22886        * UIProcess/API/C/WKPage.h:
22887        * UIProcess/WebPageProxy.cpp:
22888        (WebKit::WebPageProxy::WebPageProxy):
22889        (WebKit::WebPageProxy::creationParameters):
22890        (WebKit::WebPageProxy::setMemoryCacheClientCallsEnabled): Deleted.
22891        * UIProcess/WebPageProxy.h:
22892        * WebProcess/WebPage/WebPage.cpp:
22893        (WebKit::WebPage::WebPage):
22894        (WebKit::WebPage::setMemoryCacheMessagesEnabled): Deleted.
22895        * WebProcess/WebPage/WebPage.h:
22896        * WebProcess/WebPage/WebPage.messages.in:
22897
228982014-04-23  Simon Fraser  <simon.fraser@apple.com>
22899
22900        [iOS WK2] Make -webkit-overflow-scrolling:touch work
22901        https://bugs.webkit.org/show_bug.cgi?id=132097
22902
22903        Reviewed by Tim Horton.
22904        
22905        Scrolling of UIScrollViews in content (for -webkit-overflow-scrolling:touch)
22906        depends on them getting hit-tested correctly. UIKit hit testing assumes
22907        that subviews are enclosed by their ancestors, but this is not true of
22908        web content. In addition, we had a root layer that was zero sized.
22909        
22910        Fix by overriding hitTest:withEvent: on our content WKViews to hit
22911        test subviews even if they are not enclosed.
22912
22913        * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
22914        (-[UIView _recursiveFindDescendantViewAtPoint:withEvent:]):
22915        (-[UIView _findDescendantViewAtPoint:withEvent:]):
22916        (-[WKCompositingView hitTest:withEvent:]):
22917        (-[WKTransformView hitTest:withEvent:]):
22918        (-[WKRemoteView hitTest:withEvent:]):
22919        (WebKit::RemoteLayerTreeHost::createLayer):
22920        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
22921        (WebKit::RemoteLayerTreeDrawingArea::updatePreferences):
22922        Update debug borders on the root layer.
22923        (WebKit::RemoteLayerTreeDrawingArea::mainFrameContentSizeChanged):
22924        Size the root layer to the contents size. This isn't strictly necessary
22925        given the hit testing overrides, but seems sensible to do anyway.
22926
229272014-04-23  Simon Fraser  <simon.fraser@apple.com>
22928
22929        Nonopaque layers double-paint with UI-side compositing
22930        https://bugs.webkit.org/show_bug.cgi?id=132101
22931
22932        Reviewed by Tim Horton.
22933        
22934        The non-IOSurface code path was failing to clear the backing store
22935        before painting.
22936
22937        * Shared/mac/RemoteLayerBackingStore.mm:
22938        (WebKit::RemoteLayerBackingStore::display):
22939        (WebKit::RemoteLayerBackingStore::drawInContext):
22940
229412014-04-23  Benjamin Poulain  <bpoulain@apple.com>
22942
22943        [iOS][WK2] Image and text documents sometime gets the webpage viewport configuration
22944        https://bugs.webkit.org/show_bug.cgi?id=132099
22945
22946        Reviewed by Tim Horton.
22947
22948        When didReceiveMobileDocType(), if the doctype was not XHTML mobile, we were setting
22949        the viewport configuration to webpageParameters(). This is obviously not correct for
22950        Image and Text documents.
22951
22952        This patch moves the code deciding the default configuration out of WebPage::didCommitLoad()
22953        and use it from WebPage::didCommitLoad() and WebPage::didReceiveMobileDocType().
22954
22955        * WebProcess/WebPage/WebPage.cpp:
22956        (WebKit::WebPage::didCommitLoad):
22957        * WebProcess/WebPage/WebPage.h:
22958        * WebProcess/WebPage/ios/WebPageIOS.mm:
22959        (WebKit::WebPage::didReceiveMobileDocType):
22960        (WebKit::WebPage::resetViewportDefaultConfiguration):
22961
229622014-04-23  Benjamin Poulain  <bpoulain@apple.com>
22963
22964        [iOS][WK2] Fix a few mistakes affecting the initial layout and the initial unobscured rect
22965        https://bugs.webkit.org/show_bug.cgi?id=132093
22966        <rdar://problem/16703237>
22967
22968        Reviewed by Tim Horton.
22969
22970        The user of WKWebView can setup a size on device pixels, which can add half a point to the minimum
22971        layout size. By rounding this up before applying the page scale, we ended up with rounding errors
22972        on the layout size and the transitory unobscured content rect.
22973
22974        This patch fixes changes the minimal layout size to float point values to reduce the rounding problems.
22975
22976        * UIProcess/API/Cocoa/WKWebView.mm:
22977        (setViewportConfigurationMinimumLayoutSize):
22978        (-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]):
22979        (-[WKWebView _beginAnimatedResizeWithUpdates:]):
22980        * UIProcess/WebPageProxy.h:
22981        * UIProcess/ios/WebPageProxyIOS.mm:
22982        (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
22983        (WebKit::WebPageProxy::setViewportConfigurationMinimumLayoutSize):
22984        (WebKit::WebPageProxy::setMinimumLayoutSizeForMinimalUI):
22985
22986        * WebProcess/WebPage/WebPage.cpp:
22987        (WebKit::WebPage::didCommitLoad):
22988        Defaulting the content size to the minimum layout size only works if the initial-scale is 1.
22989        ViewportConfiguration knows exactly what to do before the first layout.
22990
22991        * WebProcess/WebPage/WebPage.h:
22992        * WebProcess/WebPage/WebPage.messages.in:
22993        * WebProcess/WebPage/ios/WebPageIOS.mm:
22994        (WebKit::WebPage::setViewportConfigurationMinimumLayoutSize):
22995        (WebKit::WebPage::setMinimumLayoutSizeForMinimalUI):
22996        (WebKit::WebPage::dynamicViewportSizeUpdate):
22997        A few fixes here:
22998        -setZoomedOutPageScaleFactor() was incorrectly using the initial scale. 99% of the time, initial scale
22999         and minimum scale are equal, but the page can specify something different with the viewport meta tag.
23000        -Use floating point for manipulating the minimum layout sizes, then round the value.
23001        -minimumLayoutSizeInDocumentCoordinate was scaled the wrong way around.
23002
23003        (WebKit::WebPage::viewportConfigurationChanged):
23004
230052014-04-23  Yongjun Zhang  <yongjun_zhang@apple.com>
23006
23007        Support encoding/decoding NSUInteger arguments in WKRemoteObjectCoder.
23008        https://bugs.webkit.org/show_bug.cgi?id=132040
23009
23010        Add support for encoding/decoding NSUInteger arguments.
23011
23012        Reviewed by Sam Weinig.
23013
23014        * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
23015        (encodeInvocation):
23016        (decodeInvocationArguments):
23017
230182014-04-22  Ryosuke Niwa  <rniwa@webkit.org>
23019
23020        Cursor doesn't change back to pointer when leaving the Safari window
23021        https://bugs.webkit.org/show_bug.cgi?id=132038
23022
23023        Reviewed by Alexey Proskuryakov.
23024
23025        Since the cursor type is now updated asynchronously after r147739,
23026        [window windowNumber] != [NSWindow windowNumberAtPoint:[NSEvent mouseLocation] belowWindowWithWindowNumber:0]
23027        evalutes to false depending on how fast cursor is moving.
23028
23029        Instead, check whether the NSWindow of the WebView is the key window or not since
23030        key window appears to control the cursor style in Cocoa as far as I've tested:
23031        https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/WinPanel/Concepts/ChangingMainKeyWindow.html
23032
23033        * UIProcess/mac/PageClientImpl.mm:
23034        (WebKit::PageClientImpl::setCursor):
23035
230362014-04-22  Yongjun Zhang  <yongjun_zhang@apple.com>
23037
23038        Add SPI to expose provisional URL from Frame.
23039        https://bugs.webkit.org/show_bug.cgi?id=132014
23040
23041        Add methods to return the provisional URL from WKWebProcessPlugInFrame.
23042
23043        Reviewed by Dan Bernstein.
23044
23045        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
23046        (-[WKWebProcessPlugInFrame _provisionalURL]):
23047        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h:
23048
230492014-04-22  Benjamin Poulain  <bpoulain@apple.com>
23050
23051        [iOS][WK2] Split iOS touch event dispatch for the regular touch event dispatch
23052        https://bugs.webkit.org/show_bug.cgi?id=132033
23053
23054        Reviewed by Simon Fraser.
23055
23056        The generic touch event dispatching does not work well with iOS gesture recognizers.
23057        Some events are required to be synchronous, while other needs can be asynchronous and
23058        can even use event coalescing. We only need UI callback for the synchronous events.
23059
23060        Previously, that was implemented by changing the property ShouldSendEventsSynchronously
23061        on WebPageProxy. That is causing issues when synchronous events are sent right after asynchronous
23062        events because the responses in WebPageProxy::didReceiveEvent() easily get out of order.
23063
23064        This patch completely split the UIGestureRecognizerDispatching from the normal asynchronous event dispatching.
23065
23066        Synchronous events are sent directly to the WebProcess and report the result to the PageClient right away.
23067
23068        Asynchronous events are sent to the EventDispatcher where they are coalesced until the main thread is free
23069        to process events.
23070
23071        There can be a race where a synchronous event comes before the asynchronous events are processed. In that case,
23072        the synchronous event handler starts by getting the events out of the EventDispatcher and dispatch them first.
23073
23074        * Shared/NativeWebTouchEvent.h:
23075        (WebKit::NativeWebTouchEvent::uniqueId): Deleted.
23076        * Shared/ios/NativeWebTouchEventIOS.mm:
23077        (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
23078        * UIProcess/WebPageProxy.cpp:
23079        (WebKit::WebPageProxy::handleSynchronousTouchEvent):
23080        (WebKit::WebPageProxy::sendAsynchronousTouchEvent):
23081        (WebKit::WebPageProxy::didReceiveEvent):
23082        (WebKit::WebPageProxy::resetStateAfterProcessExited):
23083        * UIProcess/WebPageProxy.h:
23084        * UIProcess/ios/WKContentViewInteraction.h:
23085        * UIProcess/ios/WKContentViewInteraction.mm:
23086        (-[WKContentView _webTouchEventsRecognized:]):
23087        (-[WKContentView _webTouchEvent:WebKit::preventsNativeGestures:]):
23088        * WebProcess/WebPage/EventDispatcher.cpp:
23089        (WebKit::EventDispatcher::EventDispatcher):
23090        (WebKit::EventDispatcher::clearQueuedTouchEventsForPage):
23091        (WebKit::EventDispatcher::getQueuedTouchEventsForPage):
23092        (WebKit::EventDispatcher::touchEvent):
23093        (WebKit::EventDispatcher::dispatchTouchEvents):
23094        * WebProcess/WebPage/EventDispatcher.h:
23095        * WebProcess/WebPage/EventDispatcher.messages.in:
23096        * WebProcess/WebPage/WebPage.cpp:
23097        (WebKit::WebPage::dispatchTouchEvent):
23098        (WebKit::WebPage::touchEventSync):
23099        (WebKit::WebPage::touchEvent):
23100        (WebKit::WebPage::touchEventSyncForTesting):
23101        (WebKit::WebPage::didCommitLoad):
23102        * WebProcess/WebPage/WebPage.h:
23103        * WebProcess/WebPage/WebPage.messages.in:
23104        * WebProcess/WebPage/ios/WebPageIOS.mm:
23105        (WebKit::WebPage::dispatchAsynchronousTouchEventsQueue):
23106
231072014-04-22  Chris Fleizach  <cfleizach@apple.com>
23108
23109        AX: iOS hit-testing does not work when page is zoomed
23110        https://bugs.webkit.org/show_bug.cgi?id=132013
23111
23112        Reviewed by Simon Fraser.
23113
23114        Implement accessibilityHitTest so that the point can be converted correctly.
23115
23116        * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:
23117        (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
23118
231192014-04-22  Commit Queue  <commit-queue@webkit.org>
23120
23121        Unreviewed, rolling out r167674.
23122        https://bugs.webkit.org/show_bug.cgi?id=132025
23123
23124        Going a different way with this (Requested by bradee-oh on
23125        #webkit).
23126
23127        Reverted changeset:
23128
23129        "Change Image Controls replacement to use selection and paste"
23130        https://bugs.webkit.org/show_bug.cgi?id=131992
23131        http://trac.webkit.org/changeset/167674
23132
231332014-04-22  Joseph Pecoraro  <pecoraro@apple.com>
23134
23135        Remove unused local variable
23136        https://bugs.webkit.org/show_bug.cgi?id=132020
23137
23138        Reviewed by Alexey Proskuryakov.
23139
23140        * UIProcess/ios/forms/WKFormSelectPopover.mm:
23141        (-[WKSelectPopover initWithView:hasGroups:]):
23142
231432014-04-22  Brady Eidson  <beidson@apple.com>
23144
23145        Change Image Controls replacement to use selection and paste
23146        <rdar://problem/16302722> and https://bugs.webkit.org/show_bug.cgi?id=131992
23147
23148        Reviewed by Tim Horton.
23149
23150        * UIProcess/mac/WebContextMenuProxyMac.mm:
23151        (-[WKSharingServicePickerDelegate sharingService:didShareItems:]): Write the
23152          replacement data to a special pasteboard, then replace the current selection from
23153          that pasteboard.
23154
23155        Remove all other code used to support the old replacement mechanism:
23156        * UIProcess/WebPageProxy.cpp:
23157        (WebKit::WebPageProxy::replaceControlledImage): Deleted.
23158        * UIProcess/WebPageProxy.h:
23159        * UIProcess/mac/WebContextMenuProxyMac.h:
23160        (WebKit::WebContextMenuProxyMac::page):
23161        (WebKit::WebContextMenuProxyMac::replaceControlledImage): Deleted.
23162        * WebProcess/WebPage/WebContextMenu.cpp:
23163        (WebKit::WebContextMenu::replaceControlledImage): Deleted.
23164        * WebProcess/WebPage/WebContextMenu.h:
23165        * WebProcess/WebPage/WebPage.cpp:
23166        (WebKit::WebPage::replaceControlledImage): Deleted.
23167        * WebProcess/WebPage/WebPage.h:
23168        * WebProcess/WebPage/WebPage.messages.in:
23169
231702014-04-22  Eunmi Lee  <eunmi15.lee@samsung.com>
23171
23172        [EFL][WK2] Remove duplicated code to set size to the DrawingArea.
23173        https://bugs.webkit.org/show_bug.cgi?id=131972
23174
23175        Reviewed by Andreas Kling.
23176
23177        DrawingArea's size is set in the WebView.cpp when EwkView's size is
23178        changed, so we don't have to set again in the PageViewportController.
23179
23180        * UIProcess/CoordinatedGraphics/PageViewportController.cpp:
23181        (WebKit::PageViewportController::didChangeViewportSize):
23182
231832014-04-22  Tim Horton  <timothy_horton@apple.com>
23184
23185        WKThumbnailView doesn't quite work with topContentInset
23186        https://bugs.webkit.org/show_bug.cgi?id=131976
23187        <rdar://problem/16642127>
23188
23189        Reviewed by Darin Adler.
23190
23191        * UIProcess/API/Cocoa/_WKThumbnailView.mm:
23192        (-[_WKThumbnailView initWithFrame:fromWKView:]):
23193        _WKThumbnailView always needs a layer.
23194        We don't want to use snapshots by default, this was debugging accidentally landed in the last change.
23195
23196        (-[_WKThumbnailView _requestSnapshotIfNeeded]):
23197        Don't request a new snapshot if the scale is the same as the existing one.
23198        Reduce the height of the snapshot by the topContentInset.
23199        Having the origin at (0, 0) is still correct, as the inset content is in negative Y space,
23200        and (0, 0) is the true origin of the content.
23201
23202        (-[_WKThumbnailView setScale:]):
23203        When not snapshotting, we've decided that WKThumbnailView should apply the scale to the WKView layer tree,
23204        instead of depending on clients to do so.
23205
23206        (-[_WKThumbnailView setUsesSnapshot:]):
23207        We *do* need to apply thumbnail scale in the web process even when snapshotting,
23208        because we use the live layer tree temporarily while waiting for the asynchronous
23209        snapshot to return. This was a misstep in the last thumbnail view patch.
23210
232112014-04-22  Shivakumar JM  <shiva.jm@samsung.com>
23212
23213        [WebKit2] Cleanup the build from unused parameter in WebProcess Module 
23214        https://bugs.webkit.org/show_bug.cgi?id=131970
23215
23216        Reviewed by Darin Adler.
23217
23218        Fix a build warning by removing the parameters in function paintLayerContents() to fix build warning.
23219
23220        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
23221        (WebKit::CoordinatedLayerTreeHost::paintLayerContents):
23222
232232014-04-22  Carlos Garcia Campos  <cgarcia@igalia.com>
23224
23225        [GTK] Crash after getting web view context property with g_object_get
23226        https://bugs.webkit.org/show_bug.cgi?id=131983
23227
23228        Reviewed by Philippe Normand.
23229
23230        The problem is that the getter is using g_value_take_object() and
23231        the default context is destroyed when the caller releases its ref.
23232
23233        * UIProcess/API/gtk/WebKitWebView.cpp:
23234        (webkitWebViewGetProperty): Use g_value_set_object() instead of
23235        g_value_take_object().
23236
232372014-04-22  Ryuan Choi  <ryuan.choi@samsung.com>
23238
23239        [EFL][WK2] Remove unnecessary includes in files of Source/WebKit2/UIProcess/API/efl
23240        https://bugs.webkit.org/show_bug.cgi?id=131979
23241
23242        Reviewed by Gyuyoung Kim.
23243
23244        Removed unnecessary includes of header files.
23245        In addition, tried to use forward declarations.
23246
23247        * UIProcess/API/efl/EwkView.cpp:
23248        * UIProcess/API/efl/EwkView.h:
23249        * UIProcess/API/efl/EwkViewCallbacks.h:
23250        * UIProcess/API/efl/GestureRecognizer.h:
23251        * UIProcess/API/efl/ewk_context_menu_item_private.h:
23252        * UIProcess/API/efl/ewk_context_menu_private.h:
23253        * UIProcess/API/efl/ewk_download_job.cpp:
23254        * UIProcess/API/efl/ewk_download_job_private.h:
23255        * UIProcess/API/efl/ewk_form_submission_request.cpp:
23256        * UIProcess/API/efl/ewk_form_submission_request_private.h:
23257        * UIProcess/API/efl/ewk_navigation_data.cpp:
23258        * UIProcess/API/efl/ewk_navigation_data_private.h:
23259        * UIProcess/API/efl/ewk_page_group_private.h:
23260        * UIProcess/API/efl/ewk_popup_menu_private.h:
23261        * UIProcess/API/efl/ewk_view.cpp:
23262        * UIProcess/API/efl/ewk_window_features_private.h:
23263        * UIProcess/efl/PageUIClientEfl.cpp:
23264        * UIProcess/efl/ViewClientEfl.cpp:
23265
232662014-04-21  Tim Horton  <timothy_horton@apple.com>
23267
23268        [wk2] Don't send intrinsic content size updates with dirty layout
23269        https://bugs.webkit.org/show_bug.cgi?id=131964
23270        <rdar://problem/14292718>
23271
23272        Reviewed by Simon Fraser.
23273
23274        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
23275        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
23276        (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
23277        (WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged):
23278        (WebKit::TiledCoreAnimationDrawingArea::updateIntrinsicContentSizeIfNeeded):
23279        (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
23280        (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
23281        (WebKit::TiledCoreAnimationDrawingArea::updateIntrinsicContentSizeTimerFired): Deleted.
23282        Instead of using a timer (which can fire while layout is dirty) to coalesce
23283        intrinsic content size changes, send them only from flushLayers, just after updating layout.
23284        This ensures that we never get intermediate intrinsic content sizes that won't be painted.
23285
232862014-04-21  Tim Horton  <timothy_horton@apple.com>
23287
23288        Remove a unnecessary forward-declared class from TiledCoreAnimationDrawingArea.
23289
23290        Rubber-stamped by Simon Fraser.
23291
23292        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
23293
232942014-04-21  Simon Fraser  <simon.fraser@apple.com>
23295
23296        Don't try to use a null connection()->xpcConnection()
23297        https://bugs.webkit.org/show_bug.cgi?id=131961
23298
23299        Reviewed by Dan Bernstein.
23300        
23301        If running with -WebKit2UseXPCServiceForWebProcess NO, connection()->xpcConnection()
23302        is null and xpc_connection_get_pid() would crash, so null-check the xpcConnection.
23303
23304        * UIProcess/Network/NetworkProcessProxy.cpp:
23305        (WebKit::NetworkProcessProxy::didFinishLaunching):
23306
233072014-04-21  Dan Bernstein  <mitz@apple.com>
23308
23309        WebKit part of <rdar://problem/16631323> Page::setDefersLoading doesn’t do anything when using the Network process
23310        https://bugs.webkit.org/show_bug.cgi?id=131939
23311
23312        Reviewed by David Kilzer.
23313
23314        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
23315        (WebKit::NetworkConnectionToWebProcess::setDefersLoading): Added. Forwards the message to
23316        the NetworkResourceLoader. 
23317        * NetworkProcess/NetworkConnectionToWebProcess.h:
23318
23319        * NetworkProcess/NetworkConnectionToWebProcess.messages.in: Added SetDefersLoading message.
23320
23321        * NetworkProcess/NetworkResourceLoader.cpp:
23322        (WebKit::NetworkResourceLoader::NetworkResourceLoader): Initialize new member variable
23323        m_defersLoading from the new field in the loader parameters.
23324        (WebKit::NetworkResourceLoader::start): Added. Like WebCore::ResourceLoader, if loading is
23325        deferred, keep the request in m_deferredRequest and bail out.
23326        (WebKit::NetworkResourceLoader::setDefersLoading): Added. Similar to
23327        WebCore::ResourceLoader::setDefersLoading.
23328        * NetworkProcess/NetworkResourceLoader.h:
23329        (WebKit::NetworkResourceLoader::defersLoading): 
23330
23331        * Shared/Network/NetworkResourceLoadParameters.cpp:
23332        (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters): Initialize new field
23333        defersLoading to false.
23334        (WebKit::NetworkResourceLoadParameters::encode): Encode new field.
23335        (WebKit::NetworkResourceLoadParameters::decode): Decode new field.
23336        * Shared/Network/NetworkResourceLoadParameters.h: Added defersLoading field.
23337
23338        * WebProcess/Network/WebResourceLoadScheduler.cpp:
23339        (WebKit::WebResourceLoadScheduler::scheduleLoad): Populate defersLoading field in the load
23340        parameters.
23341        (WebKit::WebResourceLoadScheduler::setDefersLoading): Send a message to the Network process.
23342        * WebProcess/Network/WebResourceLoadScheduler.h:
23343
233442014-04-21  Anders Carlsson  <andersca@apple.com>
23345
23346        Errors passed to delegate methods should have recovery attempters
23347        https://bugs.webkit.org/show_bug.cgi?id=131957
23348        <rdar://problem/16642539>
23349
23350        Reviewed by Tim Horton.
23351
23352        * UIProcess/API/Cocoa/_WKErrorRecoveryAttempting.h: Added.
23353        * UIProcess/API/Cocoa/_WKErrorRecoveryAttempting.mm: Added.
23354        * UIProcess/Cocoa/NavigationState.mm:
23355        (WebKit::createErrorWithRecoveryAttempter):
23356        (WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
23357        (WebKit::NavigationState::LoaderClient::didFailLoadWithErrorForFrame):
23358        * UIProcess/Cocoa/WKReloadFrameErrorRecoveryAttempter.h: Added.
23359        * UIProcess/Cocoa/WKReloadFrameErrorRecoveryAttempter.mm: Added.
23360        (-[WKReloadFrameErrorRecoveryAttempter initWithWebView:frameHandle:urlString:]):
23361        (-[WKReloadFrameErrorRecoveryAttempter attemptRecovery]):
23362        * WebKit2.xcodeproj/project.pbxproj:
23363
233642014-04-21  Eric Carlson  <eric.carlson@apple.com>
23365
23366        [Mac] implement WebKitDataCue
23367        https://bugs.webkit.org/show_bug.cgi?id=131799
23368
23369        Reviewed by Dean Jackson.
23370
23371        * Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE.
23372
233732014-04-21  Beth Dakin  <bdakin@apple.com>
23374
23375        topContentInset does not play well with fullscreen elements
23376        https://bugs.webkit.org/show_bug.cgi?id=131955
23377        -and corresponding-
23378        <rdar://problem/16651925>
23379
23380        Reviewed by Sam Weinig.
23381
23382        If you take an element (such as a <video>) fullscreen when you have a 
23383        topContentInset set, there will be an inset-sized gap at the top of the fullscreen 
23384        video.
23385
23386        Save and restore the topContentInset whenever the scroll position is saved and 
23387        restored.
23388        * WebProcess/FullScreen/WebFullScreenManager.cpp:
23389        (WebKit::WebFullScreenManager::WebFullScreenManager):
23390        (WebKit::WebFullScreenManager::saveScrollPosition):
23391        (WebKit::WebFullScreenManager::restoreScrollPosition):
23392        * WebProcess/FullScreen/WebFullScreenManager.h:
23393
233942014-04-21  Gavin Barraclough  <baraclough@apple.com>
23395
23396        Don't use ProcessAssertion on simulator
23397        https://bugs.webkit.org/show_bug.cgi?id=131950
23398
23399        Rubber stamped by Enrica Casucci
23400
23401        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
23402        (WebKit::connectToService):
23403        * UIProcess/ios/ProcessAssertion.h:
23404
234052014-04-21  Enrica Casucci  <enrica@apple.com>
23406
23407        [iOS WebKit2] support replacements for misspelled words.
23408        https://bugs.webkit.org/show_bug.cgi?id=131827
23409        <rdar://problem/16319657>
23410
23411        Reviewed by Darin Adler.
23412
23413        This is the second a final piece to support replacements.
23414        It adds some entrypoints used by the keyboard code to perform
23415        replacement when reaching the edge of a word using backspace.
23416        I've modified the behavior of replaceSelectedText to work both
23417        with caret or range selections.
23418
23419        * Shared/EditorState.cpp:
23420        (WebKit::EditorState::encode):
23421        (WebKit::EditorState::decode):
23422        * Shared/EditorState.h:
23423        (WebKit::EditorState::EditorState):
23424        * UIProcess/ios/WKContentViewInteraction.mm:
23425        (-[WKContentView isReplaceAllowed]):
23426        (-[WKContentView _characterBeforeCaretSelection]):
23427        * WebProcess/WebPage/WebPage.cpp:
23428        (WebKit::WebPage::editorState):
23429        * WebProcess/WebPage/ios/WebPageIOS.mm:
23430        (WebKit::WebPage::replaceSelectedText):
23431
234322014-04-21  Gavin Barraclough  <baraclough@apple.com>
23433
23434        Don't use ProcessAssertion on simulator
23435        https://bugs.webkit.org/show_bug.cgi?id=131950
23436
23437        Rubber stamped by Benjamin Poulain
23438
23439        * UIProcess/ios/ProcessAssertion.mm:
23440        (WebKit::ProcessAssertion::ProcessAssertion):
23441        (WebKit::ProcessAssertion::setState):
23442
234432014-04-21  Anders Carlsson  <andersca@apple.com>
23444
23445        Another build fix.
23446
23447        * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
23448        (WebKit::XPCServiceInitializerDelegate::checkEntitlements):
23449
234502014-04-21  Anders Carlsson  <andersca@apple.com>
23451
23452        Build fix.
23453
23454        * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
23455        (WebKit::XPCServiceInitializer):
23456
234572014-04-21  Tim Horton  <timothy_horton@apple.com>
23458
23459        [iOS WebKit2] Implement CSS viewport units
23460        https://bugs.webkit.org/show_bug.cgi?id=131863
23461        <rdar://problem/16279088>
23462
23463        Reviewed by Darin Adler.
23464
23465        * UIProcess/API/Cocoa/WKWebView.mm:
23466        (setMinimumLayoutSizeForMinimalUI):
23467        (-[WKWebView _minimumLayoutSizeOverrideForMinimalUI]):
23468        (-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]):
23469        Add _setMinimumLayoutSizeOverrideForMinimalUI:, which pushes said size
23470        down from the client to WebPageIOS, below.
23471
23472        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
23473        * UIProcess/WebPageProxy.h:
23474        * UIProcess/ios/WebPageProxyIOS.mm:
23475        (WebKit::WebPageProxy::setMinimumLayoutSizeForMinimalUI):
23476        * WebProcess/WebPage/WebPage.h:
23477        * WebProcess/WebPage/WebPage.messages.in:
23478        * WebProcess/WebPage/ios/WebPageIOS.mm:
23479        (WebKit::WebPage::setMinimumLayoutSizeForMinimalUI):
23480        (WebKit::WebPage::viewportConfigurationChanged):
23481        Update FrameView's viewport size based on the minimum layout size for minimal UI (if we have it)
23482        or the normal minimum layout size, scaled to the page's initial scale.
23483
234842014-04-21  Benjamin Poulain  <bpoulain@apple.com>
23485
23486        [iOS][WK2] Fix the dynamic viewport update when the viewport's max-scale conflict with the transition
23487        https://bugs.webkit.org/show_bug.cgi?id=131884
23488
23489        Reviewed by Darin Adler.
23490
23491        <rdar://problem/16667291>
23492
23493        * UIProcess/API/Cocoa/WKWebView.mm:
23494        (-[WKWebView _beginAnimatedResizeWithUpdates:]):
23495        It is fairly common to have a viewport configuration with min-scale=1 and max-scale=1.
23496        Since we were only changing the minimumScale for the transition, the target scale was affected
23497        by max-scale. This was breaking the transition from portrait to landscale.
23498
234992014-04-21  Benjamin Poulain  <bpoulain@apple.com>
23500
23501        [iOS][WK2] Make dynamic viewport size update content aware
23502        https://bugs.webkit.org/show_bug.cgi?id=131874
23503
23504        Reviewed by Tim Horton.
23505
23506        When possible, adjust the scroll position based on the content on dynamic viewport resize.
23507
23508        * WebProcess/WebPage/WebPage.cpp:
23509        (WebKit::WebPage::WebPage):
23510        (WebKit::WebPage::scalePage):
23511        (WebKit::WebPage::pageDidScroll):
23512        * WebProcess/WebPage/WebPage.h:
23513        The scrolling heuristic are not invertible, especially the content heuristic. To have the right
23514        behavior when doing resize without changing the page, we save the old scroll position and restore
23515        it when the content size and scale is restored.
23516
23517        * WebProcess/WebPage/ios/WebPageIOS.mm:
23518        (WebKit::WebPage::dynamicViewportSizeUpdate):
23519        On dynamic update, start by finding what node is at the center of the screen. After the layout, put that
23520        node back in the center.
23521
23522        (WebKit::WebPage::updateVisibleContentRects):
23523
235242014-04-21  Anders Carlsson  <andersca@apple.com>
23525
23526        Need default WKNavigationDelegate behavior
23527        https://bugs.webkit.org/show_bug.cgi?id=131944
23528        <rdar://problem/15949822>
23529
23530        Reviewed by Dan Bernstein.
23531
23532        Port the WebKit1 default delegate behavior over.
23533
23534        * UIProcess/Cocoa/NavigationState.mm:
23535        (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
23536        (WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
23537
235382014-04-21  Dan Bernstein  <mitz@apple.com>
23539
23540        [Cocoa] Expose WebPage::setDefersLoading
23541        https://bugs.webkit.org/show_bug.cgi?id=131943
23542
23543        Reviewed by Anders Carlsson, but he doesn’t like this.
23544
23545        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
23546        (-[WKWebProcessPlugInBrowserContextController _defersLoading]): Added this accessor.
23547        (-[WKWebProcessPlugInBrowserContextController _setDefersLoading:]): Ditto.
23548        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
23549        Declared new property _defersLoading.
23550
23551        * WebProcess/WebPage/WebPage.cpp:
23552        (WebKit::WebPage::defersLoading): Added this getter.
23553        * WebProcess/WebPage/WebPage.h:
23554
235552014-04-21  Joseph Pecoraro  <pecoraro@apple.com>
23556
23557        Remove unused WebKitSystemInterface functions
23558        https://bugs.webkit.org/show_bug.cgi?id=131938
23559
23560        Reviewed by Alexey Proskuryakov.
23561
23562        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
23563        (InitWebCoreSystemInterface):
23564
235652014-04-21  Anders Carlsson  <andersca@apple.com>
23566
23567        Check the com.apple.security.network.client entitlement for all processes
23568        https://bugs.webkit.org/show_bug.cgi?id=131942
23569        <rdar://problem/12354188>
23570
23571        Reviewed by Dan Bernstein.
23572
23573        * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
23574        (WebKit::NetworkServiceInitializerDelegate::NetworkServiceInitializerDelegate):
23575        * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
23576        * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
23577        (WebKit::XPCServiceInitializerDelegate::checkEntitlements):
23578
235792014-04-20  Dan Bernstein  <mitz@apple.com>
23580
23581        [Cocoa] Remove interfaces in the To Be Removed groups
23582        https://bugs.webkit.org/show_bug.cgi?id=131925
23583
23584        Reviewed by Darin Adler.
23585
23586        * Shared/API/Cocoa/WKRemoteObjectInterface.h: Removed.
23587        * Shared/API/Cocoa/WKRemoteObjectInterface.mm: Removed.
23588        * Shared/API/Cocoa/WKRemoteObjectRegistry.h: Removed.
23589        * Shared/API/Cocoa/WKRemoteObjectRegistry.mm: Removed.
23590        * UIProcess/API/Cocoa/WKProcessPool.mm:
23591        * UIProcess/API/Cocoa/WKProcessPoolConfiguration.h: Removed.
23592        * UIProcess/API/Cocoa/WKProcessPoolConfiguration.mm: Removed.
23593        * UIProcess/API/Cocoa/WKProcessPoolConfigurationPrivate.h: Removed.
23594        * UIProcess/API/Cocoa/WKProcessPoolToBeRemoved.mm: Removed.
23595        * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
23596        * WebKit2.xcodeproj/project.pbxproj:
23597        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInBrowserContextControllerToBeRemoved.mm: Removed.
23598        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
23599
236002014-04-20  Dan Bernstein  <mitz@apple.com>
23601
23602        [Cocoa] Crash when setting a bundle parameter to nil
23603        https://bugs.webkit.org/show_bug.cgi?id=131917
23604
23605        Reviewed by Sam Weinig.
23606
23607        * UIProcess/API/Cocoa/WKProcessPool.mm:
23608        (-[WKProcessPool _setObject:forBundleParameter:]): If the object is nil, use
23609        -[NSMutableDictionary removeObjectForKey:] rather than -setObject:forKey:.
23610
23611        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm:
23612        (-[WKWebProcessBundleParameters setParameter:forKey:]): Ditto.
23613
23614        * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
23615        (WebKit::InjectedBundle::setBundleParameter): Unrelatedly, create m_bundleParameters if
23616        needed, as it may have not been created on intialization if no bundle parameters were set
23617        at the time.
23618
236192014-04-20  Dan Bernstein  <mitz@apple.com>
23620
23621        [Cocoa] Remove unused -webView:didFinishLoadingNavigation: delegate method
23622        https://bugs.webkit.org/show_bug.cgi?id=131914
23623
23624        Reviewed by Sam Weinig.
23625
23626        * UIProcess/Cocoa/NavigationState.h: Removed flag from m_navigationDelegateMethods struct.
23627        * UIProcess/Cocoa/NavigationState.mm:
23628        (WebKit::NavigationState::setNavigationDelegate): Removed check for whether the method is
23629        implemented.
23630        (WebKit::NavigationState::LoaderClient::didFinishLoadForFrame): Stopped calling the method
23631        if implemented.
23632
236332014-04-19  Anders Carlsson  <andersca@apple.com>
23634
23635        Plug-in process crashes if NP_Initialize returns an error the second time it's called
23636        https://bugs.webkit.org/show_bug.cgi?id=131903
23637        <rdar://problem/14355462>
23638
23639        Reviewed by Sam Weinig.
23640
23641        * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
23642        (WebKit::NetscapePluginModule::decrementLoadCount):
23643        Don't try to unload the plug-in if it hasn't been initialized.
23644
236452014-04-19  Simon Fraser  <simon.fraser@apple.com>
23646
23647        [UI-side compositing] Implement blend modes
23648        https://bugs.webkit.org/show_bug.cgi?id=131891
23649        <rdar://problem/16490085>
23650
23651        Reviewed by Tim Horton.
23652
23653        Implement blend modes with UI-side compositing.
23654        
23655        PlatformCALayer::setBlendMode() becomes pure virtual, and overridden in
23656        PlatformCALayerMac and PlatformCALayerRemote.
23657        PlatformCAFilters::setBlendingFiltersOnLayer() now takes a raw platform
23658        layer, so it can be called from the UI process on a CALayer*.
23659        
23660        Add BlendMode to LayerProperties, and initialize, encode and decode it,
23661        as well as adding dumping support for blend modes.
23662        
23663        * Shared/mac/RemoteLayerTreePropertyApplier.mm:
23664        (WebKit::applyPropertiesToLayer):
23665        * Shared/mac/RemoteLayerTreeTransaction.h:
23666        * Shared/mac/RemoteLayerTreeTransaction.mm:
23667        (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
23668        (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
23669        (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
23670        (WebKit::RemoteLayerTreeTextStream::operator<<):
23671        (WebKit::dumpChangedLayers):
23672        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
23673        (WebKit::PlatformCALayerRemote::setBlendMode):
23674        * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
23675
236762014-04-19  Joseph Pecoraro  <pecoraro@apple.com>
23677
23678        Fix leak of UIScreenEdgePanGestureRecognizer in WKSwipeTransitionController
23679        https://bugs.webkit.org/show_bug.cgi?id=131877
23680
23681        Reviewed by Darin Adler.
23682
23683        * UIProcess/ios/ViewGestureControllerIOS.mm:
23684        (-[WKSwipeTransitionController gestureRecognizerForInteractiveTransition:WithTarget:action:]):
23685
236862014-04-19  Dan Bernstein  <mitz@apple.com>
23687
23688        Don’t install a source file inside WebProcess.app.
23689
23690        * WebKit2.xcodeproj/project.pbxproj: Removed ViewUpdateDispatcher.messages.in from
23691        WebProcess’s Copy Bundle Resources build phase.
23692
236932014-04-19  Darin Adler  <darin@apple.com>
23694
23695        [Mac] WebView adjusts the cursor even when another window is in front
23696        https://bugs.webkit.org/show_bug.cgi?id=131898
23697        rdar://problem/14619911
23698
23699        Reviewed by Dan Bernstein.
23700
23701        * UIProcess/API/mac/WKView.mm:
23702        (-[WKView _setCursor:]): Deleted. Moved the code all into PageClientImpl, since none of it
23703        interacts with anything special about a WKView.
23704
23705        * UIProcess/API/mac/WKViewInternal.h: Deleted the _setCursor: method.
23706
23707        * UIProcess/mac/PageClientImpl.mm:
23708        (WebKit::PageClientImpl::setCursor): Added a check that the window is under the cursor
23709        and do nothing if it's not.
23710
237112014-04-19  Dan Bernstein  <mitz@apple.com>
23712
23713        Use XPC services in the iOS Simulator, but not in Mountain Lion
23714        https://bugs.webkit.org/show_bug.cgi?id=131894
23715
23716        Reviewed by Anders Carlsson.
23717
23718        * Configurations/NetworkService.Development.xcconfig: Defined INFOPLIST_FILE for the
23719        Simulator.
23720        * Configurations/NetworkService.xcconfig: Ditto.
23721        * Configurations/WebContentService.Development.xcconfig: Ditto.
23722        * Configurations/WebContentService.xcconfig: Ditto.
23723        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
23724        (WebKit::systemDirectoryPath): Added this helper function that returns a slash-terminated
23725        path to the System directory in the current runtime.
23726        (WebKit::ProcessLauncher::launchProcess): Changed to use the above function to tell whether
23727        a development version of WebKit2 is being used.
23728        * WebKit2Prefix.h: Set WTF_USE_XPC_SERVICES to 1 when targeting the iOS Simulator, but not
23729        when targeting Mountain Lion.
23730
237312014-04-19  Dan Bernstein  <mitz@apple.com>
23732
23733        [Cocoa] Crash in -[WKWebProcessPlugInHitTestResult nodeHandle] when nodeHandle() is null
23734        https://bugs.webkit.org/show_bug.cgi?id=131888
23735
23736        Reviewed by Jon Honeycutt.
23737
23738        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInHitTestResult.mm:
23739        (-[WKWebProcessPlugInHitTestResult nodeHandle]): Added a null check.
23740
237412014-04-19  Simon Fraser  <simon.fraser@apple.com>
23742
23743        [iOS WK2] Fuzzy layers on sites using perspective and transforms
23744        https://bugs.webkit.org/show_bug.cgi?id=131873
23745        <rdar://problem/16540576>
23746
23747        Reviewed by Sam Weinig.
23748        
23749        Always set rasterizationScale on CALayers in the UI process
23750        (as we do for WK1) so that layers are rasterized taking the
23751        device scale into account. We can do unconditionally; this
23752        is benign on layers that CA doesn't rasterize.
23753
23754        * Shared/mac/RemoteLayerTreePropertyApplier.mm:
23755        (WebKit::applyPropertiesToLayer):
23756
237572014-04-18  Simon Fraser  <simon.fraser@apple.com>
23758
23759        Use 'override' in GraphicsLayerCA
23760        https://bugs.webkit.org/show_bug.cgi?id=131882
23761
23762        Reviewed by Tim Horton.
23763        
23764        Add an 'override'.
23765
23766        * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
23767
237682014-04-19  Darin Adler  <darin@apple.com>
23769
23770        Assertion in WebPage::runModal accesses object after it may have been destroyed
23771        https://bugs.webkit.org/show_bug.cgi?id=131875
23772
23773        Reviewed by Anders Carlsson.
23774
23775        * WebProcess/WebPage/WebPage.cpp:
23776        (WebKit::WebPage::runModal): Ref the WebPage so it's still around so we can
23777        check the m_isRunningModal flag.
23778
237792014-04-18  Commit Queue  <commit-queue@webkit.org>
23780
23781        Unreviewed, rolling out r167527.
23782        https://bugs.webkit.org/show_bug.cgi?id=131883
23783
23784        Broke 32-bit build (Requested by ap on #webkit).
23785
23786        Reverted changeset:
23787
23788        "[Mac] implement WebKitDataCue"
23789        https://bugs.webkit.org/show_bug.cgi?id=131799
23790        http://trac.webkit.org/changeset/167527
23791
237922014-04-18  Eric Carlson  <eric.carlson@apple.com>
23793
23794        [Mac] implement WebKitDataCue
23795        https://bugs.webkit.org/show_bug.cgi?id=131799
23796
23797        Reviewed by Dean Jackson.
23798
23799        * Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE.
23800
238012014-04-18  Anders Carlsson  <andersca@apple.com>
23802
23803        Keep the WebPageProxy alive for the lifetime of all PageLoadState::Transaction objects
23804        https://bugs.webkit.org/show_bug.cgi?id=131872
23805        <rdar://problem/15758414>
23806
23807        Reviewed by Dan Bernstein.
23808
23809        * UIProcess/PageLoadState.cpp:
23810        (WebKit::PageLoadState::PageLoadState):
23811        (WebKit::PageLoadState::Transaction::Transaction):
23812        (WebKit::PageLoadState::Transaction::~Transaction):
23813        * UIProcess/PageLoadState.h:
23814        (WebKit::PageLoadState::Transaction::Transaction): Deleted.
23815        (WebKit::PageLoadState::Transaction::~Transaction): Deleted.
23816        * UIProcess/WebPageProxy.cpp:
23817        (WebKit::WebPageProxy::WebPageProxy):
23818
238192014-04-18  Stephanie Lewis  <slewis@apple.com>
23820
23821        We shouldn’t create page throttlers for other pages than WebKit2 pages.
23822        Part of <rdar://problem/16473045> Visibility state counters are often incorrect.
23823        https://bugs.webkit.org/show_bug.cgi?id=131696
23824
23825        Reviewed by Gavin Barraclough.
23826
23827        Page throttlers were being created for SVG images and other page instances that
23828        were not accurately tracking the states that enable and disable page throttling.
23829        Make the throttler an unique ptr and only initialize it for WebKit2.
23830
23831        This also fixes  an inefficiency where we would throttle a new page on creation because 
23832        we assumed it was visible even if that was not the case.
23833
23834        * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: Check page throttler exists.
23835        (WebKit::NPRuntimeObjectMap::evaluate):
23836        * WebProcess/WebPage/WebPage.cpp: 
23837        (WebKit::WebPage::WebPage): Initialize page throttler for WebKit2 views.
23838        (WebKit::WebPage::mouseEvent): Check page throttler exists.
23839        (WebKit::WebPage::wheelEvent): ditto
23840        (WebKit::WebPage::keyEvent): ditto
23841
238422014-04-18  Anders Carlsson  <andersca@apple.com>
23843
23844        Don't allow app sandboxed apps without the network client entitlement to launch the network process
23845        https://bugs.webkit.org/show_bug.cgi?id=131868
23846        <rdar://problem/12354188>
23847
23848        Reviewed by Dan Bernstein.
23849
23850        * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
23851        (WebKit::NetworkServiceInitializerDelegate::NetworkServiceInitializerDelegate):
23852        Add a new delegate that implements checkEntitlements().
23853
23854        (NetworkServiceInitializer):
23855        Pass the new delegate to XPCServiceInitializer.
23856
23857        * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
23858        * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
23859        Call checkEntitlements.
23860
23861        (WebKit::XPCServiceInitializerDelegate::checkEntitlements):
23862        Return true.
23863
23864        (WebKit::XPCServiceInitializerDelegate::hasEntitlement):
23865        Helper function that returns whether a client has the given entitlement.
23866
23867        (WebKit::XPCServiceInitializerDelegate::isClientSandboxed):
23868        Helper function that checks whether the client is sandboxed.
23869
238702014-04-18  Alice Barraclough  <alice.barraclough@webkit.org>
23871
23872        Find on page - extend API by providing highlighted match index
23873        https://bugs.webkit.org/show_bug.cgi?id=131776
23874
23875        Reviewed by Tim Horton.
23876
23877        * Shared/WebFindOptions.h: Add an option for determining match index.
23878
23879        Plumb through the API layers the addition of a parameter for match index.
23880        * UIProcess/API/APIFindClient.h:
23881        (API::FindClient::didFindString):
23882        * UIProcess/API/C/WKPage.cpp:
23883        (WKPageSetPageFindClient):
23884        * UIProcess/API/Cocoa/WKWebView.mm:
23885        (toFindOptions):
23886        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
23887        (NS_OPTIONS):
23888        * UIProcess/API/Cocoa/_WKFindDelegate.h:
23889        * UIProcess/Cocoa/FindClient.h:
23890        * UIProcess/Cocoa/FindClient.mm:
23891        (WebKit::FindClient::setDelegate):
23892        (WebKit::FindClient::didFindString):
23893        * UIProcess/WebFindClient.cpp:
23894        (WebKit::WebFindClient::didFindString):
23895        * UIProcess/WebFindClient.h:
23896        * UIProcess/WebPageProxy.cpp:
23897        (WebKit::WebPageProxy::didFindString):
23898        * UIProcess/WebPageProxy.h:
23899        * UIProcess/WebPageProxy.messages.in:
23900
23901        The actual tracking of the match index is contained in FindController class.
23902        * WebProcess/WebPage/FindController.cpp:
23903        (WebKit::FindController::FindController): Start out as -1, understood to be an undefined index in this context.
23904        (WebKit::FindController::updateFindUIAfterPageScroll): 
23905            Perform the calculation of matchCount if the flag for DetermineMatchIndex is on.
23906        If matchCount exceeds max, keep the match index undefined because otherwise the finding could advance
23907        to a point where the index exceeds the match count, legitimately. If matchCount doesn't exceed the max, then make
23908        sure the match index, which had been being incremented or decremented blindly back in findString(), is normalized
23909        to be less than match count.
23910        (WebKit::FindController::findString): 
23911            If there is a user selection existing on the page, the next occurence of the string will be found after that
23912        selection. In that case we still want the index to properly reflect its ordinal  position within the entire document.
23913        Use findStringMatchingRanges to provide the match index, and set a flag that prevents the match index from being
23914        blindly incremented or decremented later. After findString() is actually called on the page, increment or decrement
23915        the find index under specific conditions. 
23916        (WebKit::FindController::hideFindIndicator): Reset match index when find UI goes away.
23917        * WebProcess/WebPage/FindController.h: Add m_foundStringMatchIndex to private variables.
23918        * WebProcess/WebPage/ios/FindControllerIOS.mm:
23919        (WebKit::FindController::hideFindIndicator): Reset match index when find UI goes away.
23920
239212014-04-18  Joseph Pecoraro  <pecoraro@apple.com>
23922
23923        Correct some issues small issues in WK2 file upload InjectedBundle APIs
23924        https://bugs.webkit.org/show_bug.cgi?id=131852
23925
23926        Reviewed by Dan Bernstein.
23927
23928        * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
23929        (API::InjectedBundle::PageUIClient::shouldGenerateFileForUpload):
23930        The default return value, meaning no, should return the null string. The
23931        result is checked later, and null string is a special value meaning no.
23932
23933        * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
23934        (WebKit::InjectedBundlePageUIClient::generateFileForUpload):
23935        Pre-check for the correct client function we will use.
23936
239372014-04-18  Andy Estes  <aestes@apple.com>
23938
23939        [iOS] REGRESSION (r167039): WebKit incorrectly sets a background process assertion state when displaying a PDF
23940        https://bugs.webkit.org/show_bug.cgi?id=131860
23941        <rdar://problem/16631282>
23942
23943        Reviewed by Tim Horton.
23944
23945        We were basing our process assertion state on whether or not the
23946        process had a WKContentView in a window, but when displaying a PDF
23947        we've removed the WKContentView from the window. Base this decision
23948        instead on whether or not the WKWebView is in the window.
23949
23950        * UIProcess/API/Cocoa/WKWebView.mm:
23951        (-[WKWebView didMoveToWindow]):
23952        * UIProcess/ios/PageClientImplIOS.mm:
23953        (WebKit::PageClientImpl::isViewInWindow):
23954
239552014-04-18  Anders Carlsson  <andersca@apple.com>
23956
23957        Address a couple of review comments
23958        https://bugs.webkit.org/show_bug.cgi?id=131856
23959
23960        Reviewed by Dan Bernstein.
23961
23962        * UIProcess/API/Cocoa/WKNavigationAction.h:
23963        * UIProcess/API/Cocoa/WKNavigationDelegate.h:
23964        * UIProcess/API/Cocoa/WKPreferences.h:
23965        * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
23966        * UIProcess/API/Cocoa/WKWebView.h:
23967
239682014-04-18  Anders Carlsson  <andersca@apple.com>
23969
23970        Handle pluginOrigin being null
23971        https://bugs.webkit.org/show_bug.cgi?id=131849
23972        <rdar://problem/16655898>
23973
23974        Reviewed by Alexey Proskuryakov.
23975
23976        * WebProcess/WebProcess.cpp:
23977        (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin):
23978
239792014-04-18  Dan Bernstein  <mitz@apple.com>
23980
23981        [Cocoa] Add a navigation delegate method corresponding to didFinishDocumentLoadForFrame for the main frame
23982        https://bugs.webkit.org/show_bug.cgi?id=131847
23983
23984        Reviewed by Anders Carlsson.
23985
23986        * UIProcess/API/APILoaderClient.h:
23987        (API::LoaderClient::didFinishDocumentLoadForFrame): Added a navigationID parameter.
23988        * UIProcess/API/C/WKPage.cpp:
23989        (WKPageSetPageLoaderClient): Updated for the above change in paramerers.
23990        * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new delegate method.
23991        * UIProcess/Cocoa/NavigationState.h: Declare override of didFinishDocumentLoadForFrame.
23992        * UIProcess/Cocoa/NavigationState.mm:
23993        (WebKit::NavigationState::setNavigationDelegate): Initialize
23994        webViewNavigationDidFinishDocumentLoad flag in the delegate methods struct.
23995        (WebKit::NavigationState::LoaderClient::didFinishDocumentLoadForFrame): Added override
23996        of the client function which calls the delegate.
23997        * UIProcess/WebPageProxy.cpp:
23998        (WebKit::WebPageProxy::didFinishDocumentLoadForFrame): Get and pass the navigation ID to
23999        the client.
24000        * UIProcess/WebPageProxy.h: Added navigationID parameter.
24001        * UIProcess/WebPageProxy.messages.in: Ditto.
24002        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
24003        (WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad): Get and send the navigation
24004        ID to the UI process.
24005
240062014-04-18  Philippe Normand  <pnormand@igalia.com>
24007
24008        Remove NETWORK_INFO support
24009        https://bugs.webkit.org/show_bug.cgi?id=131841
24010
24011        Reviewed by Gyuyoung Kim.
24012
24013        * CMakeLists.txt:
24014        * PlatformEfl.cmake:
24015        * Shared/API/c/WKBase.h:
24016        * Shared/APIObject.h:
24017        * Shared/WebNetworkInfo.cpp: Removed.
24018        * Shared/WebNetworkInfo.h: Removed.
24019        * UIProcess/API/C/WKAPICast.h:
24020        * UIProcess/API/C/WKContext.cpp:
24021        (WKContextGetNetworkInfoManager): Deleted.
24022        * UIProcess/API/C/WKContext.h:
24023        * UIProcess/API/C/WKNetworkInfo.cpp: Removed.
24024        * UIProcess/API/C/WKNetworkInfo.h: Removed.
24025        * UIProcess/API/C/WKNetworkInfoManager.cpp: Removed.
24026        * UIProcess/API/C/WKNetworkInfoManager.h: Removed.
24027        * UIProcess/API/efl/ewk_context.cpp:
24028        (EwkContext::EwkContext):
24029        * UIProcess/API/efl/ewk_context_private.h:
24030        * UIProcess/WebContext.cpp:
24031        (WebKit::WebContext::WebContext):
24032        * UIProcess/WebContext.h:
24033        * UIProcess/WebNetworkInfoManagerProxy.cpp: Removed.
24034        * UIProcess/WebNetworkInfoManagerProxy.h: Removed.
24035        * UIProcess/WebNetworkInfoManagerProxy.messages.in: Removed.
24036        * UIProcess/WebNetworkInfoProvider.cpp: Removed.
24037        * UIProcess/WebNetworkInfoProvider.h: Removed.
24038        * UIProcess/efl/NetworkInfoProvider.cpp: Removed.
24039        * UIProcess/efl/NetworkInfoProvider.h: Removed.
24040        * WebProcess/NetworkInfo/WebNetworkInfoManager.cpp: Removed.
24041        * WebProcess/NetworkInfo/WebNetworkInfoManager.h: Removed.
24042        * WebProcess/NetworkInfo/WebNetworkInfoManager.messages.in: Removed.
24043        * WebProcess/WebCoreSupport/WebNetworkInfoClient.cpp: Removed.
24044        * WebProcess/WebCoreSupport/WebNetworkInfoClient.h: Removed.
24045        * WebProcess/WebPage/WebPage.cpp:
24046        (WebKit::WebPage::WebPage):
24047        * WebProcess/WebProcess.cpp:
24048        (WebKit::WebProcess::WebProcess):
24049
240502014-04-17  Daniel Bates  <dabates@apple.com>
24051
24052        [iOS] Hook up screen.{availHeight, availWidth, height, width}
24053        https://bugs.webkit.org/show_bug.cgi?id=131821
24054        <rdar://problem/16413795>
24055
24056        Reviewed by Benjamin Poulain and Tim Horton.
24057
24058        Implement WebKit2-specific support infrastructure.
24059
24060        Additionally substitute "screenSize" for "viewporScreenSize" to make the code more understandable.
24061
24062        * Shared/WebPageCreationParameters.cpp:
24063        (WebKit::WebPageCreationParameters::encode): Modified to encode the available screen size
24064        creation parameter.
24065        (WebKit::WebPageCreationParameters::decode): Modified to decode the available screen size
24066        creation parameter.
24067        * Shared/WebPageCreationParameters.h:
24068        * UIProcess/WebPageProxy.cpp:
24069        (WebKit::WebPageProxy::creationParameters): Initialize the available screen size
24070        parameter.
24071        * UIProcess/WebPageProxy.h:
24072        * UIProcess/ios/WebPageProxyIOS.mm:
24073        (WebKit::WebPageProxy::screenSize): Renamed; formerly named viewportScreenSize.
24074        (WebKit::WebPageProxy::availableScreenSize): Added.
24075        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
24076        (WebKit::WebChromeClient::screenSize): Renamed; formerly named viewportScreenSize.
24077        (WebKit::WebChromeClient::availableScreenSize): Added; turns around and calls WebPage::availableScreenSize().
24078        * WebProcess/WebCoreSupport/WebChromeClient.h:
24079        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
24080        (InitWebCoreSystemInterface): Hook up WebKit System Interface function WKGetAvailableScreenSize.
24081        * WebProcess/WebPage/WebPage.cpp:
24082        (WebKit::WebPage::WebPage): Initialize available screen size instance variable.
24083        * WebProcess/WebPage/WebPage.h:
24084        * WebProcess/WebPage/ios/WebPageIOS.mm:
24085        (WebKit::WebPage::screenSize):
24086        (WebKit::WebPage::availableScreenSize):
24087
240882014-04-17  Anders Carlsson  <andersca@apple.com>
24089
24090        Remove unused API enums
24091        https://bugs.webkit.org/show_bug.cgi?id=131836
24092
24093        Reviewed by Tim Horton.
24094
24095        * UIProcess/API/Cocoa/WKNavigationDelegate.h:
24096        (NS_ENUM):
24097        * UIProcess/Cocoa/NavigationState.mm:
24098        (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
24099        (WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
24100
241012014-04-17  Brent Fulgham  <bfulgham@apple.com>
24102
24103        Make RenderLayerBacking get the timingFunction of the correct animation.
24104        https://bugs.webkit.org/show_bug.cgi?id=100632
24105
24106        Reviewed by Simon Fraser.
24107
24108        * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
24109        (IPC::ArgumentCoder<GraphicsLayerAnimation>::decode): Update for new signatures for
24110        FloatAnimationValue, TransformAnimationValue, etc.
24111
241122014-04-17  Enrica Casucci  <enrica@apple.com>
24113
24114        [iOS WebKit2] support replacements for misspelled words.
24115        https://bugs.webkit.org/show_bug.cgi?id=131827
24116        <rdar://problem/16319657>
24117
24118        Reviewed by Benjamin Poulain.
24119
24120        This is the first part of the work to add support for replacements.
24121        It handles _promptForReplace in canPerformAction to decide
24122        whether to show the Replace button in the menu and add the
24123        implementation of the replace action.
24124
24125        * Shared/EditorState.cpp:
24126        (WebKit::EditorState::encode):
24127        (WebKit::EditorState::decode):
24128        * Shared/EditorState.h:
24129        (WebKit::EditorState::EditorState):
24130        * UIProcess/WebPageProxy.h:
24131        * UIProcess/ios/WKContentViewInteraction.mm:
24132        (-[WKContentView selectedText]):
24133        (-[WKContentView replaceText:withText:]):
24134        (-[WKContentView _promptForReplace:]):
24135        (-[WKContentView replace:]):
24136        (-[WKContentView canPerformAction:withSender:]):
24137        (-[WKContentView selectWordForReplacement]): This is called
24138        by UIKit when the user taps on a mispelled word to select it.
24139        * UIProcess/ios/WebPageProxyIOS.mm:
24140        (WebKit::WebPageProxy::replaceSelectedText):
24141        * WebProcess/WebPage/WebPage.cpp:
24142        (WebKit::WebPage::WebPage):
24143        (WebKit::WebPage::editorState):
24144        * WebProcess/WebPage/WebPage.h:
24145        * WebProcess/WebPage/WebPage.messages.in:
24146        * WebProcess/WebPage/ios/WebPageIOS.mm:
24147        (WebKit::WebPage::selectWithGesture): Removed m_shouldReturnWordForSelection.
24148        We now return always the word corresponding to the caret selection or
24149        the selected text up to a maximum of 200 characters.
24150        (WebKit::WebPage::extendSelection):
24151        (WebKit::WebPage::replaceSelectedText):
24152
241532014-04-17  Tim Horton  <timothy_horton@apple.com>
24154
24155        [iOS] REGRESSION (r166975): WKPDFView is broken
24156        https://bugs.webkit.org/show_bug.cgi?id=131828
24157
24158        Reviewed by Simon Fraser.
24159
24160        * UIProcess/API/Cocoa/WKWebView.mm:
24161        (-[WKWebView _didCommitLayerTree:WebKit::]):
24162        Bail from updating the scroll view parameters from the layer tree update
24163        while it's being managed by a custom content view.
24164        We'll get any changes again in the next commit after removing the custom
24165        content view (and painting the new page) anyway, so this should be OK.
24166
241672014-04-17  Pratik Solanki  <psolanki@apple.com>
24168
24169        _webProcessIdentifier should return 0 if the web process crashed
24170        https://bugs.webkit.org/show_bug.cgi?id=131813
24171        <rdar://problem/16650605>
24172
24173        Reviewed by Anders Carlsson.
24174
24175        * UIProcess/API/Cocoa/WKWebView.mm:
24176        (-[WKWebView _hasWebProcess]):
24177        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
24178
241792014-04-17  Darin Adler  <darin@apple.com>
24180
24181        Remove use of deprecatedDeleteAllValues in NPRemoteObjectMap::pluginDestroyed
24182        https://bugs.webkit.org/show_bug.cgi?id=122496
24183
24184        Reviewed by Brent Fulgham.
24185
24186        * Shared/Plugins/NPRemoteObjectMap.cpp:
24187        (WebKit::NPRemoteObjectMap::pluginDestroyed): Use new-style code and write the
24188        deprecatedDeleteAllValues function out using a loop. Might be nice to return here
24189        and use unique_ptr instead some day, but I tried that before and got it wrong, so
24190        lets do that another time.
24191
241922014-04-17  Darin Adler  <darin@apple.com>
24193
24194        Add separate flag for IndexedDatabase in workers since the current implementation is not threadsafe
24195        https://bugs.webkit.org/show_bug.cgi?id=131785
24196        rdar://problem/16003108
24197
24198        Reviewed by Brady Eidson.
24199
24200        * Configurations/FeatureDefines.xcconfig: Added INDEXED_DATABASE_IN_WORKERS.
24201
242022014-04-17  Dan Bernstein  <mitz@apple.com>
24203
24204        WebKit2 part of <rdar://problem/16601336> [Cocoa] _userInitiated is always NO in WKNavigationAction passed to -webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:
24205        https://bugs.webkit.org/show_bug.cgi?id=131783
24206
24207        Reviewed by Tim Horton.
24208
24209        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
24210        (WebKit::WebChromeClient::createWindow): Set the isProcessingUserGesture field of
24211        the NavigationActionData to the corresponding value in the NavigationAction.
24212        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
24213        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): Ditto.
24214        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Ditto.
24215
242162014-04-16  Benjamin Poulain  <bpoulain@apple.com>
24217
24218        [iOS][WK2] Fix the DidCommitLoad initial scrolling position
24219        https://bugs.webkit.org/show_bug.cgi?id=131780
24220
24221        Reviewed by Jon Honeycutt.
24222
24223        * UIProcess/API/Cocoa/WKWebView.mm:
24224        (-[WKWebView _didCommitLayerTree:]):
24225        That code is older than _obscuredInsets and used the contentInsets as a workaround.
24226
242272014-04-16  Benjamin Poulain  <bpoulain@apple.com>
24228
24229        [iOS][WK2] Fix annoying scrolling bugs
24230        https://bugs.webkit.org/show_bug.cgi?id=131722
24231
24232        Reviewed by Simon Fraser.
24233
24234        * UIProcess/API/Cocoa/WKWebView.mm:
24235        (-[WKWebView _scrollToContentOffset:WebCore::]):
24236        We are scrolling at the wrong position when we have the "small obscured insets".
24237
242382014-04-16  Gavin Barraclough  <baraclough@apple.com>
24239
24240        On iOS keep network process running using a process assertion rather than a boost
24241        https://bugs.webkit.org/show_bug.cgi?id=131779
24242
24243        Reviewed by Benjamin Poulain.
24244
24245        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
24246        (WebKit::connectToService):
24247            - No need to leak a boost onto the NetworkProcess on iOS.
24248        * UIProcess/Network/NetworkProcessProxy.cpp:
24249        (WebKit::NetworkProcessProxy::didFinishLaunching):
24250            - Take a ProcessAssertion on the NetworkProcess.
24251        * UIProcess/Shared/ChildProcessProxy.h:
24252            - Added m_assertion.
24253        * UIProcess/WebProcessProxy.h:
24254            - Removed m_assertion.
24255        * UIProcess/ios/ProcessAssertion.h: Added.
24256            - Added - refactored from WebProcessProxy.h.
24257        * UIProcess/ios/ProcessAssertion.mm: Added.
24258        (WebKit::ProcessAssertion::ProcessAssertion):
24259        (WebKit::ProcessAssertion::setState):
24260            - Added - refactored from WebProcessProxyIOS.mm.
24261        * UIProcess/ios/WebProcessProxyIOS.mm:
24262        (WebKit::WebProcessProxy::updateProcessState):
24263            - Code refactored out to ProcessAssertion.mm.
24264        * WebKit2.xcodeproj/project.pbxproj:
24265            - Added files.
24266
242672014-04-16  Benjamin Poulain  <bpoulain@apple.com>
24268
24269        [iOS][WK2] Improve the approximation of the scroll position of the dynamic viewport size updates
24270        https://bugs.webkit.org/show_bug.cgi?id=131720
24271
24272        Reviewed by Tim Horton.
24273
24274        * UIProcess/API/Cocoa/WKWebView.mm:
24275        (-[WKWebView _scrollToContentOffset:]):
24276        The scrolling tree was forcing scroll at the wrong scale during the transition. 
24277
24278        (-[WKWebView _setMinimumLayoutSizeOverride:]):
24279        This was left out by accident. The WebProcess was getting the new layout size twice, making
24280        WebPage::dynamicViewportSizeUpdate() very confused when the content size changes.
24281
24282        * WebProcess/WebPage/ios/WebPageIOS.mm:
24283        (WebKit::WebPage::dynamicViewportSizeUpdate):
24284        Add scrolling adjustment for the dynamic relayout case:
24285        -Sticky top and bottom like the UIProcess.
24286        -Keep the same relative position of the unobscured rect's center.
24287
24288        Also fix a bug in the horizontal and vertical adjustments: the code was using the exposed rect
24289        instead of the unobscured rect, which made the adjustments off by the size of the obscured insets.
24290
24291        The type is changed from double to float since ARMv7 has a grudge against double.
24292
242932014-04-16  Benjamin Poulain  <bpoulain@apple.com>
24294
24295        [iOS][WK2] Do not update the visible content rects when setting the same obscured insets multiple times
24296        https://bugs.webkit.org/show_bug.cgi?id=131633
24297
24298        Reviewed by Darin Adler.
24299
24300        We should avoid computing the visible content rects when not needed.
24301
24302        * UIProcess/API/Cocoa/WKWebView.mm:
24303        (-[WKWebView _setObscuredInsets:]):
24304
243052014-04-16  Zan Dobersek  <zdobersek@igalia.com>
24306
24307        Make IPC::Arguments a variadic template
24308        https://bugs.webkit.org/show_bug.cgi?id=131684
24309
24310        Reviewed by Darin Adler.
24311
24312        Make IPC::Arguments a variadic template that uses the template parameter pack to further
24313        define the std::tuple ValueType and is used to define the std::tuple container of the
24314        values passed into the container.
24315
24316        * Platform/IPC/Arguments.h:
24317        (IPC::Arguments::Arguments):
24318        (IPC::Arguments::encode):
24319        (IPC::Arguments::decode):
24320        (IPC::Arguments0::encode): Deleted.
24321        (IPC::Arguments0::decode): Deleted.
24322        (IPC::Arguments1::Arguments1): Deleted.
24323        (IPC::Arguments1::encode): Deleted.
24324        (IPC::Arguments1::decode): Deleted.
24325        (IPC::Arguments2::Arguments2): Deleted.
24326        (IPC::Arguments2::encode): Deleted.
24327        (IPC::Arguments2::decode): Deleted.
24328        (IPC::Arguments3::Arguments3): Deleted.
24329        (IPC::Arguments3::encode): Deleted.
24330        (IPC::Arguments3::decode): Deleted.
24331        (IPC::Arguments4::Arguments4): Deleted.
24332        (IPC::Arguments4::encode): Deleted.
24333        (IPC::Arguments4::decode): Deleted.
24334        (IPC::Arguments5::Arguments5): Deleted.
24335        (IPC::Arguments5::encode): Deleted.
24336        (IPC::Arguments5::decode): Deleted.
24337        (IPC::Arguments6::Arguments6): Deleted.
24338        (IPC::Arguments6::encode): Deleted.
24339        (IPC::Arguments6::decode): Deleted.
24340        (IPC::Arguments7::Arguments7): Deleted.
24341        (IPC::Arguments7::encode): Deleted.
24342        (IPC::Arguments7::decode): Deleted.
24343        (IPC::Arguments8::Arguments8): Deleted.
24344        (IPC::Arguments8::encode): Deleted.
24345        (IPC::Arguments8::decode): Deleted.
24346        (IPC::Arguments10::Arguments10): Deleted.
24347        (IPC::Arguments10::encode): Deleted.
24348        (IPC::Arguments10::decode): Deleted.
24349        * Scripts/webkit2/LegacyMessages-expected.h:
24350        * Scripts/webkit2/Messages-expected.h:
24351        * Scripts/webkit2/messages.py: Clean up the code a bit.
24352        (reply_parameter_type):
24353        (arguments_type):
24354        (reply_type):
24355        (decode_type):
24356        (arguments_type_old): Deleted.
24357        (base_class): Deleted.
24358        (delayed_reply_type): Deleted.
24359
243602014-04-16  Tim Horton  <timothy_horton@apple.com>
24361
24362        Deduplicate LayerTreeContext
24363        https://bugs.webkit.org/show_bug.cgi?id=131773
24364
24365        Reviewed by Simon Fraser.
24366
24367        There are three identical implementations, one for each platform, for no reason.
24368
24369        * CMakeLists.txt:
24370        * PlatformEfl.cmake:
24371        * PlatformGTK.cmake:
24372        * Shared/LayerTreeContext.cpp: Renamed from Source/WebKit2/Shared/mac/LayerTreeContextMac.mm.
24373        (WebKit::LayerTreeContext::LayerTreeContext):
24374        (WebKit::LayerTreeContext::~LayerTreeContext):
24375        (WebKit::LayerTreeContext::encode):
24376        (WebKit::LayerTreeContext::decode):
24377        (WebKit::LayerTreeContext::isEmpty):
24378        (WebKit::operator==):
24379        * Shared/LayerTreeContext.h:
24380        (WebKit::operator!=): Deleted.
24381        * Shared/efl/LayerTreeContextEfl.cpp: Removed.
24382        * Shared/gtk/LayerTreeContextGtk.cpp: Removed.
24383        * WebKit2.xcodeproj/project.pbxproj:
24384        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
24385        (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
24386        * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
24387        (WebKit::LayerTreeHostGtk::initialize):
24388
243892014-04-16  Tim Horton  <timothy_horton@apple.com>
24390
24391        Don't build LayerTreeHost on Mac (and clean it up)
24392        https://bugs.webkit.org/show_bug.cgi?id=131769
24393
24394        Reviewed by Simon Fraser.
24395
24396        * WebKit2.xcodeproj/project.pbxproj:
24397        Don't include it in the project.
24398
24399        * WebProcess/InjectedBundle/InjectedBundle.cpp:
24400        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
24401        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
24402        (WebKit::CoordinatedDrawingArea::updatePreferences):
24403        * WebProcess/WebPage/DrawingAreaImpl.cpp:
24404        (WebKit::DrawingAreaImpl::updatePreferences):
24405        * WebProcess/WebPage/LayerTreeHost.h:
24406        (WebKit::LayerTreeHost::setLayerHostingMode): Deleted.
24407        (WebKit::LayerTreeHost::supportsAcceleratedCompositing): Deleted.
24408        * WebProcess/WebPage/WebPage.cpp:
24409        (WebKit::WebPage::updatePreferences):
24410        * WebProcess/WebPage/ios/WebPageIOS.mm:
24411        Get rid of LayerTreeHost::supportsAcceleratedCompositing, which always returns true everywhere.
24412        Remove some LayerTreeHost.h includes.
24413        Remove LayerTreeHost::setLayerHostingMode, which is PLATFORM(COCOA) and not needed.
24414
244152014-04-16  Simon Fraser  <simon.fraser@apple.com>
24416
24417        Failing to decode a layer tree commit message resulted in silent and mysterious failure
24418        https://bugs.webkit.org/show_bug.cgi?id=131766
24419        <rdar://problem/16520894>
24420
24421        Reviewed by Sam Weinig.
24422        
24423        If the message decode failed, we should have already marked the message as invalid.
24424        Failing to do so indicates in a decode code coding error.
24425
24426        * Platform/IPC/HandleMessage.h:
24427        (IPC::handleMessage):
24428        (IPC::handleMessageVariadic):
24429        (IPC::handleMessageDelayed):
24430
244312014-04-16  Tim Horton  <timothy_horton@apple.com>
24432
24433        Minor include sanity in WebPage.h
24434        https://bugs.webkit.org/show_bug.cgi?id=131752
24435
24436        Reviewed by Simon Fraser.
24437
24438        * WebProcess/WebPage/WebPage.h:
24439        Remove a bunch of unnecessary includes.
24440        Un-indent some stuff.
24441
24442        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
24443        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
24444        * WebProcess/WebPage/FindController.cpp:
24445        * WebProcess/WebPage/WebPage.cpp:
24446        * WebProcess/WebPage/mac/WebPageMac.mm:
24447        Add back more specific includes, into implementation files.
24448        
24449        * WebProcess/WebPage/WebUndoStep.cpp:
24450        (WebKit::WebUndoStep::~WebUndoStep):
24451        * WebProcess/WebPage/WebUndoStep.h:
24452        Add an out-of-line destructor.
24453
244542014-04-16  Gavin Barraclough  <baraclough@apple.com>
24455
24456        REGRESSION: PCE.js is 20x slower in WebKit2 because timers are throttled
24457        https://bugs.webkit.org/show_bug.cgi?id=131189
24458
24459        Unreviewed rollout of r166754
24460
24461        This change is no longer necessary.
24462
24463        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
24464        (WebKit::connectToService):
24465
244662014-04-16  Alexey Proskuryakov  <ap@apple.com>
24467
24468        Updating tests after bug 131721, [GTK] Fix unused parameter warnings.
24469
24470        * Scripts/webkit2/LegacyMessageReceiver-expected.cpp:
24471        (WebKit::WebPage::didReceiveWebPageMessage):
24472        (WebKit::WebPage::didReceiveSyncWebPageMessage):
24473        * Scripts/webkit2/MessageReceiver-expected.cpp:
24474        (WebKit::WebPage::didReceiveMessage):
24475        (WebKit::WebPage::didReceiveSyncMessage):
24476
244772014-04-16  Brendan Long  <b.long@cablelabs.com>
24478
24479        [GTK] Fix unused parameter warnings
24480        https://bugs.webkit.org/show_bug.cgi?id=131721
24481
24482        Reviewed by Darin Adler.
24483
24484        * Scripts/webkit2/messages.py:
24485        (generate_message_handler): Add UNUSED_PARAM() for a couple parameters which aren't always used.
24486        * Shared/WebCoreArgumentCoders.cpp:
24487        (IPC::ArgumentCoder<LinearTimingFunction>::decode): Remove unused parameters.
24488        * WebProcess/InjectedBundle/APIInjectedBundleFormClient.h:
24489        (API::InjectedBundle::FormClient::textDidChangeInTextField): Same.
24490        (API::InjectedBundle::FormClient::willSubmitForm): Same.
24491        (API::InjectedBundle::FormClient::willSendSubmitEvent): Same.
24492        * WebProcess/Network/NetworkProcessConnection.cpp:
24493        (WebKit::NetworkProcessConnection::didReceiveSyncMessage): Same.
24494
244952014-04-16  Tim Horton  <timothy_horton@apple.com>
24496
24497        Accidentally included some style-checker-testing changes in the last commit.
24498
24499        * WebProcess/Plugins/PDF/PDFPlugin.mm:
24500        (WebKit::PDFPlugin::attemptToUnlockPDF):
24501        (WebKit::PDFPlugin::updatePageAndDeviceScaleFactors):
24502
245032014-04-16  Tim Horton  <timothy_horton@apple.com>
24504
24505        Fix some style checker complaints in PDFPlugin
24506        https://bugs.webkit.org/show_bug.cgi?id=131706
24507
24508        Reviewed by Darin Adler.
24509
24510        * WebProcess/Plugins/PDF/PDFPlugin.mm:
24511        (-[WKPDFPluginAccessibilityObject accessibilityAttributeValue:]):
24512        (-[WKPDFPluginAccessibilityObject accessibilityAttributeValue:forParameter:]):
24513        (-[WKPDFPluginAccessibilityObject accessibilityAttributeNames]):
24514        (WebKit::PDFPlugin::attemptToUnlockPDF):
24515        (WebKit::PDFPlugin::updatePageAndDeviceScaleFactors):
24516        (WebKit::PDFPlugin::isEditingCommandEnabled):
24517        (WebKit::PDFPlugin::nextMatchForString):
24518        (WebKit::PDFPlugin::handleWheelEvent):
24519        (WebKit::PDFPlugin::liveData):
24520
245212014-04-15  Dan Bernstein  <mitz@apple.com>
24522
24523        [Cocoa] Add a form delegate method corresponding to willSubmitForm
24524        https://bugs.webkit.org/show_bug.cgi?id=131718
24525
24526        Reviewed by Tim Horton.
24527
24528        * UIProcess/API/Cocoa/WKWebView.mm:
24529        (-[WKWebView _setFormDelegate:]): Changed to define and create a FormClient (which derives
24530        from API::FormClient and messages a delegate), and set it as the form client.
24531
24532        * UIProcess/API/Cocoa/_WKFormDelegate.h: Declared new delegate method.
24533
24534        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Added a
24535        variant of willSubmitForm that returs a user object to pass to the delegate in the UI
24536        process, giving it a temporary name with “new”.
24537
24538        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
24539        (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Changed willSubmitForm()
24540        to check for the new bundle delegate method first and encode the user object as user data.
24541        Moved the encoding of an NSObject <NSSecureCoding> as user data into a helper function.
24542
245432014-04-15  Hyowon Kim  <hw1008.kim@samsung.com>
24544
24545        Make page overlay functionality working on coordinated graphics.
24546        https://bugs.webkit.org/show_bug.cgi?id=131425
24547
24548        Reviewed by Darin Adler.
24549
24550        Page overlay functionality did not work on coordinated graphics since r166975.
24551        This patch removes deprecated code related to the PageOverlay GraphicsLayer management.
24552        and makes CoordinatedLayerTreeHost use PageOverlayController.
24553
24554        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
24555        (WebKit::CoordinatedDrawingArea::mainFrameContentSizeChanged):
24556        (WebKit::CoordinatedDrawingArea::didInstallPageOverlay): Deleted.
24557        (WebKit::CoordinatedDrawingArea::didUninstallPageOverlay): Deleted.
24558        (WebKit::CoordinatedDrawingArea::setPageOverlayNeedsDisplay): Deleted.
24559        (WebKit::CoordinatedDrawingArea::setPageOverlayOpacity): Deleted.
24560        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
24561        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
24562        (WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer):
24563        (WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):
24564        (WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
24565        (WebKit::CoordinatedLayerTreeHost::didInstallPageOverlay): Deleted.
24566        (WebKit::CoordinatedLayerTreeHost::didUninstallPageOverlay): Deleted.
24567        (WebKit::CoordinatedLayerTreeHost::setPageOverlayNeedsDisplay): Deleted.
24568        (WebKit::CoordinatedLayerTreeHost::setPageOverlayOpacity): Deleted.
24569        (WebKit::CoordinatedLayerTreeHost::createPageOverlayLayer): Deleted.
24570        (WebKit::CoordinatedLayerTreeHost::destroyPageOverlayLayer): Deleted.
24571        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
24572        * WebProcess/WebPage/LayerTreeHost.h:
24573        (WebKit::LayerTreeHost::didInstallPageOverlay):
24574        (WebKit::LayerTreeHost::didUninstallPageOverlay):
24575        (WebKit::LayerTreeHost::setPageOverlayNeedsDisplay):
24576
245772014-04-15  Dan Bernstein  <mitz@apple.com>
24578
24579        Introduce API::FormClient
24580        https://bugs.webkit.org/show_bug.cgi?id=131714
24581
24582        Reviewed by Tim Horton.
24583
24584        * UIProcess/API/APIFormClient.h: Added.
24585        (API::FormClient::~FormClient):
24586        (API::FormClient::willSubmitForm):
24587
24588        * UIProcess/API/C/WKPage.cpp:
24589        (WKPageSetPageFormClient): Changed to create a WebFormClient and call
24590        WebPageProxy::setFormClient.
24591
24592        * UIProcess/WebFormClient.cpp:
24593        (WebKit::WebFormClient::WebFormClient): Added a constructor from WKPageFormClientBase.
24594        * UIProcess/WebFormClient.h: Added inheritance from API::FormClient, marked overrides as
24595        such.
24596
24597        * UIProcess/WebPageProxy.cpp:
24598        (WebKit::WebPageProxy::WebPageProxy): Initialize m_formClient member.
24599        (WebKit::WebPageProxy::setFormClient): Added. Updates m_formClient.
24600        (WebKit::WebPageProxy::close): Updated code to clear m_formClient.
24601        (WebKit::WebPageProxy::willSubmitForm): Updated for type change.
24602        (WebKit::WebPageProxy::initializeFormClient): Deleted.
24603        * UIProcess/WebPageProxy.h:
24604
24605        * WebKit2.xcodeproj/project.pbxproj: Added reference to new file.
24606
246072014-04-15  Simon Fraser  <simon.fraser@apple.com>
24608
24609        [iOS WK2] Pages often blank on first load if page loaded by typing the URL
24610        https://bugs.webkit.org/show_bug.cgi?id=131665
24611
24612        Reviewed by Tim Horton.
24613
24614        The document overlay-related code in RemoteLayerTreeDrawingArea::setRootCompositingLayer()
24615        was triggering a compositing layer flush when called with a null rootLayer, which happens
24616        for pages going into the page cache. This would trigger a layer flush that would clobber
24617        the root layer for the visible page, resulting in missing content.
24618        
24619        Also, rebuildCompositingLayerTree() is called recursively and the m_documentOverlayRootLayer
24620        was being added to (and then removed from) every single compositing layers.
24621        
24622        Fix both these by changing to a pull model, where RenderLayerCompositor requests
24623        the overlay layer via ChromeClient, and gets it at the end of every flush,
24624        adding to the children of the root layer.
24625
24626        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
24627        (WebKit::WebChromeClient::documentOverlayLayerForFrame):
24628        * WebProcess/WebCoreSupport/WebChromeClient.h:
24629        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
24630        (WebKit::RemoteLayerTreeDrawingArea::setRootCompositingLayer):
24631
246322014-04-15  Jinwoo Song  <jinwoo7.song@samsung.com>
24633
24634        [EFL][WK2] Pass Mouse movement data to WebMouseEvent
24635        https://bugs.webkit.org/show_bug.cgi?id=131663
24636
24637        Reviewed by Gyuyoung Kim.
24638
24639        Currently mouse movement data are not passed to WebMouseEvent. Instead, they are set to 0 as default.
24640        EFL port needs to send the deltaX and deltaY for PointerLock API which will be implemented later.
24641
24642        * Shared/efl/WebEventFactory.cpp:
24643        (WebKit::WebEventFactory::createWebMouseEvent):
24644
246452014-04-15  Commit Queue  <commit-queue@webkit.org>
24646
24647        Unreviewed, rolling out r167298.
24648        https://bugs.webkit.org/show_bug.cgi?id=131670
24649
24650        Broke CSS filters (17 test crashes) (Requested by ap on
24651        #webkit).
24652
24653        Reverted changeset:
24654
24655        "[iOS WK2] Pages often blank on first load if page loaded by
24656        typing the URL"
24657        https://bugs.webkit.org/show_bug.cgi?id=131665
24658        http://trac.webkit.org/changeset/167298
24659
246602014-04-14  Simon Fraser  <simon.fraser@apple.com>
24661
24662        [iOS WK2] Pages often blank on first load if page loaded by typing the URL
24663        https://bugs.webkit.org/show_bug.cgi?id=131665
24664
24665        Reviewed by Tim Horton.
24666
24667        The document overlay-related code in RemoteLayerTreeDrawingArea::setRootCompositingLayer()
24668        was triggering a compositing layer flush when called with a null rootLayer, which happens
24669        for pages going into the page cache. This would trigger a layer flush that would clobber
24670        the root layer for the visible page, resulting in missing content.
24671        
24672        Also, rebuildCompositingLayerTree() is called recursively and the m_documentOverlayRootLayer
24673        was being added to (and then removed from) every single compositing layers.
24674        
24675        Fix both these by changing to a pull model, where RenderLayerCompositor requests
24676        the overlay layer via ChromeClient, and gets it at the end of every flush,
24677        adding to the children of the root layer.
24678
24679        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
24680        (WebKit::WebChromeClient::documentOverlayLayerForFrame):
24681        * WebProcess/WebCoreSupport/WebChromeClient.h:
24682        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
24683        (WebKit::RemoteLayerTreeDrawingArea::setRootCompositingLayer):
24684
246852014-04-14  Tim Horton  <timothy_horton@apple.com>
24686
24687        Fix the 32-bit build.
24688
24689        * UIProcess/mac/ViewGestureControllerMac.mm:
24690
246912014-04-14  Simon Fraser  <simon.fraser@apple.com>
24692
24693        REGRESSION (WebKit2): Programmatic scrolls in overflow-scrolling:touch don't work
24694        https://bugs.webkit.org/show_bug.cgi?id=131649
24695
24696        Reviewed by Tim Horton.
24697        
24698        Update the UIScrollView's contentOffset when we're told that the scroll position
24699        changed.
24700        
24701        Also refactor slightly to have a single exception-protected block.
24702
24703        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
24704        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren):
24705
247062014-04-14  Tim Horton  <timothy_horton@apple.com>
24707
24708        Fix the 32-bit build.
24709
24710        * UIProcess/mac/ViewGestureControllerMac.mm:
24711
247122014-04-14  Tim Horton  <timothy_horton@apple.com>
24713
24714        Sometimes-crash under handleSwipeGesture after closing a window or quitting
24715        https://bugs.webkit.org/show_bug.cgi?id=131648
24716        <rdar://problem/15966106>
24717
24718        Reviewed by Simon Fraser.
24719
24720        * UIProcess/mac/ViewGestureController.h:
24721        * UIProcess/mac/ViewGestureControllerMac.mm:
24722        (WebKit::ViewGestureController::~ViewGestureController):
24723        (WebKit::ViewGestureController::trackSwipeGesture):
24724        Keep a Objective C object with a single boolean property, isCancelled, on
24725        the ViewGestureController, and also retained by the swipe-tracking block.
24726        When the ViewGestureController is destroyed, we set isCancelled to YES,
24727        and the next time the block is invoked, we will cancel the swipe without
24728        touching the destroyed ViewGestureController.
24729
24730        (WebKit::ViewGestureController::handleSwipeGesture):
24731        Don't try to handle a swipe gesture if the drawing area is missing.
24732
24733        (WebKit::ViewGestureController::endSwipeGesture):
24734        Clear the swipe cancellation tracker when the gesture completes.
24735
247362014-04-14  Enrica Casucci  <enrica@apple.com>
24737
24738        REGRESSION(r166027) Menu is shown and immediately hidden after doubletap gesture.
24739        https://bugs.webkit.org/show_bug.cgi?id=131646
24740        <rdar://problem/16614374>
24741
24742        Reviewed by Benjamin Poulain.
24743
24744        This is a problem with every gesture that changes the selection
24745        We don't need to delay updating the selection if the selection is
24746        being changed with a gesture.
24747
24748        * UIProcess/ios/WKContentViewInteraction.h:
24749        * UIProcess/ios/WKContentViewInteraction.mm:
24750        (-[WKContentView _didUpdateBlockSelectionWithTouch:withFlags:growThreshold:shrinkThreshold:]):
24751        (-[WKContentView changeSelectionWithGestureAt:withGesture:withState:]):
24752        (-[WKContentView changeSelectionWithTouchAt:withSelectionTouch:baseIsStart:]):
24753        (-[WKContentView changeSelectionWithTouchesFrom:to:withGesture:withState:]):
24754        (-[WKContentView changeBlockSelectionWithTouchAt:withSelectionTouch:forHandle:]):
24755        (-[WKContentView _selectionChanged]):
24756
247572014-04-14  Dan Bernstein  <mitz@apple.com>
24758
24759        Let the bundle form client know whether a change in a text field was initiated by user typing
24760        https://bugs.webkit.org/show_bug.cgi?id=131643
24761
24762        Reviewed by Sam Weinig.
24763
24764        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Added
24765        initiatedByUserTyping parameter to the delegate method.
24766
24767        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
24768        (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Updated overload of
24769        textDidChangeInTextField to take the initiatedByUserTyping parameter and pass it along to
24770        the delegate.
24771
24772        * WebProcess/InjectedBundle/APIInjectedBundleFormClient.h:
24773        (API::InjectedBundle::FormClient::textDidChangeInTextField): Added initiatedByUserTyping
24774        parameter.
24775
24776        * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
24777        (WebKit::InjectedBundlePageFormClient::textDidChangeInTextField): Maintained the existing
24778        behavior of not calling the C SPI client if the change was not initiated by user typing.
24779        * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h: Updated for added parameter.
24780
24781        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
24782        (WebKit::WebEditorClient::textDidChangeInTextField): Changed to call the bundle client
24783        function unconditionally, but pass along whether the change was initiated by user typing.
24784
247852014-04-14  Dan Bernstein  <mitz@apple.com>
24786
24787        [Cocoa] Add a WKWebProcessPlugInFormDelegate method corresponding to willSendSubmitEvent
24788        https://bugs.webkit.org/show_bug.cgi?id=131639
24789
24790        Reviewed by Tim Horton.
24791
24792        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Declared
24793        new delegate method.
24794        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
24795        (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Added an override
24796        of API::InjectedBundle::FormClient::willSendSubmitEvent which calls the new delegate
24797        method.
24798
247992014-04-14  Benjamin Poulain  <bpoulain@apple.com>
24800
24801        [iOS][WK2] Change the SPI used when starting the rotation animation
24802        https://bugs.webkit.org/show_bug.cgi?id=131638
24803
24804        Reviewed by Tim Horton.
24805
24806        Having an update block where all the properties are changed is more convenient for Safari.
24807
24808        * UIProcess/API/Cocoa/WKWebView.mm:
24809        (-[WKWebView _beginAnimatedResizeWithUpdates:]):
24810        (-[WKWebView _beginAnimatedResizeToSize:obscuredInsets:minimumLayoutSizeOverride:]): Deleted.
24811        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
24812
248132014-04-14  Simon Fraser  <simon.fraser@apple.com>
24814
24815        [iOS WK2] Hash table assertion closing a tab
24816        https://bugs.webkit.org/show_bug.cgi?id=131640
24817
24818        Reviewed by Tim Horton.
24819        
24820        Have RemoteLayerTreeContext keep track of all PlatformCALayerRemotes,
24821        and clear their context pointer when it is being destroyed to avoid
24822        calling into a deleted object later.
24823
24824        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
24825        (WebKit::PlatformCALayerRemote::~PlatformCALayerRemote):
24826        (WebKit::PlatformCALayerRemote::addAnimationForKey):
24827        * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
24828        (WebKit::PlatformCALayerRemote::clearContext):
24829        * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
24830        * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
24831        (WebKit::RemoteLayerTreeContext::~RemoteLayerTreeContext):
24832        (WebKit::RemoteLayerTreeContext::layerWasCreated):
24833        (WebKit::RemoteLayerTreeContext::layerWillBeDestroyed):
24834
248352014-04-14  Tim Horton  <timothy_horton@apple.com>
24836
24837        Allow dynamic changes of WKThumbnailView snapshot scale
24838        https://bugs.webkit.org/show_bug.cgi?id=131628
24839        <rdar://problem/16584156>
24840
24841        Reviewed by Beth Dakin.
24842
24843        * UIProcess/API/Cocoa/_WKThumbnailView.mm:
24844        (-[_WKThumbnailView _requestSnapshotIfNeeded]):
24845        Don't bail from requesting a snapshot just because we already had one; we want to resnapshot.
24846        Keep track of when we bail from requesting a snapshot because we have one in-flight, so we can request it later.
24847
24848        (-[_WKThumbnailView _didTakeSnapshot:]):
24849        Apply the scale to the bitmap size (whoops!).
24850        Make CA always resize the content to fill the thumbnail view's layer, respecting aspect ratio.
24851        Re-snapshot if we previously deferred a snapshot.
24852
24853        (-[_WKThumbnailView setScale:]):
24854        If we get a scale change, request a new snapshot.
24855
24856        (-[_WKThumbnailView setUsesSnapshot:]):
24857        Never apply thumbnail scale to the page if we're using snapshots. It's unnecessary,
24858        because scale will be applied simply when painting the software snapshot.
24859        Apply the thumbnail scale if we're going from usesSnapshot -> !usesSnapshot.
24860
24861        * WebProcess/WebPage/WebPage.cpp:
24862        (WebKit::WebPage::snapshotAtSize):
24863        Snapshots should use the greater of the two scales, so as to never leave a portion of the snapshot unpainted.
24864
248652014-04-14  Tim Horton  <timothy_horton@apple.com>
24866
24867        REGRESSION (WebKit2 View Gestures): Double-tap doesn't work properly when there's no element underneath the cursor
24868        https://bugs.webkit.org/show_bug.cgi?id=131629
24869        <rdar://problem/16192821>
24870
24871        Reviewed by Dan Bernstein.
24872
24873        * UIProcess/mac/ViewGestureControllerMac.mm:
24874        (WebKit::ViewGestureController::didCollectGeometryForSmartMagnificationGesture):
24875        If there's nothing under the cursor, zoom towards the cursor instead of towards 0,0.
24876
248772014-04-14  Simon Fraser  <simon.fraser@apple.com>
24878
24879        Run filter animations in the UI process with UI-side compositing
24880        https://bugs.webkit.org/show_bug.cgi?id=131199
24881        <rdar://problem/16479487>
24882
24883        Reviewed by Sam Weinig.
24884        
24885        * Shared/WebCoreArgumentCoders.cpp: Removed lots of WebCore::
24886        (IPC::ArgumentCoder<SelectionRect>::decode):
24887        (IPC::ArgumentCoder<PasteboardWebContent>::encode):
24888        (IPC::ArgumentCoder<PasteboardWebContent>::decode):
24889        (IPC::ArgumentCoder<PasteboardImage>::encode):
24890        (IPC::ArgumentCoder<PasteboardImage>::decode):
24891        (IPC::ArgumentCoder<URL>::decode):
24892        (IPC::ArgumentCoder<UserStyleSheet>::encode):
24893        (IPC::ArgumentCoder<UserStyleSheet>::decode):
24894        (IPC::ArgumentCoder<UserScript>::encode):
24895        (IPC::ArgumentCoder<UserScript>::decode):
24896        (IPC::ArgumentCoder<ScrollableAreaParameters>::encode):
24897        (IPC::ArgumentCoder<ScrollableAreaParameters>::decode):
24898        (IPC::ArgumentCoder<FixedPositionViewportConstraints>::encode):
24899        (IPC::ArgumentCoder<FixedPositionViewportConstraints>::decode):
24900        (IPC::ArgumentCoder<StickyPositionViewportConstraints>::encode):
24901        (IPC::ArgumentCoder<StickyPositionViewportConstraints>::decode):
24902        (IPC::ArgumentCoder<FilterOperation>::encode):
24903        (IPC::decodeFilterOperation):
24904        (IPC::ArgumentCoder<FilterOperations>::encode):
24905        (IPC::ArgumentCoder<WebCore::UserStyleSheet>::encode): Deleted.
24906        (IPC::ArgumentCoder<WebCore::UserStyleSheet>::decode): Deleted.
24907        (IPC::ArgumentCoder<WebCore::UserScript>::encode): Deleted.
24908        (IPC::ArgumentCoder<WebCore::UserScript>::decode): Deleted.
24909        (IPC::ArgumentCoder<WebCore::ScrollableAreaParameters>::encode): Deleted.
24910        (IPC::ArgumentCoder<WebCore::ScrollableAreaParameters>::decode): Deleted.
24911        (IPC::ArgumentCoder<WebCore::FixedPositionViewportConstraints>::encode): Deleted.
24912        (IPC::ArgumentCoder<WebCore::FixedPositionViewportConstraints>::decode): Deleted.
24913        (IPC::ArgumentCoder<WebCore::StickyPositionViewportConstraints>::encode): Deleted.
24914        (IPC::ArgumentCoder<WebCore::StickyPositionViewportConstraints>::decode): Deleted.
24915        (IPC::encodeFilterOperation): Deleted.
24916        Add encoding/decoding support for FilterOperation.
24917        decodeFilterOperation() has to be a bare function because of the RefPtr
24918        out parameter.
24919        REFERENCE filters should never be encoded, since they have CachedSVGDocumentReferences.
24920
24921        * Shared/WebCoreArgumentCoders.h:
24922
24923        * Shared/mac/RemoteLayerTreeTransaction.mm:
24924        (WebKit::RemoteLayerTreeTextStream::operator<<):
24925        Add logging for filter animations to the RemoteLayerTree log output.
24926
24927        * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
24928        * WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
24929        (WebKit::GraphicsLayerCARemote::addAnimation): Deleted. We can run
24930        filter animations now.
24931
24932        * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
24933        KeyValues have a RefPtr<WebCore::FilterOperation> now (which can't be part of
24934        the union because we need its constructor to get called).
24935        * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
24936        (WebKit::PlatformCAAnimationRemote::KeyframeValue::encode): Encode the filter.
24937        (WebKit::PlatformCAAnimationRemote::KeyframeValue::decode): Decode the filter.
24938        (WebKit::PlatformCAAnimationRemote::setFromValue): Implement.
24939        (WebKit::PlatformCAAnimationRemote::setToValue): Implement.
24940        (WebKit::PlatformCAAnimationRemote::setValues): Implement.
24941        (WebKit::animationValueFromKeyframeValue): Handle filters.
24942
249432014-04-14  Simon Fraser  <simon.fraser@apple.com>
24944
24945        Fix the build.
24946
24947        * UIProcess/mac/PageClientImpl.h:
24948
249492014-04-14  Simon Fraser  <simon.fraser@apple.com>
24950
24951        [WK2 iOS] Scrolling to anchor links is broken
24952        https://bugs.webkit.org/show_bug.cgi?id=131618
24953        <rdar://problem/16599144>
24954
24955        Reviewed by Tim Horton.
24956        
24957        The RemoteScrollingTree implements scrollingTreeNodeRequestsScroll
24958        to get informed about requested scroll position updates, and passes
24959        them along via the RemoteScrollingCoordinatorProxy, WebPageProxy and PageClient
24960        to the WKWebView, which performs a scroll.
24961
24962        * UIProcess/API/Cocoa/WKWebView.mm:
24963        (-[WKWebView _scrollToContentOffset:WebCore::]): Scroll to content offset,
24964        taking page scale and insets into account.
24965        * UIProcess/API/Cocoa/WKWebViewInternal.h:
24966        * UIProcess/CoordinatedGraphics/WebView.cpp:
24967        (WebKit::WebView::requestScroll):
24968        * UIProcess/CoordinatedGraphics/WebView.h:
24969        * UIProcess/PageClient.h:
24970        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
24971        (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeRequestsScroll):
24972        Pass scrolls along to the WebPageProxy for the root node. We will also need
24973        to handle programmatic scrolls for overflow soon.
24974        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
24975        * UIProcess/Scrolling/RemoteScrollingTree.cpp:
24976        (WebKit::RemoteScrollingTree::scrollingTreeNodeRequestsScroll):
24977        * UIProcess/Scrolling/RemoteScrollingTree.h:
24978        * UIProcess/WebPageProxy.cpp:
24979        (WebKit::WebPageProxy::requestScroll):
24980        * UIProcess/WebPageProxy.h:
24981        * UIProcess/ios/PageClientImplIOS.h:
24982        * UIProcess/ios/PageClientImplIOS.mm:
24983        (WebKit::PageClientImpl::canScrollView):
24984        (WebKit::PageClientImpl::requestScroll):
24985        * UIProcess/mac/PageClientImpl.mm:
24986        (WebKit::PageClientImpl::requestScroll):
24987
249882014-04-12  Antti Koivisto  <antti@apple.com>
24989
24990        Keep secondary tile grid for zoomed-out scale
24991        https://bugs.webkit.org/show_bug.cgi?id=131586
24992
24993        Reviewed by Darin Adler.
24994
24995        * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
24996        (WebKit::PlatformCALayerRemoteTiledBacking::PlatformCALayerRemoteTiledBacking):
24997        (WebKit::PlatformCALayerRemoteTiledBacking::customSublayers):
24998        
24999            Always request new sublayer list from tile controller.
25000
25001        * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
25002
250032014-04-14  Tim Horton  <timothy_horton@apple.com>
25004
25005        Make WK(Web)View magnification setters actually use view-relative positions
25006        https://bugs.webkit.org/show_bug.cgi?id=131611
25007        <rdar://problem/15965239>
25008
25009        Reviewed by Darin Adler.
25010
25011        * UIProcess/API/mac/WKView.mm:
25012        (-[WKView setMagnification:centeredAtPoint:]):
25013        (-[WKView setMagnification:]):
25014        Use scalePageInViewCoordinates instead.
25015
25016        * UIProcess/WebPageProxy.cpp:
25017        (WebKit::WebPageProxy::scalePageInViewCoordinates):
25018        * UIProcess/WebPageProxy.h:
25019        * WebProcess/WebPage/WebPage.cpp:
25020        (WebKit::WebPage::scalePageInViewCoordinates):
25021        (WebKit::WebPage::pageScaleFactor):
25022        * WebProcess/WebPage/WebPage.h:
25023        * WebProcess/WebPage/WebPage.messages.in:
25024        Add scalePageInViewCoordinates, which turns the scale centerpoint within the view
25025        into what scalePage expects: a post-scale scroll offset.
25026
250272014-04-14  Tim Horton  <timothy_horton@apple.com>
25028
25029        Support setting a background color on page overlays
25030        https://bugs.webkit.org/show_bug.cgi?id=131600
25031
25032        Reviewed by Darin Adler.
25033
25034        * WebProcess/WebPage/PageOverlay.cpp:
25035        (WebKit::PageOverlay::PageOverlay):
25036        (WebKit::PageOverlay::bounds):
25037        (WebKit::PageOverlay::startFadeInAnimation):
25038        (WebKit::PageOverlay::startFadeOutAnimation):
25039        (WebKit::PageOverlay::startFadeAnimation):
25040        (WebKit::PageOverlay::fadeAnimationTimerFired):
25041        Minor style adjustments.
25042        Use more references everywhere.
25043
25044        (WebKit::PageOverlay::setBackgroundColor):
25045        (WebKit::PageOverlay::setNeedsDisplay):
25046        * WebProcess/WebPage/PageOverlay.h:
25047        (WebKit::PageOverlay::backgroundColor):
25048        Keep track of our background color, and push it down to the page overlay controller if we have one.
25049
25050        * WebProcess/WebPage/PageOverlayController.cpp:
25051        (WebKit::updateOverlayGeometry):
25052        (WebKit::PageOverlayController::clearPageOverlay):
25053        Page overlays will always have the right size, and just use drawsContents to determine
25054        whether or not they should tile/have backing store/etc.
25055
25056        (WebKit::PageOverlayController::installPageOverlay):
25057        (WebKit::PageOverlayController::didChangeOverlayBackgroundColor):
25058        Set the background color of the layer.
25059
25060        * WebProcess/WebPage/PageOverlayController.h:
25061
25062        * WebProcess/WebPage/WebPage.cpp:
25063        (WebKit::WebPage::WebPage):
25064        References!
25065
250662014-04-13  Andy Estes  <aestes@apple.com>
25067
25068        [QuickLook] Move file system-related code into WebKit
25069        https://bugs.webkit.org/show_bug.cgi?id=131597
25070
25071        Reviewed by Dan Bernstein.
25072
25073        * WebProcess/Network/WebResourceLoader.h: Made m_quickLookHandle a unique_ptr.
25074        * WebProcess/ios/WebResourceLoaderIOS.mm:
25075        (WebKit::WebResourceLoader::setUpQuickLookHandleIfNeeded):
25076
250772014-04-13  Andy Estes  <aestes@apple.com>
25078
25079        REGRESSION (r167164): -[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:] _block_invoke can access a deallocated completionHandler
25080        https://bugs.webkit.org/show_bug.cgi?id=131595
25081
25082        Reviewed by Dan Bernstein.
25083
25084        Make a copy of completionHandler and release it after we're done with it.
25085
25086        * Shared/mac/CookieStorageShim.mm:
25087        (-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):
25088
250892014-04-13  Pratik Solanki  <psolanki@apple.com>
25090
25091        Don't use ImportanceAssertion on iOS
25092        https://bugs.webkit.org/show_bug.cgi?id=131481
25093        <rdar://problem/16575830>
25094
25095        Reviewed by Darin Adler.
25096
25097        We have other API to mark processes as being in use on iOS. No need to use ImportanceAssertion.
25098
25099        * Platform/IPC/MessageDecoder.cpp:
25100        * Platform/IPC/MessageDecoder.h:
25101        * Platform/IPC/mac/ConnectionMac.cpp:
25102        (IPC::Connection::receiveSourceEventHandler):
25103        * Platform/IPC/mac/ImportanceAssertion.h:
25104
251052014-04-13  Commit Queue  <commit-queue@webkit.org>
25106
25107        Unreviewed, rolling out r167168 and r167194.
25108        https://bugs.webkit.org/show_bug.cgi?id=131589
25109
25110        Caused massive ASSERTION failures on the GTK Debug bot
25111        (Requested by philn on #webkit).
25112
25113        Reverted changesets:
25114
25115        "[GTK] Add HighDPI support for non-accelerated compositing
25116        contents"
25117        https://bugs.webkit.org/show_bug.cgi?id=131562
25118        http://trac.webkit.org/changeset/167168
25119
25120        "Unreviewed. Fix GTK+ build with recent cairo and GTK+ after
25121        r167168."
25122        http://trac.webkit.org/changeset/167194
25123
251242014-04-13  Carlos Garcia Campos  <cgarcia@igalia.com>
25125
25126        Unreviewed. Fix GTK+ build with recent cairo and GTK+ after r167168.
25127
25128        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
25129        (webkitWebViewBaseCreateWebPage):
25130
251312014-04-12  Andy Estes  <aestes@apple.com>
25132
25133        [iOS] Move QuickLookHandle from ResourceLoader to WebResourceLoader
25134        https://bugs.webkit.org/show_bug.cgi?id=131580
25135
25136        Reviewed by Darin Adler.
25137
25138        There's no need to bloat WebKit1's ResourceLoader with a pointer that
25139        only WebKit2's WebResourceLoader cares about.
25140
25141        * WebProcess/Network/WebResourceLoader.cpp:
25142        (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
25143        (WebKit::WebResourceLoader::didReceiveData):
25144        (WebKit::WebResourceLoader::didFinishResourceLoad):
25145        (WebKit::WebResourceLoader::didFailResourceLoad):
25146        * WebProcess/Network/WebResourceLoader.h:
25147        * WebProcess/ios/WebResourceLoaderIOS.mm:
25148        (WebKit::WebResourceLoader::setUpQuickLookHandleIfNeeded):
25149
251502014-04-11  Alexey Proskuryakov  <ap@apple.com>
25151
25152        [Mac] Crashes when copying or pasting huge images
25153        https://bugs.webkit.org/show_bug.cgi?id=131576
25154        <rdar://problem/12131833>
25155        <rdar://problem/14427398>
25156
25157        Reviewed by Darin Adler.
25158
25159        Added a few null checks for SharedMemory::create() return value in pasteboard code.
25160        Error handling feels a bit sketchy, but
25161        - I'm not sure what it should look like ideally;
25162        - it matches the kind of error handling we already have in these functions;
25163        - it appears to work reasonably well in practice. We get empty content, which
25164        is not nice, but not particularly problematic either. When copying an animated GIF,
25165        we also get the GIF in RTFD flavor, so even pasting into NSTextViews works!
25166
25167        * Platform/mac/SharedMemoryMac.cpp:
25168        (WebKit::SharedMemory::createFromVMBuffer):
25169        * UIProcess/mac/WebContextMac.mm:
25170        (WebKit::WebContext::getPasteboardBufferForType):
25171        (WebKit::WebContext::readBufferFromPasteboard):
25172        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
25173        (WebKit::WebPlatformStrategies::setBufferForType):
25174
25175        * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: (WebKit::WebDragClient::declareAndWriteDragImage):
25176        Also renamed some variables to prevent name collisions with with nested scope.
25177
251782014-04-11  Ryuan Choi  <ryuan.choi@samsung.com>
25179
25180        Unreviewed build fix on the EFL port after r167152
25181
25182        * WebProcess/WebPage/PageOverlay.cpp:
25183        (WebKit::PageOverlay::bounds):
25184
251852014-04-11  Hyowon Kim  <hw1008.kim@samsung.com>
25186
25187        [WK2] WebProcess crashes, when closing window after opening page by means of context menu
25188        https://bugs.webkit.org/show_bug.cgi?id=131439
25189
25190        Reviewed by Tim Horton.
25191
25192        CoordinatedGraphicsLayer calls notifyFlushRequired() through its client when destroyed.
25193        When PageOverlayController::notifyFlushRequired() is called, the DrawingArea could be null
25194        because it's destoryed in WebPage::close().
25195
25196        * WebProcess/WebPage/PageOverlayController.cpp:
25197        (WebKit::PageOverlayController::notifyFlushRequired): Add null check of m_webPage->drawingArea().
25198
251992014-04-11  Tim Horton  <timothy_horton@apple.com>
25200
25201        Lots of compositing test failures after r167152
25202        https://bugs.webkit.org/show_bug.cgi?id=131574
25203
25204        Reviewed by Simon Fraser.
25205
25206        * WebProcess/WebPage/PageOverlayController.h:
25207        Skip page overlay layers in layer tree dumps, for consistency between platforms.
25208
252092014-04-11  Beth Dakin  <bdakin@apple.com>
25210
25211        Need WK2 API to disable rubber-banding
25212        https://bugs.webkit.org/show_bug.cgi?id=131567
25213
25214        Reviewed by Simon Fraser.
25215
25216        New API allows the client to enable/disable horizontal or vertical rubber-banding. 
25217        By default, rubber-banding is enabled.
25218        * UIProcess/API/C/WKPage.cpp:
25219        (WKPageVerticalRubberBandingIsEnabled):
25220        (WKPageSetEnableVerticalRubberBanding):
25221        (WKPageHorizontalRubberBandingIsEnabled):
25222        (WKPageSetEnableHorizontalRubberBanding):
25223        * UIProcess/API/C/WKPage.h:
25224        * UIProcess/WebPageProxy.cpp:
25225        (WebKit::WebPageProxy::WebPageProxy):
25226        (WebKit::WebPageProxy::setEnableVerticalRubberBanding):
25227        (WebKit::WebPageProxy::verticalRubberBandingIsEnabled):
25228        (WebKit::WebPageProxy::setEnableHorizontalRubberBanding):
25229        (WebKit::WebPageProxy::horizontalRubberBandingIsEnabled):
25230        * UIProcess/WebPageProxy.h:
25231        * WebProcess/WebPage/WebPage.cpp:
25232        (WebKit::WebPage::setEnableVerticalRubberBanding):
25233        (WebKit::WebPage::setEnableHorizontalRubberBanding):
25234        * WebProcess/WebPage/WebPage.h:
25235        * WebProcess/WebPage/WebPage.messages.in:
25236
252372014-04-11  Tim Horton  <timothy_horton@apple.com>
25238
25239        Fix the Mac build.
25240
25241        * WebProcess/WebPage/FindController.cpp:
25242        (WebKit::FindController::updateFindIndicator):
25243
252442014-04-11  Tim Horton  <timothy_horton@apple.com>
25245
25246        [iOS WebKit2] Find-in-page indicator
25247        https://bugs.webkit.org/show_bug.cgi?id=131510
25248        <rdar://problem/16547777>
25249
25250        Reviewed by Simon Fraser and Enrica Casucci.
25251
25252        * WebKit2.xcodeproj/project.pbxproj:
25253        * WebProcess/WebPage/FindController.cpp:
25254        (WebKit::FindController::updateFindUIAfterPageScroll):
25255        WebKit2 will clear the selection if we reveal it while not enabling selection painting.
25256        So, avoid revealing it.
25257
25258        (WebKit::FindController::findString):
25259        (WebKit::FindController::hideFindIndicator):
25260        (WebKit::FindController::willFindString):
25261        (WebKit::FindController::didFailToFindString):
25262        (WebKit::FindController::didHideFindIndicator):
25263        #if out the cross-platform find indicator code on iOS; it will be replaced
25264        by the code in FindControllerIOS.
25265
25266        * WebProcess/WebPage/FindController.h:
25267
25268        * WebProcess/WebPage/ios/FindControllerIOS.mm: Added.
25269        (highlightColor):
25270        (WebKit::FindIndicatorOverlayClientIOS::drawRect):
25271        Paint the selection (with black text forced on), and the yellow rounded rect
25272        into the indicator page overlay.
25273
25274        (WebKit::FindController::updateFindIndicator):
25275        Create or update a small document-relative page overlay in the selection rect.
25276
25277        (WebKit::FindController::hideFindIndicator):
25278        (WebKit::FindController::willFindString):
25279        (WebKit::FindController::didFailToFindString):
25280        (WebKit::FindController::didHideFindIndicator):
25281        Add willFindString, didFailToFindString, and didHideFindIndicator functions.
25282        They do nothing, except on iOS where they are used to prevent selection change
25283        messages from being dispatched while using find-in-page, and to force
25284        WebCore to compute a selection rect (via updateAppearance) despite the selection not being painted.
25285
25286        * WebProcess/WebPage/ios/FindIndicatorOverlayClientIOS.h:
25287        (WebKit::FindIndicatorOverlayClientIOS::setFrame):
25288
252892014-04-11  Owen Taylor  <otaylor@redhat.com>
25290
25291        [GTK] Add HighDPI support for non-accelerated compositing contents
25292        https://bugs.webkit.org/show_bug.cgi?id=131562
25293
25294        Reviewed by Martin Robinson.
25295
25296        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
25297        (scaleFactorChanged): Added this callback to pass scale changes to the page proxy.
25298        (webkitWebViewBaseCreateWebPage): Attach the callback to the notify signal.
25299        * UIProcess/cairo/BackingStoreCairo.cpp:
25300        (WebKit::createBackingStoreForGTK): Pass the scale factor to the WebCore backing store.
25301        (WebKit::BackingStore::incorporateUpdate): Ditto.
25302
253032014-04-10  Jer Noble  <jer.noble@apple.com>
25304
25305        [WK2] Dispatch to main thread's run loop to handle cookie requests.
25306        https://bugs.webkit.org/show_bug.cgi?id=131524
25307
25308        Reviewed by Brady Eidson.
25309
25310        When using synchronous network APIs from the main thread (e.g., -[NSImage
25311        initWithContentsOfURL:]) our cookie shim would attempt to dispath_async
25312        to the main thread to handle the cookie request, and block against the original
25313        request. CFNetwork is still servicing the run loop however, so rather than
25314        dispatch_async to the main queue, use the RunLoop to dispatch to the main thread.
25315
25316        * Shared/mac/CookieStorageShim.mm:
25317        (-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):
25318
253192014-04-11  Tim Horton  <timothy_horton@apple.com>
25320
25321        Make the stylebot happier with r167154.
25322
25323        * UIProcess/PageClient.h:
25324        * UIProcess/WebPageProxy.h:
25325        * UIProcess/ios/PageClientImplIOS.h:
25326
253272014-04-11  Tim Horton  <timothy_horton@apple.com>
25328
25329        [iOS WebKit2] Expose a simplified zoom-to-rect to the WebProcess
25330        https://bugs.webkit.org/show_bug.cgi?id=131563
25331
25332        Reviewed by Simon Fraser.
25333
25334        * UIProcess/PageClient.h:
25335        * UIProcess/WebPageProxy.h:
25336        * UIProcess/WebPageProxy.messages.in:
25337        * UIProcess/ios/PageClientImplIOS.h:
25338        * UIProcess/ios/PageClientImplIOS.mm:
25339        (WebKit::PageClientImpl::zoomToRect):
25340        * UIProcess/ios/WebPageProxyIOS.mm:
25341        (WebKit::WebPageProxy::zoomToRect):
25342        * WebProcess/WebPage/WebPage.h:
25343        * WebProcess/WebPage/ios/WebPageIOS.mm:
25344        (WebKit::WebPage::zoomToRect):
25345        Add a simple message that calls WKContentView's zoom-to-rect code given just a rect and min/max scale.
25346        We will use the center of the rect as the zoom origin, and will try to show the whole rect.
25347
253482014-04-10  Jer Noble  <jer.noble@apple.com>
25349
25350        [iOS][WK2] Videos should animate into and out of fullscreen.
25351        https://bugs.webkit.org/show_bug.cgi?id=131497
25352
25353        Reviewed by Simon Fraser.
25354
25355        Pass a starting rect for the enterFullscreen animation and an ending rect
25356        for the exitFullscreen animation.
25357
25358        * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
25359        * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
25360        * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
25361        (WebKit::WebVideoFullscreenManagerProxy::enterFullscreenWithID): Pass initialFrame.
25362        * WebProcess/ios/WebVideoFullscreenManager.mm:
25363        (WebKit::screenRectOfContents): Casts node -> element and returns its screenRect().
25364        (WebKit::WebVideoFullscreenManager::enterFullscreenForNode): Pass initialFrame.
25365        (WebKit::WebVideoFullscreenManager::exitFullscreenForNode): Pass finalFrame.
25366
253672014-04-11  Tim Horton  <timothy_horton@apple.com>
25368
25369        Support document-relative and custom-frame page overlays
25370        https://bugs.webkit.org/show_bug.cgi?id=131560
25371        <rdar://problem/16595556>
25372
25373        Reviewed by Simon Fraser.
25374
25375        Add "document-relative" overlays, which attach to (and scroll with) the document,
25376        and can be given a frame rect within the document to avoid overallocation of backing store.
25377
25378        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
25379        (WebKit::WebFrameLoaderClient::didChangeScrollOffset):
25380        * WebProcess/WebPage/WebPage.cpp:
25381        (WebKit::WebPage::mainFrame):
25382        (WebKit::WebPage::mainFrameView):
25383        (WebKit::WebPage::didChangeScrollOffsetForFrame):
25384        * WebProcess/WebPage/WebPage.h:
25385        Let the PageOverlayController know *which* frame scrolled, instead of "any frame".
25386
25387        * WebProcess/WebPage/FindController.cpp:
25388        (WebKit::FindController::updateFindUIAfterPageScroll):
25389        Factor out shared code.
25390
25391        (WebKit::FindController::willMoveToWebPage):
25392        (WebKit::FindController::drawRect):
25393        We can use clearRect() instead of a transparency layer and fillRect().
25394        I've looked through all the other overlay clients I know of and none of them
25395        depend on having a transparency layer at the overlay level.
25396
25397        * WebProcess/WebPage/PageOverlay.cpp:
25398        (WebKit::PageOverlay::create):
25399        (WebKit::PageOverlay::PageOverlay):
25400        (WebKit::PageOverlay::bounds):
25401        (WebKit::PageOverlay::frame):
25402        (WebKit::PageOverlay::setFrame):
25403        (WebKit::PageOverlay::drawRect):
25404        Add OverlayType, which allows creation of Document or View relative overlays.
25405        All overlays up to this point are View relative, so we default to that.
25406        Document-relative overlays scroll with the page instead of repainting as
25407        the page scrolls. They can also be given an explicit frame, allowing them
25408        to be smaller than the entire document.
25409
25410        * WebProcess/WebPage/PageOverlay.h:
25411        (WebKit::PageOverlay::overlayType):
25412        (WebKit::PageOverlay::webPage):
25413        (WebKit::PageOverlay::client): Deleted.
25414        * WebProcess/WebPage/PageOverlayController.cpp:
25415        (WebKit::PageOverlayController::initialize):
25416        (WebKit::PageOverlayController::installPageOverlay):
25417        (WebKit::PageOverlayController::uninstallPageOverlay):
25418        (WebKit::PageOverlayController::updateForceSynchronousScrollLayerPositionUpdates):
25419        (WebKit::updateOverlayGeometry):
25420        (WebKit::PageOverlayController::setPageOverlayNeedsDisplay):
25421        (WebKit::PageOverlayController::didChangeViewSize):
25422        (WebKit::PageOverlayController::didChangeDocumentSize):
25423        (WebKit::PageOverlayController::didChangeDeviceScaleFactor):
25424        (WebKit::PageOverlayController::didScrollFrame):
25425        (WebKit::PageOverlayController::flushPageOverlayLayers):
25426        (WebKit::PageOverlayController::didChangeOverlayFrame):
25427        Keep two overlay root layers - one for view-relative
25428        and one for document-relative overlays.
25429        Don't force synchronous scrolling if we only have document-relative overlays.
25430        Update the overlay's position as well as its size whenever necessary.
25431        Update document-relative overlay geometry when the document size changes.
25432        Only explicitly flush view-relative overlays; document-relative ones
25433        are plugged into the WebCore layer tree and flushed along with the page.
25434
25435        * WebProcess/WebPage/PageOverlayController.h:
25436        (WebKit::PageOverlayController::documentOverlayRootLayer):
25437        (WebKit::PageOverlayController::viewOverlayRootLayer):
25438        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
25439        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
25440        (WebKit::RemoteLayerTreeDrawingArea::setRootCompositingLayer):
25441        (WebKit::RemoteLayerTreeDrawingArea::mainFrameContentSizeChanged):
25442        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
25443        (WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged):
25444        (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
25445        Let the PageOverlay controller know when the document size changes.
25446        When we set up compositing, push the document overlay root layer
25447        down into WebCore.
25448
254492014-04-11  Pratik Solanki  <psolanki@apple.com>
25450
25451        [iOS WebKit2]: Share NSURLCache directory for webkit processes
25452        https://bugs.webkit.org/show_bug.cgi?id=131513
25453        <rdar://problem/16420859>
25454
25455        Reviewed by Alexey Proskuryakov.
25456
25457        Use iOS specific NSURLCache API to share the cache directory used by the networking process,
25458        web process and Safari.
25459
25460        * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
25461        (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
25462        * WebProcess/cocoa/WebProcessCocoa.mm:
25463        (WebKit::WebProcess::platformInitializeWebProcess):
25464
254652014-04-11  Alexey Proskuryakov  <ap@apple.com>
25466
25467        [Mac] Add IconServices to WebProcess sandbox profile
25468        https://bugs.webkit.org/show_bug.cgi?id=131558
25469        <rdar://problem/16552397>
25470
25471        Reviewed by Brady Eidson.
25472
25473        * WebProcess/com.apple.WebProcess.sb.in:
25474
254752014-04-11  Antti Koivisto  <antti@apple.com>
25476
25477        Pipe initial scale factor to TileController
25478        https://bugs.webkit.org/show_bug.cgi?id=131521
25479
25480        Reviewed by Tim Horton.
25481
25482        * WebProcess/WebPage/ios/WebPageIOS.mm:
25483        (WebKit::WebPage::viewportConfigurationChanged):
25484
254852014-04-10  Chris Fleizach  <cfleizach@apple.com>
25486
25487        AX: WebProcess at com.apple.WebCore: WebCore::AXObjectCache::rootObject + 18
25488        https://bugs.webkit.org/show_bug.cgi?id=131522
25489
25490        Reviewed by Anders Carlsson.
25491
25492        Protect against documents that have had their render tree destroyed, and no longer return a valid cache.
25493
25494        * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
25495
254962014-04-11  Brent Fulgham  <bfulgham@apple.com>
25497
25498        [Mac] Prevent crash when exiting fullscreen mode
25499        https://bugs.webkit.org/show_bug.cgi?id=131528
25500
25501        Reviewed by Jer Noble.
25502
25503        * UIProcess/mac/WKFullScreenWindowController.mm:
25504        (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
25505        Clean up the _scaleAnimation controller, not just the _fadeAnimation controller.
25506        (-[WKFullScreenWindowController close]): If we are doing an immediate
25507        close of the view, we need to stop animations so we avoid any
25508        final timer events from interacting with invalid window handles.
25509
255102014-04-11  Carlos Garcia Campos  <cgarcia@igalia.com>
25511
25512        wk2-gtk does not display anything
25513        https://bugs.webkit.org/show_bug.cgi?id=125558
25514
25515        Reviewed by Martin Robinson.
25516
25517        Remove fcntl call to set access mode flags on the duplicated files
25518        descriptor. Those flags are ignored in Linux and make fcntl to
25519        fail in FreeBSD. We should handle the case where the passed
25520        protection is ReadOnly.
25521        Thanks to Raphael Kubo da Costa who proposed the solution.
25522
25523        * Platform/unix/SharedMemoryUnix.cpp:
25524        (WebKit::SharedMemory::createHandle):
25525        (WebKit::accessModeFile): Deleted.
25526
255272014-04-11  Zan Dobersek  <zdobersek@igalia.com>
25528
25529        [GTK][WK2] Move Vector objects into WebEditorClient::executePendingEditorCommands() invocations
25530        https://bugs.webkit.org/show_bug.cgi?id=131454
25531
25532        Reviewed by Carlos Garcia Campos.
25533
25534        * WebProcess/WebCoreSupport/WebEditorClient.h:
25535        * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
25536        (WebKit::WebEditorClient::executePendingEditorCommands): Take a const reference of the Vector
25537        object to avoid unnecessary copies. Also deploy two range-based for loops and efficiently move
25538        the Editor::Command objects into the other Vector.
25539
255402014-04-10  Dan Bernstein  <mitz@apple.com>
25541
25542        <rdar://problem/16582465> [Cocoa] Avoid casts from CF types to unrelated Objective-C types
25543        https://bugs.webkit.org/show_bug.cgi?id=131529
25544
25545        Reviewed by Mark Rowe.
25546
25547        * Shared/API/c/cf/WKStringCF.mm:
25548        (WKStringCreateWithCFString): Cast the CFStringRef into its toll-free-bridged counterpart,
25549        NSString, then cast the NSString into a WKNSString.
25550        * Shared/API/c/cf/WKURLCF.mm:
25551        (WKURLCreateWithCFURL): Cast the CFURLRef into its toll-free-bridged counterpart, NSURL,
25552        then cast the NSURL into a WKNSURL.
25553
255542014-04-10  Dan Bernstein  <mitz@apple.com>
25555
25556        BundlePageDiagnosticLoggingClient leaks every string passing through it.
25557        https://bugs.webkit.org/show_bug.cgi?id=130140
25558
25559        Reviewed by Brent Fulgham.
25560
25561        * WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp:
25562        (WebKit::InjectedBundlePageDiagnosticLoggingClient::logDiagnosticMessage): Don’t copy the
25563        strings passed into the bundle client.
25564
255652014-04-10  Benjamin Poulain  <bpoulain@apple.com>
25566
25567        Try to fix the debug bots after r167102
25568
25569        * WebProcess/cocoa/WebProcessCocoa.mm:
25570        (WebKit::WebProcess::platformInitializeWebProcess):
25571
255722014-04-10  Gavin Barraclough  <barraclough@apple.com>
25573
25574        Add user default for FTL JIT
25575        https://bugs.webkit.org/show_bug.cgi?id=131520
25576
25577        Reviewed by Benjamin Poulain.
25578
25579        * Shared/WebProcessCreationParameters.cpp:
25580        (WebKit::WebProcessCreationParameters::decode):
25581        * UIProcess/mac/WebContextMac.mm:
25582        (WebKit::registerUserDefaultsIfNeeded):
25583        (WebKit::WebContext::platformInitializeWebProcess):
25584            - D'oh, whitespace.
25585
255862014-04-10  Gavin Barraclough  <barraclough@apple.com>
25587
25588        Add user default for FTL JIT
25589        https://bugs.webkit.org/show_bug.cgi?id=131520
25590
25591        Reviewed by Benjamin Poulain.
25592
25593        * Shared/WebProcessCreationParameters.cpp:
25594        (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
25595        (WebKit::WebProcessCreationParameters::encode):
25596        (WebKit::WebProcessCreationParameters::decode):
25597        * Shared/WebProcessCreationParameters.h:
25598            - pass setting to WebContent process.
25599        * UIProcess/mac/WebContextMac.mm:
25600        (WebKit::registerUserDefaultsIfNeeded):
25601        (WebKit::WebContext::platformInitializeWebProcess):
25602            - read user default.
25603        * WebProcess/cocoa/WebProcessCocoa.mm:
25604        (WebKit::WebProcess::platformInitializeWebProcess):
25605            - set JSC::Option.
25606
256072014-04-10  Dan Bernstein  <mitz@apple.com>
25608
25609        [Cocoa] Notify the form delegate when the custom button in the form accessory view is tapped
25610        https://bugs.webkit.org/show_bug.cgi?id=131518
25611
25612        Reviewed by Tim Horton.
25613
25614        * UIProcess/API/Cocoa/_WKFormDelegate.h: Declared new delegate method.
25615        * UIProcess/ios/WKContentViewInteraction.mm:
25616        (-[WKContentView accessoryAutoFill]): Call the new delegate method.
25617
256182014-04-10  Commit Queue  <commit-queue@webkit.org>
25619
25620        Unreviewed, rolling out r167097.
25621        https://bugs.webkit.org/show_bug.cgi?id=131519
25622
25623        there was already a mechanism for this, and this was
25624        incomplete anyway (Requested by thorton on #webkit).
25625
25626        Reverted changeset:
25627
25628        "[iOS WebKit2] Disable the find overlay for now"
25629        https://bugs.webkit.org/show_bug.cgi?id=131509
25630        http://trac.webkit.org/changeset/167097
25631
256322014-04-10  Tim Horton  <timothy_horton@apple.com>
25633
25634        [iOS WebKit2] Disable the find overlay for now
25635        https://bugs.webkit.org/show_bug.cgi?id=131509
25636
25637        Reviewed by Adele Peterson.
25638
25639        * Shared/WebPreferencesStore.h:
25640        * WebProcess/WebPage/FindController.cpp:
25641        (WebKit::FindController::FindController):
25642        (WebKit::FindController::hideFindOverlay):
25643        (WebKit::FindController::hideFindUI):
25644        (WebKit::FindController::setShouldShowOverlay):
25645        * WebProcess/WebPage/FindController.h:
25646        * WebProcess/WebPage/WebPage.cpp:
25647        (WebKit::WebPage::updatePreferences):
25648        Add a setting allowing us to turn off the find-in-page overlay on iOS.
25649
256502014-04-10  Sergio Villar Senin  <svillar@igalia.com>
25651
25652        Unreviewed GTK build fix after r167074.
25653
25654        This involves replacing resetDragSession() by
25655        resetCurrentDragInformation() and dragSession().operation by
25656        currentDragOperation().
25657
25658        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
25659        (webkitWebViewBaseDragDataReceived):
25660        (webkitWebViewBaseDragMotion):
25661        (dragExitedCallback):
25662
256632014-04-10  Owen Taylor  <otaylor@redhat.com>
25664
25665        [Cairo] Implement ShareableBitmap::paint() with scale factor
25666        https://bugs.webkit.org/show_bug.cgi?id=64665
25667
25668        Reviewed by Martin Robinson.
25669
25670        * Shared/cairo/ShareableBitmapCairo.cpp (WebKit::ShareableBitmap::paint):
25671
256722014-04-10  Enrica Casucci  <enrica@apple.com>
25673
25674        [iOS WebKit2] Support phraseboundary gesture recognizer for CJK.
25675        https://bugs.webkit.org/show_bug.cgi?id=131493
25676        <rdar://problem/16319583>
25677
25678        Reviewed by Benjamin Poulain.
25679
25680        On iOS it is possible with a gesture to change the selection
25681        within the marked text.
25682        Changing the selection triggers also the update of the inline candidates
25683        over the keyboard area.
25684        The patch adds the logic to decide whether the gesture can begin
25685        as well as the code for the movement of
25686        the selection within the marked range.
25687        The gesture is allowed to start within a given radius from the marked
25688        area.
25689
25690        * Shared/InteractionInformationAtPosition.cpp:
25691        (WebKit::InteractionInformationAtPosition::encode):
25692        (WebKit::InteractionInformationAtPosition::decode):
25693        * Shared/InteractionInformationAtPosition.h:
25694        (WebKit::InteractionInformationAtPosition::InteractionInformationAtPosition):
25695        * Shared/ios/GestureTypes.h:
25696        * UIProcess/WebPageProxy.cpp:
25697        (WebKit::WebPageProxy::editorStateChanged):
25698        * UIProcess/ios/WKContentViewInteraction.mm:
25699        (-[WKContentView pointIsNearMarkedText:]):
25700        (toGestureType):
25701        (toUIWKGestureType):
25702        * WebProcess/WebPage/ios/WebPageIOS.mm:
25703        (WebKit::WebPage::selectWithGesture):
25704        (WebKit::WebPage::getPositionInformation):
25705
257062014-04-10  Enrica Casucci  <enrica@apple.com>
25707
25708        Unreviewed iOS build fix after http://trac.webkit.org/changeset/167074
25709
25710        * UIProcess/WebPageProxy.cpp:
25711        (WebKit::WebPageProxy::WebPageProxy):
25712
257132014-04-10  Alexey Proskuryakov  <ap@apple.com>
25714
25715        Gtk build fix.
25716
25717        * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::performDragControllerAction):
25718
257192014-04-09  Alexey Proskuryakov  <ap@apple.com>
25720
25721        Eliminate DragSession structure
25722        https://bugs.webkit.org/show_bug.cgi?id=131465
25723
25724        Reviewed by Benjamin Poulain.
25725
25726        * Scripts/webkit2/messages.py:
25727        (struct_or_class):
25728        * Shared/WebCoreArgumentCoders.cpp:
25729        (IPC::ArgumentCoder<DragSession>::encode): Deleted.
25730        (IPC::ArgumentCoder<DragSession>::decode): Deleted.
25731        * Shared/WebCoreArgumentCoders.h:
25732        * UIProcess/API/mac/WKView.mm:
25733        (-[WKView draggingEntered:]):
25734        (-[WKView draggingUpdated:]):
25735        * UIProcess/WebPageProxy.cpp:
25736        (WebKit::WebPageProxy::WebPageProxy):
25737        (WebKit::WebPageProxy::didPerformDragControllerAction):
25738        * UIProcess/WebPageProxy.h:
25739        (WebKit::WebPageProxy::currentDragOperation):
25740        (WebKit::WebPageProxy::currentDragIsOverFileInput):
25741        (WebKit::WebPageProxy::currentDragNumberOfFilesToBeAccepted):
25742        (WebKit::WebPageProxy::resetCurrentDragInformation):
25743        (WebKit::WebPageProxy::dragSession): Deleted.
25744        (WebKit::WebPageProxy::resetDragSession): Deleted.
25745        * UIProcess/WebPageProxy.messages.in:
25746        * WebProcess/WebPage/WebPage.cpp:
25747        (WebKit::WebPage::performDragControllerAction):
25748
257492014-04-10  Martin Robinson  <mrobinson@igalia.com>
25750
25751        [GTK] LayerTreeHostGtk is creating a software scene graph
25752        https://bugs.webkit.org/show_bug.cgi?id=131471
25753
25754        Reviewed by Sergio Villar Senin.
25755
25756        At some point, a regression was introduced that sent the GTK+ WebKit2 scenegraph down the
25757        software route. The rest of the file depends on the fact that the TextureMapper is the OpenGL
25758        variety, so we should force that explicitly. This is causing crashes locally and soon we
25759        should be able to test this directly.
25760
25761        * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
25762        (WebKit::LayerTreeHostGtk::initialize): Force the use of the OpenGL scenegraph.
25763
257642014-04-09  Jeremy Jones  <jeremyj@apple.com>
25765
25766        Fix build failure when #if USE(XPC_SERVICES) is false.
25767        https://bugs.webkit.org/show_bug.cgi?id=131474
25768
25769        Reviewed by Dan Bernstein.
25770
25771        Fix build. 
25772
25773        * UIProcess/ios/WebProcessProxyIOS.mm:
25774        Add #if around BackgroundTabFlags ForegroundTabFlags to prevent unused variable error.
25775
257762014-04-09  Ryuan Choi  <ryuan.choi@samsung.com>
25777
25778        [EFL][WK2] Add API to set preferred languages
25779        https://bugs.webkit.org/show_bug.cgi?id=131435
25780
25781        Reviewed by Gyuyoung Kim.
25782
25783        Add ewk_context_preferred_languages_set to change the list of "Accept-Language".
25784        This list is used to receive alternative version of contents, which is related
25785        to specified languages from the contents provider.
25786
25787        * UIProcess/API/efl/ewk_context.cpp:
25788        (ewk_context_preferred_languages_set):
25789        * UIProcess/API/efl/ewk_context.h:
25790        * UIProcess/API/efl/tests/test_ewk2_context.cpp:
25791        (serverCallback):
25792        (TEST_F): Added test case for ewk_context_preferred_languages_set
25793
257942014-04-09  Benjamin Poulain  <bpoulain@apple.com>
25795
25796        [iOS][WK2] Add the initial WebProcess handling of animated resize for rotation
25797        https://bugs.webkit.org/show_bug.cgi?id=131469
25798
25799        Reviewed by Tim Horton.
25800
25801        Add the basic handling of dynamic resize from the WebProcess.
25802
25803        On animated resize, the UIProcess decides new target rects and scale. The information
25804        is then passed to the WebProcess to update the content.
25805
25806        For various reason, the target rects and scale computed by the UIProcess can be incorrect
25807        (for example, if viewport constraints limit the scale).
25808
25809        In those cases, the WebProcess has all the information to compute a better target. This patch
25810        adds such a basic update mechanism.
25811
25812        Once the new values are computed, they are sent back to the UIProcess. If the rotation animation
25813        is still ongoing, we do not want mess with it. What we do is set a temporary transform on the subviews
25814        and restore the real value after the animation. The key is to have the two matrix multiplying to the end
25815        value so that there is no visual difference.
25816
25817        * UIProcess/API/Cocoa/WKWebView.mm:
25818        (-[WKWebView _didCommitLayerTree:WebKit::]):
25819        (-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:]):
25820        (setViewportConfigurationMinimumLayoutSize):
25821        (-[WKWebView _frameOrBoundsChanged]):
25822        (-[WKWebView _setMinimumLayoutSizeOverride:]):
25823        (-[WKWebView _beginAnimatedResizeToSize:obscuredInsets:minimumLayoutSizeOverride:]):
25824        (-[WKWebView _endAnimatedResize]):
25825        * UIProcess/API/Cocoa/WKWebViewInternal.h:
25826        * UIProcess/API/ios/WKViewIOS.mm:
25827        (-[WKView _frameOrBoundsChanged]):
25828        (-[WKView setMinimumLayoutSizeOverride:]):
25829        * UIProcess/PageClient.h:
25830        * UIProcess/WebPageProxy.h:
25831        * UIProcess/WebPageProxy.messages.in:
25832        * UIProcess/ios/PageClientImplIOS.h:
25833        * UIProcess/ios/PageClientImplIOS.mm:
25834        (WebKit::PageClientImpl::dynamicViewportUpdateChangedTarget):
25835        * UIProcess/ios/WKContentView.h:
25836        * UIProcess/ios/WKContentView.mm:
25837        (-[WKContentView setMinimumLayoutSize:]): Deleted.
25838        * UIProcess/ios/WebPageProxyIOS.mm:
25839        (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
25840        (WebKit::WebPageProxy::dynamicViewportUpdateChangedTarget):
25841        * WebProcess/WebPage/WebPage.h:
25842        * WebProcess/WebPage/WebPage.messages.in:
25843        * WebProcess/WebPage/ios/WebPageIOS.mm:
25844        (WebKit::WebPage::dynamicViewportSizeUpdate):
25845
258462014-04-09  Martin Robinson  <mrobinson@igalia.com>
25847
25848        Try to fix the GTK+ build after resetDragOperation rename
25849
25850        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
25851        (webkitWebViewBaseDragDataReceived): Rename resetDragOperation to resetDragSession.
25852        (dragExitedCallback): Ditto.
25853
258542014-04-09  Jeremy Jones  <jeremyj@apple.com>
25855
25856        Enable fullscreen captions selection
25857        https://bugs.webkit.org/show_bug.cgi?id=131069
25858
25859        Reviewed by Eric Carlson.
25860
25861        Enable media selection in fullscreen.
25862        setLegibleMediaSelectionOptions/setAudioMediaSelectionOptions provide a list of options.
25863        selectAudioMediaOption/selectLegibleMediaOption change the selected option.
25864
25865        * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
25866        Add selectAudioMediaOption/selectLegibleMediaOption
25867
25868        * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
25869        Add selectAudioMediaOption/selectLegibleMediaOption
25870
25871        * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
25872        (WebKit::WebVideoFullscreenManagerProxy::selectAudioMediaOption):
25873        Add selectAudioMediaOption
25874
25875        (WebKit::WebVideoFullscreenManagerProxy::selectLegibleMediaOption):
25876        Add selectLegibleMediaOption
25877
25878        * WebProcess/ios/WebVideoFullscreenManager.h:
25879        Add setAudioMediaSelectionOptions/setLegibleMediaSelectionOptions
25880
25881        * WebProcess/ios/WebVideoFullscreenManager.messages.in:
25882        Add setAudioMediaSelectionOptions/setLegibleMediaSelectionOptions
25883
25884        * WebProcess/ios/WebVideoFullscreenManager.mm:
25885        (WebKit::WebVideoFullscreenManager::setAudioMediaSelectionOptions):
25886        Add setAudioMediaSelectionOptions
25887
25888        (WebKit::WebVideoFullscreenManager::setLegibleMediaSelectionOptions):
25889        Add setLegibleMediaSelectionOptions
25890
258912014-04-09  Alexey Proskuryakov  <ap@apple.com>
25892
25893        Rename some dragging functions
25894        https://bugs.webkit.org/show_bug.cgi?id=131460
25895
25896        Reviewed by Tim Horton.
25897
25898        Renamed performDrag to performDragOperation.
25899
25900        Also renamed resetDragOperation to resetDragSession, because it's m_dragSession
25901        that it resets.
25902
25903        * Shared/DragControllerAction.h:
25904        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
25905        (webkitWebViewBaseDragDrop):
25906        * UIProcess/API/mac/WKView.mm:
25907        (-[WKView draggingEntered:]):
25908        (-[WKView draggingExited:]):
25909        (-[WKView performDragOperation:]):
25910        * UIProcess/WebPageProxy.cpp:
25911        (WebKit::WebPageProxy::performDragOperation):
25912        (WebKit::WebPageProxy::performDrag): Deleted.
25913        * UIProcess/WebPageProxy.h:
25914        (WebKit::WebPageProxy::resetDragSession):
25915        (WebKit::WebPageProxy::resetDragOperation): Deleted.
25916        * WebProcess/WebPage/WebPage.cpp:
25917        (WebKit::WebPage::performDragControllerAction):
25918
259192014-04-09  Gavin Barraclough  <baraclough@apple.com>
25920
25921        Update SPI for managing tabs
25922        https://bugs.webkit.org/show_bug.cgi?id=131453
25923
25924        Reviewed by Alexey Proskuryakov.
25925
25926        * Configurations/WebKit2.xcconfig:
25927            - added AssertionServices
25928        * UIProcess/WebProcessProxy.h:
25929            - added m_assertion, m_assertionState.
25930        * UIProcess/ios/WebProcessProxyIOS.mm:
25931        (WebKit::WebProcessProxy::updateProcessState):
25932            - create BKSProcessAssertion to take an assertion.
25933
259342014-04-09  Enrica Casucci  <enrica@apple.com>
25935
25936        WK2: Dictated words disappear after being inserted.
25937        https://bugs.webkit.org/show_bug.cgi?id=131458
25938        <rdar://problem/16395011>
25939
25940        Reviewed by Benjamin Poulain.
25941
25942        The dictation engine treats selected text as text to be
25943        removed. We need to ensure that the range selected to insert the
25944        new text isn't reflected in the UI process until we are done
25945        inserting the text.
25946
25947        * WebProcess/WebPage/ios/WebPageIOS.mm:
25948        (WebKit::WebPage::replaceDictatedText):
25949
259502014-04-09  Brady Eidson  <beidson@apple.com>
25951
25952        Don't offer "contact" actions in telephone number menus
25953        <rdar://problem/16556907> and https://bugs.webkit.org/show_bug.cgi?id=131451
25954
25955        Reviewed by Tim Horton.
25956
25957        * UIProcess/mac/WebPageProxyMac.mm:
25958        (WebKit::WebPageProxy::showTelephoneNumberMenu): Skip actions that have to do with contacts,
25959          and skip separators too!
25960
259612014-04-09  Carlos Garcia Campos  <cgarcia@igalia.com>
25962
25963        Unreviewed. Fix GTK+ build after r166975.
25964
25965        Do not use WebPage removed API to fix the build. Page overlays are
25966        no broken, see https://bugs.webkit.org/show_bug.cgi?id=131433.
25967
25968        * WebProcess/WebPage/DrawingAreaImpl.cpp:
25969        (WebKit::DrawingAreaImpl::display):
25970        * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
25971        (WebKit::LayerTreeHostGtk::initialize):
25972        (WebKit::LayerTreeHostGtk::paintContents):
25973
259742014-04-09  Carlos Garcia Campos  <cgarcia@igalia.com>
25975
25976        Unreviewed. Fix GTK+ build after r166965.
25977
25978        * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
25979        (WebKit::WebDragClient::startDrag): Rename Clipboard to DataTransfer.
25980
259812014-04-08  Hyowon Kim  <hw1008.kim@samsung.com>
25982
25983        Fix EFL Build errors since r166975.
25984        https://bugs.webkit.org/show_bug.cgi?id=131421
25985
25986        Reviewed by Gyuyoung Kim.
25987
25988        This patch is just for fixing EFL build errors.
25989        The page overlay functionality is not working yet.
25990
25991        * CMakeLists.txt:
25992        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
25993        (WebKit::CoordinatedDrawingArea::display):
25994        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
25995        (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
25996        (WebKit::CoordinatedLayerTreeHost::paintLayerContents):
25997        * WebProcess/WebPage/PageOverlayController.cpp:
25998        * WebProcess/WebPage/TapHighlightController.cpp:
25999        (WebKit::TapHighlightController::hideHighlight):
26000
260012014-04-08  Jon Lee  <jonlee@apple.com>
26002
26003        Turn MSE on by default
26004        https://bugs.webkit.org/show_bug.cgi?id=131313
26005        <rdar://problem/16525223>
26006
26007        Reviewed by Jer Noble.
26008
26009        * Configurations/FeatureDefines.xcconfig:
26010        * Shared/WebPreferencesStore.h: Set default to true.
26011        * UIProcess/API/C/WKPreferencesRefPrivate.h:
26012
260132014-04-08  Ryosuke Niwa  <rniwa@webkit.org>
26014
26015        Fix the typo in the previous commit.
26016
26017        * WebProcess/WebPage/WebPage.cpp:
26018        (WebKit::WebPage::close):
26019
260202014-04-08  Ryosuke Niwa  <rniwa@webkit.org>
26021
26022        REGRESSION(r 166890): Crash inside WebKit::WebEditorClient::textFieldDidEndEditing
26023        https://bugs.webkit.org/show_bug.cgi?id=131409
26024
26025        Reviewed by Anders Carlsson.
26026
26027        Create an empty API::InjectedBundle::FormClient to avoid crashing inside
26028        m_mainFrame->coreFrame()->loader().detachFromParent().
26029
26030        * WebProcess/WebPage/WebPage.cpp:
26031        (WebKit::WebPage::close):
26032
260332014-04-08  Tim Horton  <timothy_horton@apple.com>
26034
26035        Unify and factor out page overlay implementations
26036        https://bugs.webkit.org/show_bug.cgi?id=131353
26037
26038        Reviewed by Anders Carlsson.
26039
26040        * WebProcess/WebPage/PageOverlayController.cpp:
26041        (WebKit::PageOverlayController::uninstallPageOverlay):
26042        Don't turn fast scrolling back off unless the last overlay is removed.
26043
260442014-04-08  Anders Carlsson  <andersca@apple.com>
26045
26046        Add a WKNavigationAction property indicating whether it resulted from processing a user gesture
26047        https://bugs.webkit.org/show_bug.cgi?id=131405
26048        <rdar://problem/16535453>
26049
26050        Reviewed by Tim Horton.
26051
26052        * Shared/NavigationActionData.cpp:
26053        (WebKit::NavigationActionData::NavigationActionData):
26054        (WebKit::NavigationActionData::encode):
26055        (WebKit::NavigationActionData::decode):
26056        * Shared/NavigationActionData.h:
26057        * UIProcess/API/Cocoa/WKNavigationActionInternal.h:
26058        * UIProcess/API/Cocoa/WKNavigationActionPrivate.h:
26059        * UIProcess/Cocoa/NavigationState.mm:
26060        (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
26061        * UIProcess/Cocoa/UIDelegate.mm:
26062        (WebKit::UIDelegate::UIClient::createNewPage):
26063        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
26064        (WebKit::WebChromeClient::createWindow):
26065        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
26066        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
26067        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
26068
260692014-04-08  Tim Horton  <timothy_horton@apple.com>
26070
26071        Unify and factor out page overlay implementations
26072        https://bugs.webkit.org/show_bug.cgi?id=131353
26073
26074        Reviewed by Anders Carlsson.
26075
26076        Bring all of the PageOverlay code together in a single cross-platform
26077        PageOverlayController, including hit-testing code from WebPage and painting
26078        and layer-tree manipulation code from the DrawingArea.
26079
26080        This also makes all PageOverlays a single GraphicsLayer tree which can be
26081        flushed and plugged into any DrawingArea in a straightforward manner.
26082        We no longer have to watch for individual layers flipping into/out of tiling,
26083        because they're hidden underneath the root PageOverlay GraphicsLayer.
26084        Additionally, because GraphicsLayer is cross-platform, we can share
26085        all of the fairly trivial but oft-repeated overlay management code.
26086
26087        * WebKit2.xcodeproj/project.pbxproj:
26088        * WebProcess/WebPage/PageOverlayController.cpp: Added.
26089        * WebProcess/WebPage/PageOverlayController.h: Added.
26090        (WebKit::PageOverlayController::rootLayer):
26091        Add PageOverlayController.
26092
26093        * WebProcess/WebPage/DrawingArea.h:
26094        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
26095        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
26096        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
26097        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
26098        Remove PageOverlay-related code from the DrawingAreas.
26099
26100        * WebProcess/WebPage/PageOverlay.cpp:
26101        (WebKit::PageOverlay::setNeedsDisplay):
26102        (WebKit::PageOverlay::fadeAnimationTimerFired):
26103        (WebKit::PageOverlay::clear):
26104        * WebProcess/WebPage/PageOverlay.h:
26105        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
26106        (WebKit::WebFrameLoaderClient::didChangeScrollOffset):
26107        * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
26108        (-[WKAccessibilityWebPageObject accessibilityParameterizedAttributeNames]):
26109        (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
26110        Use PageOverlayController instead of the DrawingArea/WebPage to manipulate page overlays.
26111
26112        * WebProcess/WebPage/WebPage.cpp:
26113        * WebProcess/WebPage/WebPage.h:
26114        (WebKit::WebPage::pageOverlayController):
26115        Remove PageOverlay-related code from WebPage.
26116
26117        * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
26118        * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
26119        (WebKit::RemoteLayerTreeContext::outOfTreeLayerWasAdded): Deleted.
26120        (WebKit::RemoteLayerTreeContext::outOfTreeLayerWillBeRemoved): Deleted.
26121        (WebKit::RemoteLayerTreeContext::flushOutOfTreeLayers): Deleted.
26122        Remove the no-longer-necessary out-of-tree layer code.
26123
26124        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
26125        (WKBundlePageInstallPageOverlayWithAnimation):
26126        (WKBundlePageUninstallPageOverlayWithAnimation):
26127        * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
26128        (WebKit::WebInspectorClient::highlight):
26129        (WebKit::WebInspectorClient::hideHighlight):
26130        * WebProcess/WebPage/FindController.cpp:
26131        (WebKit::FindController::updateFindUIAfterPageScroll):
26132        (WebKit::FindController::hideFindUI):
26133        * WebProcess/WebPage/TelephoneNumberOverlayController.cpp:
26134        (WebKit::TelephoneNumberOverlayController::createOverlayIfNeeded):
26135        (WebKit::TelephoneNumberOverlayController::destroyOverlay):
26136        Make use of the FadeMode enum.
26137
261382014-04-08  Anders Carlsson  <andersca@apple.com>
26139
26140        Change WebPageProxy::CreateNewPage to take a NavigationActionData object
26141        https://bugs.webkit.org/show_bug.cgi?id=131401
26142
26143        Reviewed by Dan Bernstein.
26144
26145        * UIProcess/API/APIUIClient.h:
26146        (API::UIClient::createNewPage):
26147        * UIProcess/API/C/WKPage.cpp:
26148        (WKPageSetPageUIClient):
26149        * UIProcess/API/Cocoa/WKNavigationAction.mm:
26150        (toWKNavigationType):
26151        * UIProcess/API/Cocoa/WKNavigationActionInternal.h:
26152        * UIProcess/Cocoa/NavigationState.mm:
26153        (WebKit::toWKNavigationType): Deleted.
26154        * UIProcess/Cocoa/UIDelegate.h:
26155        * UIProcess/Cocoa/UIDelegate.mm:
26156        (WebKit::UIDelegate::UIClient::createNewPage):
26157        * UIProcess/WebPageProxy.cpp:
26158        (WebKit::WebPageProxy::createNewPage):
26159        * UIProcess/WebPageProxy.h:
26160        * UIProcess/WebPageProxy.messages.in:
26161        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
26162        (WebKit::WebChromeClient::createWindow):
26163
261642014-04-08  Anders Carlsson  <andersca@apple.com>
26165
26166        Fix build.
26167
26168        * WebKit2Prefix.h:
26169
261702014-04-08  Anders Carlsson  <andersca@apple.com>
26171
26172        Use an explicit class when decoding individual bundle parameters
26173        https://bugs.webkit.org/show_bug.cgi?id=131392
26174        <rdar://problem/16213914>
26175
26176        Reviewed by Dan Bernstein.
26177
26178        * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
26179        (WebKit::InjectedBundle::setBundleParameter):
26180
261812014-04-08  Anders Carlsson  <andersca@apple.com>
26182
26183        Move a Mountain Lion declaration to the WebKit2 prefix header
26184        https://bugs.webkit.org/show_bug.cgi?id=131391
26185
26186        Reviewed by Tim Horton.
26187
26188        * UIProcess/API/Cocoa/WKProcessPool.mm:
26189        * UIProcess/ios/PageClientImplIOS.mm:
26190        * UIProcess/mac/WebContextMac.mm:
26191        * WebKit2Prefix.h:
26192        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
26193        * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
26194
261952014-04-08  Antti Koivisto  <antti@apple.com>
26196
26197        Remove exposedRect from TileController
26198        https://bugs.webkit.org/show_bug.cgi?id=131378
26199
26200        Reviewed by Simon Fraser.
26201
26202        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
26203        (WebKit::RemoteLayerTreeDrawingArea::updateScrolledExposedRect):
26204        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
26205        (WebKit::TiledCoreAnimationDrawingArea::updateScrolledExposedRect):
26206        
26207            Update the visible rect for pageOverlayLayers by calling flushCompositingState. This way
26208            tile controller visible rect updates always happens via compositing flush (we assert
26209            for this in TileController::setVisibleRect).
26210
262112014-04-08  Alexey Proskuryakov  <ap@apple.com>
26212
26213        Rename Clipboard to DataTransfer
26214        https://bugs.webkit.org/show_bug.cgi?id=131371
26215
26216        Reviewed by Anders Carlsson.
26217
26218        * WebProcess/WebCoreSupport/WebDragClient.cpp:
26219        (WebKit::WebDragClient::willPerformDragSourceAction):
26220        (WebKit::WebDragClient::startDrag):
26221        * WebProcess/WebCoreSupport/WebDragClient.h:
26222        * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
26223        (WebKit::WebDragClient::startDrag):
26224
262252014-04-08  Alexey Proskuryakov  <ap@apple.com>
26226
26227        FlagsChanged events are not delivered to input methods when using async text input
26228        https://bugs.webkit.org/show_bug.cgi?id=131383
26229
26230        Reviewed by Anders Carlsson.
26231
26232        * UIProcess/API/mac/WKView.mm: (-[WKView _interpretKeyEvent:completionHandler:]):
26233        The early return is no longer needed.
26234
262352014-04-08  Tim Horton  <timothy_horton@apple.com>
26236
26237        WebKit2 View Gestures (Swipe): Swipe-start hysteresis
26238        https://bugs.webkit.org/show_bug.cgi?id=127393
26239        <rdar://problem/15876822>
26240
26241        Reviewed by Anders Carlsson.
26242
26243        We shouldn't start a swipe immediately upon very small scrolls in the correct direction,
26244        because we don't want to get the user trapped in a swipe when they want to scroll.
26245
26246        We'll accumulate the scroll deltas and wait until the user has scrolled at least 15px horizontally.
26247        In addition, we'll drop the swipe completely if any event has a vertical delta equal to half (or more)
26248        of the horizontal delta.
26249
26250        * UIProcess/mac/ViewGestureController.h:
26251        * UIProcess/mac/ViewGestureControllerMac.mm:
26252        (WebKit::ViewGestureController::ViewGestureController):
26253        (WebKit::ViewGestureController::deltaIsSufficientToBeginSwipe):
26254        (WebKit::ViewGestureController::handleScrollWheelEvent):
26255        (WebKit::ViewGestureController::wheelEventWasNotHandledByWebCore):
26256
262572014-04-07  Jer Noble  <jer.noble@apple.com>
26258
26259        [Mac][WK2] Videos do not have access to session cookies
26260        https://bugs.webkit.org/show_bug.cgi?id=129687
26261
26262        Reviewed by Eric Carlson.
26263
26264        Update the CookieStorageShim to track changes in underlying networking stack.
26265
26266        * Shared/mac/CookieStorageShim.mm:
26267        (WebKit::CookieStorageShim::initialize):
26268        (-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):
26269
262702014-04-08  Dan Bernstein  <mitz@apple.com>
26271
26272        [Cocoa] Add a way to tell whether a WKWebProcessPlugInNodeHandle is a text-type HTML input element
26273        https://bugs.webkit.org/show_bug.cgi?id=131374
26274
26275        Reviewed by Anders Carlsson.
26276
26277        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h:
26278        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
26279        (-[WKWebProcessPlugInNodeHandle isTextField]): Added this getter. Calls
26280        InjectedBundleNodeHandle::isTextField.
26281        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
26282        (WebKit::InjectedBundleNodeHandle::isTextField): Added. Uses
26283        WebCore::HTMLInputElement::isText, which is consistent with what
26284        WebChromeClient::focusedElementChanged uses to decide whether to call didFocusTextField.
26285        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
26286
262872014-04-08  Dan Bernstein  <mitz@apple.com>
26288
26289        [Cocoa] Add a _certificateChain property to WKWebProcessPlugInFrame
26290        https://bugs.webkit.org/show_bug.cgi?id=131370
26291
26292        Reviewed by Anders Carlsson.
26293
26294        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
26295        (-[WKWebProcessPlugInFrame _certificateChain]): Added this getter, which uses the new
26296        WebFrame::certificateInfo.
26297        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h:
26298        * WebProcess/WebPage/WebFrame.cpp:
26299        (WebKit::WebFrame::certificateInfo): Added this getter.
26300        * WebProcess/WebPage/WebFrame.h:
26301
263022014-04-08  Dan Bernstein  <mitz@apple.com>
26303
26304        [Cocoa] Add a bundle form delegate method corresponding to textDidChangeInTextField
26305        https://bugs.webkit.org/show_bug.cgi?id=131369
26306
26307        Reviewed by Anders Carlsson.
26308
26309        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Declared
26310        new delegate method.
26311        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
26312        (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Added an override
26313        of API::InjectedBundle::FormClient::textDidChangeInTextField which calls the new delegate
26314        method.
26315
263162014-04-08  Dan Bernstein  <mitz@apple.com>
26317
26318        [Cocoa] Add WKFormDelegate
26319        https://bugs.webkit.org/show_bug.cgi?id=131343
26320
26321        Reviewed by Anders Carlsson.
26322
26323        * UIProcess/API/Cocoa/WKWebView.mm:
26324        (-[WKWebView _formDelegate]): Added this accessor.
26325        (-[WKWebView _setFormDelegate:]): Ditto.
26326        * UIProcess/API/Cocoa/WKWebViewPrivate.h: Declared _formDelegate property.
26327
26328        * UIProcess/API/Cocoa/_WKFormDelegate.h: Added.
26329
26330        * UIProcess/API/Cocoa/_WKFormInputSession.h: Added.
26331
26332        * UIProcess/ios/WKContentView.h: Moved _webView ivar into the @interface…
26333        * UIProcess/ios/WKContentView.mm: …from the @implementation.
26334
26335        * UIProcess/ios/WKContentViewInteraction.h: Added _formInputSession ivar and
26336        formAccessoryView property.
26337        * UIProcess/ios/WKContentViewInteraction.mm:
26338        (-[WKFormInputSession initWithContentView:userObject:]): Added.
26339        (-[WKFormInputSession dealloc]): Added.
26340        (-[WKFormInputSession userObject]): Added.
26341        (-[WKFormInputSession isValid]): Added.
26342        (-[WKFormInputSession accessoryViewCustomButtonTitle]): Added.
26343        (-[WKFormInputSession setAccessoryViewCustomButtonTitle:]): Added.
26344        (-[WKFormInputSession invalidate]): Added.
26345        (-[WKContentView cleanupInteraction]): Invalidate and release the input session.
26346        (-[WKContentView formAccessoryView]): Added this accessor.
26347        (-[WKContentView _startAssistingNode:userObject:]): Create an input session and message the
26348        form delegate.
26349        (-[WKContentView _stopAssistingNode]): Invalidate and release the input session.
26350
26351        * WebKit2.xcodeproj/project.pbxproj: Added references to new files.
26352
26353        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Added
26354        comment.
26355
263562014-04-08  Daniel Bates  <dabates@apple.com>
26357
26358        Fallback to default storage session when there isn't a valid session ID
26359        https://bugs.webkit.org/show_bug.cgi?id=131326
26360        <rdar://problem/16231679>
26361
26362        Reviewed by Alexey Proskuryakov.
26363
26364        Fixes and issue where we may use the wrong storage session after disabling
26365        a private browsing session.
26366
26367        Currently WebKit1 and WebKit2 without NetworkProcess assume that there
26368        is always a non-null private browsing storage session so long as the page
26369        has a non-default session ID. Instead we should only use the private browsing
26370        storage session when it's non-null and the page has a non-default session ID;
26371        otherwise, we should use the default storage session. This change will make
26372        the behavior in WebKit1 and WebKit2 without NetworkProcess consistent with
26373        the behavior in WebKit2 with NetworkProcess.
26374
26375        * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
26376        (WebKit::WebFrameNetworkingContext::storageSession):
26377
263782014-04-08  Youenn Fablet  <youenn.fablet@crf.canon.fr>
26379
26380        [SOUP] Control cookie management according ResourceRequest.allowCookies()
26381        https://bugs.webkit.org/show_bug.cgi?id=131026
26382
26383        Reviewed by Sergio Villar Senin.
26384
26385        Added setting of accept cookies policy for the current soup network session cookie jar and all tracked sessions.
26386        Moved the implementation of cookie policy setting from WebCookieManager to WebFrameNetworkingContext.
26387
26388        * WebProcess/Cookies/soup/WebCookieManagerSoup.cpp:
26389        (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy): Moved implementation to WebCookieManager::platformSetHTTPCookieAcceptPolicy.
26390        * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
26391        (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts): Moved implementation from WebCookieManager::platformSetHTTPCookieAcceptPolicy and set the cookie jar accept policy to the cookie jars of all sessions in addition to the default cookie jar.
26392        * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h: Added method prototype.
26393
263942014-04-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
26395
26396        [WK2] Fix unused parameter compile warning
26397        https://bugs.webkit.org/show_bug.cgi?id=131260
26398
26399        Reviewed by Darin Adler.
26400
26401        Remove the arguments name without UNUSED_PARAM().
26402
26403        * UIProcess/API/APIDownloadClient.h:
26404        (API::DownloadClient::didReceiveData):
26405        (API::DownloadClient::shouldDecodeSourceDataOfMIMEType):
26406        (API::DownloadClient::decideDestinationWithSuggestedFilename):
26407        (API::DownloadClient::didCreateDestination):
26408        * UIProcess/API/APIFindClient.h:
26409        (API::FindClient::didCountStringMatches):
26410        (API::FindClient::didFindString):
26411        * UIProcess/API/APIHistoryClient.h:
26412        (API::HistoryClient::didPerformClientRedirect):
26413        (API::HistoryClient::didPerformServerRedirect):
26414        (API::HistoryClient::didUpdateHistoryTitle):
26415        * UIProcess/API/APILoaderClient.h:
26416        (API::LoaderClient::didStartProvisionalLoadForFrame):
26417        (API::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
26418        (API::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
26419        (API::LoaderClient::didCommitLoadForFrame):
26420        (API::LoaderClient::didFinishLoadForFrame):
26421        (API::LoaderClient::didFailLoadWithErrorForFrame):
26422        (API::LoaderClient::didChangeBackForwardList):
26423        * UIProcess/API/APIPolicyClient.h:
26424        (API::PolicyClient::decidePolicyForNavigationAction):
26425        (API::PolicyClient::decidePolicyForNewWindowAction):
26426        (API::PolicyClient::decidePolicyForResponse):
26427        (API::PolicyClient::unableToImplementPolicy):
26428
264292014-04-07  Alexey Proskuryakov  <ap@apple.com>
26430
26431        [Mac] Allow com.apple.ViewBridge preferences reading in plug-in sandbox profile
26432        https://bugs.webkit.org/show_bug.cgi?id=131306
26433        <rdar://problem/16359865>
26434
26435        Reviewed by Sam Weinig.
26436
26437        * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: Do it.
26438
264392014-04-07  Stephanie Lewis  <slewis@apple.com>
26440
26441        Crash in com.apple.WebKit.Plugin.Development at com.apple.WebKit2: WebKit::PluginControllerProxy::pluginInstanceID
26442        <rdar://problem/16479432>
26443        https://bugs.webkit.org/show_bug.cgi?id=131203
26444
26445        Reviewed by Geoff Garen.
26446
26447        pluginController was being removed before accessing the pluginInstanceID.
26448
26449        * PluginProcess/WebProcessConnection.cpp:
26450        (WebKit::WebProcessConnection::removePluginControllerProxy):
26451
264522014-04-07  Dan Bernstein  <mitz@apple.com>
26453
26454        More Mountain Lion build fix.
26455
26456        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
26457
264582014-04-07  Benjamin Poulain  <bpoulain@apple.com>
26459
26460        [iOS][WK2] Implement the update of content offset on animated resize
26461        https://bugs.webkit.org/show_bug.cgi?id=131329
26462
26463        Reviewed by Tim Horton.
26464
26465        Compute a reasonable target offset on rotation. This goes in 3 steps:
26466        1) Move the page so that the center does not move during scaling.
26467        2) Limit the range to keep the page in scrollview without rubberbanding.
26468        3) The horizontal content stays the same but the vertical area changes. When on the top or bottom
26469           edge, stick to the edge.
26470
26471        The code is moved inside _beginAnimatedResizeToSize:obscuredInsets:minimumLayoutSizeOverride: so that we can tell
26472        the WebProcess where the scroll position will be at the end of the animation.
26473
26474        * UIProcess/API/Cocoa/WKWebView.mm:
26475        (-[WKWebView _frameOrBoundsChangedFrom:]):
26476        (-[WKWebView _updateVisibleContentRects]):
26477        (-[WKWebView _beginAnimatedResizeToSize:obscuredInsets:minimumLayoutSizeOverride:]):
26478
264792014-04-07  Dan Bernstein  <mitz@apple.com>
26480
26481        Mountain Lion build fix.
26482
26483        * UIProcess/ios/PageClientImplIOS.mm:
26484        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
26485
264862014-04-07  Anders Carlsson  <andersca@apple.com>
26487
26488        Handle decoding of nil invocation arguments
26489        https://bugs.webkit.org/show_bug.cgi?id=131335
26490        <rdar://problem/16528449>
26491
26492        Reviewed by Tim Horton.
26493
26494        * Shared/APIArray.h:
26495        Don't crash if the array element is null.
26496
264972014-04-07  Dan Bernstein  <mitz@apple.com>
26498
26499        Add bundle client function corresponding to startAssistingNode
26500        https://bugs.webkit.org/show_bug.cgi?id=131332
26501
26502        Reviewed by Anders Carlsson.
26503
26504        * UIProcess/PageClient.h: Added userData parameter to startAssistingNode.
26505
26506        * UIProcess/WebPageProxy.h: Added message decoder parameter to startAssistingNode.
26507        * UIProcess/WebPageProxy.messages.in: Added message decoder parameter to StartAssistingNode.
26508
26509        * UIProcess/ios/PageClientImplIOS.h: Updated startAssistingNode override.
26510        * UIProcess/ios/PageClientImplIOS.mm:
26511        (WebKit::PageClientImpl::startAssistingNode): Decode the user data into an NSObject and pass
26512        it on to the content view.
26513
26514        * UIProcess/ios/WKContentViewInteraction.h: Added userObject parameter to
26515        -_startAssitingNode:.
26516        * UIProcess/ios/WKContentViewInteraction.mm:
26517        (-[WKContentView _startAssistingNode:userObject:]): Added userObject parameter. We will pass
26518        it to a future delegate method.
26519
26520        * UIProcess/ios/WebPageProxyIOS.mm:
26521        (WebKit::WebPageProxy::startAssistingNode): Decode the user data and pass it to the client.
26522
26523        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Declared new
26524        delegate method.
26525        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
26526        (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Added an implementation
26527        of API::InjectedBundle::FormClient::willBeginInputSession which calls the new delegate
26528        method, and encodes the user object into userData.
26529
26530        * WebProcess/InjectedBundle/APIInjectedBundleFormClient.h:
26531        (API::InjectedBundle::FormClient::willBeginInputSession): Added willBeginInputSession.
26532
26533        * WebProcess/WebPage/ios/WebPageIOS.mm:
26534        (WebKit::WebPage::elementDidFocus): Call willBeginInputSession and send the user data along
26535        with the StartAssistingNode message to the UI process.
26536
265372014-04-07  Jinwoo Song  <jinwoo7.song@samsung.com>
26538
26539        Unreviewed. Fixing the EFL build.
26540
26541        * WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp: Include the Document header from WebCore
26542        to avoid operating on an incomplete type.
26543
265442014-04-07  Tim Horton  <timothy_horton@apple.com>
26545
26546        [iOS WebKit2] WKPDFView fades in tiles, PDFs load very flashily
26547        https://bugs.webkit.org/show_bug.cgi?id=131325
26548        <rdar://problem/16382960>
26549
26550        Reviewed by Anders Carlsson.
26551
26552        * UIProcess/API/Cocoa/WKWebView.mm:
26553        (-[WKWebView scrollViewDidScroll:]):
26554        Forward scroll events to the current custom content provider.
26555
26556        * UIProcess/Cocoa/WKWebViewContentProvider.h:
26557        Make content providers UIScrollViewDelegates (though we only forward didScroll for now).
26558
26559        * UIProcess/ios/WKPDFView.mm:
26560        (-[WKPDFView web_setContentProviderData:suggestedFilename:]):
26561        (-[WKPDFView web_setMinimumSize:]):
26562        (-[WKPDFView web_setScrollView:]):
26563        (-[WKPDFView scrollViewDidScroll:]):
26564        (-[WKPDFView _revalidateViews]):
26565        (-[WKPDFView _computePageAndDocumentFrames]):
26566        (-[WKPDFView layoutViews]): Deleted.
26567        Keep track of each UIPDFPage, UIPDFPageView, and its frame (in unscaled/document coordinates).
26568        Compute all the rects up front (and re-compute upon rotation, loading, etc.).
26569        When scrolling, find all the pages that intersect the view (inflated by 1.5x in each
26570        vertical direction), and ensure that pages that are inside that rect have
26571        UIPDFPageViews installed, and ones that are outside that rect do not.
26572        Use setUseBackingLayer to ensure that we have a low-resolution layer behind the
26573        tiled layer to avoid flashiness.
26574
265752014-04-07  Dan Bernstein  <mitz@apple.com>
26576
26577        Add API::InjectedBundle::FormClient
26578        https://bugs.webkit.org/show_bug.cgi?id=131317
26579
26580        Reviewed by Anders Carlsson.
26581
26582        * WebKit2.xcodeproj/project.pbxproj: Added reference to new file.
26583
26584        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
26585        (WKBundlePageSetFormClient):
26586        * WebProcess/InjectedBundle/API/c/WKBundlePageFormClient.h:
26587        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
26588        (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Changed to define and
26589        create a FormClient (which derives from API::InjectedBundle::FormClient and messages a
26590        delegate), and set it as the form client.
26591        (didFocusTextField): Deleted.
26592        (willSubmitForm): Deleted.
26593        (setUpFormClient): Deleted.
26594
26595        * WebProcess/InjectedBundle/APIInjectedBundleFormClient.h: Added.
26596        (API::InjectedBundle::FormClient::~FormClient):
26597        (API::InjectedBundle::FormClient::didFocusTextField):
26598        (API::InjectedBundle::FormClient::textFieldDidBeginEditing):
26599        (API::InjectedBundle::FormClient::textFieldDidEndEditing):
26600        (API::InjectedBundle::FormClient::textDidChangeInTextField):
26601        (API::InjectedBundle::FormClient::textDidChangeInTextArea):
26602        (API::InjectedBundle::FormClient::shouldPerformActionInTextField):
26603        (API::InjectedBundle::FormClient::willSubmitForm):
26604        (API::InjectedBundle::FormClient::willSendSubmitEvent):
26605        (API::InjectedBundle::FormClient::didAssociateFormControls):
26606        (API::InjectedBundle::FormClient::shouldNotifyOnFormChanges):
26607
26608        * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
26609        (WebKit::InjectedBundlePageFormClient::InjectedBundlePageFormClient): Added a constructor
26610        from WKBundlePageFormClientBase.
26611        (WebKit::toWKInputFieldActionType): Added helper to convert from internal enum to C SPI
26612        enum.
26613        (WebKit::InjectedBundlePageFormClient::shouldPerformActionInTextField): Use helper.
26614        * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h: Added inheritance from
26615        API::InjectedBundle::FormClient, marked overrides as such.
26616
26617        * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: Removed unused forward
26618        declarations.
26619
26620        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
26621        (WebKit::toInputFieldAction): Added helper to convert from C SPI enum to internal enum.
26622        (WebKit::WebEditorClient::doTextFieldCommandFromEvent): Use helper.
26623        (WebKit::WebEditorClient::textWillBeDeletedInTextField): Ditto.
26624
26625        * WebProcess/WebPage/WebPage.cpp:
26626        (WebKit::WebPage::WebPage): Initialize m_formClient member.
26627        (WebKit::WebPage::setInjectedBundleFormClient): Added. Updates m_formClient. 
26628        (WebKit::WebPage::close): Updated code to clear m_formClient.
26629        (WebKit::WebPage::initializeInjectedBundleFormClient): Deleted.
26630        * WebProcess/WebPage/WebPage.h:
26631        (WebKit::WebPage::injectedBundleFormClient): Updated return type.
26632
266332014-04-07  Hyowon Kim  <hw1008.kim@samsung.com>
26634
26635        Move to using std::unique_ptr for opengl, texmap, transforms and efl in WebCore/platform/graphics.
26636        https://bugs.webkit.org/show_bug.cgi?id=131276
26637
26638        Reviewed by Darin Adler.
26639
26640        Replace uses of OwnPtr for TextureMapper in LayerTreeHostGtk with std::unique_ptr.
26641
26642        * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
26643
266442014-04-07  Joseph Pecoraro  <pecoraro@apple.com>
26645
26646        Make Mac only parts of TelephoneNumberOverlayController PLATFORM(MAC).
26647
26648        Unreviewed build fix for r166881.
26649
26650        * UIProcess/WebPageProxy.h:
26651        * UIProcess/WebPageProxy.messages.in:
26652        * UIProcess/mac/WebPageProxyMac.mm:
26653        (WebKit::WebPageProxy::showTelephoneNumberMenu): Deleted.
26654        * WebProcess/WebPage/TelephoneNumberOverlayController.cpp:
26655        (WebKit::TelephoneNumberOverlayController::drawRect):
26656        (WebKit::TelephoneNumberOverlayController::mouseEvent):
26657        * WebProcess/WebPage/TelephoneNumberOverlayController.h:
26658        * WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
26659
266602014-04-07  Zan Dobersek  <zdobersek@igalia.com>
26661
26662        Unreviewed. Fixing the GTK build.
26663
26664        * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: Include the Document header from WebCore
26665        to avoid operating on an incomplete type.
26666        * WebProcess/WebPage/TapHighlightController.cpp: Include the RenderElement instead of RenderObject
26667        to make the RenderObject::style() inline accessible.
26668        * WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp: Include the Document header from WebCore
26669
266702014-04-07  Tim Horton  <timothy_horton@apple.com>
26671
26672        [iOS WebKit2] Make back-buffers purgeable when possible
26673        https://bugs.webkit.org/show_bug.cgi?id=131213
26674        <rdar://problem/15373906>
26675
26676        Reviewed by Simon Fraser.
26677
26678        We should make back-buffers volatile when their owning
26679        layer falls out of use (either stops being repainted or
26680        is unparented), as they are inherently recreatable.
26681
26682        * Shared/mac/RemoteLayerBackingStore.h:
26683        (WebKit::RemoteLayerBackingStore::volatility):
26684        (WebKit::RemoteLayerBackingStore::lastDisplayTime):
26685        Add storage and a getter for the backing store's last paint time.
26686        Add setter/getter for volatility of backing store.
26687        Add RemoteLayerTreeContext param to constructor.
26688
26689        * Shared/mac/RemoteLayerBackingStore.mm:
26690        (WebKit::RemoteLayerBackingStore::RemoteLayerBackingStore):
26691        (WebKit::RemoteLayerBackingStore::~RemoteLayerBackingStore):
26692        Inform the RemoteLayerTreeContext when backing store
26693        is created and destroyed. Since we only have a Context in
26694        the Web process, this will only happen there.
26695
26696        (WebKit::RemoteLayerBackingStore::encode):
26697        (WebKit::RemoteLayerBackingStore::decode):
26698        Move some assertions out of #else blocks which are preceded by returns.
26699
26700        (WebKit::RemoteLayerBackingStore::display):
26701        Update the last display time.
26702        If the backing store was volatile, make it non-volatile.
26703
26704        (WebKit::RemoteLayerBackingStore::setVolatility):
26705        Mark the relevant surfaces as volatile or not.
26706        setVolatility:
26707            - fails and returns false if any surfaces weren't marked
26708              volatile because they were in use
26709            - marks the whole backing store for repaint if the front
26710              surface was purged
26711
26712        * Shared/mac/RemoteLayerTreeTransaction.mm:
26713        (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
26714        (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
26715        Make it possible to remove the RemoteLayerBackingStore on layers
26716        that went from drawing contents to not drawing contents.
26717
26718        * UIProcess/ios/ViewGestureControllerIOS.mm:
26719        (WebKit::ViewGestureController::beginSwipeGesture):
26720        (WebKit::ViewGestureController::removeSwipeSnapshot):
26721        * UIProcess/mac/ViewGestureControllerMac.mm:
26722        (WebKit::ViewGestureController::beginSwipeGesture):
26723        (WebKit::ViewGestureController::removeSwipeSnapshot):
26724        * UIProcess/mac/ViewSnapshotStore.mm:
26725        (WebKit::ViewSnapshotStore::recordSnapshot):
26726        Adopt the new names from WebCore.
26727
26728        * WebKit2.xcodeproj/project.pbxproj:
26729        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
26730        (WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
26731        Clear the backing store if the layer doesn't want to draw contents anymore.
26732
26733        (WebKit::PlatformCALayerRemote::ensureBackingStore):
26734
26735        * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
26736        (WebKit::RemoteLayerTreeContext::backingStoreCollection):
26737        * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
26738        (WebKit::RemoteLayerTreeContext::RemoteLayerTreeContext):
26739        (WebKit::RemoteLayerTreeContext::backingStoreWasCreated):
26740        (WebKit::RemoteLayerTreeContext::backingStoreWillBeDestroyed):
26741        Keep a RemoteLayerBackingStoreCollection, which just keeps track
26742        of all backing store (even unparented) created for layers in a
26743        particular context. Forward backing store creation/deletion to it.
26744        Remove a unused m_rootLayer member.
26745
26746        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
26747        (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
26748        If any layers had backing store changes, start the timer
26749        on the RemoteLayerBackingStoreCollection that will mark them
26750        purgeable once they are no longer needed.
26751
26752        * Shared/mac/RemoteLayerBackingStoreCollection.mm:
26753        * Shared/mac/RemoteLayerBackingStoreCollection.h:
26754        Keep track of all backing store for our context.
26755        When the timer fires, run through the backing store, finding
26756        backing store that was last painted more than 1 second ago,
26757        and mark them purgeable. If there was more recently-painted
26758        backing store, let the timer fire again in another second;
26759        otherwise, stop it.
26760
267612014-04-07  Ryosuke Niwa  <rniwa@webkit.org>
26762
26763        Another build fix after r166879.
26764
26765        * WebProcess/WebPage/mac/WebPageMac.mm:
26766
267672014-04-07  Dan Bernstein  <mitz@apple.com>
26768
26769        Tried to fix the Mac build.
26770
26771        * WebProcess/Plugins/PDF/PDFPlugin.mm:
26772
267732014-04-07  Brady Eidson  <beidson@apple.com>
26774
26775        Handle clicks on DataDetectors UI for scanned phone numbers
26776        <rdar://problem/16379588> and https://bugs.webkit.org/show_bug.cgi?id=131309
26777
26778        Reviewed by Tim Horton.
26779
26780        WebContextMenuItemDatas never need to know about a ContextMenu, so remove that concept.
26781        Also add the concept of a selection handler for UIProcess-native menu items.
26782        * Shared/WebContextMenuItemData.cpp:
26783        (WebKit::WebContextMenuItemData::WebContextMenuItemData): 
26784        (WebKit::WebContextMenuItemData::encode):
26785        (WebKit::kitItems):
26786        (WebKit::WebContextMenuItemData::decode):
26787        * Shared/WebContextMenuItemData.h:
26788        (WebKit::WebContextMenuItemData::selectionHandler):
26789
26790        * UIProcess/WebPageProxy.cpp:
26791        (WebKit::WebPageProxy::showContextMenu):
26792        (WebKit::WebPageProxy::internalShowContextMenu): Make the decoder argument optional. Make consulting the client optional.
26793        * UIProcess/WebPageProxy.h:
26794        * UIProcess/WebPageProxy.messages.in:
26795        * UIProcess/mac/WebPageProxyMac.mm:
26796        (WebKit::WebPageProxy::showTelephoneNumberMenu):
26797
26798        * UIProcess/mac/WebContextMenuProxyMac.mm:
26799        (-[WKSelectionHandlerWrapper initWithSelectionHandler:std::]):
26800        (-[WKSelectionHandlerWrapper executeSelectionHandler]):
26801        (-[WKMenuTarget forwardContextMenuAction:]):
26802        (WebKit::nsMenuItemVector):
26803        (WebKit::WebContextMenuProxyMac::contextMenuItemSelected): If the represented object is a WKSelectionHandlerWrapper,
26804          execute the selection handler. Do nothing else.
26805
26806        Instead of getting rects from ranges, creating highlights, and storing those highlights,
26807        work in terms of a TelephoneNumberData object that wraps both a range and a highlight.
26808        This makes it easier to track where the mouse is down and to know what phone number we should act on when clicked.
26809        * WebProcess/WebPage/TelephoneNumberOverlayController.cpp:
26810        (WebKit::TelephoneNumberOverlayController::rectsForDrawing): Deleted.
26811        * WebProcess/WebPage/TelephoneNumberOverlayController.h:
26812        (WebKit::TelephoneNumberData::create):
26813        (WebKit::TelephoneNumberData::range):
26814        (WebKit::TelephoneNumberData::highlight):
26815        (WebKit::TelephoneNumberData::TelephoneNumberData):
26816        * WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
26817        (WebKit::TelephoneNumberOverlayController::drawRect):
26818        (WebKit::TelephoneNumberOverlayController::handleTelephoneClick): Pass the phone number text and the point to WebPage.
26819        (WebKit::TelephoneNumberOverlayController::mouseEvent):
26820        (WebKit::TelephoneNumberOverlayController::clearMouseDownInformation):
26821        (WebKit::TelephoneNumberOverlayController::clearHighlights):
26822
26823        * WebProcess/WebPage/WebContextMenu.cpp:
26824        (WebKit::WebContextMenu::menuItemsWithUserData):
26825
26826        * WebProcess/WebPage/WebPage.h:
26827        * WebProcess/WebPage/mac/WebPageMac.mm:
26828        (WebKit::WebPage::handleTelephoneNumberClick): Message the phone number and coordinate to the UIProcess.
26829
268302014-04-07  Dan Bernstein  <mitz@apple.com>
26831
26832        Introduce API::InjectedBundle::PageUIClient
26833        https://bugs.webkit.org/show_bug.cgi?id=131310
26834
26835        Reviewed by Anders Carlsson.
26836
26837        * WebKit2.xcodeproj/project.pbxproj: Added references to new files.
26838
26839        * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp: Added #include that
26840        became necessary.
26841
26842        * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h: Added.
26843        (API::InjectedBundle::PageUIClient::~PageUIClient):
26844        (API::InjectedBundle::PageUIClient::willAddMessageToConsole):
26845        (API::InjectedBundle::PageUIClient::willSetStatusbarText):
26846        (API::InjectedBundle::PageUIClient::willRunJavaScriptAlert):
26847        (API::InjectedBundle::PageUIClient::willRunJavaScriptConfirm):
26848        (API::InjectedBundle::PageUIClient::willRunJavaScriptPrompt):
26849        (API::InjectedBundle::PageUIClient::mouseDidMoveOverElement):
26850        (API::InjectedBundle::PageUIClient::pageDidScroll):
26851        (API::InjectedBundle::PageUIClient::shouldGenerateFileForUpload):
26852        (API::InjectedBundle::PageUIClient::generateFileForUpload):
26853        (API::InjectedBundle::PageUIClient::statusBarIsVisible):
26854        (API::InjectedBundle::PageUIClient::menuBarIsVisible):
26855        (API::InjectedBundle::PageUIClient::toolbarsAreVisible):
26856        (API::InjectedBundle::PageUIClient::didReachApplicationCacheOriginQuota):
26857        (API::InjectedBundle::PageUIClient::didExceedDatabaseQuota):
26858        (API::InjectedBundle::PageUIClient::plugInStartLabelTitle):
26859        (API::InjectedBundle::PageUIClient::plugInStartLabelSubtitle):
26860        (API::InjectedBundle::PageUIClient::plugInExtraStyleSheet):
26861        (API::InjectedBundle::PageUIClient::plugInExtraScript):
26862
26863        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
26864        (WKBundlePageSetUIClient): Changed to create an InjectedBundlePageUIClient and set it on
26865        the WebPage.
26866
26867        * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
26868        (WebKit::InjectedBundlePageUIClient::InjectedBundlePageUIClient): Added constructor from
26869        WKBundlePageUIClient.
26870        (WebKit::toUIElementVisibility): Added helper to convert from C SPI enum to internal enum.
26871        (WebKit::InjectedBundlePageUIClient::statusBarIsVisible): Changed to use the above.
26872        (WebKit::InjectedBundlePageUIClient::menuBarIsVisible): Ditto.
26873        (WebKit::InjectedBundlePageUIClient::toolbarsAreVisible): Ditto.
26874        * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: Added inheritance from
26875        API::InjectedBundle::PageUIClient, marked overrides as such.
26876
26877        * WebProcess/Storage/StorageAreaMap.cpp: Added #include that became necessary.
26878        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
26879        (WebKit::WebChromeClient::toolbarsVisible): Updated to use new internal enum.
26880        (WebKit::WebChromeClient::statusbarVisible): Ditto.
26881        (WebKit::WebChromeClient::menubarVisible): Ditto.
26882
26883        * WebProcess/WebPage/WebPage.cpp:
26884        (WebKit::WebPage::WebPage): Initialized m_uiClient member.
26885        (WebKit::WebPage::setInjectedBundleUIClient): Added. Updates m_uiClient.
26886        (WebKit::WebPage::close): Updated for change in m_uiClient.
26887        (WebKit::WebPage::pageDidScroll): Ditto.
26888        (WebKit::WebPage::initializeInjectedBundleUIClient): Deleted.
26889        * WebProcess/WebPage/WebPage.h:
26890        (WebKit::WebPage::injectedBundleUIClient): Updated return type.
26891
26892        * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm: Added #include that became
26893        necessary.
26894
268952014-04-06  Dan Bernstein  <mitz@apple.com>
26896
26897        Clean up WKGestureTypes.h
26898        https://bugs.webkit.org/show_bug.cgi?id=131286
26899
26900        Reviewed by Sam Weinig.
26901
26902        Renamed WKGestureTypes.h to GestureTypes.h, dropped the useless “WK” prefixes and changed
26903        into scoped enums, with the exception of SelectionFlags.
26904
26905        * Shared/ios/GestureTypes.h: Copied from Source/WebKit2/Shared/ios/WKGestureTypes.h.
26906        * Shared/ios/WKGestureTypes.h: Removed.
26907        * UIProcess/API/Cocoa/_WKElementAction.mm:
26908        (copyElement):
26909        (saveImage):
26910        * UIProcess/ios/PageClientImplIOS.mm:
26911        (WebKit::PageClientImpl::didUpdateBlockSelectionWithTouch):
26912        * UIProcess/ios/WKContentViewInteraction.h:
26913        * UIProcess/ios/WKContentViewInteraction.mm:
26914        (-[WKContentView _performAction:]):
26915        (toGestureType):
26916        (toUIWKGestureType):
26917        (toSelectionTouch):
26918        (toUIWKSelectionTouch):
26919        (toGestureRecognizerState):
26920        (toUIGestureRecognizerState):
26921        (toUIWKSelectionFlags):
26922        (toSelectionHandlePosition):
26923        (selectionChangedWithGesture):
26924        (selectionChangedWithTouch):
26925        (-[WKContentView _didUpdateBlockSelectionWithTouch:withFlags:growThreshold:shrinkThreshold:]):
26926        (-[WKContentView changeSelectionWithGestureAt:withGesture:withState:]):
26927        (-[WKContentView changeSelectionWithTouchAt:withSelectionTouch:baseIsStart:]):
26928        (-[WKContentView changeSelectionWithTouchesFrom:to:withGesture:withState:]):
26929        (-[WKContentView changeBlockSelectionWithTouchAt:withSelectionTouch:forHandle:]):
26930        * WebKit2.xcodeproj/project.pbxproj:
26931        * WebProcess/WebPage/WebPage.h:
26932        * WebProcess/WebPage/ios/WebPageIOS.mm:
26933        (WebKit::WebPage::rangeForWebSelectionAtPosition):
26934        (WebKit::WebPage::selectWithGesture):
26935        (WebKit::distanceBetweenRectsForPosition):
26936        (WebKit::computeEdgeCenter):
26937        (WebKit::WebPage::expandedRangeFromHandle):
26938        (WebKit::WebPage::contractedRangeFromHandle):
26939        (WebKit::WebPage::computeExpandAndShrinkThresholdsForHandle):
26940        (WebKit::shouldExpand):
26941        (WebKit::WebPage::changeBlockSelection):
26942        (WebKit::WebPage::updateBlockSelectionWithTouch):
26943        (WebKit::WebPage::updateSelectionWithTouches):
26944        (WebKit::WebPage::performActionOnElement):
26945
269462014-04-06  Sam Weinig  <sam@webkit.org>
26947
26948        Document user content related APIs..
26949
26950        Reviewed by Anders Carlsson.
26951
26952        - Also demote WKScriptWorld to SPI.
26953
26954        * UIProcess/API/Cocoa/WKScriptMessage.h:
26955        * UIProcess/API/Cocoa/WKScriptMessage.mm:
26956        (-[WKScriptMessage _scriptWorld]):
26957        (-[WKScriptMessage scriptWorld]): Deleted.
26958        * UIProcess/API/Cocoa/WKScriptMessageHandler.h:
26959        * UIProcess/API/Cocoa/WKScriptMessagePrivate.h: Added.
26960        * UIProcess/API/Cocoa/WKScriptWorld.h: Removed.
26961        * UIProcess/API/Cocoa/WKScriptWorld.mm: Removed.
26962        * UIProcess/API/Cocoa/WKUserContentController.h:
26963        * UIProcess/API/Cocoa/WKUserContentController.mm:
26964        (-[WKUserContentController addScriptMessageHandler:name:]):
26965        (-[WKUserContentController removeScriptMessageHandlerForName:]):
26966        (-[WKUserContentController _addScriptMessageHandler:name:world:]):
26967        (-[WKUserContentController _removeScriptMessageHandlerForName:world:]):
26968        (-[WKUserContentController addScriptMessageHandler:name:world:]): Deleted.
26969        (-[WKUserContentController removeScriptMessageHandlerForName:world:]): Deleted.
26970        * UIProcess/API/Cocoa/WKUserContentControllerPrivate.h: Added.
26971        * UIProcess/API/Cocoa/_WKScriptWorld.h: Copied from WebKit2/UIProcess/API/Cocoa/WKScriptWorld.h.
26972        * UIProcess/API/Cocoa/_WKScriptWorld.mm: Copied from WebKit2/UIProcess/API/Cocoa/WKScriptWorld.mm.
26973        (+[_WKScriptWorld defaultWorld]):
26974        (+[WKScriptWorld defaultWorld]): Deleted.
26975        * WebKit2.xcodeproj/project.pbxproj:
26976
269772014-04-04  Brian J. Burg  <burg@cs.washington.edu>
26978
26979        Enable WEB_REPLAY for PLATFORM(MAC)
26980        https://bugs.webkit.org/show_bug.cgi?id=130700
26981
26982        Reviewed by Timothy Hatcher.
26983
26984        * Configurations/FeatureDefines.xcconfig:
26985
269862014-04-05  Miyoung Shin  <myid.m.shin@gmail.com>
26987
26988        [WK2] Fix unused parameter compile warning.
26989        https://bugs.webkit.org/show_bug.cgi?id=131260
26990
26991        Reviewed by Gyuyoung Kim.
26992
26993        fix unused parameter warning in the WebKit2 build.
26994
26995        * UIProcess/API/APIDownloadClient.h:
26996        (API::DownloadClient::didReceiveData):
26997        (API::DownloadClient::shouldDecodeSourceDataOfMIMEType):
26998        (API::DownloadClient::decideDestinationWithSuggestedFilename):
26999        (API::DownloadClient::didCreateDestination):
27000
270012014-04-05  Alexey Proskuryakov  <ap@apple.com>
27002
27003        REGRESSION (NetworkProcess): Subresources fail to load from AppCache
27004        https://bugs.webkit.org/show_bug.cgi?id=131262
27005        <rdar://problem/15370653>
27006
27007        Reviewed by Sam Weinig.
27008
27009        * WebProcess/Network/WebResourceLoadScheduler.cpp:
27010        (WebKit::WebResourceLoadScheduler::scheduleLoad): Check application cache,
27011        as done in ResourceLoader::start() for in-process loads.
27012
270132014-04-05  Alexey Proskuryakov  <ap@apple.com>
27014
27015        Frequent PluginProcess crashes at libsqlite3.dylib: openDatabase
27016        https://bugs.webkit.org/show_bug.cgi?id=131264
27017        <rdar://problem/14165329>
27018
27019        Reviewed by Sam Weinig.
27020
27021        Don't create NSURLCache until after having called setenv.
27022
27023        * PluginProcess/PluginProcess.h: Added m_nsurlCacheDirectory.
27024
27025        * PluginProcess/mac/PluginProcessMac.mm:
27026        (WebKit::PluginProcess::platformInitializePluginProcess): Compute NSURL cache path
27027        on our own. This does not match CFNetwork's result in most cases, but should work
27028        equally well.
27029        (WebKit::PluginProcess::initializeSandbox): Create a cache with our path and best
27030        guess for capacity.
27031
270322014-04-04  Joseph Pecoraro  <pecoraro@apple.com>
27033
27034        Unreviewed. iOS Build fix after r166818.
27035
27036        These member variables / declarations are accessed by iOS
27037        in shared code in TelephoneNumberOverlayControllerMac.
27038
27039        * WebProcess/WebPage/TelephoneNumberOverlayController.h:
27040
270412014-04-04  Joseph Pecoraro  <pecoraro@apple.com>
27042
27043        Unreviewed. Rollout r166812, breaks 32-bit Mavericks build.
27044
27045        * Shared/mac/CookieStorageShim.mm:
27046        (WebKit::CookieStorageShim::initialize):
27047        (-[WKNSURLSessionLocal _copyCookiesForRequestUsingAllAppropriateStorageSemantics:]):
27048
270492014-04-04  Brady Eidson  <beidson@apple.com>
27050
27051        Show DataDetector UI on scanned phone numbers.
27052        <rdar://problem/16379588> and https://bugs.webkit.org/show_bug.cgi?id=131247
27053
27054        Reviewed by Tim Horton.
27055
27056        Add a new PageOverlay for telephone number UI, handle drawing the UI, and
27057        handle mouse clicks on the button in that UI.
27058
27059        Even though clicks are detected, they aren’t acted upon yet.
27060
27061        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
27062        (WebKit::WebEditorClient::selectedTelephoneNumberRangesChanged): Pass ranges to
27063          the TelephoneNumberController.
27064        * WebProcess/WebCoreSupport/WebEditorClient.h:
27065
27066        This controller handles installing/removing the PageOverlay, drawing the UI elements,
27067        and handling mouse events while any of the UI elements are shown.
27068        There’s also a clumsy attempt to keep platform-specific parts separated out.
27069        * WebProcess/WebPage/TelephoneNumberOverlayController.cpp: Added.
27070        (WebKit::TelephoneNumberOverlayController::TelephoneNumberOverlayController):
27071        (WebKit::TelephoneNumberOverlayController::createOverlayIfNeeded):
27072        (WebKit::TelephoneNumberOverlayController::destroyOverlay):
27073        (WebKit::TelephoneNumberOverlayController::pageOverlayDestroyed):
27074        (WebKit::TelephoneNumberOverlayController::willMoveToWebPage):
27075        (WebKit::TelephoneNumberOverlayController::didMoveToWebPage):
27076        (WebKit::TelephoneNumberOverlayController::rectsForDrawing):
27077        (WebKit::TelephoneNumberOverlayController::selectedTelephoneNumberRangesChanged):
27078
27079        * WebProcess/WebPage/TelephoneNumberOverlayController.h: Added.
27080        (WebKit::TelephoneNumberOverlayController::create):
27081
27082        * WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm: Added.
27083        (WebKit::TelephoneNumberOverlayController::drawRect):
27084        (WebKit::TelephoneNumberOverlayController::handleTelephoneClick):
27085        (WebKit::TelephoneNumberOverlayController::mouseEvent):
27086        (WebKit::TelephoneNumberOverlayController::clearMouseDownInformation):
27087        (WebKit::TelephoneNumberOverlayController::clearHighlights):
27088
27089        * WebProcess/WebPage/WebPage.cpp:
27090        (WebKit::WebPage::telephoneNumberOverlayController):
27091        * WebProcess/WebPage/WebPage.h:
27092
27093        * WebKit2.xcodeproj/project.pbxproj:
27094
270952014-04-04  Martin Hock  <mhock@apple.com>
27096
27097        Include Session ID in WebPageCreationParameters.
27098        https://bugs.webkit.org/show_bug.cgi?id=131239
27099
27100        <rdar://problem/16175483>
27101
27102        Reviewed by Sam Weinig.
27103
27104        * Shared/WebPageCreationParameters.cpp:
27105        (WebKit::WebPageCreationParameters::encode):
27106        (WebKit::WebPageCreationParameters::decode):
27107        * Shared/WebPageCreationParameters.h:
27108        * UIProcess/WebPageProxy.cpp:
27109        (WebKit::WebPageProxy::creationParameters):
27110        * WebProcess/WebPage/WebPage.cpp:
27111        (WebKit::WebPage::WebPage):
27112
271132014-04-04  Jer Noble  <jer.noble@apple.com>
27114
27115        [Mac][WK2] Videos do not have access to session cookies
27116        https://bugs.webkit.org/show_bug.cgi?id=129687
27117
27118        Reviewed by Eric Carlson.
27119
27120        Update the CookieStorageShim to track changes in underlying networking stack.
27121
27122        * Shared/mac/CookieStorageShim.mm:
27123        (WebKit::CookieStorageShim::initialize):
27124        (-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):
27125
271262014-04-04  Alexey Proskuryakov  <ap@apple.com>
27127
27128        Improve error checking in WebPageProxy::didReceiveEvent
27129        https://bugs.webkit.org/show_bug.cgi?id=131243
27130        <rdar://problem/16529207>
27131
27132        Reviewed by Anders Carlsson.
27133
27134        * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didReceiveEvent):
27135
271362014-04-04  Anders Carlsson  <andersca@apple.com>
27137
27138        More documentation
27139        https://bugs.webkit.org/show_bug.cgi?id=131238
27140
27141        Reviewed by Sam Weinig.
27142
27143        * UIProcess/API/Cocoa/WKNavigation.h:
27144        * UIProcess/API/Cocoa/WKNavigationDelegate.h:
27145        * UIProcess/API/Cocoa/WKPreferences.h:
27146        * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
27147
271482014-04-04  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
27149
27150        [GTK][CMake] Use a stricter check for the HAVE_GTK_UNIX_PRINTING define
27151        https://bugs.webkit.org/show_bug.cgi?id=131226
27152
27153        Reviewed by Carlos Garcia Campos.
27154
27155        #cmakedefine01 will define HAVE_GTK_UNIX_PRINTING to 0 instead of #undef'ining it. This
27156        means that simple checks like #ifdef HAVE_GTK_UNIX_PRINTING will always be true -- we
27157        actually need to check if the value is set to 1, which is precisely what the HAVE() macro
27158        does, so start using it.
27159
27160        * UIProcess/API/gtk/WebKitPrintOperation.cpp:
27161        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
27162        (WebKit::WebChromeClient::print):
27163        * WebProcess/WebPage/gtk/PrinterListGtk.cpp:
27164        * WebProcess/WebPage/gtk/PrinterListGtk.h:
27165        * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
27166        (WebKit::WebPrintOperationGtk::create):
27167
271682014-04-03  Chris Fleizach  <cfleizach@apple.com>
27169
27170        AX: iOS does not need to spin the run loop on synchronous message calls
27171        https://bugs.webkit.org/show_bug.cgi?id=131195
27172
27173        Reviewed by Dan Bernstein.
27174
27175        On the Mac platform, we need to spin the run loop while making synchronous calls to avoid VoiceOver hanging.
27176        On iOS, this not needed due to architectural differences.
27177
27178        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
27179        (WebKit::WebChromeClient::runJavaScriptAlert):
27180        (WebKit::WebChromeClient::runJavaScriptConfirm):
27181        (WebKit::WebChromeClient::runJavaScriptPrompt):
27182        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
27183        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
27184        * WebProcess/WebPage/WebPage.cpp:
27185        (WebKit::WebPage::synchronousMessagesShouldSpinRunLoop):
27186        * WebProcess/WebPage/WebPage.h:
27187
271882014-04-03 Andy Estes <aestes@apple.com>
27189
27190        [Cocoa] Add additional WKWebView SPI for clients that interact with PDFs
27191        https://bugs.webkit.org/show_bug.cgi?id=131206
27192
27193        Reviewed by Dan Bernstein.
27194
27195        Add _dataForDisplayedPDF and _suggestedFilenameForDisplayedPDF to
27196        support clients that wish to save a copy of the currently displayed PDF
27197        to disk. Ultimately we should support this use case by exposing something
27198        like WKWebViewContentProvider, but for now let's do something simple.
27199
27200        * UIProcess/API/Cocoa/WKWebView.mm:
27201        (-[WKWebView _didFinishLoadingDataForCustomContentProviderWithSuggestedFilename:data:]):
27202        (-[WKWebView _dataForDisplayedPDF]):
27203        (-[WKWebView _suggestedFilenameForDisplayedPDF]):
27204        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
27205        * UIProcess/Cocoa/WKWebViewContentProvider.h:
27206        * UIProcess/ios/WKPDFView.h:
27207        * UIProcess/ios/WKPDFView.mm:
27208        (-[WKPDFView documentData]):
27209        (-[WKPDFView suggestedFilename]):
27210        (-[WKPDFView web_setContentProviderData:suggestedFilename:]):
27211
272122014-04-03  Eunmi Lee  <eunmi15.lee@samsung.com>
27213
27214        [EFL][WK2] Add API to get contents size of current web page.
27215        https://bugs.webkit.org/show_bug.cgi?id=131148
27216
27217        Reviewed by Gyuyoung Kim.
27218
27219        Application can want to get contents size of current web page without
27220        monitoring "contents,size,changed" signal, so I add API to get contents
27221        size directly.
27222
27223        * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
27224        (WKViewGetContentsSize): WK API to get contents size from WebView.
27225        * UIProcess/API/C/CoordinatedGraphics/WKView.h:
27226        * UIProcess/API/efl/ewk_view.cpp:
27227        (ewk_view_contents_size_get): new API to get contents size.
27228        * UIProcess/API/efl/ewk_view.h:
27229        * UIProcess/API/efl/tests/test_ewk2_view.cpp:
27230        (TEST_F):
27231
272322014-04-03  Jinwoo Song  <jinwoo7.song@samsung.com>
27233
27234        [WK2][EFL] Use template method in creating NativeWebMouseEvent
27235        https://bugs.webkit.org/show_bug.cgi?id=131152
27236
27237        Reviewed by Anders Carlsson.
27238
27239        There are three EFL mouse events, such as Evas_Event_Mouse_Down, Evas_Event_Mouse_Up,
27240        and Evas_Event_Mouse_Move. They can be defined as a template method.
27241
27242        * PlatformEfl.cmake: Remove NativeWebMouseEventEfl.cpp
27243        * Shared/NativeWebMouseEvent.h:
27244        (WebKit::NativeWebMouseEvent::NativeWebMouseEvent): Add a template method.
27245        * Shared/efl/NativeWebMouseEventEfl.cpp: Removed.
27246
272472014-04-03  Anders Carlsson  <andersca@apple.com>
27248
27249        Add WKWebView documentation
27250        https://bugs.webkit.org/show_bug.cgi?id=131190
27251
27252        Reviewed by Sam Weinig.
27253
27254        * UIProcess/API/Cocoa/WKBackForwardListItem.h:
27255        * UIProcess/API/Cocoa/WKNavigationAction.h:
27256        * UIProcess/API/Cocoa/WKWebView.h:
27257
272582014-04-03  Michael Saboff  <msaboff@apple.com>
27259
27260        REGRESSION: PCE.js is 20x slower in WebKit2 because timers are throttled
27261        https://bugs.webkit.org/show_bug.cgi?id=131189
27262
27263        Reviewed by Geoffrey Garen.
27264
27265        Elevate the priority of all WebKit2 service processes on iOS, not just the network process.
27266
27267        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
27268        (WebKit::connectToService):
27269
272702014-04-03  Simon Fraser  <simon.fraser@apple.com>
27271
27272        ASSERT(m_children.isEmpty()) in PlatformCALayerRemote::removeAllSublayers() on time.com
27273        https://bugs.webkit.org/show_bug.cgi?id=131187
27274
27275        Reviewed by Maciej Stachowiak.
27276        
27277        After a call to PlatformCALayerRemote::adoptSublayers() when a layer
27278        toggles between tiled and non-tiled, we'd assert in PlatformCALayerRemote::removeAllSublayers()
27279        that not all sublayers had been removed (there was one with a null superlayer).
27280        
27281        Fix by ensuring that we don't copy over custom subviews when adoptSublayers()
27282        is called; they'll get added as we update children anyway.
27283
27284        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
27285        (WebKit::PlatformCALayerRemote::adoptSublayers):
27286
272872014-04-03  Benjamin Poulain  <bpoulain@apple.com>
27288
27289        [iOS][WK2] Add SPI to handle animated resize
27290        https://bugs.webkit.org/show_bug.cgi?id=131141
27291
27292        Reviewed by Simon Fraser.
27293
27294        Set up a basic API to handle animated resize. The code does not do much at the moment,
27295        it is mostly to have an interface we can implement later.
27296
27297        * UIProcess/API/Cocoa/WKWebView.mm:
27298        (-[WKWebView initWithFrame:configuration:]):
27299        (-[WKWebView setFrame:]):
27300        (-[WKWebView setBounds:]):
27301        (-[WKWebView _didCommitLayerTree:WebKit::]):
27302        (-[WKWebView _frameOrBoundsChangedFrom:]):
27303        (-[WKWebView _beginAnimatedResizeToSize:obscuredInsets:minimumLayoutSizeOverride:]):
27304        (-[WKWebView _endAnimatedResize]):
27305        (-[WKWebView _frameOrBoundsChanged]): Deleted.
27306        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
27307
273082014-04-03  Simon Fraser  <simon.fraser@apple.com>
27309
27310        Pixelated WebView when display is changed from hiDPI to regularDPI
27311        https://bugs.webkit.org/show_bug.cgi?id=131185
27312        <rdar://problem/16512184&16503714>
27313
27314        Reviewed by Tim Horton.
27315        
27316        TileController function was renamed.
27317
27318        * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
27319        (WebKit::PlatformCALayerRemoteTiledBacking::setContentsScale):
27320
273212014-04-03  Sam Weinig  <sam@webkit.org>
27322
27323        [WebKit2] Promote user script SPI to API
27324        https://bugs.webkit.org/show_bug.cgi?id=131181
27325
27326        Reviewed by Anders Carlsson.
27327
27328        * UIProcess/API/Cocoa/WKScriptMessage.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKScriptMessage.h.
27329        * UIProcess/API/Cocoa/WKScriptMessage.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKScriptMessage.mm.
27330        (-[WKScriptMessage scriptWorld]):
27331        (-[_WKScriptMessage scriptWorld]): Deleted.
27332        * UIProcess/API/Cocoa/WKScriptMessageHandler.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKScriptMessageHandler.h.
27333        * UIProcess/API/Cocoa/WKScriptWorld.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKScriptWorld.h.
27334        * UIProcess/API/Cocoa/WKScriptWorld.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKScriptWorld.mm.
27335        (+[WKScriptWorld defaultWorld]):
27336        (+[_WKScriptWorld defaultWorld]): Deleted.
27337        * UIProcess/API/Cocoa/WKUserContentController.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKUserContentController.h.
27338        * UIProcess/API/Cocoa/WKUserContentController.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKUserContentController.mm.
27339        (-[WKUserContentController addScriptMessageHandler:name:world:]):
27340        (-[WKUserContentController removeScriptMessageHandlerForName:world:]):
27341        (-[_WKUserContentController addScriptMessageHandler:name:world:]): Deleted.
27342        (-[_WKUserContentController removeScriptMessageHandlerForName:world:]): Deleted.
27343        * UIProcess/API/Cocoa/WKWebView.mm:
27344        (-[WKWebView initWithFrame:configuration:]):
27345        * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
27346        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
27347        (-[WKWebViewConfiguration copyWithZone:]):
27348        (-[WKWebViewConfiguration userContentController]):
27349        (-[WKWebViewConfiguration setUserContentController:]):
27350        (-[WKWebViewConfiguration _userContentController]): Deleted.
27351        (-[WKWebViewConfiguration _setUserContentController:]): Deleted.
27352        * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
27353        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
27354        * UIProcess/API/Cocoa/_WKScriptMessage.h: Removed.
27355        * UIProcess/API/Cocoa/_WKScriptMessage.mm: Removed.
27356        * UIProcess/API/Cocoa/_WKScriptMessageHandler.h: Removed.
27357        * UIProcess/API/Cocoa/_WKScriptWorld.h: Removed.
27358        * UIProcess/API/Cocoa/_WKScriptWorld.mm: Removed.
27359        * UIProcess/API/Cocoa/_WKUserContentController.h: Removed.
27360        * UIProcess/API/Cocoa/_WKUserContentController.mm: Removed.
27361        * WebKit2.xcodeproj/project.pbxproj:
27362
273632014-04-03  Anders Carlsson  <andersca@apple.com>
27364
27365        Make download policy decisions SPI for now
27366        https://bugs.webkit.org/show_bug.cgi?id=131179
27367
27368        Reviewed by Sam Weinig.
27369
27370        * UIProcess/API/Cocoa/WKNavigationDelegate.h:
27371        (NS_ENUM):
27372        * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
27373        (NS_ENUM):
27374        * UIProcess/Cocoa/NavigationState.mm:
27375        (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
27376        (WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
27377
273782014-04-02  Simon Fraser  <simon.fraser@apple.com>
27379
27380        Harden FilterOperation type casting
27381        https://bugs.webkit.org/show_bug.cgi?id=131142
27382
27383        Reviewed by Sam Weinig.
27384
27385        DefaultFilterOperation had an error-prone behavior where it set the base class
27386        OperationType to the type of some other filter class, but overrode isDefault(). 
27387        This made it very easy to write incorrect code that casted incorrectly based on type().
27388        
27389        Fix by making adding a DEFAULT filter operation type, and storing the represented
27390        type on DefaultFilterOperation().
27391        
27392        Also remove the OperationType argument for constructors of FilterOperations that
27393        can only be of one type, to avoid possible mistakes.
27394        
27395        Make the type cast macros a bit more normal, and use them in a few places.
27396        
27397        Fixed PlatformCAFiltersMac to handle the default filter case more cleanly.
27398
27399        * Shared/WebCoreArgumentCoders.cpp:
27400        (IPC::encodeFilterOperation):
27401        (IPC::decodeFilterOperation):
27402        * Shared/mac/RemoteLayerTreeTransaction.mm:
27403        (WebKit::RemoteLayerTreeTextStream::operator<<):
27404
274052014-04-03  Alexey Proskuryakov  <ap@apple.com>
27406
27407        REGRESSION (Async text input): Controls become unresponsive to mouse events
27408        https://bugs.webkit.org/show_bug.cgi?id=131176
27409        <rdar://problem/16507932>
27410
27411        Reviewed by Tim Horton.
27412
27413        * UIProcess/API/mac/WKView.mm: (NATIVE_MOUSE_EVENT_HANDLER):
27414        Don't confuse event handling machinery by sending events to WebProcess twice.
27415
274162014-04-03  Anders Carlsson  <andersca@apple.com>
27417
27418        WKWebView should always have a UIDelegate, even when closed
27419        https://bugs.webkit.org/show_bug.cgi?id=131174
27420        <rdar://problem/16389248>
27421
27422        Reviewed by Sam Weinig.
27423
27424        * UIProcess/API/Cocoa/WKWebView.mm:
27425        (-[WKWebView initWithFrame:configuration:]):
27426        (-[WKWebView UIDelegate]):
27427        (-[WKWebView setUIDelegate:]):
27428        * UIProcess/Cocoa/UIDelegate.h:
27429        * UIProcess/Cocoa/UIDelegate.mm:
27430        (WebKit::UIDelegate::UIDelegate):
27431        (WebKit::UIDelegate::~UIDelegate):
27432        (WebKit::UIDelegate::createUIClient):
27433        (WebKit::UIDelegate::delegate):
27434        (WebKit::UIDelegate::setDelegate):
27435        (WebKit::UIDelegate::UIClient::UIClient):
27436        (WebKit::UIDelegate::UIClient::~UIClient):
27437        (WebKit::UIDelegate::UIClient::createNewPage):
27438        (WebKit::UIDelegate::UIClient::runJavaScriptAlert):
27439        (WebKit::UIDelegate::UIClient::runJavaScriptConfirm):
27440        (WebKit::UIDelegate::UIClient::runJavaScriptPrompt):
27441        (WebKit::UIDelegate::UIClient::actionsForElement):
27442        (WebKit::UIClient::UIClient): Deleted.
27443        (WebKit::UIClient::~UIClient): Deleted.
27444        (WebKit::UIClient::delegate): Deleted.
27445        (WebKit::UIClient::setDelegate): Deleted.
27446        (WebKit::UIClient::createNewPage): Deleted.
27447        (WebKit::UIClient::runJavaScriptAlert): Deleted.
27448        (WebKit::UIClient::runJavaScriptConfirm): Deleted.
27449        (WebKit::UIClient::runJavaScriptPrompt): Deleted.
27450        (WebKit::UIClient::actionsForElement): Deleted.
27451        * UIProcess/ios/WKActionSheetAssistant.mm:
27452
274532014-04-02  Anders Carlsson  <andersca@apple.com>
27454
27455        Document WKNavigationAction and WKNavigationResponse
27456        https://bugs.webkit.org/show_bug.cgi?id=131138
27457
27458        Reviewed by Sam Weinig.
27459
27460        * UIProcess/API/Cocoa/WKFrameInfo.h:
27461        * UIProcess/API/Cocoa/WKNavigationAction.h:
27462        * UIProcess/API/Cocoa/WKNavigationResponse.h:
27463
274642014-04-03  Anders Carlsson  <andersca@apple.com>
27465
27466        Make actionsForElement a proper API::UIClient member function
27467        https://bugs.webkit.org/show_bug.cgi?id=131171
27468
27469        Reviewed by Sam Weinig.
27470
27471        * UIProcess/API/APIUIClient.h:
27472        (API::UIClient::actionsForElement):
27473        * UIProcess/Cocoa/UIDelegate.h:
27474        * UIProcess/Cocoa/UIDelegate.mm:
27475        (WebKit::UIClient::actionsForElement):
27476        * UIProcess/ios/WKActionSheetAssistant.mm:
27477        (-[WKActionSheetAssistant showImageSheet]):
27478        (-[WKActionSheetAssistant showLinkSheet]):
27479
274802014-04-03  Martin Hodovan  <mhodovan@inf.u-szeged.hu>
27481
27482        [WK2] Fix !ENABLE(BLOB) build
27483        https://bugs.webkit.org/show_bug.cgi?id=131164
27484
27485        Reviewed by Alexey Proskuryakov.
27486
27487        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
27488        (WebKit::NetworkConnectionToWebProcess::didClose):
27489        * NetworkProcess/NetworkConnectionToWebProcess.h:
27490        * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
27491
274922014-04-03  Anders Carlsson  <andersca@apple.com>
27493
27494        Fix iOS build.
27495
27496        * UIProcess/ios/WKActionSheetAssistant.mm:
27497
274982014-04-03  Anders Carlsson  <andersca@apple.com>
27499
27500        Rename UIClient.{h, mm} to UIDelegate.{h, mm}.
27501
27502        Rubber-stamped by Dan Bernstein.
27503
27504        * UIProcess/API/Cocoa/WKWebView.mm:
27505        * UIProcess/Cocoa/UIDelegate.h: Renamed from Source/WebKit2/UIProcess/Cocoa/UIClient.h.
27506        * UIProcess/Cocoa/UIDelegate.mm: Renamed from Source/WebKit2/UIProcess/Cocoa/UIClient.mm.
27507        * WebKit2.xcodeproj/project.pbxproj:
27508
275092014-04-03  Andrzej Badowski  <a.badowski@samsung.com>
27510
27511        [EFL][WK2] Replacing zoom functionality of MiniBrowser from scale_set to page_zoom_set.
27512        https://bugs.webkit.org/show_bug.cgi?id=130391
27513
27514        Reviewed by Gyuyoung Kim.
27515
27516        Change the implementation of the zoom functionality from ewk_view_scale_set
27517        to ewk_view_page_zoom_set. Adding to the API functions: ewk_view_page_zoom_set and
27518        ewk_view_page_zoom_get to call appropriate WK functions.
27519
27520        * UIProcess/API/efl/ewk_view.cpp:
27521        (ewk_view_page_zoom_set):
27522        (ewk_view_page_zoom_get):
27523        * UIProcess/API/efl/ewk_view.h:
27524        * UIProcess/API/efl/tests/test_ewk2_view.cpp:
27525        (TEST_F):
27526
275272014-04-02  Alexey Proskuryakov  <ap@apple.com>
27528
27529        Sandbox violation in NetworkProcess when uploading a bundle
27530        https://bugs.webkit.org/show_bug.cgi?id=131133
27531
27532        Reviewed by Brady Eidson.
27533
27534        * NetworkProcess/NetworkResourceLoader.cpp:
27535        (WebKit::NetworkResourceLoader::cleanup):
27536        (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
27537        Don't delete the files. It can't work.
27538
275392014-04-02  Jinwoo Song  <jinwoo7.song@samsung.com>
27540
27541        [WK2][EFL] Remove unnecessary reinterpret_cast<> in unit testcase
27542        https://bugs.webkit.org/show_bug.cgi?id=131143
27543
27544        Reviewed by Gyuyoung Kim.
27545
27546        Ecore_Timer callback requires *Eina_Bool* return type instead of *bool*.
27547        Also, WebKit/EFL port coding style recommends to use *Eina_Bool* in the
27548        callback function for EFL event handler. Additionally, replaced 0 to nullptr.
27549
27550        * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
27551        (EWK2UnitTest::CallbackDataTimer::CallbackDataTimer):
27552        (EWK2UnitTest::CallbackDataTimer::setDone):
27553        (EWK2UnitTest::CallbackDataTimer::timeOutCallback):
27554        (EWK2UnitTest::CallbackDataTimer::setTimedOut):
27555        * UIProcess/API/efl/tests/test_ewk2_storage_manager.cpp:
27556        (EWK2StorageManagerTest::timerCallback):
27557        (TEST_F):
27558
275592014-04-02  Tim Horton  <timothy_horton@apple.com>
27560
27561        Remove a FIXME that happened.
27562
27563        * Shared/mac/RemoteLayerBackingStore.mm:
27564        (WebKit::RemoteLayerBackingStore::display):
27565
275662014-04-02  Tim Horton  <timothy_horton@apple.com>
27567
27568        Fix the !USE(IOSURFACE) build... again.
27569
27570        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
27571        (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
27572
275732014-04-02  Mark Rowe  <mrowe@apple.com>
27574
27575        <https://webkit.org/b/131135> Introduce LockHistory and LockBackForwardList enums to use in place of bools.
27576
27577        These arguments are often passed using literals at the call site, where the use of bools severely hinders
27578        the readability of the code.
27579
27580        Reviewed by Andreas Kling.
27581
27582        * WebProcess/Plugins/PDF/PDFPlugin.mm:
27583        (WebKit::PDFPlugin::clickedLink):
27584
275852014-04-02  Tim Horton  <timothy_horton@apple.com>
27586
27587        Pool IOSurfaces to help with allocation cost
27588        https://bugs.webkit.org/show_bug.cgi?id=131096
27589        <rdar://problem/15373942>
27590
27591        Reviewed by Simon Fraser.
27592
27593        * Shared/mac/RemoteLayerBackingStore.h:
27594        * Shared/mac/RemoteLayerBackingStore.mm:
27595        (WebKit::RemoteLayerBackingStore::~RemoteLayerBackingStore):
27596        (WebKit::RemoteLayerBackingStore::clearBackingStore):
27597        (WebKit::RemoteLayerBackingStore::display):
27598        When RemoteLayerBackingStore discards a layer, throw it into the pool.
27599
27600        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
27601        (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
27602        Disable the pool in the UI process.
27603
276042014-04-02  Alice Barraclough  <alice.barraclough@apple.com>
27605
27606        Fix a typo causing TestWebKitAPI to timeout when testing Find.
27607
27608        Reviewed by Dan Bernstein.
27609
27610        * UIProcess/API/C/WKPage.cpp:
27611        (WKPageSetPageFindClient): Test for !functionPointer like
27612        all the other implementations do.
27613
276142014-04-02  Dean Jackson  <dino@apple.com>
27615
27616        [iOS] Expose geolocation provider on the process pool
27617        https://bugs.webkit.org/show_bug.cgi?id=131125
27618
27619        Reviewed by Dan Bernstein.
27620
27621        Followup comments from Dan Bernstein. Use a class
27622        extension rather than a new category.
27623
27624        * UIProcess/API/Cocoa/WKProcessPool.mm:
27625        (-[WKProcessPool _geolocationProvider]):
27626        * UIProcess/API/Cocoa/WKProcessPoolInternal.h:
27627
276282014-04-02  Tim Horton  <timothy_horton@apple.com>
27629
27630        RemoteLayerBackingStore doesn't need to clear opaque layers
27631        https://bugs.webkit.org/show_bug.cgi?id=131134
27632
27633        Reviewed by Simon Fraser.
27634
27635        * Shared/mac/RemoteLayerBackingStore.mm:
27636        (WebKit::RemoteLayerBackingStore::display):
27637        We don't need to clear opaque layers, because we'll paint
27638        over the whole area. In addition, we should fill opaque layers
27639        with a bright color in debug builds to make it very clear
27640        that we've made a mistake (similar to what FrameView does).
27641
276422014-04-02  Anders Carlsson  <andersca@apple.com>
27643
27644        Document WKBackForwardList, WKBackForwardListItem and WKWebViewConfiguration
27645        https://bugs.webkit.org/show_bug.cgi?id=131131
27646
27647        Reviewed by Dan Bernstein.
27648
27649        * UIProcess/API/Cocoa/WKBackForwardList.h:
27650        * UIProcess/API/Cocoa/WKBackForwardListItem.h:
27651        * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
27652
276532014-04-02  Anders Carlsson  <andersca@apple.com>
27654
27655        Document WKUIDelegate and WKWindowFeatures
27656        https://bugs.webkit.org/show_bug.cgi?id=131124
27657
27658        Reviewed by Dan Bernstein.
27659
27660        * UIProcess/API/Cocoa/WKProcessPool.h:
27661        * UIProcess/API/Cocoa/WKUIDelegate.h:
27662        * UIProcess/API/Cocoa/WKWindowFeatures.h:
27663
276642014-04-02  Dean Jackson  <dino@apple.com>
27665
27666        [iOS] Expose geolocation provider on the process pool
27667        https://bugs.webkit.org/show_bug.cgi?id=131125
27668
27669        Patch by Sam Weinig.
27670        Reviewed by Dean Jackson.
27671
27672        * UIProcess/API/Cocoa/WKProcessPool.mm:
27673        (-[WKProcessPool _geolocationProvider]): Create and initialize WKGeolocationProviderIOS if necessary.
27674        * UIProcess/API/Cocoa/WKProcessPoolInternal.h: Expose _geolocationProvider.
27675        * UIProcess/ios/WKContentView.mm:
27676        (-[WKContentView _decidePolicyForGeolocationRequestFromOrigin:frame:request:]): Call into WKProcessPool.
27677
276782014-04-02  Martin Hock  <mhock@apple.com>
27679
27680        Unify private browsing with sessions.
27681        https://bugs.webkit.org/show_bug.cgi?id=130099
27682
27683        Reviewed by Alexey Proskuryakov.
27684
27685        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: Change WebPage::isUsingEphemeralSession() to WebPage::usesEphemeralSession().
27686        (WKBundlePageIsUsingEphemeralSession):
27687        * WebProcess/InjectedBundle/InjectedBundle.cpp: Change Settings::setPrivateBrowsingEnabled() to Page::enableLegacyPrivateBrowsing().
27688        (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
27689        * WebProcess/Plugins/PluginView.cpp: Change Settings::privateBrowsingEnabled() to Page::usesEphemeralSession().
27690        (WebKit::PluginView::isPrivateBrowsingEnabled):
27691        * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp: Ditto.
27692        (WebKit::WebFrameNetworkingContext::storageSession):
27693        * WebProcess/WebPage/WebPage.cpp:
27694        (WebKit::WebPage::usesEphemeralSession): Renamed from isUsingEphemeralSession.
27695        (WebKit::WebPage::setSessionID): Ensure session before setting.
27696        (WebKit::WebPage::updatePreferences): Set session to legacy private session if needed.
27697        (WebKit::WebPage::sessionID): Moved to header.
27698        (WebKit::WebPage::isUsingEphemeralSession): Renamed to usesEphemeralSession.
27699        * WebProcess/WebPage/WebPage.h:
27700        (WebKit::WebPage::sessionID): Just call down to m_page.
27701
277022014-04-02  Alice Barraclough  <alice.liu@apple.com>
27703
27704        Adding Objective-C SPI for Find in Page.
27705        https://bugs.webkit.org/show_bug.cgi?id=131000 Need an Objective-C API or SPI for Find in Page
27706
27707        Reviewed by Dan Bernstein.
27708
27709        Find-on-page SPI added to WKWebView, which funnels the messages through the WebPageProxy.
27710        Returning messages are designated by _WKFindDelegate protocol.
27711        Also provide FindDelegate access on WKWebView.
27712        WebPageProxy gets a new-style API::FindClient.
27713        Also had to replicate WKFindOptions as _WKFindOptions in Cocoa SPI. This is unfortunate, but it 
27714        does follow the pattern of other options & enums related to classes that are SPI-for-now.
27715        
27716        PageClientImplIOS handles setFindIndicator function by forwarding to its WKContentView, 
27717        but WKContentView _setFindIndicator remains unimplemented for now.
27718        
27719        * UIProcess/API/APIFindClient.h: Added.
27720        (API::FindClient::~FindClient):
27721        (API::FindClient::didCountStringMatches):
27722        (API::FindClient::didFindString):
27723        (API::FindClient::didFailToFindString):
27724        * UIProcess/API/C/WKPage.cpp:
27725        (WKPageSetPageFindClient):
27726        * UIProcess/API/Cocoa/WKWebView.mm:
27727        (-[WKWebView initWithFrame:configuration:]):
27728        (-[WKWebView _findDelegate]):
27729        (-[WKWebView _setFindDelegate:]):
27730        (toFindOptions):
27731        (-[WKWebView _countStringMatches:options:maxCount:]):
27732        (-[WKWebView _findString:options:maxCount:]):
27733        (-[WKWebView _hideFindUI]):
27734        (-[WKWebView _hostForFindUI]):
27735        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
27736        (NS_OPTIONS):
27737        * UIProcess/API/Cocoa/_WKFindDelegate.h: Added.
27738        * UIProcess/Cocoa/FindClient.h: Added.
27739        * UIProcess/Cocoa/FindClient.mm: Added.
27740        (WebKit::FindClient::FindClient):
27741        (WebKit::FindClient::delegate):
27742        (WebKit::FindClient::setDelegate):
27743        (WebKit::FindClient::didCountStringMatches):
27744        (WebKit::FindClient::didFindString):
27745        (WebKit::FindClient::didFailToFindString):
27746        * UIProcess/WebPageProxy.cpp:
27747        (WebKit::WebPageProxy::WebPageProxy):
27748        (WebKit::WebPageProxy::setFindClient):
27749        (WebKit::WebPageProxy::close):
27750        (WebKit::WebPageProxy::didCountStringMatches):
27751        (WebKit::WebPageProxy::didFindString):
27752        (WebKit::WebPageProxy::didFailToFindString):
27753        (WebKit::WebPageProxy::initializeFindClient): Deleted.
27754        * UIProcess/WebPageProxy.h:
27755        (WebKit::WebPageProxy::findClient):
27756        * UIProcess/ios/PageClientImplIOS.mm:
27757        (WebKit::PageClientImpl::setFindIndicator):
27758        * UIProcess/ios/WKContentView.h:
27759        * UIProcess/ios/WKContentView.mm:
27760        (-[WKContentView _setFindIndicator:WebKit::fadeOut:animate:]):
27761        * WebKit2.xcodeproj/project.pbxproj:
27762
277632014-04-02  Anders Carlsson  <andersca@apple.com>
27764
27765        Rename -[WKBackForwardListItem originalURL] to -[WKBackForwardListItem initialURL]
27766        https://bugs.webkit.org/show_bug.cgi?id=131116
27767
27768        Reviewed by Antti Koivisto.
27769
27770        * UIProcess/API/Cocoa/WKBackForwardListItem.h:
27771        * UIProcess/API/Cocoa/WKBackForwardListItem.mm:
27772        (-[WKBackForwardListItem initialURL]):
27773        (-[WKBackForwardListItem originalURL]): Deleted.
27774
277752014-04-02  Antti Koivisto  <antti@apple.com>
27776
27777        Split tile grid out from TileController
27778        https://bugs.webkit.org/show_bug.cgi?id=131102
27779
27780        Reviewed by Simon Fraser.
27781
27782        * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
27783        (WebKit::PlatformCALayerRemoteTiledBacking::PlatformCALayerRemoteTiledBacking):
27784        * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
27785
277862014-04-02  Anders Carlsson  <andersca@apple.com>
27787
27788        Try a workaround for a crash
27789        https://bugs.webkit.org/show_bug.cgi?id=131112
27790
27791        Reviewed by Sam Weinig.
27792
27793        * UIProcess/API/Cocoa/WKWebView.mm:
27794        (-[WKWebView UIDelegate]):
27795        (-[WKWebView setUIDelegate:]):
27796
277972014-04-02  Martin Robinson  <mrobinson@igalia.com>
27798
27799        REGRESSION(r165704): [GTK] Inspector resources not correctly generated
27800        https://bugs.webkit.org/show_bug.cgi?id=130343
27801
27802        Reviewed by Gustavo Noronha Silva.
27803
27804        * PlatformGTK.cmake: Pass all appropriate directories to the
27805        GResources XML generation script.
27806
278072014-04-02  Carlos Garcia Campos  <cgarcia@igalia.com>
27808
27809        [GTK] Move NEWS file to a new location
27810        https://bugs.webkit.org/show_bug.cgi?id=130901
27811
27812        Reviewed by Brent Fulgham.
27813
27814        * gtk/NEWS: Renamed from Source/WebKit/gtk/NEWS.
27815
278162014-04-01  Benjamin Poulain  <bpoulain@apple.com>
27817
27818        <rdar://problem/16294704> Remove _pageExtendedBackgroundColor entirely
27819        https://bugs.webkit.org/show_bug.cgi?id=131075
27820
27821        Reviewed by Beth Dakin.
27822
27823        * UIProcess/API/Cocoa/WKWebView.mm:
27824        (-[WKWebView _pageExtendedBackgroundColor]): Deleted.
27825        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
27826
278272014-04-01  Anders Carlsson  <andersca@apple.com>
27828
27829        Stub out more WKNavigation properties
27830        https://bugs.webkit.org/show_bug.cgi?id=131080
27831
27832        Reviewed by Tim Horton.
27833
27834        * UIProcess/API/Cocoa/WKNavigation.h:
27835        * UIProcess/API/Cocoa/WKNavigation.mm:
27836        (-[WKNavigation initialRequest]):
27837        (-[WKNavigation response]):
27838        (-[WKNavigation error]):
27839
278402014-04-01  Anders Carlsson  <andersca@apple.com>
27841
27842        Rename -[WKWebView activeURL] to -[WKWebView URL]
27843        https://bugs.webkit.org/show_bug.cgi?id=131077
27844
27845        Reviewed by Tim Horton.
27846
27847        Keep -[WKWebView activeURL] as SPI until no clients depend on it.
27848
27849        * UIProcess/API/Cocoa/WKWebView.h:
27850        * UIProcess/API/Cocoa/WKWebView.mm:
27851        (-[WKWebView URL]):
27852        (-[WKWebView activeURL]):
27853        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
27854        * UIProcess/Cocoa/NavigationState.mm:
27855        (WebKit::NavigationState::willChangeActiveURL):
27856        (WebKit::NavigationState::didChangeActiveURL):
27857
278582014-04-01  Anders Carlsson  <andersca@apple.com>
27859
27860        Move -[WKWebView stopLoading:] back to WKIBActions
27861        https://bugs.webkit.org/show_bug.cgi?id=131072
27862
27863        Reviewed by Tim Horton.
27864
27865        * UIProcess/API/Cocoa/WKWebView.h:
27866        * UIProcess/API/Cocoa/WKWebView.mm:
27867        (-[WKWebView stopLoading:]):
27868
278692014-04-01  Anders Carlsson  <andersca@apple.com>
27870
27871        Migrate more headers
27872        https://bugs.webkit.org/show_bug.cgi?id=131068
27873
27874        Reviewed by Tim Horton.
27875
27876        * UIProcess/API/Cocoa/WKBackForwardList.h:
27877        Remove a newline.
27878
27879        * WebKit2.xcodeproj/project.pbxproj:
27880        Move files from the "Deprecated" group.
27881
278822014-04-01  Manuel Rego Casasnovas  <rego@igalia.com>
27883
27884        [CSS Grid Layout] Enable runtime feature if feature flag is enabled
27885        https://bugs.webkit.org/show_bug.cgi?id=130013
27886
27887        Reviewed by Simon Fraser.
27888
27889        Enable CSS Grid Layout runtime feature when ENABLE_CSS_GRID_LAYOUT flag is true.
27890
27891        * Shared/WebPreferencesStore.h:
27892
278932014-04-01  Anders Carlsson  <andersca@apple.com>
27894
27895        Demote WKBackForwardListDidChangeNotification to SPI
27896        https://bugs.webkit.org/show_bug.cgi?id=131059
27897
27898        Reviewed by Dan Bernstein.
27899
27900        * UIProcess/API/Cocoa/WKBackForwardList.h:
27901        * UIProcess/API/Cocoa/WKBackForwardList.mm:
27902        * UIProcess/API/Cocoa/WKBackForwardListInternal.h:
27903        * UIProcess/API/Cocoa/WKBackForwardListPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKBackForwardListInternal.h.
27904        * UIProcess/Cocoa/NavigationState.mm:
27905        (WebKit::NavigationState::LoaderClient::didChangeBackForwardList):
27906        * WebKit2.xcodeproj/project.pbxproj:
27907
279082014-04-01  Andy Estes  <aestes@apple.com>
27909
27910        [Cocoa] Add SPI to determine if a WKWebView is displaying a PDF
27911        https://bugs.webkit.org/show_bug.cgi?id=131063
27912
27913        Reviewed by Tim Horton.
27914
27915        * UIProcess/API/Cocoa/WKWebView.mm:
27916        (-[WKWebView _isDisplayingPDF]):
27917        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
27918
279192014-04-01  Simon Fraser  <simon.fraser@apple.com>
27920
27921        Remove some explicit template instantiations from logging code
27922        https://bugs.webkit.org/show_bug.cgi?id=131065
27923
27924        Reviewed by Tim Horton.
27925        
27926        No need to explicitly state template types.
27927
27928        * Shared/mac/RemoteLayerTreeTransaction.mm:
27929        (WebKit::dumpChangedLayers):
27930
279312014-04-01  Tim Horton  <timothy_horton@apple.com>
27932
27933        [iOS WebKit2] Partial repaint is broken
27934        https://bugs.webkit.org/show_bug.cgi?id=131056
27935
27936        Reviewed by Dean Jackson.
27937
27938        * Shared/mac/RemoteLayerBackingStore.mm:
27939        (WebKit::RemoteLayerBackingStore::display):
27940        We need to check if the repaint rects themselves cover the whole
27941        layer's surface, not just their bounds. Otherwise, we'll optimize
27942        out the back->front copy and end up not painting the whole layer.
27943
279442014-04-01  Anders Carlsson  <andersca@apple.com>
27945
27946        Pass a WKNavigationAction to the create UIDelegate method
27947        https://bugs.webkit.org/show_bug.cgi?id=131053
27948
27949        Reviewed by Sam Weinig.
27950
27951        * UIProcess/API/Cocoa/WKUIDelegate.h:
27952        * UIProcess/Cocoa/UIClient.h:
27953        * UIProcess/Cocoa/UIClient.mm:
27954        (WebKit::UIClient::setDelegate):
27955        (WebKit::UIClient::createNewPage):
27956
279572014-04-01  Benjamin Poulain  <bpoulain@apple.com>
27958
27959        [iOS][WK2] Remove the two finger pan gesture recognizer until it is actually implemented
27960        https://bugs.webkit.org/show_bug.cgi?id=131009
27961
27962        Reviewed by Sam Weinig.
27963
27964        The two finger pan should not block the pinch gesture recognizer.
27965
27966        * UIProcess/ios/WKContentViewInteraction.h:
27967        * UIProcess/ios/WKContentViewInteraction.mm:
27968        (-[WKContentView setupInteraction]):
27969        (-[WKContentView cleanupInteraction]):
27970        (-[WKContentView gestureRecognizerShouldBegin:]):
27971        (-[WKContentView _twoFingerPanRecognized:]): Deleted.
27972
279732014-04-01  Anders Carlsson  <andersca@apple.com>
27974
27975        Remove limits from WKBackForwardList getters
27976        https://bugs.webkit.org/show_bug.cgi?id=131052
27977
27978        Reviewed by Beth Dakin.
27979
27980        * UIProcess/API/Cocoa/WKBackForwardList.h:
27981        * UIProcess/API/Cocoa/WKBackForwardList.mm:
27982        (-[WKBackForwardList backList]):
27983        (-[WKBackForwardList forwardList]):
27984        (-[WKBackForwardList backListCount]): Deleted.
27985        (-[WKBackForwardList forwardListCount]): Deleted.
27986        (-[WKBackForwardList backListWithLimit:]): Deleted.
27987        (-[WKBackForwardList forwardListWithLimit:]): Deleted.
27988        * UIProcess/WebBackForwardList.cpp:
27989        (WebKit::WebBackForwardList::backList):
27990        (WebKit::WebBackForwardList::forwardList):
27991        * UIProcess/WebBackForwardList.h:
27992
279932014-04-01  Anders Carlsson  <andersca@apple.com>
27994
27995        Stub out the web process -> UI process message SPI
27996        https://bugs.webkit.org/show_bug.cgi?id=131048
27997
27998        Reviewed by Sam Weinig.
27999
28000        * UIProcess/API/Cocoa/WKWebView.mm:
28001        (-[WKWebView initWithFrame:configuration:]):
28002        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
28003        (-[WKWebViewConfiguration copyWithZone:]):
28004        (-[WKWebViewConfiguration _userContentController]):
28005        (-[WKWebViewConfiguration _setUserContentController:]):
28006        * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
28007        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
28008        * UIProcess/API/Cocoa/_WKScriptMessage.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKScriptWorld.h.
28009        * UIProcess/API/Cocoa/_WKScriptMessage.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKScriptWorld.h.
28010        (-[_WKScriptMessage body]):
28011        (-[_WKScriptMessage originatingWebView]):
28012        * UIProcess/API/Cocoa/_WKScriptMessageHandler.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKScriptWorld.h.
28013        * UIProcess/API/Cocoa/_WKScriptWorld.h:
28014        * UIProcess/API/Cocoa/_WKUserContentController.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKScriptWorld.h.
28015        * UIProcess/API/Cocoa/_WKUserContentController.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h.
28016        (-[_WKUserContentController addScriptMessageHandler:name:world:]):
28017        (-[_WKUserContentController removeScriptMessageHandler:]):
28018        * WebKit2.xcodeproj/project.pbxproj:
28019
280202014-04-01  Andreas Kling  <akling@apple.com>
28021
28022        Invalidate CFNetwork connection cache on memory pressure.
28023        <https://webkit.org/b/131038>
28024
28025        Stop holding on to cached HTTP connections if we come under memory pressure.
28026
28027        Reviewed by Geoff Malloc-Garen.
28028
28029        * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
28030        (WebKit::NetworkProcess::platformLowMemoryHandler):
28031
280322014-04-01  Anders Carlsson  <andersca@apple.com>
28033
28034        Tweak WKPreferences API
28035        https://bugs.webkit.org/show_bug.cgi?id=131047
28036
28037        Reviewed by Simon Fraser.
28038
28039        * UIProcess/API/Cocoa/WKPreferences.h:
28040        * UIProcess/API/Cocoa/WKPreferences.mm:
28041        (-[WKPreferences init]):
28042        (-[WKPreferences initWithUserDefaultsKeyPrefix:]):
28043        (-[WKPreferences userDefaultsKeyPrefix]):
28044        (-[WKPreferences initWithUserDefaultsPrefixKey:]): Deleted.
28045        (-[WKPreferences userDefaultsPrefixKey]): Deleted.
28046
280472014-03-31  Simon Fraser  <simon.fraser@apple.com>
28048
28049        Enable WEB_TIMING on Mac and iOS
28050        https://bugs.webkit.org/show_bug.cgi?id=128064
28051
28052        Reviewed by Sam Weinig, Brent Fulgham.
28053        
28054        Enable WEB_TIMING.
28055
28056        * Configurations/FeatureDefines.xcconfig:
28057
280582014-03-31  Simon Fraser  <simon.fraser@apple.com>
28059
28060        [UI-side compositing] Fix animations, and add logging
28061        https://bugs.webkit.org/show_bug.cgi?id=131011
28062
28063        Reviewed by Tim Horton.
28064        
28065        UI-side animations were broken because GraphicsLayerCARemote::addAnimation()
28066        never called the superclass, so fix.
28067        
28068        Add logging for animations to the layer tree commit output.
28069
28070        * Shared/mac/RemoteLayerTreeTransaction.mm:
28071        (WebKit::dumpProperty):
28072        (WebKit::RemoteLayerTreeTextStream::operator<<):
28073        (WebKit::dumpChangedLayers):
28074        * WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
28075        (WebKit::GraphicsLayerCARemote::addAnimation):
28076
280772014-04-01  Zalan Bujtas  <zalan@apple.com>
28078
28079        Build fix after r166582.
28080
28081        * Shared/ContextMenuContextData.cpp:
28082        (WebKit::ContextMenuContextData::ContextMenuContextData):
28083
280842014-04-01  Zalan Bujtas  <zalan@apple.com>
28085
28086        Subpixel rendering: Transition class Image (and its dependencies) from int to float to enable subpixel positioned/sized images.
28087        https://bugs.webkit.org/show_bug.cgi?id=130643
28088
28089        Reviewed by Simon Fraser.
28090
28091        This is in preparation to support subpixel positioned/sized background images. While 1x bitmap images can't take
28092        subpixel sizing on hidpi resolutions, both generated and hidpi images can.
28093        This patch does not change Image behavior in general as both position and size are still snapped to integral values.  
28094
28095        No change in behavior.
28096
28097        * Shared/WebCoreArgumentCoders.cpp:
28098        (IPC::encodeImage):
28099        * UIProcess/API/efl/EwkView.cpp:
28100        (EwkView::updateCursor):
28101
281022014-04-01  Joonghun Park  <jh718.park@samsung.com>
28103
28104        [EFL][WK2] Fix and update the existing test case for ewk_database_manager_origins_async_get API
28105        https://bugs.webkit.org/show_bug.cgi?id=131017
28106
28107        Reviewed by Gyuyoung Kim.
28108
28109        * UIProcess/API/efl/tests/test_ewk2_database_manager.cpp:
28110        Fix memory leaks and errors caused by duplication of Ecore_Timer deletion
28111        as well as update a naming style of local variable.
28112        (EWK2DatabaseManagerTest::databaseOriginsCallback):
28113        (TEST_F):
28114
281152014-04-01  Zan Dobersek  <zdobersek@igalia.com>
28116
28117        Don't copy the children map in webkitWebViewBaseContainerForall
28118        https://bugs.webkit.org/show_bug.cgi?id=131016
28119
28120        Reviewed by Carlos Garcia Campos.
28121
28122        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
28123        (webkitWebViewBaseContainerForall): Avoid copying the GtkWidget-to-IntRect HashMap object
28124        by transforming the iteration to a range-based for-loop over that HashMap's keys.
28125
281262014-04-01  Zan Dobersek  <zdobersek@igalia.com>
28127
28128        [GTK] Don't copy the ResourceResponse object in webkitWebViewDecidePolicy
28129        https://bugs.webkit.org/show_bug.cgi?id=131015
28130
28131        Reviewed by Carlos Garcia Campos.
28132
28133        * UIProcess/API/gtk/WebKitWebView.cpp:
28134        (webkitWebViewDecidePolicy): Avoid copying the ResourceResponce object returned by webkitURIResponseGetResourceResponse.
28135        That function already returns a reference, so the return value should be stored accordingly.
28136
281372014-04-01  Eunmi Lee  <eunmi15.lee@samsung.com>
28138
28139        [CoordinatedGraphics] Content scale factor should not be applied to draw contents when fixed layout is not used.
28140        https://bugs.webkit.org/show_bug.cgi?id=130962
28141
28142        Reviewed by Gyuyoung Kim.
28143
28144        Delegating scaling is turned off when fixed layout is not used in the
28145        coordinated graphics, so page scale factor is applied to the contents
28146        directly.
28147        In that case, we should not apply page scale factor to coordinated
28148        graphics to draw contents and calculate visible content rect.
28149
28150        Currently, page scale factor is applied twice to the coordinated
28151        graphics and contents, so result of scaling is abnormal.
28152
28153        * UIProcess/CoordinatedGraphics/WebView.cpp:
28154        (WebKit::WebView::transformToScene):
28155        (WebKit::WebView::visibleContentsSize):
28156
281572014-04-01  Ryuan Choi  <ryuan.choi@samsung.com>
28158
28159        [EFL][WK2] Rename ewk_application_cache_manager_delete{_all}
28160        https://bugs.webkit.org/show_bug.cgi?id=131012
28161
28162        Reviewed by Gyuyoung Kim.
28163
28164        While discussing Bug 130577, we resulted that _clear and _xxx_del is better name for the EFL.
28165        This patch will rename similar API in ewk_application_cache_manager.
28166
28167        In addition, fixed some typos in doxygen.
28168
28169        * UIProcess/API/efl/ewk_application_cache_manager.cpp:
28170        (ewk_application_cache_manager_clear): Renamed from ewk_application_cache_manager_delete_all
28171        (ewk_application_cache_manager_entries_for_origin_del): Renamed from ewk_application_cache_manager_delete
28172        (ewk_application_cache_manager_delete_all): Deleted.
28173        (ewk_application_cache_manager_delete): Deleted.
28174        * UIProcess/API/efl/ewk_application_cache_manager.h:
28175        * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
28176        (TEST_F):
28177
281782014-03-31  Zan Dobersek  <zdobersek@igalia.com>
28179
28180        Unreviewed GTK build fix after r166553.
28181
28182        * UIProcess/API/gtk/WebKitSettings.cpp:
28183        (_WebKitSettingsPrivate::_WebKitSettingsPrivate): Pass 'WebKit2.' as the second argument to WebPreferences::create().
28184
281852014-03-31  Ryuan Choi  <ryuan.choi@samsung.com>
28186
28187        [EFL][WK2] Extract the control of page background out of color_set
28188        https://bugs.webkit.org/show_bug.cgi?id=127539
28189
28190        Reviewed by Gyuyoung Kim.
28191
28192        EFL have a way to change the color using evas_object_color_set and we used it to change background.
28193        But, We should not use it because the alpha value of color_set is used
28194        for the transparancy of object itself including background and contents.
28195
28196        This patch added ewk_view_bg_color_{get|set} to change the background color.
28197
28198        * UIProcess/API/C/efl/WKViewEfl.cpp:
28199        Extracted controls of page background out of color_set.
28200        color_set will be only used for the opacity of whole contents.
28201        (WKViewSetBackgroundColor): Added to share page background color.
28202        (WKViewGetBackgroundColor):
28203        * UIProcess/API/C/efl/WKViewEfl.h:
28204        * UIProcess/API/efl/EwkView.cpp:
28205        (EwkView::handleEvasObjectColorSet):
28206        * UIProcess/API/efl/ewk_view.cpp:
28207        Removed ewk_view_draws_page_background_set which just control whether to draw background.
28208        ewk_view_bg_color_set will conver it.
28209        (ewk_view_bg_color_set):
28210        (ewk_view_bg_color_get):
28211        * UIProcess/API/efl/ewk_view.h:
28212        * UIProcess/API/efl/tests/test_ewk2_view.cpp: Added simple test case.
28213        * UIProcess/efl/WebViewEfl.cpp:
28214        (WebKit::WebViewEfl::setViewBackgroundColor):
28215        (WebKit::WebViewEfl::viewBackgroundColor):
28216        * UIProcess/efl/WebViewEfl.h:
28217
282182014-03-31  Joonghun Park  <jh718.park@samsung.com>
28219
28220        [EFL][WK2]Implement ewk APIs of web local storage which have deletion functions of the local storage entries
28221        https://bugs.webkit.org/show_bug.cgi?id=130577
28222
28223        Reviewed by Gyuyoung Kim.
28224
28225        * UIProcess/API/efl/ewk_storage_manager.cpp:
28226        (ewk_storage_manager_entries_clear):
28227        (ewk_storage_manager_entries_for_origin_del):
28228        * UIProcess/API/efl/ewk_storage_manager.h:
28229        * UIProcess/API/efl/ewk_storage_manager_private.h:
28230        (EwkStorageManager::wkStorageManager):
28231        * UIProcess/API/efl/tests/test_ewk2_storage_manager.cpp:
28232        adding and updating API unittest and fixing memory leak of the existing test case
28233        (EWK2StorageManagerTest::getStorageOriginsCallback):
28234        (EWK2StorageManagerTest::checkOrigin):
28235        (EWK2StorageManagerTest::getOrigin):
28236        (TEST_F):
28237
282382014-03-31  Anders Carlsson  <andersca@apple.com>
28239
28240        Rename policy enums to match the delegate methods
28241        https://bugs.webkit.org/show_bug.cgi?id=131002
28242
28243        Reviewed by Tim Horton.
28244
28245        * UIProcess/API/Cocoa/WKNavigationDelegate.h:
28246        (NS_ENUM):
28247        * UIProcess/Cocoa/NavigationState.mm:
28248        (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
28249        (WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
28250
282512014-03-31  Anders Carlsson  <andersca@apple.com>
28252
28253        Add more preferences
28254        https://bugs.webkit.org/show_bug.cgi?id=131001
28255
28256        Reviewed by Simon Fraser.
28257
28258        * UIProcess/API/Cocoa/WKPreferences.h:
28259        * UIProcess/API/Cocoa/WKPreferences.mm:
28260        (-[WKPreferences isJavaScriptEnabled]):
28261        (-[WKPreferences setJavaScriptEnabled:]):
28262        (-[WKPreferences javaScriptCanOpenWindowsAutomatically]):
28263        (-[WKPreferences setJavaScriptCanOpenWindowsAutomatically:]):
28264        (-[WKPreferences suppressesIncrementalRendering]):
28265        (-[WKPreferences setSuppressesIncrementalRendering:]):
28266        (-[WKPreferences isJavaEnabled]):
28267        (-[WKPreferences setJavaEnabled:]):
28268        (-[WKPreferences arePlugInsEnabled]):
28269        (-[WKPreferences setPlugInsEnabled:]):
28270
282712014-03-31  Tim Horton  <timothy_horton@apple.com>
28272
28273        Fix the build.
28274
28275        * WebProcess/WebPage/WebPage.cpp:
28276        (WebKit::WebPage::updatePreferences):
28277
282782014-03-31  Simon Fraser  <simon.fraser@apple.com>
28279
28280        Fix the iOS build.
28281
28282        * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
28283        (WebKit::RemoteLayerTreeHost::createLayer):
28284        * UIProcess/mac/RemoteLayerTreeHost.h:
28285        * UIProcess/mac/RemoteLayerTreeHost.mm:
28286        (WebKit::RemoteLayerTreeHost::setLayerID):
28287        (WebKit::RemoteLayerTreeHost::layerID):
28288        (WebKit::RemoteLayerTreeHost::createLayer):
28289
282902014-03-31  Anders Carlsson  <andersca@apple.com>
28291
28292        Add a couple of iOS specific preferences
28293        https://bugs.webkit.org/show_bug.cgi?id=130999
28294
28295        Reviewed by Simon Fraser.
28296
28297        * Shared/WebPreferencesStore.h:
28298        * UIProcess/API/Cocoa/WKPreferences.h:
28299        * UIProcess/API/Cocoa/WKPreferences.mm:
28300        (-[WKPreferences allowsInlineMediaPlayback]):
28301        (-[WKPreferences setAllowsInlineMediaPlayback:]):
28302        (-[WKPreferences mediaPlaybackRequiresUserAction]):
28303        (-[WKPreferences setMediaPlaybackRequiresUserAction:]):
28304        (-[WKPreferences mediaPlaybackAllowsAirPlay]):
28305        (-[WKPreferences setMediaPlaybackAllowsAirPlay:]):
28306        * WebProcess/WebPage/WebPage.cpp:
28307        (WebKit::WebPage::updatePreferences):
28308
283092014-03-31  Anders Carlsson  <andersca@apple.com>
28310
28311        Add a new -[WKPreferences initWithUserDefaultsPrefixKey:] initializer
28312        https://bugs.webkit.org/show_bug.cgi?id=130996
28313
28314        Reviewed by Simon Fraser.
28315
28316        Add a "key prefix" to the WebKit::WebPreferences create function, so we can use a different
28317        key prefix ("WebKit") for the modern API and not pollute the user defaults namespace with
28318        the old key prefix ("WebKit2.").
28319        
28320        * UIProcess/API/C/WKPreferences.cpp:
28321        (WKPreferencesCreate):
28322        (WKPreferencesCreateWithIdentifier):
28323        * UIProcess/API/Cocoa/WKPreferences.h:
28324        * UIProcess/API/Cocoa/WKPreferences.mm:
28325        (-[WKPreferences init]):
28326        (-[WKPreferences initWithUserDefaultsPrefixKey:]):
28327        (-[WKPreferences userDefaultsPrefixKey]):
28328        * UIProcess/WebPageGroup.cpp:
28329        (WebKit::WebPageGroup::WebPageGroup):
28330        * UIProcess/WebPreferences.cpp:
28331        (WebKit::WebPreferences::WebPreferences):
28332        * UIProcess/WebPreferences.h:
28333        (WebKit::WebPreferences::create):
28334        * UIProcess/mac/WebPreferencesMac.mm:
28335        (WebKit::makeKey):
28336        (WebKit::setStringValueIfInUserDefaults):
28337        (WebKit::setBoolValueIfInUserDefaults):
28338        (WebKit::setUInt32ValueIfInUserDefaults):
28339        (WebKit::setDoubleValueIfInUserDefaults):
28340        (WebKit::WebPreferences::platformInitializeStore):
28341        (WebKit::WebPreferences::platformUpdateStringValueForKey):
28342        (WebKit::WebPreferences::platformUpdateBoolValueForKey):
28343        (WebKit::WebPreferences::platformUpdateUInt32ValueForKey):
28344        (WebKit::WebPreferences::platformUpdateDoubleValueForKey):
28345        (WebKit::WebPreferences::platformUpdateFloatValueForKey):
28346
283472014-03-31  Pratik Solanki  <psolanki@apple.com>
28348
28349        Remove duplicate entries in Derived Sources.
28350
28351        Rubber-stamped by Anders Carlsson.
28352
28353        * WebKit2.xcodeproj/project.pbxproj:
28354
283552014-03-31  Tim Horton  <timothy_horton@apple.com>
28356
28357        Fix the build.
28358
28359        * UIProcess/mac/RemoteLayerTreeHost.mm:
28360        (WebKit::RemoteLayerTreeHost::updateLayerTree):
28361
283622014-03-31  Tim Horton  <timothy_horton@apple.com>
28363
28364        Fix the build.
28365
28366        * UIProcess/mac/RemoteLayerTreeHost.mm:
28367        (WebKit::RemoteLayerTreeHost::updateLayerTree):
28368
283692014-03-31  Anders Carlsson  <andersca@apple.com>
28370
28371        Rename -[WKNavigationAction destinationFrame] to -[WKNavigationAction targetFrame]
28372        https://bugs.webkit.org/show_bug.cgi?id=130994
28373
28374        Reviewed by Dan Bernstein.
28375
28376        * UIProcess/API/Cocoa/WKNavigationAction.h:
28377        * UIProcess/API/Cocoa/WKNavigationAction.mm:
28378        (-[WKNavigationAction description]):
28379        (-[WKNavigationAction targetFrame]):
28380        (-[WKNavigationAction setTargetFrame:]):
28381        (-[WKNavigationAction destinationFrame]): Deleted.
28382        (-[WKNavigationAction setDestinationFrame:]): Deleted.
28383        * UIProcess/API/Cocoa/WKNavigationActionInternal.h:
28384        * UIProcess/Cocoa/NavigationState.mm:
28385        (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
28386
283872014-03-31  Tim Horton  <timothy_horton@apple.com>
28388
28389        [iOS WebKit2] Flush all surfaces after painting into all of them, instead of after painting into each one
28390        https://bugs.webkit.org/show_bug.cgi?id=130768
28391        <rdar://problem/16421471>
28392
28393        Reviewed by Benjamin Poulain.
28394
28395        * Shared/mac/RemoteLayerBackingStore.h:
28396        Make RemoteLayerBackingStore noncopyable.
28397        Add flush(), which synchronously flushes painting operations on the underlying backing store.
28398        Add storage for the CGContext that needs to be flushed, and ensure that it is flushed before we paint again.
28399
28400        * Shared/mac/RemoteLayerBackingStore.mm:
28401        (RemoteLayerBackingStore::display):
28402
28403        (RemoteLayerBackingStore::drawInContext):
28404        Don't flush the context immediately after painting.
28405
28406        (RemoteLayerBackingStore::flush):
28407        Flush the current front surface/buffer's context.
28408        Clear the new pending-flush members.
28409
28410        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
28411        (WebKit::flushBackingStoreChangesInTransaction):
28412        (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
28413        Crawl through all of the valid changed backing stores in the transaction and flush them.
28414        Reset changed properties after encoding the commit.
28415
28416        * Shared/mac/RemoteLayerTreeTransaction.h:
28417        (WebKit::RemoteLayerTreeTransaction::LayerProperties::resetChangedProperties):
28418        (WebKit::RemoteLayerTreeTransaction::changedLayers):
28419        (WebKit::RemoteLayerTreeTransaction::changedLayerProperties):
28420        * Shared/mac/RemoteLayerTreeTransaction.mm:
28421        (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
28422        (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
28423        (WebKit::RemoteLayerTreeTransaction::encode):
28424        (WebKit::RemoteLayerTreeTransaction::decode):
28425        (WebKit::RemoteLayerTreeTransaction::layerPropertiesChanged):
28426        (WebKit::dumpChangedLayers):
28427        Instead of storing a copy of the LayerProperties struct for each changed layer
28428        while building the transaction in the Web process, store a list of changed layers,
28429        and directly encode the commit from those layers' LayerProperties. This provides a few benefits:
28430                - We avoid copying LayerProperties for every changed layer, every commit
28431                - We can make RemoteLayerBackingStore noncopyable
28432                - We can walk the changed layers after building the transaction
28433                in order to flush backing store, and actually affect the layers'
28434                own RemoteLayerBackingStore instead of a copy.
28435        The UI process will still generate a LayerPropertiesMap at decode time.
28436        
28437        * UIProcess/mac/RemoteLayerTreeHost.mm:
28438        (WebKit::RemoteLayerTreeHost::updateLayerTree):
28439        Don't copy the LayerProperties struct for the debug overlay. Instead,
28440        adjust the properties which the debug overlay whacks directly on the layer,
28441        after applying the normal LayerProperties.
28442
28443        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
28444        (PlatformCALayerRemote::recursiveBuildTransaction):
28445        Don't reset changed layer properties in the middle of building a transaction. Instead,
28446        RemoteLayerTreeDrawingArea::flushLayers() will reset all the flags on all changed layers
28447        after the commit is encoded.
28448
28449        * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
28450        (WebKit::PlatformCALayerRemote::properties):
28451
284522014-03-31  Simon Fraser  <simon.fraser@apple.com>
28453
28454        [UI-side compositing] Proxy animations to the UI process
28455        https://bugs.webkit.org/show_bug.cgi?id=130946
28456
28457        Reviewed by Tim Horton.
28458        
28459        Add encoding/decoding of TimingFunctions. Add encoding support
28460        for HashSet.
28461        
28462        Add PlatformCAAnimationRemote and have PlatformCALayerRemote allow
28463        animations now. PlatformCALayerRemote's properties are defined in the class,
28464        as is the encoding/decoding (much cleaner than having them in the transaction
28465        class I think).
28466        
28467        Add support for the "animationDidStart" callback and sending this back to the
28468        web process. This involves a HashMap of layerID->WKAnimationDelegate stored
28469        on the RemoteLayerTreeHost, and a message send via the DrawingArea. On the
28470        other side, RemoteLayerTreeContext stores a HashMap of layerID->PlatformCALayerRemote*
28471        for layers which have just started animations, which is used to get the
28472        PlatformCALayer* to call animationDidStart() on.
28473        
28474        This requires that the RemoteLayerTreeHost* be passed down into property application,
28475        and that the RemoteLayerTreeHost have a reference to the drawing area.
28476        
28477        To every CALayer in the UI process we -setValue:forKey: to track the PlatformLayerID,
28478        so we can get back to it in order to dispatch "animationDidStart".
28479        
28480        Replace some "using namespace WebKit" with "namespace WebKit { }".
28481
28482        * Platform/IPC/ArgumentCoders.h:
28483        * Shared/WebCoreArgumentCoders.cpp:
28484        (IPC::ArgumentCoder<LinearTimingFunction>::encode):
28485        (IPC::ArgumentCoder<LinearTimingFunction>::decode):
28486        (IPC::ArgumentCoder<CubicBezierTimingFunction>::encode):
28487        (IPC::ArgumentCoder<CubicBezierTimingFunction>::decode):
28488        (IPC::ArgumentCoder<StepsTimingFunction>::encode):
28489        (IPC::ArgumentCoder<StepsTimingFunction>::decode):
28490        * Shared/WebCoreArgumentCoders.h:
28491        * Shared/mac/RemoteLayerBackingStore.mm:
28492        * Shared/mac/RemoteLayerTreePropertyApplier.h:
28493        * Shared/mac/RemoteLayerTreePropertyApplier.mm:
28494        (WebKit::applyPropertiesToLayer):
28495        (WebKit::RemoteLayerTreePropertyApplier::applyProperties):
28496        * Shared/mac/RemoteLayerTreeTransaction.h:
28497        * Shared/mac/RemoteLayerTreeTransaction.mm:
28498        (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
28499        (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
28500        (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
28501        (WebKit::dumpChangedLayers):
28502        * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
28503        (WebKit::RemoteLayerTreeHost::layerID):
28504        (WebKit::RemoteLayerTreeHost::createLayer):
28505        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
28506        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
28507        (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
28508        (WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidStart):
28509        (WebKit::RemoteLayerTreeDrawingAreaProxy::showDebugIndicator):
28510        * UIProcess/mac/RemoteLayerTreeHost.h:
28511        (WebKit::RemoteLayerTreeHost::animationDelegates):
28512        * UIProcess/mac/RemoteLayerTreeHost.mm:
28513        (WebKit::RemoteLayerTreeHost::RemoteLayerTreeHost):
28514        (WebKit::RemoteLayerTreeHost::updateLayerTree):
28515        (WebKit::RemoteLayerTreeHost::layerWillBeRemoved):
28516        (WebKit::RemoteLayerTreeHost::animationDidStart):
28517        (WebKit::RemoteLayerTreeHost::layerID):
28518        (WebKit::RemoteLayerTreeHost::createLayer):
28519        * WebKit2.xcodeproj/project.pbxproj:
28520        * WebProcess/WebPage/DrawingArea.h:
28521        (WebKit::DrawingArea::acceleratedAnimationDidStart):
28522        * WebProcess/WebPage/DrawingArea.messages.in:
28523        * WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
28524        (WebKit::GraphicsLayerCARemote::createPlatformCAAnimation):
28525        * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
28526        * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h: Added.
28527        * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm: Added.
28528        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
28529        (WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
28530        (WebKit::PlatformCALayerRemote::animationStarted):
28531        (WebKit::PlatformCALayerRemote::addAnimationForKey):
28532        (WebKit::PlatformCALayerRemote::removeAnimationForKey):
28533        (WebKit::PlatformCALayerRemote::animationForKey):
28534        (PlatformCALayerRemote::recursiveBuildTransaction): Deleted.
28535        (PlatformCALayerRemote::addAnimationForKey): Deleted.
28536        (PlatformCALayerRemote::removeAnimationForKey): Deleted.
28537        (PlatformCALayerRemote::animationForKey): Deleted.
28538        * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
28539        * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
28540        * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
28541        * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
28542        (WebKit::RemoteLayerTreeContext::layerWillBeDestroyed):
28543        (WebKit::RemoteLayerTreeContext::willStartAnimationOnLayer):
28544        (WebKit::RemoteLayerTreeContext::animationDidStart):
28545        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
28546        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
28547        (WebKit::RemoteLayerTreeDrawingArea::acceleratedAnimationDidStart):
28548        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
28549        (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
28550
285512014-03-31  Tim Horton  <timothy_horton@apple.com>
28552
28553        Double-buffer RemoteLayerBackingStore
28554        https://bugs.webkit.org/show_bug.cgi?id=130990
28555
28556        Reviewed by Simon Fraser.
28557
28558        We'll keep a front and back buffer for each surface; the front is generally currently
28559        being displayed in the UI process, and the back is the one we'll paint into.
28560
28561        Swap the two surfaces each time we paint; since we synchronize with the UI process,
28562        the old front surface will generally be out-of-use by the render server by the time
28563        we paint again. However, since render server commits are asynchronous and we have 
28564        no way to syncronize with them yet, we have to check if the (swapped to front) back buffer is in use,
28565        and create a new front buffer if it is.
28566
28567        Triple-buffering would solve this problem, as would synchronization with the render server,
28568        as would a pool of surfaces - we will revisit these solutions in future patches.
28569
28570        * Shared/mac/RemoteLayerBackingStore.h:
28571        * Shared/mac/RemoteLayerBackingStore.mm:
28572        (RemoteLayerBackingStore::ensureBackingStore):
28573        (RemoteLayerBackingStore::clearBackingStore):
28574        Factor clearBackingStore() out of ensureBackingStore() and display().
28575
28576        (RemoteLayerBackingStore::display):
28577        Swap buffers. Since m_backSurface will hold on to the back surface's CGContext,
28578        we don't need to worry about tearing down the image first anymore.
28579        Don't worry about creating a back image (nor copying it into the front image)
28580        if we're going to paint the whole layer.
28581
28582        (RemoteLayerBackingStore::drawInContext):
28583        Fix some names.
28584
28585        (RemoteLayerBackingStore::applyBackingStoreToLayer):
28586        Reduce duplication.
28587
28588        (RemoteLayerBackingStore::createImageForFrontBuffer): Deleted.
28589
285902014-03-31  Tim Horton  <timothy_horton@apple.com>
28591
28592        Synchronize Web process remote layer tree commits with CoreAnimation commits in the UI process
28593        https://bugs.webkit.org/show_bug.cgi?id=130984
28594
28595        Reviewed by Simon Fraser.
28596
28597        There's no reason for the Web process to paint faster than the UI process
28598        can apply to and commit the CoreAnimation layer tree.
28599
28600        Also, once we get proper double-buffering and purgeable back buffers, we
28601        will need the ability to make some assumptions about in-use surfaces.
28602
28603        Unfortunately, we can't actually tell when the render server commits, 
28604        as this is an asynchronous operation in a process we don't control, so
28605        for now, this is only an approximation.
28606
28607        This also means that the assumptions we would like to make won't be
28608        strong guarantees yet.
28609
28610        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
28611        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
28612        (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
28613        When we commit, install a run loop observer to fire immediately after CoreAnimation commits.
28614
28615        (WebKit::RemoteLayerTreeDrawingAreaProxy::showDebugIndicator):
28616        Fix a typo ('cmponents').
28617
28618        (WebKit::coreAnimationDidCommitLayersCallback):
28619        (WebKit::RemoteLayerTreeDrawingAreaProxy::scheduleCoreAnimationLayerCommitObserver):
28620        (WebKit::RemoteLayerTreeDrawingAreaProxy::coreAnimationDidCommitLayers):
28621        When CA commits, send a message to the Web process letting it know that we
28622        swapped to the new backing store.
28623
28624        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
28625        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
28626        (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
28627        (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
28628        (WebKit::RemoteLayerTreeDrawingArea::didUpdate):
28629        Defer remote layer tree commits until we get didUpdate() from the UI process.
28630
286312014-03-31  Dean Jackson  <dino@apple.com>
28632
28633        Remove WEB_ANIMATIONS
28634        https://bugs.webkit.org/show_bug.cgi?id=130989
28635
28636        Reviewed by Simon Fraser.
28637
28638        Remove this feature flag until we plan to implement.
28639
28640        * Configurations/FeatureDefines.xcconfig:
28641
286422014-03-31  Simon Fraser  <simon.fraser@apple.com>
28643
28644        [iOS WK2] Hook up scroll events for accelerated overflow:scroll
28645        https://bugs.webkit.org/show_bug.cgi?id=130976
28646
28647        Reviewed by Tim Horton.
28648        
28649        When an accelerated overflow:scroll is scrolled in the UI process,
28650        tell the WebProcess that the scroll happened to update RenderLayer
28651        state and fire events.
28652        
28653        Add a WKOverflowScrollViewDelegate which is set as the delegate of
28654        UIScrollViews, owned by ScrollingTreeOverflowScrollingNodeIOS, and propagates
28655        -scrollViewDidScroll: messages to ScrollingTree::scrollPositionChangedViaDelegatedScrolling(),
28656        which updates child layers and then, via RemoteScrollingTree::scrollingTreeNodeDidScroll,
28657        tells the RemoteScrollingCoordinator which sends a message to the WebProcess.
28658        
28659        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
28660        (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidScroll): Name change
28661        to try to reduce confusion.
28662        (WebKit::RemoteScrollingCoordinatorProxy::scrollPositionChanged): Deleted.
28663        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
28664        * UIProcess/Scrolling/RemoteScrollingTree.cpp:
28665        (WebKit::RemoteScrollingTree::scrollingTreeNodeDidScroll):
28666        * UIProcess/Scrolling/RemoteScrollingTree.h:
28667        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
28668        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
28669        (-[WKOverflowScrollViewDelegate initWithScrollingTreeNode:WebKit::]):
28670        (-[WKOverflowScrollViewDelegate scrollViewDidScroll:]):
28671        (-[WKOverflowScrollViewDelegate scrollViewWillBeginDragging:]):
28672        (-[WKOverflowScrollViewDelegate scrollViewDidEndDragging:willDecelerate:]):
28673        (-[WKOverflowScrollViewDelegate scrollViewDidEndScrollingAnimation:]):
28674        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::~ScrollingTreeOverflowScrollingNodeIOS):
28675        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateBeforeChildren):
28676        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren):
28677        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollViewDidScroll):
28678        * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
28679        (WebKit::RemoteScrollingCoordinator::scrollPositionChangedForNode): No need for
28680        rounding.
28681
286822014-03-29  Simon Fraser  <simon.fraser@apple.com>
28683
28684        Fix scrolling on OS X with UI-side compositing
28685        https://bugs.webkit.org/show_bug.cgi?id=130930
28686
28687        Reviewed by Tim Horton.
28688        
28689        On iOS, we rely on visible rect updates to propagate scroll offset
28690        changes to the WebProcess. RemoteScrollingCoordinatorProxy was thus hardcoded
28691        to bail from scrollPositionChanged() when the scrolled node was the root node,
28692        but this broke OS X. Fix by adding a behavior flag to RemoteScrollingCoordinatorProxy.
28693
28694        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
28695        (WebKit::RemoteScrollingCoordinatorProxy::RemoteScrollingCoordinatorProxy):
28696        (WebKit::RemoteScrollingCoordinatorProxy::scrollPositionChanged):
28697        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
28698        (WebKit::RemoteScrollingCoordinatorProxy::setPropagatesMainFrameScrolls):
28699        (WebKit::RemoteScrollingCoordinatorProxy::propagatesMainFrameScrolls):
28700        * UIProcess/WebPageProxy.cpp:
28701        (WebKit::WebPageProxy::initializeWebPage):
28702
287032014-03-31  Tim Horton  <timothy_horton@apple.com>
28704
28705        [iOS WebKit2] Disable tile cohort retention for now
28706        https://bugs.webkit.org/show_bug.cgi?id=130926
28707        <rdar://problem/16465413>
28708
28709        Reviewed by Simon Fraser.
28710
28711        * Shared/WebPreferencesStore.h:
28712        * WebProcess/WebPage/WebPage.cpp:
28713        (WebKit::WebPage::updatePreferences):
28714        Add a preference for temporary tile cohort retention (essentially, provide a setting
28715        that means that we will never retain tiles at all once they leave the tile coverage rect).
28716        Defaults to true to maintain existing behavior, except for iOS WebKit2, where
28717        it defaults to false because we don't have the requisite support for purgeable tiles yet.
28718
28719        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
28720        (WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
28721        (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
28722
287232014-03-31  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
28724
28725        Buildfix after r166497.
28726
28727        Reviewed by Csaba Osztrogonác.
28728
28729        * UIProcess/API/efl/ewk_context.h: Missing EAPI added.
28730
287312014-03-31  Martin Robinson  <mrobinson@igalia.com>
28732
28733        [GTK] Use PROJECT_VERSION_* instead of WEBKIT_*_VERSION
28734        https://bugs.webkit.org/show_bug.cgi?id=130936
28735
28736        Reviewed by Carlos Garcia Campos.
28737
28738        * UIProcess/API/gtk/WebKitVersion.h.in: Use PROJECT_VERSION_* macros instead of the Autotools ones.
28739
287402014-03-31  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
28741
28742        [EFL][WK2] Add ewk APIs to control TLS error policy on WebContext.
28743        https://bugs.webkit.org/show_bug.cgi?id=129740
28744
28745        Reviewed by Gyuyoung Kim.
28746
28747        * PlatformEfl.cmake:
28748        Added the new SSL test.
28749
28750        * UIProcess/API/efl/ewk_context.cpp:
28751        (EwkContext::ignoreTLSErrors):
28752        (EwkContext::setIgnoreTLSErrors):
28753        (ewk_context_ignore_tls_errors_get):
28754        (ewk_context_ignore_tls_errors_set):
28755        * UIProcess/API/efl/ewk_context.h:
28756        * UIProcess/API/efl/ewk_context_private.h:
28757        Added the API functions.
28758
28759        * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.cpp:
28760        (EWK2UnitTestServer::EWK2UnitTestServer):
28761        * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.h:
28762        Extended the unit test server to handle TLS.
28763
28764        * UIProcess/API/efl/tests/test_ewk2_ssl.cpp:
28765        Added tests to check the TLS policy API.
28766
287672014-03-31  Carlos Garcia Campos  <cgarcia@igalia.com>
28768
28769        Unreviewed. Fix GTK2 plugin process binary name after r166492.
28770
28771        * PlatformGTK.cmake: Fix typo.
28772
287732014-03-31  Dániel Bátyai  <dbatyai.u-szeged@partner.samsung.com>
28774
28775        Remove hostThisRegister() and hostThisValue()
28776        https://bugs.webkit.org/show_bug.cgi?id=130895
28777
28778        Reviewed by Geoffrey Garen.
28779
28780        Removed hostThisRegister() and hostThisValue() and instead use thisArgumentOffset() and thisValue() respectively.
28781
28782        * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
28783        (WebKit::callMethod):
28784
287852014-03-31  Carlos Garcia Campos  <cgarcia@igalia.com>
28786
28787        [GTK] Add support for GTK3 plugins
28788        https://bugs.webkit.org/show_bug.cgi?id=130599
28789
28790        Reviewed by Martin Robinson.
28791
28792        We currently have a gtk2 based plugin process mainly for flash
28793        and a few other plugins that use GTK2, but many other plugins
28794        don't even use gtk at all. This patch builds a lighter plugin
28795        process based on GTK3, used by default for all the plugins expect
28796        the ones requiring GTK2. And of course the default plugin process
28797        supports GTK3 plugins.
28798
28799        * CMakeLists.txt: Add common rules to build the default plugin process.
28800        * PlatformEfl.cmake: Remove common cmake code that is now in CMakeLists.txt.
28801        * PlatformGTK.cmake: Rename WebKitPluginProcess to
28802        WebKitPluginProcess2 and add the platform specific rules to build
28803        the default plugin process.
28804        * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
28805        (WebKit::NetscapePluginModule::getPluginInfoForLoadedPlugin):
28806        Check if the loaded plugin module uses GTK2.
28807        (WebKit::NetscapePluginModule::getPluginInfo): Set requiresGtk2 accordingly.
28808        (WebKit::NetscapePluginModule::scanPlugin): Write "requires-gtk2"
28809        line to stdout if the plugin requires GTK2.
28810        * Shared/Plugins/PluginModuleInfo.h: Add requiresGtk2 boolean member.
28811        * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
28812        (WebKit::ProcessLauncher::launchProcess): Use the
28813        WebKitPluginProcess2 executable when the plugin requires GTK2.
28814        * UIProcess/Plugins/PluginProcessProxy.h: Add requiresGtk2 boolean
28815        member to RawPluginMetaData struct.
28816        * UIProcess/Plugins/gtk/PluginInfoCache.cpp: Bump the cache schema version.
28817        (WebKit::PluginInfoCache::getPluginInfo): Read also requires-gtk2
28818        key from the cache.
28819        (WebKit::PluginInfoCache::updatePluginInfo): Save also
28820        requires-gtk2 key in the cache.
28821        * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
28822        (WebKit::PluginProcessProxy::platformGetLaunchOptions): Add an
28823        extra initialization data parameter if the plugin requires GTK2.
28824        (WebKit::PluginProcessProxy::scanPlugin): Check if "requires-gtk2"
28825        was written to stdout.
28826
288272014-03-30  Andy Estes  <aestes@apple.com>
28828
28829        [Cocoa] Add an originatingWebView property to _WKDownload
28830        https://bugs.webkit.org/show_bug.cgi?id=130945
28831
28832        Reviewed by Anders Carlsson.
28833
28834        * UIProcess/API/Cocoa/WKWebView.mm:
28835        (-[WKWebView initWithFrame:configuration:]): Passed self to WKView's initializer.
28836        * UIProcess/API/Cocoa/_WKDownload.h: Declared originatingWebView as a weak, readonly property.
28837        * UIProcess/API/Cocoa/_WKDownload.mm:
28838        (-[_WKDownload originatingWebView]):
28839        (-[_WKDownload setOriginatingWebView:]):
28840        * UIProcess/API/Cocoa/_WKDownloadInternal.h: Re-declared originatingWebView as readwrite so that
28841        PageClientImpl can call setOriginatingWebView:. Removed some dead code.
28842        * UIProcess/API/mac/WKView.mm:
28843        (-[WKView initWithFrame:context:configuration:webView:]): Updated to accept a webView parameter.
28844        (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]): Passed nil for the webView parameter.
28845        * UIProcess/API/mac/WKViewInternal.h:
28846        * UIProcess/Cocoa/DownloadClient.mm:
28847        (WebKit::DownloadClient::decideDestinationWithSuggestedFilename): Ensured allowOverwrite is initialized.
28848        * UIProcess/PageClient.h: Included handleDownloadRequest() on all platforms.
28849        * UIProcess/WebPageProxy.cpp:
28850        (WebKit::WebPageProxy::receivedPolicyDecision): Ditto.
28851        (WebKit::WebPageProxy::handleDownloadRequest): Ditto.
28852        * UIProcess/WebPageProxy.h: Ditto.
28853        * UIProcess/ios/PageClientImplIOS.h:
28854        * UIProcess/ios/PageClientImplIOS.mm:
28855        (WebKit::PageClientImpl::handleDownloadRequest): Called -[_WKDownload setOriginatingWebView:].
28856        * UIProcess/mac/PageClientImpl.h: Added a m_webView member variable.
28857        * UIProcess/mac/PageClientImpl.mm:
28858        (WebKit::PageClientImpl::PageClientImpl): Asserted that m_webView is nil if WK API isn't enabled.
28859        (WebKit::PageClientImpl::handleDownloadRequest): Called -[_WKDownload setOriginatingWebView:].
28860
288612014-03-29  Commit Queue  <commit-queue@webkit.org>
28862
28863        Unreviewed, rolling out r166434.
28864        https://bugs.webkit.org/show_bug.cgi?id=130938
28865
28866        Caused crashes and other failures on cache tests (Requested by
28867        ap on #webkit).
28868
28869        Reverted changeset:
28870
28871        "Web Replay: add page-level setting to bypass the MemoryCache"
28872        https://bugs.webkit.org/show_bug.cgi?id=130728
28873        http://trac.webkit.org/changeset/166434
28874
288752014-03-28  Anders Carlsson  <andersca@apple.com>
28876
28877        Uncaught NSExceptions should crash the web process
28878        https://bugs.webkit.org/show_bug.cgi?id=130923
28879        <rdar://problem/16463751>
28880
28881        Reviewed by Dan Bernstein.
28882
28883        * WebProcess/cocoa/WebProcessCocoa.mm:
28884        (WebKit::WebProcess::platformInitializeWebProcess):
28885
288862014-03-28  Csaba Osztrogonác  <ossy@webkit.org>
28887
28888        Unreviewed buildfix after r166441 and r166443.
28889
28890        Missing PLATFORM(COCOA) guards added.
28891
28892        * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
28893        (WebKit::NPRuntimeObjectMap::evaluate):
28894        * WebProcess/Plugins/PluginProxy.cpp:
28895        * WebProcess/Plugins/PluginProxy.h:
28896
288972014-03-28  Stephanie Lewis  <slewis@apple.com>
28898
28899        Don't prevent AppSleep from sync messages.
28900        https://bugs.webkit.org/show_bug.cgi?id=130747.
28901
28902        Reviewed by Anders Carlsson.
28903
28904        We think sync messages only need to happen full throttle when the plugin is visible,
28905        the user is interacting with the plugin, or audio is playing.  Since we already
28906        take assertions for all these cases the assertion in sync messages doesn’t provide
28907        any value.  Since it can keep the PluginProcess awake in other instances remove it.
28908
28909        * PluginProcess/WebProcessConnection.cpp:
28910        (WebKit::WebProcessConnection::didReceiveSyncMessage):
28911
289122014-03-28  Stephanie Lewis  <slewis@apple.com>
28913
28914        Stop waking up the web process in the background because of plugin activity.
28915        Part of <rdar://problem/16061257> PluginProcess should AppNap when no plugins on active tab.
28916
28917        Reviewed by Anders Carlsson.
28918
28919        Plugin activity in the background can constantly wake up web processes.  This is only
28920        necessary when audio is playing to support web apps like Pandora and youtube playing 
28921        in the background.  Use a new api in CoreAudio to see if there is audio playing in
28922        the PluginProcess.
28923
28924        * PluginProcess/PluginProcess.cpp:
28925        (WebKit::PluginProcess::PluginProcess): Add a AudioHardwareListener
28926        (WebKit::PluginProcess::createWebProcessConnection): tell web process current state
28927        (WebKit::PluginProcess::audioHardwareDidBecomeActive): respond to audio hardware notifications
28928        (WebKit::PluginProcess::audioHardwareDidBecomeInactive):
28929        * PluginProcess/PluginProcess.h:
28930        * PluginProcess/WebProcessConnection.cpp: tell WebProcess when audio state in PluginProcess
28931             changes.
28932        (WebKit::WebProcessConnection::audioHardwareDidBecomeActive):
28933        (WebKit::WebProcessConnection::audioHardwareDidBecomeInactive):
28934        * PluginProcess/WebProcessConnection.h:
28935        * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
28936             Only invoke pageThrottler activity when playing audio
28937        (WebKit::NPRuntimeObjectMap::evaluate):
28938        * WebProcess/Plugins/Plugin.h: add function to get audio state
28939        (WebKit::Plugin::audioIsPlayingInPluginProcess):
28940        * WebProcess/Plugins/PluginProcessConnection.cpp: store audio state
28941        (WebKit::PluginProcessConnection::PluginProcessConnection):
28942        (WebKit::PluginProcessConnection::didReceiveMessage):
28943        (WebKit::PluginProcessConnection::audioHardwareDidBecomeActive):
28944        (WebKit::PluginProcessConnection::audioHardwareDidBecomeInactive):
28945        * WebProcess/Plugins/PluginProcessConnection.h:
28946        (WebKit::PluginProcessConnection::audioIsPlaying):
28947        * WebProcess/Plugins/PluginProcessConnection.messages.in:
28948        * WebProcess/Plugins/PluginProxy.cpp:
28949        (WebKit::PluginProxy::audioIsPlayingInPluginProcess):
28950        * WebProcess/Plugins/PluginProxy.h:
28951        * WebProcess/Plugins/PluginView.cpp:
28952        (WebKit::PluginView::audioIsPlayingInPluginProcess):
28953        * WebProcess/Plugins/PluginView.h:
28954
289552014-03-28  Stephanie Lewis  <slewis@apple.com>
28956
28957        Have the plugin process track visibility of it’s plugin and sleep when none
28958        are visible.
28959        Part of <rdar://problem/16061257> PluginProcess should AppNap when no plugins on active tab.
28960        https://bugs.webkit.org/show_bug.cgi?id=130694
28961
28962        Reviewed by Anders Carlsson.
28963
28964        Currently AppSleep is enabled on the PluginProcess based on web page visibility.
28965        Add visibility tracking to plugins and move the decision to AppSleep into the the
28966        PluginProcess
28967
28968        * PluginProcess/PluginProcess.cpp:
28969        (WebKit::PluginProcess::PluginProcess): Add a new activity for visible plugins
28970        (WebKit::PluginProcess::pluginsForWebProcessDidBecomeVisible): take an activity
28971             assertion if any web processes have a visible plugin.
28972        (WebKit::PluginProcess::pluginsForWebProcessDidBecomeHidden): 
28973        * PluginProcess/PluginProcess.h:
28974        * PluginProcess/WebProcessConnection.cpp: 
28975        (WebKit::WebProcessConnection::removePluginControllerProxy): remove plugin from 
28976            visible plugins when destroying it
28977        (WebKit::WebProcessConnection::pluginDidBecomeVisible):
28978        (WebKit::WebProcessConnection::pluginDidBecomeHidden): track which plugins are
28979            visible for each web process
28980        * PluginProcess/WebProcessConnection.h:
28981        * PluginProcess/mac/PluginControllerProxyMac.mm:
28982        (WebKit::PluginControllerProxy::windowVisibilityChanged): notify WebProcessConnection
28983            when visibility changed.
28984        * UIProcess/WebContext.h:
28985        * UIProcess/mac/WebContextMac.mm:  instead of tracking plugin app sleep state on the web pref.
28986            and visibility state, just use the web pref.
28987        (WebKit::WebContext::updateProcessSuppressionState):
28988        (WebKit::WebContext::processSuppressionPreferenceIsEnabledForAllContexts):
28989
289902014-03-28  Brian Burg  <bburg@apple.com>
28991
28992        Web Replay: add page-level setting to bypass the MemoryCache
28993        https://bugs.webkit.org/show_bug.cgi?id=130728
28994
28995        Reviewed by Timothy Hatcher.
28996
28997        * UIProcess/APISession.cpp:
28998        (API::generateID): update the base ID for generating unique sessions.
28999
290002014-03-28  Cody Krieger  <cjk@apple.com>
29001
29002        Add willSubmitForm callback support to WKWebProcessPlugInFormDelegatePrivate.
29003
29004        https://bugs.webkit.org/show_bug.cgi?id=130875
29005
29006        Reviewed by Anders Carlsson.
29007
29008        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h:
29009        Add -_webProcessPlugInBrowserContextController:willSubmitForm:toFrame:fromFrame:withValues:
29010        to the WKWebProcessPlugInFormDelegatePrivate protocol.
29011
29012        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
29013        Wire up the willSubmitForm() callback to the new
29014        WKWebProcessPlugInFormDelegatePrivate method.
29015
290162014-03-28  Alexey Proskuryakov  <ap@apple.com>
29017
29018        [Mac] Enable async text input implementation
29019        https://bugs.webkit.org/show_bug.cgi?id=130856
29020
29021        Reviewed by Sam Weinig.
29022
29023        * UIProcess/API/mac/WKView.mm: (-[WKView _interpretKeyEvent:completionHandler:]):
29024        Temporarily work around <rdar://16393434>.
29025
290262014-03-28  Alexey Proskuryakov  <ap@apple.com>
29027
29028        Move sync CancelComposition message under an ifdef
29029        https://bugs.webkit.org/show_bug.cgi?id=130908
29030
29031        Reviewed by Enrica Casucci.
29032
29033        * UIProcess/WebPageProxy.h:
29034        * UIProcess/ios/WebPageProxyIOS.mm:
29035        (WebKit::WebPageProxy::cancelComposition): Deleted.
29036        * UIProcess/mac/WebPageProxyMac.mm:
29037        * WebProcess/WebPage/WebPage.h:
29038        * WebProcess/WebPage/WebPage.messages.in:
29039        * WebProcess/WebPage/mac/WebPageMac.mm:
29040
290412014-03-28  Alexey Proskuryakov  <ap@apple.com>
29042
29043        [iOS] Don't cancel composition on selection change
29044        https://bugs.webkit.org/show_bug.cgi?id=130909
29045
29046        Reviewed by Enrica Casucci.
29047
29048        Fixing a recent regression from bug 130727.
29049
29050        * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didChangeSelection):
29051
290522014-03-28  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
29053
29054        [WK2] Removed unused method logChannelByName.
29055        https://bugs.webkit.org/show_bug.cgi?id=130897
29056
29057        Reviewed by Anders Carlsson.
29058
29059        * Platform/Logging.cpp:
29060        (WebKit::logChannelByName): Deleted.
29061        * Platform/Logging.h:
29062
290632014-03-28  Alexey Proskuryakov  <ap@apple.com>
29064
29065        Eliminate a sync cancelComposition call in WebPageProxy::editorStateChanged
29066        https://bugs.webkit.org/show_bug.cgi?id=130727
29067
29068        Reviewed by Enrica Casucci.
29069
29070        Added a separate CompositionWasCanceled IPC call, with which WebProcess can tell
29071        UIProcess that it should notify an input method of canceled composition. There are
29072        a lot of incorrect edge cases where we don't call it correctly, but this was true
29073        in the old implementation too (for different edge cases).
29074
29075        This change only affects iOS and async NSTextInputClient code path on Mac. I don't
29076        want to change sync NSTextInputClient code path unless absolutely necessary.
29077
29078        * UIProcess/WebPageProxy.cpp:
29079        (WebKit::WebPageProxy::WebPageProxy):
29080        (WebKit::WebPageProxy::editorStateChanged):
29081        (WebKit::WebPageProxy::compositionWasCanceled):
29082        (WebKit::WebPageProxy::resetStateAfterProcessExited):
29083        * UIProcess/WebPageProxy.h:
29084        * UIProcess/WebPageProxy.messages.in:
29085        * UIProcess/mac/WebPageProxyMac.mm:
29086        (WebKit::WebPageProxy::insertText):
29087        (WebKit::WebPageProxy::executeKeypressCommands):
29088        * WebProcess/WebPage/WebPage.cpp:
29089        (WebKit::WebPage::didChangeSelection):
29090
290912014-03-28  Mario Sanchez Prada  <mario.prada@samsung.com>
29092
29093        [GTK] Running minibrowser with url crashes in debug build
29094        https://bugs.webkit.org/show_bug.cgi?id=130492
29095
29096        Reviewed by Martin Robinson.
29097
29098        Use the ResourceRequest(const URL& url) constructor, instead of the
29099        one taking a String, to call WebPageProxy::loadRequest(), so we
29100        ensure that the passed URI is correctly constructed.
29101
29102        * UIProcess/API/gtk/WebKitWebView.cpp:
29103        (webkit_web_view_load_uri): Create an URL out of a SoupURI and
29104        use that to create a ResourceRequest to pass to loadRequest().
29105
291062014-03-27  Pratik Solanki  <psolanki@apple.com>
29107
29108        [iOS WebKit2] Tweak cache sizes for iOS
29109        https://bugs.webkit.org/show_bug.cgi?id=130871
29110
29111        Reviewed by Sam Weinig.
29112
29113        Bring over the tweaks we had made to memory cache size for WebKit1 on iOS to WebKit2. These
29114        were made per findings in <rdar://8611638>.
29115
29116        * Shared/CacheModel.cpp:
29117        (WebKit::calculateCacheSizes):
29118
291192014-03-27  Jinwoo Song  <jinwoo7.song@samsung.com>
29120
29121        [WK2][EFL] Fix wrong parameter name in ewk_view_user_agent_set()
29122        https://bugs.webkit.org/show_bug.cgi?id=130888
29123
29124        Reviewed by Gyuyoung Kim.
29125
29126        * UIProcess/API/efl/ewk_view.h:
29127
291282014-03-27  Alexey Proskuryakov  <ap@apple.com>
29129
29130        Confirm composition in resignFirstResponder, don't cancel it
29131        https://bugs.webkit.org/show_bug.cgi?id=130852
29132
29133        Reviewed by Darin Adler.
29134
29135        * UIProcess/API/mac/WKView.mm: (-[WKView resignFirstResponder]):
29136
291372014-03-27  Pratik Solanki  <psolanki@apple.com>
29138
29139        [iOS WebKit2] Don't pass disk cache directory path on iOS
29140        https://bugs.webkit.org/show_bug.cgi?id=130862
29141
29142        Reviewed by Sam Weinig.
29143
29144        The diskPath passed to NSURLCache initializer is treated differently on Mac and iOS. Just
29145        pass nil for now until we sort out the API.
29146
29147        * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
29148        (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
29149        * WebProcess/cocoa/WebProcessCocoa.mm:
29150        (WebKit::WebProcess::platformInitializeWebProcess):
29151
291522014-03-27  Pratik Solanki  <psolanki@apple.com>
29153
29154        [iOS WebKit2] Share network process code between iOS and Mac
29155        https://bugs.webkit.org/show_bug.cgi?id=130861
29156
29157        Reviewed by Sam Weinig.
29158
29159        Implement network process functions for iOS by moving common code from NetworkProcessMac.mm
29160        to a new shared file NetworkProcessCocoa.mm and sharing between iOS and Mac.
29161
29162        * NetworkProcess/NetworkProcess.h:
29163        * NetworkProcess/cocoa/NetworkProcessCocoa.mm: Added.
29164        (WebKit::NetworkProcess::platformLowMemoryHandler):
29165        (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
29166        Common initialization code for iOS and Mac.
29167        (WebKit::memorySize):
29168        (WebKit::volumeFreeSize):
29169        (WebKit::NetworkProcess::platformSetCacheModel):
29170        * NetworkProcess/ios/NetworkProcessIOS.mm:
29171        (WebKit::NetworkProcess::initializeProcess):
29172        Remove unnecessary #if PLATFORM(IOS).
29173        (WebKit::NetworkProcess::platformInitializeNetworkProcess):
29174        * NetworkProcess/mac/NetworkProcessMac.mm:
29175        (WebKit::NetworkProcess::platformInitializeNetworkProcess):
29176        * WebKit2.xcodeproj/project.pbxproj:
29177
291782014-03-27  Enrica Casucci  <enrica@apple.com>
29179
29180        Add support for AirPlay picker in WK2 for iOS.
29181        https://bugs.webkit.org/show_bug.cgi?id=130855
29182        <rdar://problem/15349859>
29183
29184        Reviewed by Joseph Pecoraro and Benjamin Poulain.
29185
29186        Adds support to display the airplay picker for iPhone and iPad
29187        in WK2.
29188        The picker on iPad is displayed next to the airplay button.
29189
29190        * UIProcess/PageClient.h:
29191        * UIProcess/WebPageProxy.h:
29192        * UIProcess/WebPageProxy.messages.in:
29193        * UIProcess/ios/PageClientImplIOS.h:
29194        * UIProcess/ios/PageClientImplIOS.mm:
29195        (WebKit::PageClientImpl::showAirPlayRoutePicker):
29196        * UIProcess/ios/WKContentViewInteraction.h:
29197        * UIProcess/ios/WKContentViewInteraction.mm:
29198        (-[WKContentView _showAirPlayRoutePicker:fromRect:]):
29199        * UIProcess/ios/WebPageProxyIOS.mm:
29200        (WebKit::WebPageProxy::showAirPlayRoutePicker):
29201        * UIProcess/ios/forms/WKAirPlayRoutePicker.h: Added.
29202        * UIProcess/ios/forms/WKAirPlayRoutePicker.mm: Added.
29203        (-[WKAirPlayRoutePicker initWithView:]):
29204        (-[WKAirPlayRoutePicker dealloc]):
29205        (-[WKAirPlayRoutePicker popoverControllerDidDismissPopover:]):
29206        (-[WKAirPlayRoutePicker _presentAirPlayPopoverAnimated:fromRect:]):
29207        (-[WKAirPlayRoutePicker _windowWillRotate:]):
29208        (-[WKAirPlayRoutePicker _windowDidRotate:]):
29209        (-[WKAirPlayRoutePicker _dismissAirPlayRoutePickerIPad]):
29210        (-[WKAirPlayRoutePicker showAirPlayPickerIPad:fromRect:]):
29211        (-[WKAirPlayRoutePicker showAirPlayPickerIPhone:]):
29212        (-[WKAirPlayRoutePicker show:fromRect:]):
29213        * WebKit2.xcodeproj/project.pbxproj:
29214        * WebProcess/WebCoreSupport/WebChromeClient.h:
29215        * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
29216        (WebKit::WebChromeClient::showAirPlayRoutePicker):
29217        * WebProcess/WebPage/WebPage.cpp:
29218        (WebKit::WebPage::touchEvent):
29219        (WebKit::WebPage::touchEventSyncForTesting):
29220        * WebProcess/WebPage/WebPage.h:
29221        * WebProcess/WebPage/ios/WebPageIOS.mm:
29222        (WebKit::WebPage::rectForElementAtInteractionLocation):
29223        (WebKit::WebPage::handleTap):
29224
292252014-03-27  Benjamin Poulain  <bpoulain@apple.com>
29226
29227        [WK2][iOS] <rdar://problem/16414684> WKWebView should draw a white background before the page loads
29228        https://bugs.webkit.org/show_bug.cgi?id=130873
29229
29230        Reviewed by Simon Fraser.
29231
29232        * UIProcess/API/Cocoa/WKWebView.mm:
29233        (-[WKWebView initWithFrame:configuration:]):
29234
292352014-03-27  Benjamin Poulain  <bpoulain@apple.com>
29236
29237        [iOS][WK2] Compute a good exposed rect when scaling WKContentView
29238        https://bugs.webkit.org/show_bug.cgi?id=130761
29239
29240        Reviewed by Simon Fraser.
29241
29242        Add a simple heuristic to improve tiling while zooming. In theory we could take the zoom
29243        center and scaleRate to split the speed between scrolling and pinching. In practice,
29244        zoom is transitory and is not as predictable as scrolling, so this patch just does a very
29245        simple heuristic:
29246        -When zooming in, do not expand coverage.
29247        -When zooming out, add half a tile size on every side.
29248
29249        * Shared/VisibleContentRectUpdateInfo.cpp:
29250        (WebKit::VisibleContentRectUpdateInfo::encode):
29251        (WebKit::VisibleContentRectUpdateInfo::decode):
29252        * Shared/VisibleContentRectUpdateInfo.h:
29253        (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
29254        (WebKit::VisibleContentRectUpdateInfo::timestamp):
29255        (WebKit::VisibleContentRectUpdateInfo::horizontalVelocity):
29256        (WebKit::VisibleContentRectUpdateInfo::verticalVelocity):
29257        (WebKit::VisibleContentRectUpdateInfo::scaleChangeRate):
29258        * UIProcess/ios/WKContentView.mm:
29259        (WebKit::HistoricalVelocityData::VelocityData::VelocityData):
29260        (WebKit::HistoricalVelocityData::velocityForNewData):
29261        (WebKit::HistoricalVelocityData::append):
29262        (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
29263        * WebProcess/WebPage/ios/WebPageIOS.mm:
29264
29265        (WebKit::adjustExposedRectForBoundedScale):
29266        When zooming past the maximum size, adjust the exposed rect to continue tiling the area
29267        at maximum size. Otherwise, we tile a tiny area, and have to retile larger when the animation
29268        pull back the view to maximum scale.
29269
29270        (WebKit::adjustVelocityDataForBoundedScale):
29271        Since we do not split the velocity from scrolling from the scaling, just clear the velocity when zooming.
29272        Also clear the scaleChangeRate when the scale is out of bounds. There is no reason to add tiles for
29273        temporary state.
29274
29275        (WebKit::WebPage::updateVisibleContentRects):
29276
292772014-03-27  Anders Carlsson  <andersca@apple.com>
29278
29279        Add _ prefix to WKRemoteObjectRegistery and WKRemoteObjectInterface
29280        https://bugs.webkit.org/show_bug.cgi?id=130868
29281
29282        Reviewed by Sam Weinig.
29283
29284        * Shared/API/Cocoa/RemoteObjectRegistry.h:
29285        * Shared/API/Cocoa/RemoteObjectRegistry.mm:
29286        (WebKit::RemoteObjectRegistry::RemoteObjectRegistry):
29287        * Shared/API/Cocoa/WKRemoteObject.h:
29288        * Shared/API/Cocoa/WKRemoteObject.mm:
29289        (-[WKRemoteObject _initWithObjectRegistry:interface:]):
29290        * Shared/API/Cocoa/WKRemoteObjectCoder.h:
29291        * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
29292        (-[WKRemoteObjectDecoder initWithInterface:rootObjectDictionary:WebKit::]):
29293        * Shared/API/Cocoa/WKRemoteObjectInterface.h:
29294        * Shared/API/Cocoa/WKRemoteObjectInterface.mm:
29295        (isContainerClass): Deleted.
29296        (propertyListClasses): Deleted.
29297        (allowedArgumentClassesForMethod): Deleted.
29298        (initializeAllowedArgumentClasses): Deleted.
29299        (-[WKRemoteObjectInterface initWithProtocol:identifier:]): Deleted.
29300        (+[WKRemoteObjectInterface remoteObjectInterfaceWithProtocol:]): Deleted.
29301        (-[WKRemoteObjectInterface description]): Deleted.
29302        (classesForSelectorArgument): Deleted.
29303        (-[WKRemoteObjectInterface classesForSelector:argumentIndex:]): Deleted.
29304        (-[WKRemoteObjectInterface setClasses:forSelector:argumentIndex:]): Deleted.
29305        (methodArgumentTypeEncodingForSelector): Deleted.
29306        (-[WKRemoteObjectInterface _methodSignatureForSelector:]): Deleted.
29307        (-[WKRemoteObjectInterface _allowedArgumentClassesForSelector:]): Deleted.
29308        * Shared/API/Cocoa/WKRemoteObjectRegistry.h:
29309        * Shared/API/Cocoa/WKRemoteObjectRegistry.mm:
29310        (-[WKRemoteObjectRegistry registerExportedObject:interface:]): Deleted.
29311        (-[WKRemoteObjectRegistry unregisterExportedObject:interface:]): Deleted.
29312        (-[WKRemoteObjectRegistry remoteObjectProxyWithInterface:]): Deleted.
29313        (-[WKRemoteObjectRegistry _initWithMessageSender:IPC::]): Deleted.
29314        (-[WKRemoteObjectRegistry _invalidate]): Deleted.
29315        (-[WKRemoteObjectRegistry _sendInvocation:interface:]): Deleted.
29316        (-[WKRemoteObjectRegistry WebKit::]): Deleted.
29317        (-[WKRemoteObjectRegistry _invokeMethod:]): Deleted.
29318        (-[WKRemoteObjectRegistry _invokeMessageWithInterfaceIdentifier:encodedInvocation:]): Deleted.
29319        * Shared/API/Cocoa/_WKRemoteObjectInterface.h: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectInterface.h.
29320        * Shared/API/Cocoa/_WKRemoteObjectInterface.mm: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectInterface.mm.
29321        (isContainerClass):
29322        (propertyListClasses):
29323        (allowedArgumentClassesForMethod):
29324        (initializeAllowedArgumentClasses):
29325        (-[_WKRemoteObjectInterface initWithProtocol:identifier:]):
29326        (+[_WKRemoteObjectInterface remoteObjectInterfaceWithProtocol:]):
29327        (-[_WKRemoteObjectInterface description]):
29328        (classesForSelectorArgument):
29329        (-[_WKRemoteObjectInterface classesForSelector:argumentIndex:]):
29330        (-[_WKRemoteObjectInterface setClasses:forSelector:argumentIndex:]):
29331        (methodArgumentTypeEncodingForSelector):
29332        (-[_WKRemoteObjectInterface _methodSignatureForSelector:]):
29333        (-[_WKRemoteObjectInterface _allowedArgumentClassesForSelector:]):
29334        * Shared/API/Cocoa/_WKRemoteObjectInterfaceInternal.h: Renamed from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectInterfaceInternal.h.
29335        * Shared/API/Cocoa/_WKRemoteObjectRegistry.h: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectRegistry.h.
29336        * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectRegistry.mm.
29337        (-[_WKRemoteObjectRegistry registerExportedObject:interface:]):
29338        (-[_WKRemoteObjectRegistry unregisterExportedObject:interface:]):
29339        (-[_WKRemoteObjectRegistry remoteObjectProxyWithInterface:]):
29340        (-[_WKRemoteObjectRegistry _initWithMessageSender:IPC::]):
29341        (-[_WKRemoteObjectRegistry _invalidate]):
29342        (-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
29343        (-[_WKRemoteObjectRegistry WebKit::]):
29344        (-[_WKRemoteObjectRegistry _invokeMethod:]):
29345        (-[_WKRemoteObjectRegistry _invokeMessageWithInterfaceIdentifier:encodedInvocation:]):
29346        * Shared/API/Cocoa/_WKRemoteObjectRegistryInternal.h: Renamed from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectRegistryInternal.h.
29347        * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
29348        (-[WKBrowsingContextController _remoteObjectRegistry]):
29349        (-[WKBrowsingContextController remoteObjectRegistry]): Deleted.
29350        * UIProcess/API/Cocoa/WKBrowsingContextControllerPrivate.h:
29351        * UIProcess/API/Cocoa/WKWebView.mm:
29352        (-[WKWebView _remoteObjectRegistry]):
29353        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
29354        * WebKit2.xcodeproj/project.pbxproj:
29355        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInBrowserContextControllerToBeRemoved.mm: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObject.h.
29356        (-[WKWebProcessPlugInBrowserContextController remoteObjectRegistry]):
29357        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
29358        (-[WKWebProcessPlugInBrowserContextController _remoteObjectRegistry]):
29359        (-[WKWebProcessPlugInBrowserContextController remoteObjectRegistry]): Deleted.
29360        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
29361
293622014-03-27  Commit Queue  <commit-queue@webkit.org>
29363
29364        Unreviewed, rolling out r166360.
29365        https://bugs.webkit.org/show_bug.cgi?id=130869
29366
29367        Seems to have broken PLT (Requested by ap on #webkit).
29368
29369        Reverted changeset:
29370
29371        "Connection::dispatchOneMessage() can be re-entered while
29372        handling Cmd-key menu"
29373        https://bugs.webkit.org/show_bug.cgi?id=130767
29374        http://trac.webkit.org/changeset/166360
29375
293762014-03-27  Sam Weinig  <sam@webkit.org>
29377
29378        Support dynamic layer hosting context changes
29379        <rdar://problem/16278019>
29380        https://bugs.webkit.org/show_bug.cgi?id=130863
29381
29382        Reviewed by Anders Carlsson.
29383
29384        * UIProcess/API/mac/WKView.mm:
29385        (-[WKView addWindowObserversForWindow:]):
29386        (-[WKView removeWindowObservers]):
29387        (-[WKView _windowDidChangeLayerHosting:]):
29388        * UIProcess/WebPageProxy.cpp:
29389        (WebKit::WebPageProxy::layerHostingModeDidChange):
29390        * UIProcess/WebPageProxy.h:
29391
293922014-03-27  Simon Fraser  <simon.fraser@apple.com>
29393
29394        Don't leak the WKBrowsingContextController
29395        https://bugs.webkit.org/show_bug.cgi?id=130815
29396
29397        Reviewed by Tim Horton.
29398        
29399        Use adoptNS to avoid leaking the WKBrowsingContextController.
29400
29401        * UIProcess/ios/WKContentView.mm:
29402        (-[WKContentView browsingContextController]):
29403
294042014-03-27  Joseph Pecoraro  <pecoraro@apple.com>
29405
29406        Web Inspector: Give WebProcess a proxy application entitlement
29407        https://bugs.webkit.org/show_bug.cgi?id=130806
29408
29409        Reviewed by Timothy Hatcher.
29410
29411        * Configurations/WebContent-iOS.entitlements:
29412
294132014-03-27  Anders Carlsson  <andersca@apple.com>
29414
29415        Add reload and reloadFromOrigin as API
29416        https://bugs.webkit.org/show_bug.cgi?id=130858
29417
29418        Reviewed by Simon Fraser.
29419
29420        * UIProcess/API/Cocoa/WKWebView.h:
29421        * UIProcess/API/Cocoa/WKWebView.mm:
29422        (-[WKWebView reload]):
29423        (-[WKWebView reloadFromOrigin]):
29424        (-[WKWebView validateUserInterfaceItem:]):
29425        (-[WKWebView reload:]):
29426        (-[WKWebView reloadFromOrigin:]):
29427
294282014-03-27  Anders Carlsson  <andersca@apple.com>
29429
29430        Rename WKFrameHandle to _WKFrameHandle
29431        https://bugs.webkit.org/show_bug.cgi?id=130847
29432
29433        Reviewed by Tim Horton.
29434
29435        * Shared/API/Cocoa/_WKFrameHandle.h: Renamed from Source/WebKit2/Shared/API/Cocoa/WKFrameHandle.h.
29436        * Shared/API/Cocoa/_WKFrameHandle.mm: Renamed from Source/WebKit2/Shared/API/Cocoa/WKFrameHandle.mm.
29437        (-[_WKFrameHandle dealloc]):
29438        (-[_WKFrameHandle isEqual:]):
29439        (-[_WKFrameHandle hash]):
29440        (-[_WKFrameHandle _frameID]):
29441        (-[_WKFrameHandle copyWithZone:]):
29442        (+[_WKFrameHandle supportsSecureCoding]):
29443        (-[_WKFrameHandle initWithCoder:]):
29444        (-[_WKFrameHandle encodeWithCoder:]):
29445        (-[_WKFrameHandle API::]):
29446        * Shared/API/Cocoa/_WKFrameHandleInternal.h: Renamed from Source/WebKit2/Shared/API/Cocoa/WKFrameHandleInternal.h.
29447        (WebKit::wrapper):
29448        * Shared/Cocoa/APIObject.mm:
29449        (API::Object::newObject):
29450        * WebKit2.xcodeproj/project.pbxproj:
29451        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h:
29452        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
29453        (+[WKWebProcessPlugInFrame lookUpFrameFromHandle:]):
29454        (-[WKWebProcessPlugInFrame handle]):
29455        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h:
29456
294572014-03-27  Alexey Proskuryakov  <ap@apple.com>
29458
29459        Connection::dispatchOneMessage() can be re-entered while handling Cmd-key menu
29460        equivalents, ASSERT(!_data->_keyDownEventBeingResent)
29461        https://bugs.webkit.org/show_bug.cgi?id=130767
29462        <rdar://problem/16307487>
29463
29464        Reviewed by Darin Adler.
29465
29466        * Shared/WebKit2Initialize.cpp: (WebKit::InitializeWebKit2): Added NSModalPanelRunLoopMode
29467        to RunLoop event source and timer modes.
29468
294692014-03-27  Jae Hyun Park  <jaepark@webkit.org>
29470
29471        Remove LayerTreeContextCairo.cpp
29472        https://bugs.webkit.org/show_bug.cgi?id=130807
29473
29474        Reviewed by Martin Robinson.
29475
29476        * Shared/cairo/LayerTreeContextCairo.cpp: Removed.
29477
294782014-03-27  Maciej Florek  <m.florek@samsung.com>
29479
29480        [EFL][WK2] Add tests of the set process model API
29481        https://bugs.webkit.org/show_bug.cgi?id=130830
29482
29483        Reviewed by Gyuyoung Kim.
29484
29485        Implement unit tests to check, if process model API works
29486        properly. When process model is set to EWK_PROCESS_MODEL_SHARED_SECONDARY,
29487        there should be only one WebProcess. In case of EWK_PROCESS_MODEL_MULTIPLE_SECONDARY
29488        setting, each WebView should have own process, as well as the network process
29489        should exist.
29490
29491        * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
29492        (EWK2UnitTest::EWK2UnitTestBase::EWK2UnitTestBase):
29493        (EWK2UnitTest::EWK2UnitTestBase::SetUp):
29494        * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
29495        * UIProcess/API/efl/tests/test_ewk2_context.cpp:
29496        (EWK2ContextTestMultipleProcesses::EWK2ContextTestMultipleProcesses):
29497        (TEST_F):
29498
294992014-03-27  Commit Queue  <commit-queue@webkit.org>
29500
29501        Unreviewed, rolling out r166296 and r166331.
29502        https://bugs.webkit.org/show_bug.cgi?id=130822
29503
29504        caused some crashes and frequent assertion failures, and the
29505        fix is going to take a little while (Requested by thorton on
29506        #webkit).
29507
29508        Reverted changesets:
29509
29510        "[iOS WebKit2] Flush all surfaces after painting into all of
29511        them, instead of after painting into each one"
29512        https://bugs.webkit.org/show_bug.cgi?id=130768
29513        http://trac.webkit.org/changeset/166296
29514
29515        "Assertion failure in RemoteLayerBackingStore::flush"
29516        https://bugs.webkit.org/show_bug.cgi?id=130810
29517        http://trac.webkit.org/changeset/166331
29518
295192014-03-26  Tim Horton  <timothy_horton@apple.com>
29520
29521        Blind speculative iOS build fix.
29522
29523        * WebProcess/WebPage/ios/WebPageIOS.mm:
29524        (WebKit::WebPage::viewportConfigurationChanged):
29525
295262014-03-26  Benjamin Poulain  <bpoulain@apple.com>
29527
29528        [iOS][WK2] <rdar://problem/16265272> REGRESSION (WebKit2): Some pages appear blank until you scroll
29529        https://bugs.webkit.org/show_bug.cgi?id=130819
29530
29531        Reviewed by Tim Horton.
29532
29533        When loading a new page, we never define the unobscured rect and exposed rect on the new frame.
29534        As a result, there is nothing to render.
29535
29536        It uses to work thanks to dumb luck and a bug in Safari updating the visibleContentRects from
29537        the UIProcess. Now that the bug is gone, "dumb luck" is not reliable enough to get the content rects :)
29538
29539        What this patch does is save if we have ever received new rects from the UI. If we have not, create them
29540        based on the minimum layout size. This works because we know Safari shows the minimum layout size by default
29541        and will tell us if it changes the obscured rects.
29542
29543        * WebProcess/WebPage/WebPage.cpp:
29544        (WebKit::WebPage::WebPage):
29545        (WebKit::WebPage::didCommitLoad):
29546        * WebProcess/WebPage/WebPage.h:
29547        * WebProcess/WebPage/ios/WebPageIOS.mm:
29548        (WebKit::WebPage::viewportConfigurationChanged):
29549        (WebKit::WebPage::updateVisibleContentRects):
29550
295512014-03-26  Anders Carlsson  <andersca@apple.com>
29552
29553        Add a _WKScriptWorld class
29554        https://bugs.webkit.org/show_bug.cgi?id=130817
29555
29556        Reviewed by Dan Bernstein.
29557
29558        * UIProcess/API/Cocoa/_WKScriptWorld.h: Added.
29559        * UIProcess/API/Cocoa/_WKScriptWorld.mm: Added.
29560        (generateWorldID):
29561        (+[_WKScriptWorld defaultWorld]):
29562        (-[_WKScriptWorld init]):
29563        (-[_WKScriptWorld _initWithWorldID:]):
29564        * WebKit2.xcodeproj/project.pbxproj:
29565
295662014-03-26  Anders Carlsson  <andersca@apple.com>
29567
29568        Rename a delegate method to -webView:didFinishNavigation:
29569        https://bugs.webkit.org/show_bug.cgi?id=130814
29570
29571        Reviewed by Sam Weinig.
29572
29573        * UIProcess/API/Cocoa/WKNavigationDelegate.h:
29574        * UIProcess/Cocoa/NavigationState.h:
29575        * UIProcess/Cocoa/NavigationState.mm:
29576        (WebKit::NavigationState::setNavigationDelegate):
29577        (WebKit::NavigationState::LoaderClient::didFinishLoadForFrame):
29578
295792014-03-26  Tim Horton  <timothy_horton@apple.com>
29580
29581        [iOS WebKit2] Crashes on swipe
29582        <rdar://problem/16440867>
29583
29584        Reviewed by Benjamin Poulain.
29585
29586        * UIProcess/ios/ViewGestureControllerIOS.mm:
29587        (WebKit::ViewGestureController::beginSwipeGesture):
29588        Get the IOSurfaceRef from the WebCore::IOSurface.
29589
295902014-03-26  Simon Fraser  <simon.fraser@apple.com>
29591
29592        Fix the build: include UIKit headers inside the iOS #ifdef.
29593
29594        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
29595
295962014-03-26  Simon Fraser  <simon.fraser@apple.com>
29597
29598        Hook up -webkit-overflow-scrolling:touch for iOS WK2
29599        https://bugs.webkit.org/show_bug.cgi?id=130809
29600
29601        Reviewed by Tim Horton.
29602
29603        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
29604        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
29605        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren):
29606        Set the content size of the UIScrollVIew based on the geometry.
29607        * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
29608        (WebKit::RemoteLayerTreeHost::createLayer): Make a UIScrollView if the
29609        layer properties tell us that we have the scrolling behavior.
29610        * UIProcess/ios/WKContentView.mm:
29611        (-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::webView:]):
29612        We need to allow user interaction in the _rootContentView so that events get to
29613        nested UIScrollViews (this could be optimized in future).
29614        * UIProcess/mac/RemoteLayerTreeHost.h:
29615        * UIProcess/mac/RemoteLayerTreeHost.mm:
29616        (WebKit::RemoteLayerTreeHost::updateLayerTree):
29617        (WebKit::RemoteLayerTreeHost::createLayer): Need to pass RemoteLayerTreeTransaction::LayerProperties
29618        in so we can get at the custom behavior.
29619
296202014-03-26  Anders Carlsson  <andersca@apple.com>
29621
29622        Add -[WKWebView stopLoading]
29623        https://bugs.webkit.org/show_bug.cgi?id=130812
29624
29625        Reviewed by Tim Horton.
29626
29627        * UIProcess/API/Cocoa/WKWebView.h:
29628        * UIProcess/API/Cocoa/WKWebView.mm:
29629        (-[WKWebView stopLoading]):
29630
296312014-03-26  Tim Horton  <timothy_horton@apple.com>
29632
29633        Assertion failure in RemoteLayerBackingStore::flush
29634        https://bugs.webkit.org/show_bug.cgi?id=130810
29635        <rdar://problem/16439276>
29636
29637        Reviewed by Simon Fraser.
29638
29639        * Shared/mac/RemoteLayerBackingStore.mm:
29640        (RemoteLayerBackingStore::flush):
29641        We don't always have backing store to flush, if platformCALayerDrawsContent() is false.
29642        We also can't assert that we have a back surface, because the very first paint will not.
29643
296442014-03-26  Andy Estes  <aestes@apple.com>
29645
29646        [Cocoa] Expose DownloadClient::didFail() and DownloadClient::didCancel()
29647        https://bugs.webkit.org/show_bug.cgi?id=130805
29648
29649        Reviewed by Dan Bernstein.
29650
29651        * UIProcess/API/Cocoa/_WKDownloadDelegate.h:
29652        * UIProcess/Cocoa/DownloadClient.h:
29653        * UIProcess/Cocoa/DownloadClient.mm:
29654        (WebKit::DownloadClient::DownloadClient):
29655        (WebKit::DownloadClient::didFail):
29656        (WebKit::DownloadClient::didCancel):
29657
296582014-03-26  Cody Krieger  <cjk@apple.com>
29659
29660        -[WKWebProcessPlugInNodeHandle HTMLInputElementIsUserEdited] and -HTMLTextAreaElementIsUserEdited do not return the correct values.
29661
29662        https://bugs.webkit.org/show_bug.cgi?id=130804
29663
29664        Reviewed by Dan Bernstein.
29665
29666        The existing implementations of these methods are mis-cased
29667        ("HTMLInputELementIsUserEdited" and "HTMLTextAreaELementIsUserEdited" —
29668        note the "EL" in both cases). This results in us getting
29669        auto-synthesized getters for the HTMLInputElementIsUserEdited and
29670        HTMLTextAreaElementIsUserEdited properties, which will return NO
29671        unconditionally.
29672
29673        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
29674        Fix the capitalization of -HTMLInputElementIsUserEdited and
29675        -HTMLTextAreaElementIsUserEdited.
29676
296772014-03-26  Andy Estes  <aestes@apple.com>
29678
29679        [Cocoa] Expose DownloadProxy::cancel()
29680        https://bugs.webkit.org/show_bug.cgi?id=130799
29681
29682        Reviewed by Dan Bernstein.
29683
29684        * UIProcess/API/Cocoa/_WKDownload.h:
29685        * UIProcess/API/Cocoa/_WKDownload.mm:
29686        (-[_WKDownload cancel]):
29687
296882014-03-26  Timothy Hatcher  <timothy@apple.com>
29689
29690        Propagate the hiddenFromInspector flag on ResourceRequest in
29691        places when a new request a made or passed between processes.
29692
29693        https://bugs.webkit.org/show_bug.cgi?id=130741
29694
29695        Reviewed by Joseph Pecoraro.
29696
29697        * NetworkProcess/NetworkResourceLoader.cpp:
29698        (WebKit::NetworkResourceLoader::continueWillSendRequest): Use updateFromDelegatePreservingOldProperties.
29699        * Shared/WebCoreArgumentCoders.cpp:
29700        (IPC::ArgumentCoder<ResourceRequest>::encode): Added hiddenFromInspector support.
29701        (IPC::ArgumentCoder<ResourceRequest>::decode): Ditto.
29702        * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp:
29703        (WebKit::InjectedBundlePageResourceLoadClient::willSendRequestForFrame): Ditto.
29704
297052014-03-26  Andy Estes  <aestes@apple.com>
29706
29707        [Cocoa] Expose DownloadProxy::request()
29708        https://bugs.webkit.org/show_bug.cgi?id=130796
29709
29710        Reviewed by Anders Carlsson.
29711
29712        * UIProcess/API/Cocoa/_WKDownload.h:
29713        * UIProcess/API/Cocoa/_WKDownload.mm:
29714        (-[_WKDownload request]):
29715
297162014-03-26  Anders Carlsson  <andersca@apple.com>
29717
29718        Pass a real FrameLoadRequest to Chrome::createWindow
29719        https://bugs.webkit.org/show_bug.cgi?id=130795
29720
29721        Reviewed by Dan Bernstein.
29722
29723        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
29724        (WebKit::WebFrameLoaderClient::dispatchCreatePage):
29725
297262014-03-26  Jeremy Jones  <jeremyj@apple.com>
29727
29728        Implement hasLiveStreamingContent property in WebAVPlayerController
29729        https://bugs.webkit.org/show_bug.cgi?id=128684
29730
29731        Reviewed by Simon Fraser.
29732
29733        Plumb through the seekable ranges to the fullscreen interface.
29734
29735        * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
29736        Add declaration for setSeekableRangesVector()
29737
29738        * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
29739        Add interface SetSeekableRangesVector()
29740
29741        * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
29742        (WebKit::WebVideoFullscreenManagerProxy::setSeekableRangesVector):
29743        Add setSeekableRangesVector that translates the vector into a TimeRanges and calls setSeekableRanges()
29744
29745        * WebProcess/ios/WebVideoFullscreenManager.h:
29746        Add setSeekableRanges()
29747
29748        * WebProcess/ios/WebVideoFullscreenManager.mm:
29749        (WebKit::WebVideoFullscreenManager::setSeekableRanges):
29750        setSeekableRanges() converts TimeRanges to Vector and calls SetSeekableRangesVector()
29751
297522014-03-26  Simon Fraser  <simon.fraser@apple.com>
29753
29754        Add a custom behavior flag to GraphicsLayer, piped down to PlatformCALayer, for scrolling layers
29755        https://bugs.webkit.org/show_bug.cgi?id=130778
29756
29757        Reviewed by Tim Horton.
29758
29759        Make it possible to put a "custom behavior" flag on a layer so that,
29760        with UI-side compositing, we know to create a specific type of
29761        layer or view for that GraphicsLayer.
29762
29763        * Shared/mac/RemoteLayerTreeTransaction.h:
29764        * Shared/mac/RemoteLayerTreeTransaction.mm:
29765        (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
29766        (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
29767        (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
29768        (WebKit::dumpChangedLayers):
29769        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
29770        (PlatformCALayerRemote::customBehavior):
29771        (PlatformCALayerRemote::updateCustomBehavior):
29772        * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
29773
297742014-03-26  Zoltan Horvath  <zoltan@webkit.org>
29775
29776        [CSS Shapes] Remove shape-inside support
29777        https://bugs.webkit.org/show_bug.cgi?id=130698
29778
29779        Reviewed by David Hyatt.
29780
29781        * Configurations/FeatureDefines.xcconfig:
29782
297832014-03-26  Tim Horton  <timothy_horton@apple.com>
29784
29785        [iOS WebKit2] Flush all surfaces after painting into all of them, instead of after painting into each one
29786        https://bugs.webkit.org/show_bug.cgi?id=130768
29787        <rdar://problem/16421471>
29788
29789        Reviewed by Simon Fraser.
29790
29791        * Shared/mac/RemoteLayerBackingStore.h:
29792        Add flush(), which synchronously flushes painting operations on the underlying backing store.
29793        Factor clearBackingStore() out of ensureBackingStore/display, which releases our reference to underlying backing store.
29794        Add two members for storing the back surface and front buffer context until flush() is called.
29795                - We need to keep the back surface alive because the CGImageRef created from it is referenced by
29796                the front surface's drawing queue, and won't be freed until said queue is flushed. If we release
29797                the back surface (and its associated CGContextRef) *before* the CGImageRef is freed, we will
29798                do an expensive readback of the surface.
29799                - When not using accelerated drawing, we need to keep the front buffer's CGContextRef around
29800                until the flush occurs so that we can avoid re-creating it in order to perform the flush. This
29801                happens automatically in the accelerated drawing case via WebCore::IOSurface.
29802
29803        * Shared/mac/RemoteLayerBackingStore.mm:
29804        (RemoteLayerBackingStore::ensureBackingStore):
29805        (RemoteLayerBackingStore::clearBackingStore):
29806        (RemoteLayerBackingStore::display):
29807        Factor clearBackingStore() out of ensureBackingStore() and display().
29808        Update a comment about the above performance gotcha.
29809        Store the current back surface/front buffer context.
29810
29811        (RemoteLayerBackingStore::drawInContext):
29812        Don't flush the context immediately after painting.
29813
29814        (RemoteLayerBackingStore::applyBackingStoreToLayer):
29815        Move things around to reduce duplicated code.
29816
29817        (RemoteLayerBackingStore::flush):
29818        Flush the current front surface/buffer's context.
29819        Clear the new pending-flush members.
29820
29821        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
29822        (WebKit::flushBackingStoreChangesInTransaction):
29823        (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
29824        Crawl through all of the valid changed backing stores in the transaction and flush them.
29825        Remove a completely useless assertion.
29826
298272014-03-25  Simon Fraser  <simon.fraser@apple.com>
29828
29829        Add a new type of scrolling tree node for overflow scrolling
29830        https://bugs.webkit.org/show_bug.cgi?id=130763
29831
29832        Reviewed by Tim Horton.
29833
29834        Prepare for overflow scrolling via the scrolling tree by adding
29835        a new scrolling node type for overflow:scroll nodes. Mostly
29836        this is a new ScrollingNodeType that gets mapped to the same
29837        scrolling state nodes and scrolling nodes, but iOS creates
29838        state and scrolling nodes specific to overflow:scroll.
29839        
29840        Change the type checking on nodes to use virtual functions instead
29841        of just checking the node type, to allow the macros to work with
29842        the new scrolling node type.
29843
29844        * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
29845        (WebKit::encodeNodeAndDescendants):
29846        (WebKit::RemoteScrollingCoordinatorTransaction::decode):
29847        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
29848        (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
29849        * UIProcess/Scrolling/RemoteScrollingTree.cpp:
29850        (WebKit::RemoteScrollingTree::createNode):
29851        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h: Copied from Source/WebCore/page/scrolling/mac/ScrollingTreeFixedNode.h.
29852        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: Copied from Source/WebCore/page/scrolling/mac/ScrollingTreeFixedNode.h.
29853        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::create):
29854        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::ScrollingTreeOverflowScrollingNodeIOS):
29855        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::~ScrollingTreeOverflowScrollingNodeIOS):
29856        * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
29857        (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
29858        * WebKit2.xcodeproj/project.pbxproj:
29859
298602014-03-26  Zan Dobersek  <zdobersek@igalia.com>
29861
29862        Unreviewed. Removing the remaining Automake cruft.
29863
29864        * GNUmakefile.list.am: Removed.
29865
298662014-03-25  Pratik Solanki  <psolanki@apple.com>
29867
29868        Remove PLATFORM(IOS) from NetworkProcessMac.mm
29869        https://bugs.webkit.org/show_bug.cgi?id=130751
29870
29871        Reviewed by Alexey Proskuryakov.
29872
29873        Code in NetworkProcessMac.mm is guarded by PLATFORM(MAC) and so is not compiled on iOS.
29874        Having PLATFORM(IOS) code in this file is unnecessary and confusing.
29875
29876        * NetworkProcess/mac/NetworkProcessMac.mm:
29877        (WebKit::NetworkProcess::initializeProcessName):
29878        (WebKit::overrideSystemProxies):
29879        (WebKit::NetworkProcess::platformInitializeNetworkProcess):
29880
298812014-03-25  Anders Carlsson  <andersca@apple.com>
29882
29883        Add a UI delegate callback for handling window.open
29884        https://bugs.webkit.org/show_bug.cgi?id=130757
29885
29886        Reviewed by Sam Weinig.
29887
29888        * UIProcess/API/Cocoa/WKUIDelegate.h:
29889        * UIProcess/API/Cocoa/WKWebView.mm:
29890        * UIProcess/API/Cocoa/WKWebViewInternal.h:
29891        * UIProcess/Cocoa/UIClient.h:
29892        * UIProcess/Cocoa/UIClient.mm:
29893        (WebKit::UIClient::setDelegate):
29894        (WebKit::UIClient::createNewPage):
29895
298962014-03-25  Anders Carlsson  <andersca@apple.com>
29897
29898        Move stopLoading: back for now.
29899
29900        * UIProcess/API/Cocoa/WKWebView.h:
29901        * UIProcess/API/Cocoa/WKWebView.mm:
29902        (-[WKWebView stopLoading:]):
29903
299042014-03-25  Anders Carlsson  <andersca@apple.com>
29905
29906        Change toolbarVisibility back to toolbarsVisibility
29907        https://bugs.webkit.org/show_bug.cgi?id=130749
29908
29909        Reviewed by Tim Horton.
29910
29911        * UIProcess/API/Cocoa/WKWindowFeatures.h:
29912        * UIProcess/API/Cocoa/WKWindowFeatures.mm:
29913        (-[WKWindowFeatures _initWithWindowFeatures:WebCore::]):
29914
299152014-03-25  Anders Carlsson  <andersca@apple.com>
29916
29917        Pass the source frame to the CreateNewPage message
29918        https://bugs.webkit.org/show_bug.cgi?id=130752
29919
29920        Reviewed by Tim Horton.
29921
29922        * UIProcess/API/APIUIClient.h:
29923        (API::UIClient::createNewPage):
29924        * UIProcess/API/C/WKPage.cpp:
29925        (WKPageSetPageUIClient):
29926        * UIProcess/WebPageProxy.cpp:
29927        (WebKit::WebPageProxy::createNewPage):
29928        * UIProcess/WebPageProxy.h:
29929        * UIProcess/WebPageProxy.messages.in:
29930        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
29931        (WebKit::WebChromeClient::createWindow):
29932
299332014-03-25  Anders Carlsson  <andersca@apple.com>
29934
29935        Add a WebFrame::fromCoreFrame static member function and use it where possible
29936        https://bugs.webkit.org/show_bug.cgi?id=130744
29937
29938        Reviewed by Tim Horton.
29939
29940        * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
29941        (WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation):
29942        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
29943        (WebKit::InjectedBundleNodeHandle::documentFrame):
29944        (WebKit::InjectedBundleNodeHandle::htmlFrameElementContentFrame):
29945        (WebKit::InjectedBundleNodeHandle::htmlIFrameElementContentFrame):
29946        * WebProcess/InjectedBundle/InjectedBundle.cpp:
29947        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
29948        * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
29949        (WebKit::InjectedBundleDOMWindowExtension::frame):
29950        * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
29951        (WebKit::InjectedBundleHitTestResult::frame):
29952        (WebKit::InjectedBundleHitTestResult::targetFrame):
29953        * WebProcess/Plugins/PluginView.cpp:
29954        (WebKit::webPage):
29955        (WebKit::PluginView::performFrameLoadURLRequest):
29956        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
29957        (WebKit::WebChromeClient::focusedElementChanged):
29958        (WebKit::WebChromeClient::focusedFrameChanged):
29959        (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
29960        (WebKit::WebChromeClient::runJavaScriptAlert):
29961        (WebKit::WebChromeClient::runJavaScriptConfirm):
29962        (WebKit::WebChromeClient::runJavaScriptPrompt):
29963        (WebKit::WebChromeClient::print):
29964        (WebKit::WebChromeClient::exceededDatabaseQuota):
29965        (WebKit::WebChromeClient::runOpenPanel):
29966        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
29967        (WebKit::WebEditorClient::textFieldDidBeginEditing):
29968        (WebKit::WebEditorClient::textFieldDidEndEditing):
29969        (WebKit::WebEditorClient::textDidChangeInTextField):
29970        (WebKit::WebEditorClient::textDidChangeInTextArea):
29971        (WebKit::WebEditorClient::doTextFieldCommandFromEvent):
29972        (WebKit::WebEditorClient::textWillBeDeletedInTextField):
29973        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
29974        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
29975        (WebKit::WebFrameLoaderClient::dispatchWillSendSubmitEvent):
29976        (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
29977        * WebProcess/WebPage/WebFrame.cpp:
29978        (WebKit::WebFrame::fromCoreFrame):
29979        (WebKit::WebFrame::contentsAsString):
29980        (WebKit::WebFrame::parentFrame):
29981        (WebKit::WebFrame::childFrames):
29982        (WebKit::WebFrame::frameForContext):
29983        (WebKit::WebFrame::webArchiveData):
29984        * WebProcess/WebPage/WebFrame.h:
29985
299862014-03-25  Jeffrey Pfau  <jpfau@apple.com>
29987
29988        [WK2] Schemes registered as cache partitioned are not properly registered in new web processes
29989        https://bugs.webkit.org/show_bug.cgi?id=130739
29990
29991        Reviewed by Anders Carlsson.
29992
29993        * WebProcess/WebProcess.cpp:
29994        (WebKit::WebProcess::initializeWebProcess):
29995
299962014-03-25  Joseph Pecoraro  <pecoraro@apple.com>
29997
29998        [iOS] Inspector View Indication Support
29999        https://bugs.webkit.org/show_bug.cgi?id=130709
30000
30001        Reviewed by Simon Fraser.
30002
30003        * UIProcess/ios/WKContentView.h:
30004        * UIProcess/ios/WKContentView.mm:
30005        (-[WKInspectorIndicationView initWithFrame:]):
30006        (-[WKContentView isShowingInspectorIndication]):
30007        (-[WKContentView setShowingInspectorIndication:]):
30008        (-[WKContentView _didCommitLayerTree:WebKit::]):
30009        When indicating include a simple tinted UIView over the content.
30010
30011        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
30012        * UIProcess/API/Cocoa/WKWebView.mm:
30013        (-[WKWebView _showInspectorIndication]):
30014        (-[WKWebView _hideInspectorIndication]):
30015        Have the content view show or hide an indication.
30016
30017        * UIProcess/PageClient.h:
30018        * UIProcess/ios/PageClientImplIOS.h:
30019        * UIProcess/ios/PageClientImplIOS.mm:
30020        (WebKit::PageClientImpl::showInspectorIndication):
30021        (WebKit::PageClientImpl::hideInspectorIndication):
30022        * UIProcess/WebPageProxy.h:
30023        * UIProcess/WebPageProxy.messages.in:
30024        * UIProcess/ios/WebPageProxyIOS.mm:
30025        (WebKit::WebPageProxy::showInspectorIndication):
30026        (WebKit::WebPageProxy::hideInspectorIndication):
30027        Pass WebProcess indication message up to the WKWebView.
30028
30029        * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
30030        (WebKit::WebInspectorClient::indicate):
30031        (WebKit::WebInspectorClient::hideIndication):
30032        * WebProcess/WebCoreSupport/WebInspectorClient.h:
30033        * WebProcess/WebPage/WebPage.h:
30034        * WebProcess/WebPage/ios/WebPageIOS.mm:
30035        (WebKit::WebPage::indicate):
30036        (WebKit::WebPage::hideIndication):
30037        Pass WebCore / remote inspector indication message up to UIProcess.
30038
300392014-03-25  Anders Carlsson  <andersca@apple.com>
30040
30041        Add more properties to WKWindowFeatures
30042        https://bugs.webkit.org/show_bug.cgi?id=130738
30043
30044        Reviewed by Tim Horton.
30045
30046        * UIProcess/API/Cocoa/WKWindowFeatures.h:
30047        * UIProcess/API/Cocoa/WKWindowFeatures.mm:
30048        (-[WKWindowFeatures _initWithWindowFeatures:WebCore::]):
30049        (-[WKWindowFeatures menuBarVisibility]):
30050        (-[WKWindowFeatures statusBarVisibility]):
30051        (-[WKWindowFeatures toolbarsVisibility]):
30052        (-[WKWindowFeatures allowsResizing]):
30053
300542014-03-25  Anders Carlsson  <andersca@apple.com>
30055
30056        Fix iOS build.
30057
30058        * UIProcess/API/Cocoa/WKWebView.h:
30059        * UIProcess/API/Cocoa/WKWebView.mm:
30060        Make WKIBActions OS X only for now.
30061
300622014-03-25  Anders Carlsson  <andersca@apple.com>
30063
30064        Begin stubbing out a WKWindowFeatures class
30065        https://bugs.webkit.org/show_bug.cgi?id=130733
30066
30067        Reviewed by Dan Bernstein.
30068
30069        * UIProcess/API/Cocoa/WKWindowFeatures.h: Added.
30070        * UIProcess/API/Cocoa/WKWindowFeatures.mm: Added.
30071        (-[WKWindowFeatures _initWithWindowFeatures:WebCore::]):
30072        (-[WKWindowFeatures x]):
30073        (-[WKWindowFeatures y]):
30074        (-[WKWindowFeatures width]):
30075        (-[WKWindowFeatures height]):
30076        * UIProcess/API/Cocoa/WKWindowFeaturesInternal.h: Added.
30077        * WebKit2.xcodeproj/project.pbxproj:
30078
300792014-03-25  Anders Carlsson  <andersca@apple.com>
30080
30081        Add goBack: and goForward: IBActions and move stopLoading: to a new WKIBActions category on WKWebView
30082        https://bugs.webkit.org/show_bug.cgi?id=130732
30083
30084        Reviewed by Tim Horton.
30085
30086        * UIProcess/API/Cocoa/WKWebView.h:
30087        * UIProcess/API/Cocoa/WKWebView.mm:
30088        (-[WKWebView goBack]):
30089        (-[WKWebView goForward]):
30090        (-[WKWebView validateUserInterfaceItem:]):
30091        (-[WKWebView goBack:]):
30092        (-[WKWebView goForward:]):
30093        (-[WKWebView stopLoading:]):
30094
300952014-03-25  Martin Robinson  <mrobinson@igalia.com>
30096
30097        [GTK] Remove the autotools build
30098        https://bugs.webkit.org/show_bug.cgi?id=130717
30099
30100        Reviewed by Anders Carlsson.
30101
30102        * GNUmakefile.am: Removed.
30103        * WebKit2Prefix.h: Removed references to the autotools configure file.
30104        * config.h: Ditto.
30105
301062014-03-25  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
30107
30108        [EFL][WK2] Add NETWORK_PROCESS build option
30109        https://bugs.webkit.org/show_bug.cgi?id=130131
30110
30111        Reviewed by Gyuyoung Kim.
30112
30113        * PlatformEfl.cmake: Add file needed to build with NETWORK_PROCESS enabled.
30114
301152014-03-24 Michał Pakuła vel Rutka  <m.pakula@samsung.com>
30116
30117        [EFL][WK2] Add an API to set process model
30118        https://bugs.webkit.org/show_bug.cgi?id=130133
30119
30120        Reviewed by Gyuyoung Kim.
30121
30122        Implement an API to set and get process model in ewk_context.
30123        By default process model enum value is set to EWK_PROCESS_MODEL_SHARED_SECONDARY
30124        which keeps current behaviour. Setting EWK_PROCESS_MODEL_MULTIPLE_SECONDARY
30125        will make each web view use separate web process, also enables network process.
30126
30127        * UIProcess/API/efl/ewk_context.cpp:
30128        (toWKProcessModel):
30129        (EwkContext::setProcessModel):
30130        (toEwkProcessModel):
30131        (EwkContext::processModel):
30132        (ewk_context_process_model_set):
30133        (ewk_context_process_model_get):
30134        * UIProcess/API/efl/ewk_context.h:
30135        * UIProcess/API/efl/ewk_context_private.h:
30136        * UIProcess/API/efl/tests/test_ewk2_context.cpp:
30137        (TEST_F):
30138
301392014-03-24  Chris Fleizach  <cfleizach@apple.com>
30140
30141        AX: hit-testing doesn't always work correctly with WK2
30142        https://bugs.webkit.org/show_bug.cgi?id=130706
30143
30144        Reviewed by Simon Fraser.
30145
30146        Accessibility code was trying to do screenToRootView itself, and in 
30147        some cases with embedded WK2 views that did not work.
30148
30149        * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
30150        (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
30151
301522014-03-24  Benjamin Poulain  <bpoulain@apple.com>
30153
30154        [WK2] SpinLock are not initialized by default, ViewUpdateDispatcher is missing an initializer
30155        https://bugs.webkit.org/show_bug.cgi?id=130705
30156
30157        Reviewed by Simon Fraser.
30158
30159        * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
30160        (WebKit::ViewUpdateDispatcher::ViewUpdateDispatcher):
30161
301622014-03-24  Enrica Casucci  <enrica@apple.com>
30163
30164        [iOS WebKit2] Dictation support.
30165        https://bugs.webkit.org/show_bug.cgi?id=130622
30166        <rdar://problem/15337316>
30167
30168        Reviewed by Benjamin Poulain.
30169
30170        Adding support for dictation on iOS. There are two main types of interactions
30171        with the dictation system:
30172        - initial request for context, which consists in retrieving the selected text
30173        and 5 words before the selection and 5 words after, if available.
30174        - insertion of recognized chunks of text, providing the text
30175        to replace.
30176    
30177        * UIProcess/AutoCorrectionCallback.h:
30178        (WebKit::DictationContextCallback::create):
30179        (WebKit::DictationContextCallback::~DictationContextCallback):
30180        (WebKit::DictationContextCallback::performCallbackWithReturnValue):
30181        (WebKit::DictationContextCallback::invalidate):
30182        (WebKit::DictationContextCallback::DictationContextCallback):
30183        * UIProcess/WebPageProxy.h:
30184        * UIProcess/WebPageProxy.messages.in:
30185        * UIProcess/ios/WKContentViewInteraction.h:
30186        * UIProcess/ios/WKContentViewInteraction.mm:
30187        (-[WKContentView replaceDictatedText:withText:]):
30188        (-[WKContentView requestDictationContext:]):
30189        * UIProcess/ios/WebPageProxyIOS.mm:
30190        (WebKit::WebPageProxy::dictationContextCallback):
30191        (WebKit::WebPageProxy::replaceDictatedText):
30192        (WebKit::WebPageProxy::requestDictationContext):
30193        * WebProcess/WebPage/WebPage.h:
30194        * WebProcess/WebPage/WebPage.messages.in:
30195        * WebProcess/WebPage/ios/WebPageIOS.mm:
30196        (WebKit::WebPage::requestDictationContext):
30197        (WebKit::WebPage::replaceDictatedText):
30198
301992014-03-24  Andy Estes  <aestes@apple.com>
30200
30201        Yet another iOS build fix, for the 32-bit build this time.
30202
30203        * Shared/Downloads/ios/DownloadIOS.mm:
30204        (WebKit::setUpDownloadClient):
30205
302062014-03-24  Tim Horton  <timothy_horton@apple.com>
30207
30208        REGRESSION (r165872): Double-applying device scale to snapshots
30209        https://bugs.webkit.org/show_bug.cgi?id=130697
30210        <rdar://problem/16396629>
30211
30212        Reviewed by Simon Fraser.
30213
30214        * WebProcess/WebPage/WebPage.cpp:
30215        (WebKit::WebPage::scaledSnapshotWithOptions):
30216        Drive-by, make scaledSnapshotWithOptions respect SnapshotOptionsExcludeDeviceScaleFactor.
30217
30218        (WebKit::WebPage::snapshotAtSize):
30219        Divide the device scale out of the scale factor
30220
30221        * WebProcess/WebPage/WebPage.h:
30222        Rename the scale argument to scaledSnapshotWithOptions to clarify
30223        that it is an additional scale on top of the device scale.
30224
302252014-03-24  Brent Fulgham  <bfulgham@apple.com>
30226
30227        Activate WebVTT Tests Once Merging is Complete
30228        https://bugs.webkit.org/show_bug.cgi?id=130420
30229
30230        Reviewed by Eric Carlson.
30231
30232        * Configurations/FeatureDefines.xcconfig: Turn on ENABLE(WEBVTT_REGIONS)
30233
302342014-03-24  Andy Estes  <aestes@apple.com>
30235
30236        Fix the iOS build.
30237
30238        * Shared/Downloads/ios/DownloadIOS.mm:
30239        (WebKit::setUpDownloadClient):
30240        * UIProcess/Cocoa/DownloadClient.mm:
30241
302422014-03-24  Mark Rowe  <mrowe@apple.com>
30243
30244        Build fix after r166186.
30245
30246        * UIProcess/Cocoa/DownloadClient.mm:
30247
302482014-03-24  Benjamin Poulain  <bpoulain@apple.com>
30249
30250        [WK2] Make updates on ViewUpdateDispatcher less heavy
30251        https://bugs.webkit.org/show_bug.cgi?id=130626
30252
30253        Reviewed by Darin Adler.
30254
30255        * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
30256        (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
30257        (WebKit::ViewUpdateDispatcher::dispatchVisibleContentRectUpdate):
30258        * WebProcess/WebPage/ViewUpdateDispatcher.h:
30259
302602014-03-24  Benjamin Poulain  <bpoulain@apple.com>
30261
30262        [iOS][WK2] Micro-optimize view state updates on the UIProcess side
30263        https://bugs.webkit.org/show_bug.cgi?id=130631
30264
30265        Reviewed by Darin Adler.
30266
30267        * UIProcess/API/Cocoa/WKWebView.mm:
30268        (contentZoomScale):
30269        [UIScrollView zoomScale] is not fast enough for -[WKWebView _updateVisibleContentRects]. Since we know what the zoom view is,
30270        make a fast version hardcoding that.
30271
30272        (-[WKWebView _updateScrollViewBackground]):
30273        (-[WKWebView _zoomToPoint:WebCore::atScale:]):
30274        (-[WKWebView _scrollToRect:WebCore::origin:WebCore::minimumScrollDistance:]):
30275        (-[WKWebView _zoomToRect:WebCore::withOrigin:WebCore::fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:]):
30276        (-[WKWebView _updateVisibleContentRects]):
30277        * UIProcess/ios/WKContentView.mm:
30278        (fixedPositionRectFromExposedRect):
30279        (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
30280
302812014-03-24  Dean Jackson  <dino@apple.com>
30282
30283        Remove WebGL asset entitlement
30284        https://bugs.webkit.org/show_bug.cgi?id=130685
30285
30286        Reviewed by Simon Fraser.
30287
30288        No longer necessary on iOS.
30289
30290        * Configurations/WebContent-iOS.entitlements:
30291
302922014-03-24  Andy Estes  <aestes@apple.com>
30293
30294        [iOS] Download support by CFURLDownloadRef under USE(CFNETWORK).
30295        https://bugs.webkit.org/show_bug.cgi?id=129322
30296
30297        Reviewed by Anders Carlsson.
30298
30299        Based on an original patch by Yongjun Zhang  <yongjun_zhang@apple.com>.
30300
30301        * Shared/Cocoa/APIObject.mm:
30302        (API::Object::newObject):
30303        * Shared/Downloads/ios/DownloadIOS.mm:
30304        (WebKit::dispatchOnMainThread):
30305        (WebKit::toDownload):
30306        (WebKit::setUpDownloadClient):
30307        (WebKit::Download::startWithHandle):
30308        * UIProcess/API/APIDownloadClient.h:
30309        (API::DownloadClient::~DownloadClient):
30310        * UIProcess/API/C/WKContext.cpp:
30311        (WKContextSetDownloadClient):
30312        * UIProcess/API/Cocoa/WKProcessPool.mm:
30313        (-[WKProcessPool _downloadDelegate]):
30314        (-[WKProcessPool _setDownloadDelegate:]):
30315        * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
30316        * UIProcess/API/Cocoa/_WKDownload.h: Added.
30317        * UIProcess/API/Cocoa/_WKDownload.mm: Added.
30318        (WebKit::wrapper):
30319        (WebKit::createAPIDownloadClient):
30320        (-[_WKDownload dealloc]):
30321        (-[_WKDownload API::]):
30322        * UIProcess/API/Cocoa/_WKDownloadDelegate.h: Added.
30323        * UIProcess/API/Cocoa/_WKDownloadInternal.h: Added.
30324        * UIProcess/Cocoa/DownloadClient.h: Added.
30325        * UIProcess/Cocoa/DownloadClient.mm: Added.
30326        * WebKit2.xcodeproj/project.pbxproj:
30327
303282014-03-24  Dániel Bátyai  <dbatyai.u-szeged@partner.samsung.com>
30329
30330        [EFL][WK2] Buildfix after r166159.
30331
30332        Reviewed by Csaba Osztrogonác.
30333
30334        * UIProcess/API/efl/ewk_settings.cpp:
30335        (ewk_settings_file_access_from_file_urls_allowed_set):
30336        (ewk_settings_file_access_from_file_urls_allowed_get):
30337
303382014-03-24  Jinwoo Song  <jinwoo7.song@samsung.com>
30339
30340        [EFL][WK2] Use C API inside ewk_settings
30341        https://bugs.webkit.org/show_bug.cgi?id=107820
30342
30343        Reviewed by Gyuyoung Kim.
30344
30345        Use C API inside ewk_settings instead of accessing directly
30346        internal C++ classes, to avoid violating API layering.
30347
30348        Original-author: Christophe Dumez <ch.dumez@sisa.samsung.com>
30349
30350        * UIProcess/API/efl/EwkView.cpp:
30351        (EwkView::EwkView):
30352        * UIProcess/API/efl/ewk_settings.cpp:
30353        (ewk_settings_fullscreen_enabled_set):
30354        (ewk_settings_fullscreen_enabled_get):
30355        (ewk_settings_javascript_enabled_set):
30356        (ewk_settings_javascript_enabled_get):
30357        (ewk_settings_loads_images_automatically_set):
30358        (ewk_settings_loads_images_automatically_get):
30359        (ewk_settings_developer_extras_enabled_set):
30360        (ewk_settings_developer_extras_enabled_get):
30361        (ewk_settings_file_access_from_file_urls_allowed_set):
30362        (ewk_settings_file_access_from_file_urls_allowed_get):
30363        (ewk_settings_frame_flattening_enabled_set):
30364        (ewk_settings_frame_flattening_enabled_get):
30365        (ewk_settings_dns_prefetching_enabled_set):
30366        (ewk_settings_dns_prefetching_enabled_get):
30367        (ewk_settings_encoding_detector_enabled_set):
30368        (ewk_settings_encoding_detector_enabled_get):
30369        (ewk_settings_preferred_minimum_contents_width_set):
30370        (ewk_settings_preferred_minimum_contents_width_get):
30371        (ewk_settings_offline_web_application_cache_enabled_set):
30372        (ewk_settings_offline_web_application_cache_enabled_get):
30373        (ewk_settings_scripts_can_open_windows_set):
30374        (ewk_settings_scripts_can_open_windows_get):
30375        (ewk_settings_local_storage_enabled_set):
30376        (ewk_settings_local_storage_enabled_get):
30377        (ewk_settings_plugins_enabled_set):
30378        (ewk_settings_plugins_enabled_get):
30379        (ewk_settings_default_font_size_set):
30380        (ewk_settings_default_font_size_get):
30381        (ewk_settings_private_browsing_enabled_set):
30382        (ewk_settings_private_browsing_enabled_get):
30383        (ewk_settings_text_autosizing_enabled_set):
30384        (ewk_settings_text_autosizing_enabled_get):
30385        (ewk_settings_spatial_navigation_enabled_set):
30386        (ewk_settings_spatial_navigation_enabled_get):
30387        (EwkSettings::setDefaultTextEncodingName):
30388        * UIProcess/API/efl/ewk_settings_private.h:
30389        (EwkSettings::EwkSettings):
30390        (EwkSettings::preferences):
30391
303922014-03-24  Zan Dobersek  <zdobersek@igalia.com>
30393
30394        [GTK][WK2] Guard NetscapePluginModule methods used in PluginInfoCache that are specific to X11 architecture
30395        https://bugs.webkit.org/show_bug.cgi?id=130663
30396
30397        Reviewed by Carlos Garcia Campos.
30398
30399        The two used methods are specific to the X11 plugin architecture and are not declared when building for a
30400        Wayland-only configuration. Guarding them prevents build failures, but does not ensure proper functionality
30401        which isn't a problem anyway since there's no support yet for Netscape plugins on Wayland.
30402
30403        * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
30404        (WebKit::PluginInfoCache::getPluginInfo): Guard NetscapePluginModule::parseMIMEDescription with PLUGIN_ARCHITECTURE(X11).
30405        (WebKit::PluginInfoCache::updatePluginInfo): Ditto for NetscapePluginModule::buildMIMEDescription.
30406
304072014-03-24  Ryuan Choi  <ryuan.choi@samsung.com>
30408
30409        [EFL][WK2] Convert some more OwnPtr/PassOwnPtr to std::unique_ptr
30410        https://bugs.webkit.org/show_bug.cgi?id=130662
30411
30412        Reviewed by Gyuyoung Kim.
30413
30414        Replace uses of PassOwnPtr/OwnPtr with std::unique_ptr in remained WebKit2/Efl specific code.
30415
30416        * UIProcess/API/efl/EwkView.h:
30417        * UIProcess/API/efl/ewk_cookie_manager.cpp:
30418        * UIProcess/API/efl/ewk_database_manager.cpp:
30419        (getDatabaseOriginsCallback):
30420        * UIProcess/API/efl/ewk_error_private.h:
30421        * UIProcess/efl/DownloadManagerEfl.cpp:
30422        (WebKit::DownloadManagerEfl::didFail):
30423        * UIProcess/efl/InputMethodContextEfl.h:
30424        (WebKit::InputMethodContextEfl::create):
30425        * UIProcess/efl/PageLoadClientEfl.cpp:
30426        (WebKit::PageLoadClientEfl::didFailLoadWithErrorForFrame):
30427        (WebKit::PageLoadClientEfl::didFailProvisionalLoadWithErrorForFrame):
30428
304292014-03-23  Hyowon Kim  <hw1008.kim@samsung.com>
30430
30431        Move all EFL typedefs into EflTypedefs.h.
30432        https://bugs.webkit.org/show_bug.cgi?id=130511
30433
30434        Reviewed by Gyuyoung Kim.
30435
30436        * Shared/API/c/efl/WKArrayEfl.h: Remove EFL typedefs.
30437        * UIProcess/API/efl/EwkView.h: Ditto.
30438
304392014-03-23  Jinwoo Song  <jinwoo7.song@samsung.com>
30440
30441        [WK2] Refine WebKit2 BatteryStatus code
30442        https://bugs.webkit.org/show_bug.cgi?id=130573
30443
30444        Reviewed by Anders Carlsson.
30445
30446        Refinements
30447         - Return PassRef instead of PassRefPtr in create methods
30448         - Use auto instead of iterator
30449
30450        * UIProcess/WebBatteryManagerProxy.cpp:
30451        (WebKit::WebBatteryManagerProxy::create):
30452        * UIProcess/WebBatteryManagerProxy.h:
30453        * UIProcess/efl/BatteryProvider.cpp:
30454        (BatteryProvider::create):
30455        * UIProcess/efl/BatteryProvider.h:
30456        * WebProcess/Battery/WebBatteryManager.cpp:
30457        (WebKit::WebBatteryManager::didChangeBatteryStatus):
30458        (WebKit::WebBatteryManager::updateBatteryStatus):
30459
304602014-03-23  Sam Weinig  <sam@webkit.org>
30461
30462        Simplify the HTMLConverter interface (Part 2)
30463        https://bugs.webkit.org/show_bug.cgi?id=130654
30464
30465        Reviewed by Darin Adler.
30466
30467        * WebProcess/WebPage/WebPage.h:
30468        * WebProcess/WebPage/ios/WebPageIOS.mm:
30469        (WebKit::WebPage::performDictionaryLookupForRange):
30470        * WebProcess/WebPage/mac/WebPageMac.mm:
30471        (WebKit::WebPage::getAttributedSubstringFromRange):
30472        (WebKit::WebPage::attributedSubstringForCharacterRangeAsync):
30473        (WebKit::WebPage::performDictionaryLookupAtLocation):
30474        (WebKit::WebPage::performDictionaryLookupForSelection):
30475        (WebKit::WebPage::performDictionaryLookupForRange):
30476
304772014-03-23  David Kilzer  <ddkilzer@apple.com>
30478
30479        WebKit::resistanceForDelta() truncates 'scaleDistance' to integer value using abs()
30480        <http://webkit.org/b/130651>
30481
30482        Reviewed by Darin Adler.
30483
30484        Fixes the following build failure with trunk clang:
30485
30486            WebKit2/UIProcess/mac/ViewGestureControllerMac.mm:112:28: error: using integer absolute value function 'abs' when argument is of floating point type [-Werror,-Wabsolute-value]
30487                double scaleDistance = abs(limit - currentScale);
30488                                       ^
30489            WebKit2/UIProcess/mac/ViewGestureControllerMac.mm:112:28: note: use function 'fabs' instead
30490                double scaleDistance = abs(limit - currentScale);
30491                                       ^~~
30492                                       fabs
30493
30494        * UIProcess/mac/ViewGestureControllerMac.mm:
30495        (WebKit::resistanceForDelta): Use fabs() instead of abs().
30496
304972014-03-23  Simon Fraser  <simon.fraser@apple.com>
30498
30499        Clean up #includes by geometry classes
30500        https://bugs.webkit.org/show_bug.cgi?id=130645
30501
30502        Reviewed by Andreas Kling.
30503
30504        Pulling in <wtf/Vector.h> and <wtf/PrintStream.h> in the simple geometry
30505        classes brings in a lot of additional headers. Fix by adding a new
30506        GeometryUtilities file so that the basic files don't need Vector,
30507        and including GeometryUtilities.h where necessary.
30508        
30509        Also forward declare PrintStream.h and only bring in the header
30510        in implementation files.
30511
30512        * Shared/UpdateInfo.h:
30513        * UIProcess/BackingStore.h:
30514        * UIProcess/CoordinatedGraphics/PageViewportController.h:
30515        * UIProcess/FindIndicator.cpp:
30516        * UIProcess/mac/WKPrintingView.h:
30517
305182014-03-23  Simon Fraser  <simon.fraser@apple.com>
30519
30520        Clean up #includes by geometry classes
30521        https://bugs.webkit.org/show_bug.cgi?id=130645
30522
30523        Reviewed by Andreas Kling.
30524
30525        Pulling in <wtf/Vector.h> and <wtf/PrintStream.h> in the simple geometry
30526        classes brings in a lot of additional headers. Fix by adding a new
30527        GeometryUtilities file so that the basic files don't need Vector,
30528        and including GeometryUtilities.h where necessary.
30529        
30530        Also forward declare PrintStream.h and only bring in the header
30531        in implementation files.
30532
30533        * UIProcess/BackingStore.h:
30534        * UIProcess/FindIndicator.cpp:
30535        * UIProcess/mac/WKPrintingView.h:
30536
305372014-03-22  Alexey Proskuryakov  <ap@apple.com>
30538
30539        Assertions in WebPage::rangeFromEditingRange when requested range location is NSNotFound
30540        https://bugs.webkit.org/show_bug.cgi?id=130633
30541        <rdar://problem/16397583>
30542
30543        Reviewed by Darin Adler.
30544
30545        * UIProcess/API/mac/WKView.mm:
30546        (-[WKView firstRectForCharacterRange:completionHandler:]):
30547        (-[WKView firstRectForCharacterRange:actualRange:]):
30548        Return NSZeroRect, like NSTextView does for any locations that are out of bounds.
30549        There is no need for a round trip to WebProcess in this case.
30550
305512014-03-21  Benjamin Poulain  <bpoulain@apple.com>
30552
30553        [iOS][WK2] Reduce the tiling coverage to the current rect and 1 tile size ahead
30554        https://bugs.webkit.org/show_bug.cgi?id=130555
30555
30556        Reviewed by Simon Fraser.
30557
30558        * Shared/VisibleContentRectUpdateInfo.cpp:
30559        (WebKit::VisibleContentRectUpdateInfo::encode):
30560        (WebKit::VisibleContentRectUpdateInfo::decode):
30561        * Shared/VisibleContentRectUpdateInfo.h:
30562        (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
30563        (WebKit::operator==):
30564        * UIProcess/ios/WKContentView.mm:
30565        (WebKit::HistoricalKinematicData::HistoricalKinematicData):
30566        (WebKit::HistoricalKinematicData::velocityForNewData):
30567        (WebKit::HistoricalKinematicData::clear):
30568        (WebKit::HistoricalKinematicData::append):
30569        (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
30570        * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
30571        (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
30572        * WebProcess/WebPage/ios/WebPageIOS.mm:
30573        (WebKit::WebPage::updateVisibleContentRects):
30574
305752014-03-21  Alexey Proskuryakov  <ap@apple.com>
30576
30577        REGRESSION (r165356): Predictive Chinese input is broken
30578        https://bugs.webkit.org/show_bug.cgi?id=130619
30579
30580        Reviewed by Enrica Casucci.
30581
30582        * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::executeKeypressCommands):
30583        Like after insertText, we are no longer in an intermediate state after executeKeypressCommands.
30584        Make sure that we don't call -discardMarkedText the next time we get a non-intermediate
30585        state with closed composition.
30586
305872014-03-21  Sam Weinig  <sam@webkit.org>
30588
30589        [WebKit2] Implement NetworkingContext::sourceApplicationAuditData() for WebKit2
30590        https://bugs.webkit.org/show_bug.cgi?id=130528
30591
30592        Reviewed by Tim Horton.
30593
30594        * Platform/IPC/Connection.h:
30595        * Platform/IPC/mac/ConnectionMac.cpp:
30596        (IPC::Connection::getAuditToken):
30597        Expose the audit data if available. 
30598
30599        * NetworkProcess/mac/RemoteNetworkingContext.mm:
30600        (WebKit::RemoteNetworkingContext::sourceApplicationAuditData):
30601        * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
30602        (WebKit::WebFrameNetworkingContext::sourceApplicationAuditData):
30603        Pass the audit data corresponding to the UIProcess.
30604
30605        * Configurations/Network-iOS.entitlements: Copied from Configurations/WebContent-iOS.entitlements.
30606        * Configurations/NetworkProcess.xcconfig:
30607        * Configurations/NetworkService.Development.xcconfig:
30608        * Configurations/NetworkService.xcconfig:
30609        * Configurations/WebContent-iOS.entitlements:
30610        Add entitlement allowing the audit data to be used.
30611
306122014-03-21  Tim Horton  <timothy_horton@apple.com>
30613
30614        Always retrieve the screen scale factor from WKSI
30615        <rdar://problem/16329679>
30616
30617        Reviewed by Sam Weinig.
30618
30619        * UIProcess/ios/WKContentView.mm:
30620        (-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::webView:]):
30621        (-[WKContentView _updateForScreen:]):
30622        Use WKGetScreenScaleFactor/WKGetScaleFactorForScreen.
30623
306242014-03-21  Yongjun Zhang  <yongjun_zhang@apple.com>
30625
30626        [Webkit2] Add APIDownloadClient for download support.
30627        https://bugs.webkit.org/show_bug.cgi?id=130484
30628
30629        Add API::DownloadClient to WebContext and get rid of WebDownloadClient.
30630
30631        Reviewed by Anders Carlsson.
30632
30633        * UIProcess/API/APIDownloadClient.h: Added.
30634        (API::DownloadClient::~DownloadClient):
30635        (API::DownloadClient::didStart):
30636        (API::DownloadClient::didReceiveAuthenticationChallenge):
30637        (API::DownloadClient::didReceiveResponse):
30638        (API::DownloadClient::didReceiveData):
30639        (API::DownloadClient::shouldDecodeSourceDataOfMIMEType):
30640        (API::DownloadClient::decideDestinationWithSuggestedFilename):
30641        (API::DownloadClient::didCreateDestination):
30642        (API::DownloadClient::didFinish):
30643        (API::DownloadClient::didFail):
30644        (API::DownloadClient::didCancel):
30645        (API::DownloadClient::processDidCrash):
30646        * UIProcess/API/C/WKContext.cpp:
30647        (WKContextSetDownloadClient): Move the original WebDownloadClient methods to a local class
30648            DownloadClient and set up the downloadClient for WebContext.
30649        * UIProcess/Downloads/DownloadProxy.cpp:
30650        * UIProcess/WebContext.cpp:
30651        (WebKit::WebContext::setDownloadClient):
30652        * UIProcess/WebContext.h:
30653        (WebKit::WebContext::downloadClient):
30654        * UIProcess/WebDownloadClient.cpp: Removed.
30655        * UIProcess/WebDownloadClient.h: Removed.
30656        * WebKit2.xcodeproj/project.pbxproj:
30657
306582014-03-21  Alexey Proskuryakov  <ap@apple.com>
30659
30660        ASSERTION FAILED: event == [NSApp currentEvent] hitting Command-+
30661        https://bugs.webkit.org/show_bug.cgi?id=130526
30662        <rdar://problem/16371612> 
30663
30664        This was fixed yesterday for sync code path, landing the same this for async one.
30665
30666        * UIProcess/API/mac/WKView.mm: (-[WKView performKeyEquivalent:]):
30667
306682014-03-21  Pratik Solanki  <psolanki@apple.com>
30669
30670        Add callbacks in WebKit2 Cocoa API for page load testing
30671        https://bugs.webkit.org/show_bug.cgi?id=130569
30672
30673        Reviewed by Anders Carlsson.
30674
30675        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
30676        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
30677        (didFirstVisuallyNonEmptyLayoutForFrame):
30678        (didHandleOnloadEventsForFrame):
30679        (setUpPageLoaderClient):
30680        (willSendRequestForFrame):
30681        (didInitiateLoadForResource):
30682        (didFinishLoadForResource):
30683        (didFailLoadForResource):
30684        (setUpResourceLoadClient):
30685
306862014-03-21  Ryuan Choi  <ryuan.choi@samsung.com>
30687
30688        [EFL][WK2] Remove Ewk_Error parameter from some async callbacks
30689        https://bugs.webkit.org/show_bug.cgi?id=130567
30690
30691        Reviewed by Gyuyoung Kim.
30692
30693        WebKit2 internally uses GenericCallbacks for several APIs such as WKKeyValueStorageManagerGetKeyValueStorageOrigins.
30694        But only few callbacks really return errors.
30695
30696        This patch removes Ewk_Error parameters from these callbacks not to make
30697        the confusion for application developers.
30698
30699        * UIProcess/API/efl/ewk_cookie_manager.cpp:
30700        (getAcceptPolicyCallback):
30701        (getHostnamesWithCookiesCallback):
30702        * UIProcess/API/efl/ewk_cookie_manager.h:
30703        * UIProcess/API/efl/ewk_database_manager.cpp:
30704        (getDatabaseOriginsCallback):
30705        * UIProcess/API/efl/ewk_database_manager.h:
30706        * UIProcess/API/efl/ewk_storage_manager.cpp:
30707        (getStorageOriginsCallback):
30708        * UIProcess/API/efl/ewk_storage_manager.h:
30709        * UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp:
30710        (EWK2CookieManagerTest::getAcceptPolicyCallback):
30711        (EWK2CookieManagerTest::getHostnamesWithCookiesCallback):
30712        * UIProcess/API/efl/tests/test_ewk2_database_manager.cpp:
30713        (EWK2DatabaseManagerTest::databaseOriginsCallback):
30714        * UIProcess/API/efl/tests/test_ewk2_storage_manager.cpp:
30715        (EWK2StorageManagerTest::getStorageOriginsCallback):
30716
307172014-03-21  Darin Adler  <darin@apple.com>
30718
30719        Improve idiom used for string building in a few places
30720        https://bugs.webkit.org/show_bug.cgi?id=130561
30721
30722        Reviewed by Andreas Kling.
30723
30724        * Shared/mac/ChildProcessMac.mm:
30725        (WebKit::ChildProcess::initializeSandbox): Use a more efficient idiom for string
30726        concatenation.
30727
30728        * UIProcess/WebInspectorProxy.cpp:
30729        (WebKit::WebInspectorProxy::createInspectorPage): Use a StringBuilder.
30730
307312014-03-20  Hyowon Kim  <hw1008.kim@samsung.com>
30732
30733        Move to using std::unique_ptr for EFL objects.
30734        https://bugs.webkit.org/show_bug.cgi?id=129853
30735
30736        Reviewed by Gyuyoung Kim.
30737
30738        EflUniquePtr is a template alias of std::unique_ptr
30739        with a custom deleter for each Efl Objects, which is motivated by GUniquePtr.
30740        This patch replaces uses of OwnPtr and PassOwnPtr for Efl objects with EflUniquePtr.
30741
30742        * Platform/Module.h:
30743        * Platform/efl/ModuleEfl.cpp:
30744        (WebKit::Module::load):
30745        * UIProcess/API/efl/EwkView.cpp:
30746        (EwkView::EwkView):
30747        * UIProcess/API/efl/EwkView.h:
30748        * UIProcess/efl/InputMethodContextEfl.cpp:
30749        (WebKit::InputMethodContextEfl::InputMethodContextEfl):
30750        (WebKit::InputMethodContextEfl::createIMFContext):
30751        * UIProcess/efl/InputMethodContextEfl.h:
30752        (WebKit::InputMethodContextEfl::create):
30753
307542014-03-20  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
30755
30756        [EFL][GTK] Get CMake to find Freetype2 properly
30757        https://bugs.webkit.org/show_bug.cgi?id=130150
30758
30759        Reviewed by Martin Robinson.
30760
30761        Newer versions of CMake are not able to find Freetype2 correctly.
30762        FindFreetype2.cmake checks for the version number in freetype.h header, since it seems that bug exists in
30763        freetype2 repo, because a completely different version number is found in freetype2.pc.
30764
30765        * PlatformEfl.cmake:
30766
307672014-03-20  Martin Robinson  <mrobinson@igalia.com>
30768
30769        [GTK] Suppress errors about using gdk_threads_enter gdk_threads_leave
30770        https://bugs.webkit.org/show_bug.cgi?id=130517
30771
30772        Reviewed by Sergio Villar Senin.
30773
30774        * UIProcess/API/gtk/WebKitWebView.cpp: Use GCC suppression to suppress errors about deprecations.
30775        * UIProcess/gtk/WebPopupMenuProxyGtk.cpp: Ditto.
30776
307772014-03-20  Ryuan Choi  <ryuan.choi@samsung.com>
30778
30779        [EFL][WK2] tests of test_ewk2_cookie_manager are flaky
30780        https://bugs.webkit.org/show_bug.cgi?id=130498
30781
30782        Reviewed by Gyuyoung Kim.
30783
30784        Loaded web page before calling getAcceptPolicy() to guarantee that webprocess
30785        or networkprocess was launched and registered WebCookieManager.
30786
30787        * UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp:
30788        (TEST_F):
30789
307902014-03-20  Commit Queue  <commit-queue@webkit.org>
30791
30792        Unreviewed, rolling out r165985.
30793        https://bugs.webkit.org/show_bug.cgi?id=130551
30794
30795        broke page loading on all cocoa platforms (Requested by
30796        thorton on #webkit).
30797
30798        Reverted changeset:
30799
30800        "[WebKit2] Implement
30801        NetworkingContext::sourceApplicationAuditData() for WebKit2"
30802        https://bugs.webkit.org/show_bug.cgi?id=130528
30803        http://trac.webkit.org/changeset/165985
30804
308052014-03-20  Alexey Proskuryakov  <ap@apple.com>
30806
30807        Fix a long-standing typo that's now breaking USE(ASYNC_NSTEXTINPUTCLIENT) build.
30808
30809        Rubber-stamped by Tim Horton.
30810
30811        * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::cancelComposition):
30812        Use a correct type for reply (it's really the same type, but ConfirmComposition
30813        is behind an ifdef, and not available).
30814
308152014-03-20  Enrica Casucci  <enrica@apple.com>
30816
30817        [iOS WebKit2] typing and deleting text lags behind the caret movement on google.com.
30818        https://bugs.webkit.org/show_bug.cgi?id=130544
30819        <rdar://problem/16380296>
30820
30821        Reviewed by Tim Horton.
30822
30823        On iOS the selection is drawn in the UIProcess. If the WebProcess is
30824        processing multiple requests within the same runloop, the caret could be
30825        updated in the UIProcess before the WebProcess has had a chance to paint.
30826        This change synchronizes the selection drawing with the tile update.
30827
30828        * UIProcess/WebPageProxy.h:
30829        * UIProcess/ios/WKContentView.mm:
30830        (-[WKContentView _didCommitLayerTree:WebKit::]):
30831        * UIProcess/ios/WKContentViewInteraction.h:
30832        * UIProcess/ios/WKContentViewInteraction.mm:
30833        (-[WKContentView _selectionChanged]):
30834        (-[WKContentView _updateChangedSelection]):
30835        * WebProcess/WebPage/WebPage.cpp:
30836        (WebKit::WebPage::didChangeSelection):
30837
308382014-03-20  Alexey Proskuryakov  <ap@apple.com>
30839
30840        Generalize WebInspector check in maybeInitializeSandboxExtensionHandle().
30841        https://bugs.webkit.org/show_bug.cgi?id=130079
30842        <rdar://problem/16286683>
30843
30844        Reviewed by Anders Carlsson.
30845
30846        * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
30847        Perform an early return for all paths that don't need a sandbox extension due to
30848        access being assumed, not only for WebInspector pages.
30849
30850        * UIProcess/WebProcessProxy.cpp:
30851        (WebKit::WebProcessProxy::hasAssumedReadAccessToURL):
30852        (WebKit::WebProcessProxy::checkURLReceivedFromWebProcess):
30853        * UIProcess/WebProcessProxy.h:
30854        Factored out m_localPathsWithAssumedReadAccess iteration to a public function.
30855
308562014-03-20  Csaba Osztrogonác  <ossy@webkit.org>
30857
30858        Unreviewed buildfix after r165983 for non Cocoa platforms.
30859
30860        * UIProcess/API/C/WKAPICast.h:
30861        * UIProcess/API/C/WKPreferences.cpp:
30862        * UIProcess/efl/WebInspectorProxyEfl.cpp:
30863
308642014-03-20  Beth Dakin  <bdakin@apple.com>
30865
30866        Implement contentInset for Mac WebKit2
30867        https://bugs.webkit.org/show_bug.cgi?id=130273
30868
30869        Reviewed by Simon Fraser.
30870
30871        This patch adds WKView API for setting a topContentInset(). All of this work gets 
30872        that number plumbed down to WebCore.
30873
30874        * Shared/WebPageCreationParameters.cpp:
30875        (WebKit::WebPageCreationParameters::encode):
30876        (WebKit::WebPageCreationParameters::decode):
30877        * Shared/WebPageCreationParameters.h:
30878        * UIProcess/API/Cocoa/WKViewPrivate.h:
30879        * UIProcess/API/Cocoa/WKWebView.mm:
30880        (-[WKWebView _setTopContentInset:]):
30881        (-[WKWebView _topContentInset]):
30882        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
30883        * UIProcess/API/mac/WKView.mm:
30884        (-[WKView _setTopContentInset:]):
30885        (-[WKView _topContentInset]):
30886        * UIProcess/WebPageProxy.cpp:
30887        (WebKit::WebPageProxy::WebPageProxy):
30888        (WebKit::WebPageProxy::setTopContentInset):
30889        (WebKit::WebPageProxy::creationParameters):
30890        * UIProcess/WebPageProxy.h:
30891        (WebKit::WebPageProxy::topContentInset):
30892        * WebProcess/WebPage/WebPage.cpp:
30893        (WebKit::WebPage::WebPage):
30894        (WebKit::WebPage::setTopContentInset):
30895        * WebProcess/WebPage/WebPage.h:
30896        * WebProcess/WebPage/WebPage.messages.in:
30897
308982014-03-20  Anders Carlsson  <andersca@apple.com>
30899
30900        Fix 32-bit build.
30901
30902        * UIProcess/API/Cocoa/WKProcessPoolConfiguration.mm:
30903
309042014-03-20  Anders Carlsson  <andersca@apple.com>
30905
30906        Make WKProcessPoolConfiguration SPI
30907        https://bugs.webkit.org/show_bug.cgi?id=130537
30908
30909        Reviewed by Tim Horton.
30910
30911        * UIProcess/API/Cocoa/WKProcessPool.h:
30912        * UIProcess/API/Cocoa/WKProcessPool.mm:
30913        (-[WKProcessPool init]):
30914        (-[WKProcessPool dealloc]):
30915        (-[WKProcessPool description]):
30916        (-[WKProcessPool _configuration]):
30917        (-[WKProcessPool API::]):
30918        (-[WKProcessPool _initWithConfiguration:]):
30919        * UIProcess/API/Cocoa/WKProcessPoolConfiguration.h:
30920        * UIProcess/API/Cocoa/WKProcessPoolConfiguration.mm:
30921        (-[WKProcessPoolConfiguration _injectedBundleURL]):
30922        (-[WKProcessPoolConfiguration _setInjectedBundleURL:]):
30923        * UIProcess/API/Cocoa/WKProcessPoolConfigurationPrivate.h:
30924        * UIProcess/API/Cocoa/WKProcessPoolInternal.h:
30925        * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
30926        * UIProcess/API/Cocoa/WKProcessPoolToBeRemoved.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h.
30927        (-[WKProcessPool initWithConfiguration:]):
30928        (-[WKProcessPool configuration]):
30929        * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolConfigurationPrivate.h.
30930        * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolConfiguration.mm.
30931        (-[_WKProcessPoolConfiguration injectedBundleURL]):
30932        (-[_WKProcessPoolConfiguration setInjectedBundleURL:]):
30933        (-[_WKProcessPoolConfiguration description]):
30934        (-[_WKProcessPoolConfiguration copyWithZone:]):
30935        * WebKit2.xcodeproj/project.pbxproj:
30936
309372014-03-20  Tim Horton  <timothy_horton@apple.com>
30938
30939        Add WebCore::IOSurface wrapper
30940        https://bugs.webkit.org/show_bug.cgi?id=130529
30941
30942        Reviewed by Simon Fraser.
30943
30944        * Shared/mac/RemoteLayerBackingStore.h:
30945        * Shared/mac/RemoteLayerBackingStore.mm:
30946        (RemoteLayerBackingStore::encode):
30947        (RemoteLayerBackingStore::decode):
30948        (RemoteLayerBackingStore::display):
30949        (RemoteLayerBackingStore::applyBackingStoreToLayer):
30950        * UIProcess/ios/ViewGestureControllerIOS.mm:
30951        (WebKit::ViewGestureController::beginSwipeGesture):
30952        (WebKit::ViewGestureController::removeSwipeSnapshot):
30953        * UIProcess/mac/ViewGestureController.h:
30954        * UIProcess/mac/ViewGestureControllerMac.mm:
30955        (WebKit::ViewGestureController::beginSwipeGesture):
30956        (WebKit::ViewGestureController::removeSwipeSnapshot):
30957        * UIProcess/mac/ViewSnapshotStore.h:
30958        * UIProcess/mac/ViewSnapshotStore.mm:
30959        (WebKit::createIOSurfaceFromImage):
30960        (WebKit::ViewSnapshotStore::recordSnapshot):
30961        Adopt WebCore::IOSurface.
30962
309632014-03-20  Alexey Proskuryakov  <ap@apple.com>
30964
30965        Update iOS input method code to use new cross-platform async functions
30966        https://bugs.webkit.org/show_bug.cgi?id=130530
30967
30968        Reviewed by Enrica Casucci.
30969
30970        Merge identical iOS and cross-platform functions.
30971
30972        Also tightened up ifdefs, and removed stub iOS implementations of sync methods,
30973        which hopefully won't be ever needed. The only tricky case is sync cancelComposition,
30974        will I'll investigate separately.
30975
30976        * UIProcess/WebPageProxy.h:
30977        * UIProcess/ios/WKContentViewInteraction.mm:
30978        (-[WKContentView setMarkedText:selectedRange:]):
30979        (-[WKContentView unmarkText]):
30980        (-[WKContentView insertText:]):
30981        * UIProcess/ios/WebPageProxyIOS.mm:
30982        (WebKit::WebPageProxy::cancelComposition):
30983        * UIProcess/mac/WebPageProxyMac.mm:
30984        (WebKit::WebPageProxy::cancelComposition):
30985        (WebKit::WebPageProxy::insertDictatedTextAsync):
30986        (WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync):
30987        (WebKit::WebPageProxy::attributedStringForCharacterRangeCallback):
30988        * WebProcess/WebPage/WebPage.h:
30989        * WebProcess/WebPage/WebPage.messages.in:
30990        * WebProcess/WebPage/ios/WebPageIOS.mm:
30991        * WebProcess/WebPage/mac/WebPageMac.mm:
30992        (WebKit::WebPage::cancelComposition):
30993        (WebKit::WebPage::insertDictatedTextAsync):
30994        (WebKit::WebPage::attributedSubstringForCharacterRangeAsync):
30995
309962014-03-20  Alexey Proskuryakov  <ap@apple.com>
30997
30998        ASSERTION FAILED: event == [NSApp currentEvent] hitting Command-+
30999        https://bugs.webkit.org/show_bug.cgi?id=130526
31000        <rdar://problem/16371612>
31001
31002        Reviewed by Anders Carlsson.
31003
31004        * UIProcess/API/mac/WKView.mm: (-[WKView performKeyEquivalent:]): Cut custom
31005        processing short whenever we are redispatching an event, not just when the event
31006        we are handling is the one being redispatched. There shouldn't be any other unrelated
31007        events here, just the one being redispatched and synthetic ones generated from it by AppKit.
31008
310092014-03-20  Anders Carlsson  <andersca@apple.com>
31010
31011        Fix build.
31012
31013        Rename WKPreferencesPrivate.h to WKPreferencesRefPrivate.h.
31014
31015        * UIProcess/API/C/WKPreferencesRefPrivate.h: Renamed from Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h.
31016        * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
31017        * WebKit2.xcodeproj/project.pbxproj:
31018
310192014-03-20  Gavin Barraclough  <barraclough@apple.com>
31020
31021        Merge AtomicString, Identifier
31022        https://bugs.webkit.org/show_bug.cgi?id=128624
31023
31024        Unreviewed build fix following r165982.
31025
31026        * WebProcess/Plugins/Netscape/NPJSObject.cpp:
31027            - update includes.
31028
310292014-03-20  Sam Weinig  <sam@webkit.org>
31030
31031        [WebKit2] Implement NetworkingContext::sourceApplicationAuditData() for WebKit2
31032        https://bugs.webkit.org/show_bug.cgi?id=130528
31033
31034        Reviewed by Anders Carlsson.
31035
31036        * Platform/IPC/Connection.h:
31037        * Platform/IPC/mac/ConnectionMac.cpp:
31038        (IPC::Connection::getAuditToken):
31039        Expose the audit data if available. 
31040
31041        * NetworkProcess/mac/RemoteNetworkingContext.mm:
31042        (WebKit::RemoteNetworkingContext::sourceApplicationAuditData):
31043        * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
31044        (WebKit::WebFrameNetworkingContext::sourceApplicationAuditData):
31045        Pass the audit data corresponding to the UIProcess.
31046
310472014-03-20  Sam Weinig  <sam@webkit.org>
31048
31049        [Cocoa] Expose preference to enable telephone number detection
31050        https://bugs.webkit.org/show_bug.cgi?id=130524
31051
31052        Reviewed by Anders Carlsson.
31053
31054        * UIProcess/API/Cocoa/WKPreferences.mm:
31055        (-[WKPreferences _telephoneNumberDetectionIsEnabled]):
31056        (-[WKPreferences _setTelephoneNumberDetectionIsEnabled:]):
31057        * UIProcess/API/Cocoa/WKPreferencesInternal.h:
31058        * UIProcess/API/Cocoa/WKPreferencesPrivate.h: Added.
31059        * WebKit2.xcodeproj/project.pbxproj:
31060
310612014-03-19  Alexey Proskuryakov  <ap@apple.com>
31062
31063        [Mac] Support asynchronous NSTextInputClient
31064        https://bugs.webkit.org/show_bug.cgi?id=130479
31065
31066        Reviewed by Anders Carlsson.
31067
31068        The implementation is currently disabled, pending lower level support.
31069        Most of the code is not under compile time guard however, to facilitate cross-platform
31070        reuse, or at least under a PLATFORM(COCOA) guard to share the code with iOS.
31071
31072        * UIProcess/API/mac/WKView.mm: Added a compile time branch for USE(ASYNC_NSTEXTINPUTCLIENT).
31073        We still implement sync NSTextInputClient here, in order to get assertions when
31074        its methods are unexpectedly called.
31075        The new code first sends an event to input method asynchronously, handling any callbacks
31076        that may arrive. During this time, we no longer care about WKViewInterpretKeyEventsParameters
31077        at all. Once done, we interpret key bindings synchronously, collecting them into
31078        a vector.
31079
31080        * UIProcess/API/mac/WKViewInternal.h: We no longer expose _interpretKeyEvent outside
31081        WKView.
31082
31083        * UIProcess/WebPageProxy.cpp:
31084        * UIProcess/WebPageProxy.h:
31085        Added async calls and callbacks. Removed unnecessary and slightly harmful .get() when moving
31086        a callback pointer into map. Moved insertDictatedText() and getAttributedSubstringFromRange()
31087        from PLATFORM(COCOA) to PLATFORM(MAC), because they are unused and unimplemented on
31088        iOS, and unlikely to be needed any time soon. Changed USE(APPKIT) to PLATFORM(MAC),
31089        because that's more accurate in this case (nothing depends on AppKit, it's just code
31090        that we only need on Mac).
31091
31092        * UIProcess/WebPageProxy.messages.in: Added messages for new async IM responses.
31093
31094        * UIProcess/ios/WebPageProxyIOS.mm: Removed insertDictatedText() and getAttributedSubstringFromRange().
31095
31096        * UIProcess/mac/WebPageProxyMac.mm:
31097        (WebKit::WebPageProxy::insertDictatedTextAsync):
31098        (WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync):
31099        (WebKit::WebPageProxy::attributedStringForCharacterRangeCallback):
31100        Added async calls and callbacks that are Mac only.
31101
31102        * WebProcess/WebPage/WebPage.cpp:
31103        * WebProcess/WebPage/WebPage.h:
31104        * WebProcess/WebPage/mac/WebPageMac.mm:
31105        Added async implementations (which are essentially the same as sync ones, sadly).
31106
31107        * WebProcess/WebPage/WebPage.messages.in: Added async messages, moved some messages
31108        under PLATFORM(MAC).
31109
31110        * WebProcess/WebPage/ios/WebPageIOS.mm: More of deleting functions that are Mac only,
31111        and cannot be easily implemented in WebPage.cpp with shared code.
31112
311132014-03-20  Martin Robinson  <mrobinson@igalia.com>
31114
31115        Remove remaining GTK+ unused parameter warnings from WebKit2
31116        https://bugs.webkit.org/show_bug.cgi?id=130518
31117
31118        Reviewed by Sergio Villar Senin.
31119
31120        Fix almost all unused parameter warnings in the WebKit2GTK+ build.
31121
311222014-03-20  Commit Queue  <commit-queue@webkit.org>
31123
31124        Unreviewed, rolling out r165962.
31125        https://bugs.webkit.org/show_bug.cgi?id=130512
31126
31127        It broke the build (Requested by Ossy on #webkit).
31128
31129        Reverted changeset:
31130
31131        "[EFL][GTK] Get CMake to find Freetype2 properly"
31132        https://bugs.webkit.org/show_bug.cgi?id=130150
31133        http://trac.webkit.org/changeset/165962
31134
311352014-03-20  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
31136
31137        [EFL][GTK] Get CMake to find Freetype2 properly
31138        https://bugs.webkit.org/show_bug.cgi?id=130150
31139
31140        Reviewed by Csaba Osztrogonác.
31141
31142        Newer versions of CMake are not able to find Freetype2 correctly.
31143        FindFreetype2.cmake checks for the version number in freetype.h header, since it seems that bug exists in
31144        freetype2 repo, because a completely different version number is found in freetype2.pc.
31145
31146        * PlatformEfl.cmake:
31147
311482014-03-20  Ryuan Choi  <ryuan.choi@samsung.com>
31149
31150        [EFL][WK2] test_ewk2_application_cache_manager is flaky
31151        https://bugs.webkit.org/show_bug.cgi?id=130501
31152
31153        Reviewed by Gyuyoung Kim.
31154
31155        * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
31156        (timerCallback): Return ECORE_CALLBACK_CANCEL to clear the timer.
31157
311582014-03-19  Tim Horton  <timothy_horton@apple.com>
31159
31160        Address late review comment and style nit after r165934.
31161
31162        * UIProcess/ios/ViewGestureControllerIOS.mm:
31163        (WebKit::ViewGestureController::beginSwipeGesture):
31164
311652014-03-19  Tim Horton  <timothy_horton@apple.com>
31166
31167        [iOS][WebKit2] Back-forward swipe doesn't always complete with fingers down
31168        https://bugs.webkit.org/show_bug.cgi?id=130489
31169        <rdar://problem/16027007>
31170
31171        Reviewed by Simon Fraser.
31172
31173        * UIProcess/ios/ViewGestureControllerIOS.mm:
31174        (WebKit::ViewGestureController::beginSwipeGesture):
31175        In order to have fingers-down swipe completion work correctly, we need
31176        to give UIKit an empty interactive update block.
31177
311782014-03-19  Anders Carlsson  <andersca@apple.com>
31179
31180        Get rid of two IPC::Connection functions by folding them into lambdas
31181        https://bugs.webkit.org/show_bug.cgi?id=130482
31182
31183        Reviewed by Tim Horton.
31184
31185        * Platform/IPC/Connection.cpp:
31186        (IPC::Connection::addWorkQueueMessageReceiver):
31187        (IPC::Connection::removeWorkQueueMessageReceiver):
31188        * Platform/IPC/Connection.h:
31189
311902014-03-19  Simon Fraser  <simon.fraser@apple.com>
31191
31192        Expose text and page zoom in WK2 SPI, and hook them up in MiniBrowser
31193        https://bugs.webkit.org/show_bug.cgi?id=130476
31194
31195        Reviewed by Anders Carlsson.
31196        
31197        Expose page and text zoom as SPI.
31198
31199        * UIProcess/API/Cocoa/WKWebView.mm:
31200        (-[WKWebView _supportsTextZoom]):
31201        (-[WKWebView _textZoomFactor]):
31202        (-[WKWebView _setTextZoomFactor:]):
31203        (-[WKWebView _pageZoomFactor]):
31204        (-[WKWebView _setPageZoomFactor:]):
31205        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
31206
312072014-03-19  Benjamin Poulain  <bpoulain@apple.com>
31208
31209        [iOS][WK2] Reduce the extended background's opacity when WKContentView is smaller than its WKWebView
31210        https://bugs.webkit.org/show_bug.cgi?id=130436
31211
31212        Reviewed by Beth Dakin.
31213
31214        * UIProcess/API/Cocoa/WKWebView.mm:
31215        (-[WKWebView _updateScrollViewBackground]):
31216
312172014-03-19  Benjamin Poulain  <bpoulain@apple.com>
31218
31219        [iOS][WebKit2] <rdar://problem/16330387> Do not use the keyboard rect for computing the general unobscuredRect, only use it for centering
31220        https://bugs.webkit.org/show_bug.cgi?id=130382
31221
31222        Reviewed by Simon Fraser.
31223
31224        Always accumulating the keyboard rect out of the exposedRect caused some issues (see <rdar://problem/16330387>).
31225        This patch split the rect in two: unobscured rect for WebCore, and unobscuredContentRectIncludingKeyboard for centering
31226        UI Elements in view.
31227
31228        * UIProcess/API/Cocoa/WKWebView.mm:
31229        (-[WKWebView _zoomToRect:WebCore::atScale:origin:WebCore::]):
31230        (-[WKWebView _scrollToRect:WebCore::origin:WebCore::minimumScrollDistance:]):
31231        (-[WKWebView _zoomToRect:WebCore::withOrigin:WebCore::fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:]):
31232        (-[WKWebView _contentRectForUserInteraction]):
31233        (-[WKWebView _updateVisibleContentRects]):
31234
312352014-03-19  Anders Carlsson  <andersca@apple.com>
31236
31237        Get rid of WKProcessClass
31238        https://bugs.webkit.org/show_bug.cgi?id=130478
31239
31240        Reviewed by Dan Bernstein.
31241
31242        * UIProcess/API/Cocoa/WKProcessClass.h: Removed.
31243        * UIProcess/API/Cocoa/WKProcessClass.mm: Removed.
31244        * UIProcess/API/Cocoa/WKProcessClassConfiguration.h: Removed.
31245        * UIProcess/API/Cocoa/WKProcessClassConfiguration.mm: Removed.
31246        * UIProcess/API/Cocoa/WKProcessClassConfigurationPrivate.h: Removed.
31247        * UIProcess/API/Cocoa/WKProcessClassPrivate.h: Removed.
31248        * UIProcess/API/Cocoa/WKWebViewConfigurationToBeRemoved.mm: Removed.
31249        * WebKit2.xcodeproj/project.pbxproj:
31250
312512014-03-19  Jer Noble  <jer.noble@apple.com>
31252
31253        [Mac][EME] Query whether decoder support exists before creating a new MediaKeys object.
31254        https://bugs.webkit.org/show_bug.cgi?id=130459
31255
31256        Reviewed by Eric Carlson.
31257
31258        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
31259        (InitWebCoreSystemInterface): Initialize the new WCSI method.
31260
312612014-03-19  Brady Eidson  <beidson@apple.com>
31262
31263        Filter out editable services from image menu for non-contenteditable images
31264        <rdar://problem/16319645> and https://bugs.webkit.org/show_bug.cgi?id=130437
31265
31266        Reviewed by Tim Horton.
31267
31268        * UIProcess/mac/WebContextMenuProxyMac.h:
31269        * UIProcess/mac/WebContextMenuProxyMac.mm:
31270        (-[WKSharingServicePickerDelegate setIncludeEditorServices:]):
31271        (-[WKSharingServicePickerDelegate sharingServicePicker:sharingServicesForItems:mask:proposedSharingServices:]):
31272          Filter out editing services based on the includeEditorServices flag.
31273        (WebKit::WebContextMenuProxyMac::setupImageServicesMenu):
31274        (WebKit::WebContextMenuProxyMac::populate):
31275
312762014-03-19  Yongjun Zhang  <yongjun_zhang@apple.com>
31277
31278        [iOS] WebKit2 Quicklook.
31279        https://bugs.webkit.org/show_bug.cgi?id=130360
31280
31281        For WebKit2 resource loads, if we detect a quicklook content that QLConverter is able to
31282        convert, handle the response data to QLConverter and use its delegate WKWebResourceQuickLookDelegate
31283        to rounte the converted results (HTML) back into WebCore.  Thie similiar logic has been in place
31284        for WebKit1.
31285
31286        Reviewed by Tim Horton.
31287
31288        * WebKit2.xcodeproj/project.pbxproj: Add WebResourceLoaderIOS.mm to the project.
31289        * WebProcess/Network/WebResourceLoadScheduler.cpp:
31290        * WebProcess/ios/WebResourceLoaderIOS.mm: Added.
31291        (-[WKWebResourceQuickLookDelegate initWithWebResourceLoader:WebKit::]): WKWebResourceQuickLookDelegate holds
31292            the original WebResourceLoader so that we could send converted result to WebCore.
31293        (-[WKWebResourceQuickLookDelegate connection:didReceiveDataArray:]):
31294        (-[WKWebResourceQuickLookDelegate connection:didReceiveData:lengthReceived:]):
31295        (-[WKWebResourceQuickLookDelegate connectionDidFinishLoading:]):
31296        (-[WKWebResourceQuickLookDelegate connection:didFailWithError:]):
31297        (-[WKWebResourceQuickLookDelegate clearHandle]):
31298        (WebKit::WebResourceLoader::setUpQuickLookHandleIfNeeded):
31299
313002014-03-19  Tim Horton  <timothy_horton@apple.com>
31301
31302        WebKit2 View Gestures: Swipe gesture can track vertical movement instead of horizontal movement
31303        https://bugs.webkit.org/show_bug.cgi?id=130441
31304        <rdar://problem/16337279>
31305
31306        Reviewed by Simon Fraser.
31307
31308        * UIProcess/mac/ViewGestureControllerMac.mm:
31309        (WebKit::scrollEventCanBecomeSwipe):
31310        Factor logic that determines if a scroll event can become a swipe
31311        out into scrollEventCanBecomeSwipe.
31312        Use <= instead of < when comparing the axes, because we don't want
31313        to start a swipe on a completely diagonal scroll either (because AppKit
31314        can start tracking a vertical swipe in that case).
31315
31316        (WebKit::ViewGestureController::handleScrollWheelEvent):
31317        (WebKit::ViewGestureController::wheelEventWasNotHandledByWebCore):
31318        Make use of scrollEventCanBecomeSwipe.
31319
313202014-03-18  Anders Carlsson  <andersca@apple.com>
31321
31322        Add new functionality that will be required by the history item decoding
31323        https://bugs.webkit.org/show_bug.cgi?id=130433
31324
31325        Reviewed by Sam Weinig.
31326
31327        * Shared/cf/KeyedDecoder.cpp:
31328        (WebKit::KeyedDecoder::decodeUInt32):
31329        (WebKit::KeyedDecoder::decodeInt32):
31330        (WebKit::KeyedDecoder::decodeFloat):
31331        * Shared/cf/KeyedDecoder.h:
31332
313332014-03-19  Tim Horton  <timothy_horton@apple.com>
31334
31335        [iOS] WebPDFViewPlaceholder divides-by-zero with an empty document
31336        https://bugs.webkit.org/show_bug.cgi?id=130444
31337        <rdar://problem/15580682>
31338
31339        Reviewed by Sam Weinig.
31340
31341        * UIProcess/ios/WKPDFView.mm:
31342        (-[WKPDFView web_setContentProviderData:]):
31343        Don't make UIPDFPageViews for null pages.
31344
313452014-03-18  Tim Horton  <timothy_horton@apple.com>
31346
31347        [iOS][WebKit2] Provide generic software-snapshotting API
31348        https://bugs.webkit.org/show_bug.cgi?id=130385
31349        <rdar://problem/16005957>
31350
31351        Reviewed by Sam Weinig.
31352
31353        * UIProcess/API/Cocoa/WKWebView.mm:
31354        (-[WKWebView _didCommitLayerTree:WebKit::]):
31355        (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
31356        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
31357        * UIProcess/API/Cocoa/_WKThumbnailView.mm:
31358        (-[_WKThumbnailView initWithFrame:fromWKView:]):
31359        (-[_WKThumbnailView _requestSnapshotIfNeeded]):
31360        * UIProcess/WebPageProxy.cpp:
31361        (WebKit::WebPageProxy::internalShowContextMenu):
31362        * UIProcess/WebPageProxy.h:
31363        * WebProcess/WebPage/WebPage.cpp:
31364        (WebKit::WebPage::takeSnapshot):
31365        (WebKit::WebPage::scaledSnapshotWithOptions):
31366        (WebKit::WebPage::snapshotAtSize):
31367        * WebProcess/WebPage/WebPage.h:
31368        * WebProcess/WebPage/WebPage.messages.in:
31369        Rename TakeThumbnailSnapshot message to TakeSnapshot.
31370
31371        Fill the snapshot image with the FrameView's background color, to avoid
31372        half-pixel alpha around the edges.
31373
31374        Factor snapshotAtSize out of scaledSnapshotWithOptions.
31375
31376        Don't apply both the custom and device scale factor to the base CTM,
31377        only the device scale factor. Custom scale factor should only be
31378        applied to the user CTM.
31379
31380        * Shared/ImageOptions.h:
31381        Add a snapshot option, RespectDrawingAreaTransform, that maps
31382        the rect through the drawing area's root layer transform.
31383        Use this in place of the thumbnail-specific code in TakeThumbnailSnapshot.
31384        Add a snapshot option, ExcludeDeviceScaleFactor, which means that
31385        snapshotting will not factor the device scale in (useful for drawing
31386        to a bitmap at an exact requested size).
31387
313882014-03-18  Samuel White  <samuel_white@apple.com>
31389
31390        AX: Not able to use arrow keys to read text with VoiceOver before selection is set someplace (anyplace).
31391        https://bugs.webkit.org/show_bug.cgi?id=130250
31392
31393        Reviewed by Chris Fleizach.
31394
31395        Added ability to toggle enhanced accessibility on and off to support tests that require it.
31396
31397        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
31398        (WKAccessibilityEnableEnhancedAccessibility):
31399        (WKAccessibilityEnhancedAccessibilityEnabled):
31400        * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
31401
314022014-03-18  Ryuan Choi  <ryuan.choi@samsung.com>
31403
31404        [EFL][WK2] Rename async APIs for better consistency with EFL
31405        https://bugs.webkit.org/show_bug.cgi?id=130319
31406
31407        Reviewed by Gyuyoung Kim.
31408
31409        There are inconsistency with async keyword in several ewebkit2 APIs.
31410        This patch rename them to {module/feature}_async_{verb} for better consistency with EFL.
31411        In addition, added Async keyword into their callback name.
31412
31413        * UIProcess/API/efl/ewk_application_cache_manager.cpp:
31414        (EwkApplicationCacheOriginsAsyncData::EwkApplicationCacheOriginsAsyncData):
31415        (getApplicationCacheOriginsCallback):
31416        (ewk_application_cache_manager_origins_async_get):
31417        * UIProcess/API/efl/ewk_application_cache_manager.h:
31418        * UIProcess/API/efl/ewk_cookie_manager.cpp:
31419        (EwkCookiePolicyAsyncData::EwkCookiePolicyAsyncData):
31420        (getAcceptPolicyCallback):
31421        (ewk_cookie_manager_accept_policy_async_get):
31422        (EwkCookieHostnamesAsyncData::EwkCookieHostnamesAsyncData):
31423        (getHostnamesWithCookiesCallback):
31424        (ewk_cookie_manager_hostnames_with_cookies_async_get):
31425        * UIProcess/API/efl/ewk_cookie_manager.h:
31426        * UIProcess/API/efl/ewk_database_manager.cpp:
31427        (EwkDatabaseOriginsAsyncData::EwkDatabaseOriginsAsyncData):
31428        (getDatabaseOriginsCallback):
31429        (ewk_database_manager_origins_async_get):
31430        * UIProcess/API/efl/ewk_database_manager.h:
31431        * UIProcess/API/efl/ewk_storage_manager.cpp:
31432        (EwkStorageOriginsAsyncData::EwkStorageOriginsAsyncData):
31433        (getStorageOriginsCallback):
31434        (ewk_storage_manager_origins_async_get):
31435        * UIProcess/API/efl/ewk_storage_manager.h:
31436        * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
31437        (timerCallback):
31438        * UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp:
31439        (EWK2CookieManagerTest::getAcceptPolicy):
31440        (EWK2CookieManagerTest::getHostnamesWithCookies):
31441        * UIProcess/API/efl/tests/test_ewk2_database_manager.cpp:
31442        (EWK2DatabaseManagerTest::timerCallback):
31443        (TEST_F):
31444        * UIProcess/API/efl/tests/test_ewk2_storage_manager.cpp:
31445        (EWK2StorageManagerTest::timerCallback):
31446        (TEST_F):
31447
314482014-03-18  Tim Horton  <timothy_horton@apple.com>
31449
31450        [iOS][WebKit2] Mark layer contents as being opaque if they are
31451        https://bugs.webkit.org/show_bug.cgi?id=130427
31452        <rdar://problem/15540434>
31453
31454        Reviewed by Simon Fraser.
31455
31456        * Shared/mac/RemoteLayerBackingStore.h:
31457        (WebKit::RemoteLayerBackingStore::isOpaque):
31458        * Shared/mac/RemoteLayerBackingStore.mm:
31459        (RemoteLayerBackingStore::RemoteLayerBackingStore):
31460        (RemoteLayerBackingStore::ensureBackingStore):
31461        (RemoteLayerBackingStore::encode):
31462        (RemoteLayerBackingStore::decode):
31463        (RemoteLayerBackingStore::display):
31464        (RemoteLayerBackingStore::applyBackingStoreToLayer):
31465        Move the code to set a RemoteLayerBackingStore as a CALayer's contents
31466        from RemoteLayerTreePropertyApplier to RemoteLayerBackingStore (mostly
31467        as a way to keep the USE(IOSURFACE) #ifs in one place).
31468        Remove the surface() getter, because it's no longer needed, and make
31469        image() private as it can be now (and rename it to createImageForFrontBuffer
31470        for clarity's sake).
31471
31472        Add an isOpaque argument to ensureBackingStore, encode/decode it, and
31473        add a getter. If isOpaque is true when applying backing store to the
31474        CALayer on the UI process side, set CALayer.contentsOpaque to let CA know.
31475
31476        Make opaque bitmaps if not using accelerated drawing. For the IOSurface
31477        case, we can't make opaque IOSurfaces, but telling CA that we have filled
31478        the whole bitmap still enables similar optimizations.
31479
31480        * Shared/mac/RemoteLayerTreePropertyApplier.mm:
31481        (WebKit::applyPropertiesToLayer):
31482        Reset contentsOpaque if the layer loses its backing store.
31483
31484        * Shared/mac/RemoteLayerTreeTransaction.mm:
31485        (WebKit::RemoteLayerTreeTextStream::operator<<):
31486        (WebKit::dumpChangedLayers):
31487        Add a bit more logging about RemoteLayerBackingStore's opaqueness
31488        and acceleratedness.
31489
31490        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
31491        (PlatformCALayerRemote::updateBackingStore):
31492        (PlatformCALayerRemote::setOpaque):
31493        Invalidate the RemoteLayerBackingStore if layer opaqueness changes.
31494
314952014-03-18  Brady Eidson  <beidson@apple.com>
31496
31497        Make image controls menu work in WK2
31498        <rdar://problem/16294412> and https://bugs.webkit.org/show_bug.cgi?id=130424
31499
31500        Reviewed by Tim Horton.
31501
31502        * Platform/SharedMemory.h:
31503        * Platform/mac/SharedMemoryMac.cpp:
31504        (WebKit::SharedMemory::Handle::~Handle):
31505        (WebKit::SharedMemory::Handle::clear):
31506
31507        * Platform/unix/SharedMemoryUnix.cpp:
31508        (WebKit::SharedMemory::Handle::~Handle):
31509        (WebKit::SharedMemory::Handle::clear):
31510
31511        * Shared/ContextMenuContextData.cpp:
31512        (WebKit::ContextMenuContextData::ContextMenuContextData):
31513        (WebKit::ContextMenuContextData::operator=):
31514        (WebKit::ContextMenuContextData::encode):
31515        (WebKit::ContextMenuContextData::decode):
31516        * Shared/ContextMenuContextData.h:
31517        (WebKit::ContextMenuContextData::controlledImageHandle):
31518
31519        * Shared/ShareableBitmap.cpp:
31520        (WebKit::ShareableBitmap::Handle::clear):
31521        * Shared/ShareableBitmap.h:
31522        * UIProcess/WebContextMenuProxy.h:
31523
31524        * UIProcess/WebPageProxy.cpp:
31525        (WebKit::WebPageProxy::internalShowContextMenu):
31526        (WebKit::WebPageProxy::replaceControlledImage):
31527        * UIProcess/WebPageProxy.h:
31528
31529        * UIProcess/efl/WebContextMenuProxyEfl.cpp:
31530        (WebKit::WebContextMenuProxyEfl::showContextMenu):
31531        * UIProcess/efl/WebContextMenuProxyEfl.h:
31532
31533        * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
31534        (WebKit::WebContextMenuProxyGtk::showContextMenu):
31535        * UIProcess/gtk/WebContextMenuProxyGtk.h:
31536
31537        Add a sharing service context menu that lives side-by-side with the normal one:
31538        * UIProcess/mac/WebContextMenuProxyMac.h:
31539        * UIProcess/mac/WebContextMenuProxyMac.mm:
31540        (+[WKSharingServicePickerDelegate sharedSharingServicePickerDelegate]):
31541        (-[WKSharingServicePickerDelegate setMenuProxy:WebKit::]):
31542        (-[WKSharingServicePickerDelegate setPicker:]):
31543        (-[WKSharingServicePickerDelegate sharingServicePicker:delegateForSharingService:]):
31544        (-[WKSharingServicePickerDelegate sharingService:willShareItems:]):
31545        (-[WKSharingServicePickerDelegate sharingService:didShareItems:]):
31546        (-[WKSharingServicePickerDelegate sharingService:sourceFrameOnScreenForShareItem:]):
31547        (-[WKSharingServicePickerDelegate sharingService:transitionImageForShareItem:contentRect:]):
31548        (-[WKSharingServicePickerDelegate sharingService:sourceWindowForShareItems:sharingContentScope:]):
31549        (WebKit::WebContextMenuProxyMac::contextMenuItemSelected):
31550        (WebKit::WebContextMenuProxyMac::setupImageServicesMenu):
31551        (WebKit::WebContextMenuProxyMac::clearImageServicesMenu):
31552        (WebKit::WebContextMenuProxyMac::populate):
31553        (WebKit::WebContextMenuProxyMac::showContextMenu):
31554        (WebKit::WebContextMenuProxyMac::window):
31555        (WebKit::WebContextMenuProxyMac::replaceControlledImage):
31556
31557        * WebProcess/WebPage/WebContextMenu.cpp:
31558        (WebKit::WebContextMenu::show):
31559        (WebKit::WebContextMenu::replaceControlledImage):
31560        * WebProcess/WebPage/WebContextMenu.h:
31561
31562        Teach the WebProcess how to accept the replaced image.
31563        * WebProcess/WebPage/WebPage.cpp:
31564        (WebKit::WebPage::replaceControlledImage):
31565        * WebProcess/WebPage/WebPage.h:
31566        * WebProcess/WebPage/WebPage.messages.in:
31567
315682014-03-18  Anders Carlsson  <andersca@apple.com>
31569
31570        Begin cleaning up KeyedDecoder and KeyedEncoder
31571        https://bugs.webkit.org/show_bug.cgi?id=130431
31572
31573        Reviewed by Tim Horton.
31574
31575        * Shared/cf/KeyedDecoder.cpp:
31576        (WebKit::KeyedDecoder::KeyedDecoder):
31577        If we can't parse the property list data, just add an empty dictionary to the stack.
31578
31579        (WebKit::KeyedDecoder::decodeBool):
31580        Remove unneeded m_dictionaryStack.last() null check. m_dictionaryStack would either be empty
31581        or at least have a root element; it would never have a null element.
31582        
31583        (WebKit::KeyedDecoder::decodeDouble):
31584        Remove the same check as above and remove the CFNumberGetType checks since CFNumberGetValue will
31585        do the type conversion for us and return false if it's lossy.
31586
31587        (WebKit::KeyedDecoder::decodeInt64):
31588        Remove the m_dictionaryStack.last() check.
31589
31590        (WebKit::KeyedDecoder::decodeUInt32):
31591        Ditto.
31592
31593        (WebKit::KeyedDecoder::decodeString):
31594        Ditto.
31595
31596        (WebKit::KeyedDecoder::beginObject):
31597        Ditto.
31598
31599        (WebKit::KeyedDecoder::beginArray):
31600        Ditto.
31601
31602        (WebKit::KeyedDecoder::beginArrayElement):
31603        Ditto.
31604
31605        * Shared/cf/KeyedDecoder.h:
31606        Sort functions to be in the same logical order as the base class.
31607
31608        * Shared/cf/KeyedEncoder.cpp:
31609        (WebKit::KeyedEncoder::finishEncoding):
31610        Don't check for a non-null CFErrorRef here (which we incidentally never released on error). Instead,
31611        just null check the returned CFDataRef object.
31612
316132014-03-18  Joseph Pecoraro  <pecoraro@apple.com>
31614
31615        Unreviewed typo build fix for r165846.
31616
31617        * Shared/WebPageCreationParameters.cpp:
31618        (WebKit::WebPageCreationParameters::decode):
31619
316202014-03-18  Joseph Pecoraro  <pecoraro@apple.com>
31621
31622        WebKit2 SPI to disable remote inspection on a WKWebView / WKPage
31623        https://bugs.webkit.org/show_bug.cgi?id=130371
31624
31625        Reviewed by Dan Bernstein.
31626
31627        * Shared/WebPageCreationParameters.h:
31628        * Shared/WebPageCreationParameters.cpp:
31629        (WebKit::WebPageCreationParameters::encode):
31630        (WebKit::WebPageCreationParameters::decode):
31631        Add allowsRemoteInspection bool.
31632
31633        * UIProcess/API/C/WKPagePrivate.h:
31634        * UIProcess/API/C/WKPage.cpp:
31635        (WKPageGetAllowsRemoteInspection):
31636        (WKPageSetAllowsRemoteInspection):
31637        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
31638        * UIProcess/API/Cocoa/WKWebView.mm:
31639        (-[WKWebView _allowsRemoteInspection]):
31640        (-[WKWebView _setAllowsRemoteInspection:]):
31641        Getter and setter for allowing remote inspection state.
31642
31643        * UIProcess/WebPageProxy.h:
31644        (WebKit::WebPageProxy::allowsRemoteInspection):
31645        * UIProcess/WebPageProxy.cpp:
31646        (WebKit::WebPageProxy::WebPageProxy):
31647        (WebKit::WebPageProxy::setAllowsRemoteInspection):
31648        (WebKit::WebPageProxy::creationParameters):
31649        Cached allows remote inspection state, with getter and setter.
31650
31651        * WebProcess/WebPage/WebPage.h:
31652        * WebProcess/WebPage/WebPage.messages.in:
31653        * WebProcess/WebPage/WebPage.cpp:
31654        (WebKit::WebPage::setAllowsRemoteInspection):
31655        When setting, call into WebCore to adjust the Page's setting.
31656
316572014-03-18  Anders Carlsson  <andersca@apple.com>
31658
31659        REGRESSION: Visited link coloring seems to be completely broken in tip of tree
31660        https://bugs.webkit.org/show_bug.cgi?id=130419
31661        <rdar://problem/16337850>
31662
31663        Reviewed by Dan Bernstein.
31664
31665        Make sure to send any queued up messages before calling connectionWillOpen so we'll ensure
31666        FIFO ordering if any messages are sent from within connectionWillOpen.
31667
31668        * Shared/ChildProcessProxy.cpp:
31669        (WebKit::ChildProcessProxy::didFinishLaunching):
31670
316712014-03-18  Joseph Pecoraro  <pecoraro@apple.com>
31672
31673        WebPageCreationParameters colorSpace should be MAC not COCOA
31674        https://bugs.webkit.org/show_bug.cgi?id=130414
31675
31676        Reviewed by Dan Bernstein.
31677
31678        The colorSpace param was only set and used on Mac, not iOS.
31679
31680        * Shared/WebPageCreationParameters.h:
31681        * Shared/WebPageCreationParameters.cpp:
31682        (WebKit::WebPageCreationParameters::encode):
31683        (WebKit::WebPageCreationParameters::decode):
31684
316852014-03-18  Simon Fraser  <simon.fraser@apple.com>
31686
31687        Dan says that options should be unsigned, and enums should be signed.
31688        
31689        Reviewed by Dan Bernstein.
31690
31691        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
31692        (NS_ENUM):
31693
316942014-03-17  Alexey Proskuryakov  <ap@apple.com>
31695
31696        [WK2] Pass ranges over IPC in a cross-platform manner
31697        https://bugs.webkit.org/show_bug.cgi?id=130376
31698
31699        Reviewed by Anders Carlsson.
31700
31701        Added an EditingRange class for IPC, which automatically converts to and from
31702        NSRanges, knowing the difference between notFound and NSNotFound.
31703
31704        Manually applied the same fix to characterIndexForPoint.
31705
31706        * Scripts/webkit2/messages.py:
31707        (struct_or_class):
31708        * Shared/EditingRange.h: Added.
31709        (WebKit::EditingRange::EditingRange):
31710        (WebKit::EditingRange::isValid):
31711        (WebKit::EditingRange::operator NSRange):
31712        * UIProcess/API/mac/WKView.mm:
31713        (-[WKView insertText:replacementRange:]):
31714        (-[WKView selectedRange]):
31715        (-[WKView hasMarkedText]):
31716        (-[WKView setMarkedText:selectedRange:replacementRange:]):
31717        (-[WKView markedRange]):
31718        (-[WKView attributedSubstringForProposedRange:actualRange:]):
31719        (-[WKView characterIndexForPoint:]):
31720        (-[WKView firstRectForCharacterRange:actualRange:]):
31721        * UIProcess/WebPageProxy.h:
31722        * UIProcess/ios/WKContentViewInteraction.mm:
31723        (-[WKContentView setMarkedText:selectedRange:]):
31724        (-[WKContentView insertText:]):
31725        * UIProcess/ios/WebPageProxyIOS.mm:
31726        (WebKit::WebPageProxy::setComposition):
31727        (WebKit::WebPageProxy::insertText):
31728        (WebKit::WebPageProxy::insertDictatedText):
31729        (WebKit::WebPageProxy::getMarkedRange):
31730        (WebKit::WebPageProxy::getSelectedRange):
31731        (WebKit::WebPageProxy::getAttributedSubstringFromRange):
31732        (WebKit::WebPageProxy::firstRectForCharacterRange):
31733        * UIProcess/mac/WebPageProxyMac.mm:
31734        (WebKit::WebPageProxy::setComposition):
31735        (WebKit::WebPageProxy::insertText):
31736        (WebKit::WebPageProxy::insertDictatedText):
31737        (WebKit::WebPageProxy::getMarkedRange):
31738        (WebKit::WebPageProxy::getSelectedRange):
31739        (WebKit::WebPageProxy::getAttributedSubstringFromRange):
31740        (WebKit::WebPageProxy::firstRectForCharacterRange):
31741        * WebKit2.xcodeproj/project.pbxproj:
31742        * WebProcess/WebPage/WebPage.cpp:
31743        (WebKit::WebPage::rangeFromEditingRange):
31744        * WebProcess/WebPage/WebPage.h:
31745        * WebProcess/WebPage/WebPage.messages.in:
31746        * WebProcess/WebPage/ios/WebPageIOS.mm:
31747        (WebKit::WebPage::setComposition):
31748        (WebKit::WebPage::insertText):
31749        (WebKit::WebPage::insertDictatedText):
31750        (WebKit::WebPage::getMarkedRange):
31751        (WebKit::WebPage::getSelectedRange):
31752        (WebKit::WebPage::getAttributedSubstringFromRange):
31753        (WebKit::WebPage::firstRectForCharacterRange):
31754        * WebProcess/WebPage/mac/WebPageMac.mm:
31755        (WebKit::WebPage::setComposition):
31756        (WebKit::WebPage::insertText):
31757        (WebKit::WebPage::insertDictatedText):
31758        (WebKit::WebPage::getMarkedRange):
31759        (WebKit::WebPage::getSelectedRange):
31760        (WebKit::WebPage::getAttributedSubstringFromRange):
31761        (WebKit::WebPage::characterIndexForPoint):
31762        (WebKit::WebPage::firstRectForCharacterRange):
31763
317642014-03-17  Filip Pizlo  <fpizlo@apple.com>
31765
31766        More FTL enabling.
31767
31768        Rubber stamped by Dan Bernstein.
31769
31770        * Configurations/FeatureDefines.xcconfig:
31771
317722014-03-17  Simon Fraser  <simon.fraser@apple.com>
31773
31774        Renable pagination mode in WK2 MiniBrowser
31775        https://bugs.webkit.org/show_bug.cgi?id=130374
31776
31777        Reviewed by Anders Carlsson.
31778        
31779        Add SPI for pagination mode.
31780
31781        * UIProcess/API/Cocoa/WKWebView.mm:
31782        (-[WKWebView _paginationMode]):
31783        (-[WKWebView _setPaginationMode:]):
31784        (-[WKWebView _paginationBehavesLikeColumns]):
31785        (-[WKWebView _setPaginationBehavesLikeColumns:]):
31786        (-[WKWebView _pageLength]):
31787        (-[WKWebView _setPageLength:]):
31788        (-[WKWebView _gapBetweenPages]):
31789        (-[WKWebView _setGapBetweenPages:]):
31790        (-[WKWebView _pageCount]):
31791        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
31792        (NS_ENUM):
31793
317942014-03-18  Ryuan Choi  <ryuan.choi@samsung.com>
31795
31796        [CMAKE][WK2]Move CoordinatedGraphics related files out of WebKit2/CMakeLists.txt
31797        https://bugs.webkit.org/show_bug.cgi?id=130390
31798
31799        Reviewed by Martin Robinson.
31800
31801        Now, only EFL port use CoordinatedGraphics among CMake based ports.
31802
31803        * CMakeLists.txt:
31804        * PlatformEfl.cmake:
31805        * PlatformGTK.cmake: Removed CoordinatedGraphics related files.
31806
318072014-03-18  Carlos Garcia Campos  <cgarcia@igalia.com>
31808
31809        [GTK] Race condition when the socket event source is cancelled
31810        https://bugs.webkit.org/show_bug.cgi?id=130395
31811
31812        Reviewed by Martin Robinson.
31813
31814        In some cases when the socket event source is cancelled the socket
31815        event source callback is called with the condition of the previous
31816        poll instead of 0. This can happen sometimes when the source is
31817        cancelled from the socket event source callback. Once the socket
31818        event source is cancelled, it's dispatched by glib without
31819        polling, so the condition is never reset again and the callback is
31820        called again and again with the previous condition. When the
31821        condition is G_IO_IN, the source is re-scheduled entering into an
31822        infinite loop. We should always check if the source has been
31823        cancelled at the beginning of the callback to destroy the source
31824        instead of relying on the condition being 0.
31825
31826        * Platform/gtk/WorkQueueGtk.cpp:
31827        (WorkQueue::SocketEventSource::isCancelled):
31828        (WorkQueue::SocketEventSource::eventCallback):
31829
318302014-03-18  Csaba Osztrogonác  <ossy@webkit.org>
31831
31832        [GTK] URTFB after r165789. Stub function added.
31833
31834        * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
31835        (WebKit::InjectedBundle::setBundleParameter):
31836
318372014-03-17  Jaehun Lim  <ljaehun.lim@samsung.com>
31838
31839        Unreviewed, EFL build fix after r165789
31840
31841        * WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp:
31842        (WebKit::InjectedBundle::setBundleParameter): Implemented.
31843
318442014-03-17  Jae Hyun Park  <jaepark@webkit.org>
31845
31846        [GTK] Build fix for debug build
31847
31848        Unreviewed.
31849
31850        finalizedListItem was actually used in ASSERT.  So, use ASSERT_UNUSED
31851        instead of ASSERT.
31852
31853        * UIProcess/API/gtk/WebKitBackForwardListItem.cpp:
31854        (webkitBackForwardListItemFinalized):
31855
318562014-03-17  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
31857
31858        [WK2] Getting rid of compilation warnings
31859        https://bugs.webkit.org/show_bug.cgi?id=130348
31860
31861        Reviewed by Benjamin Poulain.
31862
31863        * UIProcess/API/APIHistoryClient.h:
31864        (API::HistoryClient::didPerformClientRedirect):
31865        (API::HistoryClient::didPerformServerRedirect):
31866        (API::HistoryClient::didUpdateHistoryTitle):
31867        * UIProcess/API/APILoaderClient.h:
31868        (API::LoaderClient::didStartProvisionalLoadForFrame):
31869        (API::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
31870        (API::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
31871        (API::LoaderClient::didCommitLoadForFrame):
31872        (API::LoaderClient::didFinishLoadForFrame):
31873        (API::LoaderClient::didFailLoadWithErrorForFrame):
31874        (API::LoaderClient::didChangeBackForwardList):
31875        * UIProcess/API/APIPolicyClient.h:
31876        (API::PolicyClient::decidePolicyForNavigationAction):
31877        (API::PolicyClient::decidePolicyForNewWindowAction):
31878        (API::PolicyClient::decidePolicyForResponse):
31879        (API::PolicyClient::unableToImplementPolicy):
31880        * UIProcess/API/APIUIClient.h:
31881        (API::UIClient::exceededDatabaseQuota):
31882        (API::UIClient::saveDataToFileInDownloadsFolder):
31883        * UIProcess/API/C/WKPage.cpp:
31884        (WKPageSetPageLoaderClient):
31885        * UIProcess/APISession.cpp:
31886        (API::generateID):
31887        * WebProcess/Plugins/PluginView.cpp:
31888        (WebKit::PluginView::viewStateDidChange):
31889
318902014-03-17  Anders Carlsson  <andersca@apple.com>
31891
31892        Update the bundle parameters dictionary and send out KVO notifications
31893        https://bugs.webkit.org/show_bug.cgi?id=130379
31894        <rdar://problem/16213914>
31895
31896        Reviewed by Dan Bernstein.
31897
31898        * UIProcess/API/Cocoa/WKProcessPool.mm:
31899        (-[WKProcessPool _setObject:forBundleParameter:]):
31900        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.h:
31901        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm:
31902        (-[WKWebProcessBundleParameters setParameter:forKey:]):
31903        * WebProcess/InjectedBundle/InjectedBundle.h:
31904        * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
31905        (WebKit::InjectedBundle::setBundleParameter):
31906        * WebProcess/WebProcess.cpp:
31907        (WebKit::WebProcess::setInjectedBundleParameter):
31908        * WebProcess/WebProcess.h:
31909        * WebProcess/WebProcess.messages.in:
31910
319112014-03-17  Tim Horton  <timothy_horton@apple.com>
31912
31913        Address some style nits.
31914
31915        * UIProcess/API/Cocoa/_WKThumbnailViewInternal.h:
31916
319172014-03-17  Simon Fraser  <simon.fraser@apple.com>
31918
31919        Address some style nits.
31920
31921        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
31922
319232014-03-17  Simon Fraser  <simon.fraser@apple.com>
31924
31925        Add transparent window support back into MiniBrowser
31926        https://bugs.webkit.org/show_bug.cgi?id=130363
31927
31928        Reviewed by Anders Carlsson.
31929        
31930        Expose SPI for transparent window support.
31931
31932        * UIProcess/API/Cocoa/WKWebView.mm:
31933        (-[WKWebView _drawsTransparentBackground]):
31934        (-[WKWebView _setDrawsTransparentBackground:]):
31935        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
31936
319372014-03-17  Alexey Proskuryakov  <ap@apple.com>
31938
31939        Undo some accidental Gtk changes from http://trac.webkit.org/changeset/165759
31940
31941        * UIProcess/WebPageProxy.cpp:
31942        * WebProcess/WebPage/WebPage.messages.in:
31943
319442014-03-17  Csaba Osztrogonác  <ossy@webkit.org>
31945
31946        [WK2] URTBF after r165755 for non Apple platforms, stub functions added.
31947
31948        * WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp:
31949        (WebKit::InjectedBundle::platformInitialize):
31950        * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
31951        (WebKit::InjectedBundle::platformInitialize):
31952
319532014-03-17  Alexey Proskuryakov  <ap@apple.com>
31954
31955        Move convertToRange() helper to cross-platform WebPage.cpp
31956        https://bugs.webkit.org/show_bug.cgi?id=130365
31957
31958        Reviewed by Tim Horton.
31959
31960        Also renamed it to rangeFromEditingLocationAndLength().
31961
31962        * WebProcess/WebPage/WebPage.cpp:
31963        (WebKit::WebPage::rangeFromEditingLocationAndLength):
31964        * WebProcess/WebPage/WebPage.h:
31965        * WebProcess/WebPage/ios/WebPageIOS.mm:
31966        (WebKit::WebPage::insertText):
31967        * WebProcess/WebPage/mac/WebPageMac.mm:
31968        (WebKit::WebPage::setComposition):
31969        (WebKit::WebPage::insertText):
31970        (WebKit::WebPage::insertDictatedText):
31971        (WebKit::WebPage::getAttributedSubstringFromRange):
31972        (WebKit::WebPage::characterIndexForPoint):
31973        (WebKit::WebPage::firstRectForCharacterRange):
31974
319752014-03-17  Anders Carlsson  <andersca@apple.com>
31976
31977        Follow-up fix.
31978
31979        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.h:
31980
319812014-03-17  Enrica Casucci  <enrica@apple.com>
31982
31983        WK2: support data detectors driven action sheet..
31984        https://bugs.webkit.org/show_bug.cgi?id=130362
31985        <rdar://problem/16319711>
31986
31987        Reviewed by Benjamin Poulain.
31988
31989        * UIProcess/ios/WKActionSheetAssistant.mm:
31990        (-[WKActionSheetAssistant showDataDetectorsSheet]):
31991
319922014-03-17  Anders Carlsson  <andersca@apple.com>
31993
31994        Fix 32-bit OS X build.
31995
31996        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.h:
31997        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm:
31998        * WebProcess/InjectedBundle/InjectedBundle.h:
31999        * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
32000        (WebKit::InjectedBundle::platformInitialize):
32001
320022014-03-17  Jae Hyun Park  <jaepark@webkit.org>
32003
32004        [GTK][CMake] Fix WebKit2 unused parameter warnings
32005        https://bugs.webkit.org/show_bug.cgi?id=130316
32006
32007        Reviewed by Martin Robinson.
32008
32009        * Platform/gtk/WorkQueueGtk.cpp: Fix unused parameter warnings.
32010        * UIProcess/API/gtk/PageClientImpl.cpp: Ditto.
32011        * UIProcess/API/gtk/WebKitBackForwardListItem.cpp: Ditto.
32012        * UIProcess/API/gtk/WebKitContextMenuClient.cpp: Ditto.
32013        * UIProcess/API/gtk/WebKitContextMenuItem.cpp: Ditto.
32014        * UIProcess/API/gtk/WebKitDownloadClient.cpp: Ditto.
32015        * UIProcess/API/gtk/WebKitFaviconDatabase.cpp: Ditto.
32016        * UIProcess/API/gtk/WebKitFindController.cpp: Ditto.
32017        * UIProcess/API/gtk/WebKitFormClient.cpp: Ditto.
32018        * UIProcess/API/gtk/WebKitGeolocationProvider.cpp: Ditto.
32019        * UIProcess/API/gtk/WebKitLoaderClient.cpp: Ditto.
32020        * UIProcess/API/gtk/WebKitPlugin.cpp: Ditto.
32021        * UIProcess/API/gtk/WebKitPolicyClient.cpp: Ditto.
32022        * UIProcess/API/gtk/WebKitRequestManagerClient.cpp: Ditto.
32023        * UIProcess/API/gtk/WebKitTextChecker.cpp: Ditto.
32024        * UIProcess/API/gtk/WebKitUIClient.cpp: Ditto.
32025        * UIProcess/API/gtk/WebKitURISchemeRequest.cpp: Ditto.
32026        * UIProcess/API/gtk/WebKitWebContext.cpp: Ditto.
32027        * UIProcess/API/gtk/WebKitWebInspector.cpp: Ditto.
32028        * UIProcess/API/gtk/WebKitWebView.cpp: Ditto.
32029        * UIProcess/API/gtk/WebKitWebViewBase.cpp: Ditto.
32030        * UIProcess/API/gtk/WebKitWebViewBaseAccessible.cpp: Ditto.
32031        * UIProcess/API/gtk/WebViewBaseInputMethodFilter.cpp: Ditto.
32032        * UIProcess/gtk/TextCheckerGtk.cpp: Ditto.
32033        * UIProcess/gtk/WebContextMenuProxyGtk.cpp: Ditto.
32034        * UIProcess/gtk/WebPopupMenuProxyGtk.cpp: Ditto.
32035        * WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp: Ditto.
32036        * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp: Ditto.
32037        * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp: Ditto.
32038        * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: Ditto.
32039        * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: Ditto.
32040
320412014-03-17  Alexey Proskuryakov  <ap@apple.com>
32042
32043        [Mac] Standardize on start/length in text input IPC methods
32044        https://bugs.webkit.org/show_bug.cgi?id=130359
32045
32046        Reviewed by Anders Carlsson.
32047
32048        Some IPC methods used start/length, and others use start/end. This was confusing.
32049
32050        While here, changed WebPageMac.mm to not use NSMakeRange where we don't need it
32051        (I want to move this code to WebPage.cpp, where it could be shared with iOS and
32052        other platforms, as it doesn't depend on Foundation much).
32053
32054        * UIProcess/API/mac/WKView.mm:
32055        (-[WKView insertText:replacementRange:]):
32056        (-[WKView setMarkedText:selectedRange:replacementRange:]):
32057        (-[WKView attributedSubstringForProposedRange:actualRange:]):
32058        * UIProcess/WebPageProxy.cpp:
32059        (WebKit::WebPageProxy::internalShowContextMenu):
32060        * UIProcess/WebPageProxy.h:
32061        * UIProcess/ios/WebPageProxyIOS.mm:
32062        (WebKit::WebPageProxy::setComposition):
32063        (WebKit::WebPageProxy::insertText):
32064        * UIProcess/mac/WebPageProxyMac.mm:
32065        (WebKit::WebPageProxy::setComposition):
32066        (WebKit::WebPageProxy::insertText):
32067        (WebKit::WebPageProxy::insertDictatedText):
32068        (WebKit::WebPageProxy::getAttributedSubstringFromRange):
32069        * WebProcess/WebPage/WebPage.cpp:
32070        (WebKit::WebPage::setComposition):
32071        * WebProcess/WebPage/WebPage.h:
32072        * WebProcess/WebPage/WebPage.messages.in:
32073        * WebProcess/WebPage/ios/WebPageIOS.mm:
32074        (WebKit::WebPage::setComposition):
32075        (WebKit::WebPage::insertText):
32076        * WebProcess/WebPage/mac/WebPageMac.mm:
32077        (WebKit::WebPage::setComposition):
32078        (WebKit::WebPage::insertText):
32079        (WebKit::WebPage::insertDictatedText):
32080        (WebKit::WebPage::getAttributedSubstringFromRange):
32081        (WebKit::convertToRange):
32082        (WebKit::WebPage::firstRectForCharacterRange):
32083
320842014-03-17  Tim Horton  <timothy_horton@apple.com>
32085
32086        Rename WKThumbnailView to _WKThumbnailView
32087        https://bugs.webkit.org/show_bug.cgi?id=130361
32088
32089        Reviewed by Anders Carlsson.
32090
32091        * UIProcess/API/Cocoa/_WKThumbnailView.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKThumbnailView.h.
32092        * UIProcess/API/Cocoa/_WKThumbnailView.mm: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKThumbnailView.mm.
32093        (-[_WKThumbnailView initWithFrame:fromWKView:]):
32094        (-[_WKThumbnailView _viewWasUnparented]):
32095        (-[_WKThumbnailView _viewWasParented]):
32096        (-[_WKThumbnailView _requestSnapshotIfNeeded]):
32097        (-[_WKThumbnailView _didTakeSnapshot:]):
32098        (-[_WKThumbnailView viewDidMoveToWindow]):
32099        (-[_WKThumbnailView setScale:]):
32100        (-[_WKThumbnailView setUsesSnapshot:]):
32101        (-[_WKThumbnailView _setThumbnailLayer:]):
32102        (-[_WKThumbnailView _thumbnailLayer]):
32103        * UIProcess/API/Cocoa/_WKThumbnailViewInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKThumbnailViewInternal.h.
32104        * UIProcess/API/mac/WKView.mm:
32105        (-[WKView _setThumbnailView:]):
32106        (-[WKView _thumbnailView]):
32107        (-[WKView _updateThumbnailViewLayer]):
32108        * UIProcess/API/mac/WKViewInternal.h:
32109        * UIProcess/mac/PageClientImpl.mm:
32110        * WebKit2.xcodeproj/project.pbxproj:
32111
321122014-03-17  Anders Carlsson  <andersca@apple.com>
32113
32114        Add SPI for getting bundle parameters from the injected bundle
32115        https://bugs.webkit.org/show_bug.cgi?id=130355
32116
32117        Reviewed by Dan Bernstein.
32118
32119        * UIProcess/mac/WebContextMac.mm:
32120        (WebKit::WebContext::platformInitializeWebProcess):
32121        * WebKit2.xcodeproj/project.pbxproj:
32122        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.h: Copied from Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h.
32123        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm: Copied from Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h.
32124        (-[WKWebProcessBundleParameters initWithDictionary:]):
32125        (-[WKWebProcessBundleParameters valueForKey:]):
32126        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h:
32127        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
32128        (-[WKWebProcessPlugInController parameters]):
32129        * WebProcess/InjectedBundle/InjectedBundle.cpp:
32130        (WebKit::InjectedBundle::InjectedBundle):
32131        * WebProcess/InjectedBundle/InjectedBundle.h:
32132        (WebKit::InjectedBundle::create):
32133        * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
32134        (WebKit::InjectedBundle::bundleParameters):
32135        (WebKit::InjectedBundle::platformInitialize):
32136        * WebProcess/WebProcess.cpp:
32137        (WebKit::WebProcess::initializeWebProcess):
32138
321392014-03-17  Brent Fulgham  <bfulgham@apple.com>
32140
32141        Provide preference to enable additional AVFoundation options
32142        https://bugs.webkit.org/show_bug.cgi?id=130275
32143
32144        Reviewed by Eric Carlson.
32145
32146        * Shared/WebPreferencesStore.h: Added new preference.
32147        * UIProcess/API/C/WKPreferences.cpp:
32148        (WKPreferencesSetEnableInheritURIQueryComponent): Added.
32149        (WKPreferencesGetEnableInheritURIQueryComponent): Added.
32150        * UIProcess/API/C/WKPreferencesPrivate.h:
32151        * WebProcess/WebPage/WebPage.cpp:
32152        (WebKit::WebPage::updatePreferences): Handle new preference.
32153
321542014-03-17  Alexey Proskuryakov  <ap@apple.com>
32155
32156        [Mac] getAttributedSubstringFromRange arguments are incorrectly named
32157        https://bugs.webkit.org/show_bug.cgi?id=130349
32158
32159        Reviewed by Tim Horton.
32160
32161        There is a mess of start/end and start/length pairs in IPC. One day we'll fix them
32162        all, but now, let's at least name them correctly.
32163
32164        No behavior change.
32165
32166        * UIProcess/WebPageProxy.h:
32167        * UIProcess/mac/WebPageProxyMac.mm:
32168        (WebKit::WebPageProxy::getAttributedSubstringFromRange):
32169        * WebProcess/WebPage/WebPage.h:
32170        * WebProcess/WebPage/WebPage.messages.in:
32171        * WebProcess/WebPage/mac/WebPageMac.mm:
32172        (WebKit::WebPage::getAttributedSubstringFromRange):
32173
321742014-03-17  Tim Horton  <timothy_horton@apple.com>
32175
32176        WKThumbnailView should support snapshots
32177        https://bugs.webkit.org/show_bug.cgi?id=130335
32178        <rdar://problem/16255139>
32179
32180        Reviewed by Simon Fraser.
32181
32182        Add a mode where WKThumbnailView takes a software snapshot of the web content,
32183        replacing the live layer tree with said snapshot once it returns from the
32184        web process. This may improve animation performance in cases where the
32185        layer tree would otherwise be very complex.
32186
32187        * UIProcess/API/Cocoa/WKThumbnailView.h:
32188        Add a property, usesSnapshot, which determines whether the thumbnail view
32189        should use the live layer tree or a snapshot of the content.
32190
32191        * UIProcess/API/Cocoa/WKThumbnailView.mm:
32192        (-[WKThumbnailView initWithFrame:fromWKView:]):
32193        (-[WKThumbnailView _viewWasUnparented]):
32194        Clear the snapshot when unparented.
32195
32196        (-[WKThumbnailView _viewWasParented]):
32197        Take a snapshot of the web content when parented, if needed.
32198
32199        (-[WKThumbnailView _requestSnapshotIfNeeded]):
32200        If we're using snapshots, and haven't already dispatched an async snapshot request,
32201        and don't already have a snapshot, request a snapshot from the web process.
32202
32203        When it returns, use it as the contents of the WKThumbnailView layer, and
32204        unparent the live layer tree.
32205
32206        (-[WKThumbnailView setScale:]):
32207        (-[WKThumbnailView setUsesSnapshot:]):
32208        (-[WKThumbnailView _setThumbnailLayer:]):
32209        (-[WKThumbnailView _thumbnailLayer]):
32210        * UIProcess/API/Cocoa/WKThumbnailViewInternal.h:
32211
32212        * UIProcess/API/mac/WKView.mm:
32213        (-[WKView _setAcceleratedCompositingModeRootLayer:]):
32214        (-[WKView _acceleratedCompositingModeRootLayer]):
32215        WKView should always keep track of the current root layer, instead of totally
32216        handing control over to WKThumbnailView when it is used.
32217
32218        (-[WKView _setThumbnailView:]):
32219        (-[WKView _updateThumbnailViewLayer]):
32220        (-[WKView _reparentLayerTreeInThumbnailView]):
32221        If needed (either we're not using snapshots, or still waiting for the snapshot to be painted),
32222        push the WKView's live layer tree into the thumbnail view.
32223
32224        * UIProcess/API/mac/WKViewInternal.h:
32225        * UIProcess/WebPageProxy.cpp:
32226        (WebKit::WebPageProxy::internalShowContextMenu):
32227        * UIProcess/WebPageProxy.h:
32228        * WebProcess/WebPage/WebPage.h:
32229        * WebProcess/WebPage/WebPage.messages.in:
32230        * WebProcess/WebPage/WebPage.cpp:
32231        (WebKit::WebPage::takeThumbnailSnapshot):
32232        Add a message that asynchronously returns a snapshot that respects the
32233        current thumbnail scale and position.
32234
32235        (WebKit::WebPage::scaledSnapshotWithOptions):
32236        Use some nullptr.
32237
32238        * WebProcess/WebPage/DrawingArea.cpp:
32239        (WebKit::DrawingArea::transform):
32240        * WebProcess/WebPage/DrawingArea.h:
32241        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
32242        Add a getter for the DrawingArea's transform.
32243        Rename it to rootLayerTransform.
32244
322452014-03-17  Zan Dobersek  <zdobersek@igalia.com>
32246
32247        Use RunLoop objects through references instead of pointers
32248        https://bugs.webkit.org/show_bug.cgi?id=130313
32249
32250        Reviewed by Andreas Kling.
32251
32252        Adjust the code accordingly now that RunLoop::current() and RunLoop::main()
32253        return RunLoop reference instead of a pointer.
32254
32255        * DatabaseProcess/DatabaseProcess.cpp:
32256        (WebKit::DatabaseProcess::didClose):
32257        (WebKit::DatabaseProcess::didReceiveInvalidMessage):
32258        * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
32259        (WebKit::UniqueIDBDatabase::postMainThreadTask):
32260        * NetworkProcess/NetworkProcess.cpp:
32261        (WebKit::NetworkProcess::didClose):
32262        (WebKit::NetworkProcess::didReceiveInvalidMessage):
32263        * NetworkProcess/NetworkResourceLoader.cpp:
32264        (WebKit::NetworkResourceLoader::continueWillSendRequest):
32265        * Platform/IPC/Connection.cpp:
32266        (IPC::Connection::SyncMessageState::getOrCreate):
32267        (IPC::Connection::SyncMessageState::SyncMessageState):
32268        (IPC::Connection::SyncMessageState::~SyncMessageState):
32269        (IPC::Connection::SyncMessageState::processIncomingMessage):
32270        (IPC::Connection::SyncMessageState::dispatchMessages):
32271        (IPC::Connection::createServerConnection):
32272        (IPC::Connection::createClientConnection):
32273        (IPC::Connection::Connection):
32274        (IPC::Connection::addWorkQueueMessageReceiver):
32275        (IPC::Connection::removeWorkQueueMessageReceiver):
32276        (IPC::Connection::sendSyncMessage):
32277        (IPC::Connection::sendSyncMessageFromSecondaryThread):
32278        (IPC::Connection::waitForSyncReply):
32279        (IPC::Connection::processIncomingMessage):
32280        (IPC::Connection::connectionDidClose):
32281        (IPC::Connection::dispatchDidReceiveInvalidMessage):
32282        (IPC::Connection::enqueueIncomingMessage):
32283        (IPC::Connection::wakeUpRunLoop):
32284        * Platform/IPC/Connection.h:
32285        * Platform/IPC/mac/ConnectionMac.cpp:
32286        (IPC::Connection::receiveSourceEventHandler):
32287        * Shared/ChildProcess.cpp:
32288        (WebKit::ChildProcess::stopRunLoop):
32289        * Shared/Plugins/NPObjectProxy.cpp:
32290        (WebKit::NPObjectProxy::NP_Deallocate):
32291        * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
32292        (WebKit::ProcessLauncher::launchProcess):
32293        * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
32294        (WebKit::ProcessLauncher::launchProcess):
32295        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
32296        (WebKit::connectToService):
32297        (WebKit::tryPreexistingProcess):
32298        (WebKit::createProcess):
32299        * UIProcess/Storage/StorageManager.cpp:
32300        (WebKit::StorageManager::getOrigins):
32301        (WebKit::StorageManager::getStorageDetailsByOrigin):
32302        * UIProcess/Storage/StorageManager.h:
32303        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
32304        (WebKit::NetscapePlugin::pluginThreadAsyncCall):
32305        * WebProcess/Plugins/PluginView.cpp:
32306        (WebKit::PluginView::unprotectPluginFromDestruction):
32307        * WebProcess/WebPage/EventDispatcher.cpp:
32308        (WebKit::EventDispatcher::wheelEvent):
32309        * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
32310        (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
32311        * WebProcess/WebPage/WebPage.cpp:
32312        (WebKit::WebPage::close):
32313
323142014-03-17  Giovanni Campagna  <gcampagna@src.gnome.org>
32315
32316        [GTK] Don't busy loop when the socket is full
32317        https://bugs.webkit.org/show_bug.cgi?id=129802
32318
32319        Reviewed by Carlos Garcia Campos.
32320
32321        When the socket is full and we see EAGAIN or EWOULDBLOCK
32322        (because the socket is non blocking), don't busy loop by
32323        tring to write again, instead poll() until the socket
32324        becomes writable.
32325
32326        * Platform/IPC/unix/ConnectionUnix.cpp:
32327        (IPC::Connection::sendOutgoingMessage):
32328
323292014-03-17  Martin Robinson  <mrobinson@igalia.com>
32330
32331        [GTK][CMake] Ensure that HAVE_GTK_UNIX_PRINTING is defined when appropriate
32332        https://bugs.webkit.org/show_bug.cgi?id=130155
32333
32334        Reviewed by Philippe Normand.
32335
32336        * PlatformGTK.cmake: Add GTK_UNIX_PRINT flags to the build.
32337
323382014-03-17  Ryuan Choi  <ryuan.choi@samsung.com>
32339
32340        [EFL][WK2] Restore cursor when moving mouse into webview
32341        https://bugs.webkit.org/show_bug.cgi?id=130182
32342
32343        Reviewed by Gyuyoung Kim.
32344
32345        We changed mouse cursor when the type of cursor is changed.
32346        But once mouse is moved out of webview, ewebkit will not know whether cursor
32347        is changed or not.
32348
32349        So, this patch added a logic to restore the last applied type of cursor when
32350        mouse is moved into webview again.
32351
32352        * UIProcess/API/efl/EwkView.cpp:
32353        (EwkViewEventHandler<EVAS_CALLBACK_MOUSE_IN>::handleEvent):
32354        Call updateCursor to restore the last applied type of cursor.
32355        (EwkView::EwkView):
32356        (EwkView::updateCursor): Extracted from setCursor.
32357        (EwkView::setCursor):
32358        (EwkView::handleEvasObjectAdd):
32359        * UIProcess/API/efl/EwkView.h:
32360
323612014-03-16  Ryuan Choi  <ryuan.choi@samsung.com>
32362
32363        [EFL][WK2] Add ewk_application_cache_manager APIs
32364        https://bugs.webkit.org/show_bug.cgi?id=102853
32365
32366        Reviewed by Gyuyoung Kim.
32367
32368        Implemented application cache manager to get list of origins which stores
32369        application cache and remove specified origin or all.
32370
32371        * PlatformEfl.cmake: Added newly added files.
32372        * UIProcess/API/efl/ewk_application_cache_manager.cpp: Added.
32373        (EwkApplicationCacheManager::EwkApplicationCacheManager):
32374        (EwkApplicationCacheManager::~EwkApplicationCacheManager):
32375        (Get_Origins_Data::Get_Origins_Data):
32376        (getApplicationCacheOriginsCallback):
32377        (ewk_application_cache_manager_origins_get):
32378        (ewk_application_cache_origins_free):
32379        (ewk_application_cache_manager_delete_all):
32380        (ewk_application_cache_manager_delete):
32381        * UIProcess/API/efl/ewk_application_cache_manager.h: Added.
32382        * UIProcess/API/efl/ewk_application_cache_manager_private.h: Added.
32383        (EwkApplicationCacheManager::impl):
32384        * UIProcess/API/efl/ewk_context.cpp:
32385        (EwkContext::applicationCacheManager):
32386        (ewk_context_application_cache_manager_get):
32387        * UIProcess/API/efl/ewk_context.h:
32388        * UIProcess/API/efl/ewk_context_private.h:
32389        * UIProcess/API/efl/ewk_security_origin_private.h:
32390        (EwkSecurityOrigin::wkSecurityOrigin):
32391        * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.cpp:
32392        (EWK2UnitTestServer::port):
32393        * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.h:
32394        * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
32395        Added to test application_cache_manager.
32396        (serverCallback):
32397        (getOriginsCallback):
32398        (timerCallback):
32399        (TEST_F):
32400        * UIProcess/API/efl/tests/test_ewk2_context.cpp:
32401        Added test case to test getter of application_cache_manager.
32402        (TEST_F):
32403
324042014-03-16  Zan Dobersek  <zdobersek@igalia.com>
32405
32406        Move GTK WebKit2 code to std::unique_ptr
32407        https://bugs.webkit.org/show_bug.cgi?id=129672
32408
32409        Reviewed by Anders Carlsson.
32410
32411        Repace uses of OwnPtr and PassOwnPtr in GTK-specific WebKit2 code with std::unique_ptr.
32412
32413        * Shared/Downloads/Download.h:
32414        * Shared/Downloads/soup/DownloadSoup.cpp:
32415        (WebKit::Download::start):
32416        (WebKit::Download::startWithHandle):
32417        (WebKit::Download::platformInvalidate):
32418        * UIProcess/API/gtk/PageClientImpl.cpp:
32419        * UIProcess/API/gtk/PageClientImpl.h:
32420        * UIProcess/API/gtk/WebKitContextMenuItem.cpp:
32421        (webkitContextMenuItemCreate):
32422        (webkitContextMenuItemCreateForGtkItem):
32423        (webkit_context_menu_item_new):
32424        (webkit_context_menu_item_new_from_stock_action):
32425        (webkit_context_menu_item_new_from_stock_action_with_label):
32426        (webkit_context_menu_item_new_with_submenu):
32427        (webkit_context_menu_item_new_separator):
32428        * UIProcess/API/gtk/WebKitTextChecker.h:
32429        * UIProcess/API/gtk/WebKitWebContext.cpp:
32430        (createDefaultWebContext):
32431        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
32432        (webkitWebViewBaseConstructed):
32433        * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
32434        (WebKit::WebPrintOperationGtk::print):
32435        * WebProcess/gtk/WebGtkExtensionManager.cpp:
32436        (WebKit::WebGtkExtensionManager::initialize):
32437        * WebProcess/soup/WebKitSoupRequestInputStream.cpp:
32438        (webkitSoupRequestInputStreamPendingReadAsyncComplete):
32439        (webkitSoupRequestInputStreamReadAsync):
32440        * WebProcess/soup/WebSoupRequestManager.cpp:
32441        (WebKit::WebSoupRequestManager::send):
32442        * WebProcess/soup/WebSoupRequestManager.h:
32443
324442014-03-16  Brian Burg  <bburg@apple.com>
32445
32446        Web Inspector: vended backend commands file should be generated as part of the build
32447        https://bugs.webkit.org/show_bug.cgi?id=130110
32448
32449        Reviewed by Timothy Hatcher.
32450
32451        * PlatformGTK.cmake: Copy over generated inspector backend commands files.
32452
324532014-03-16  Darin Adler  <darin@apple.com>
32454
32455        Try to fix 32-bit Mac build.
32456
32457        * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: Add missing include.
32458
324592014-03-16  Philippe Normand  <pnormand@igalia.com>
32460
32461        Unreviewed, GTK build fix after r165692.
32462
32463        * UIProcess/gtk/TextCheckerGtk.cpp:
32464        (WebKit::TextChecker::checkSpellingOfString):
32465        (WebKit::TextChecker::checkGrammarOfString):
32466
324672014-03-15  Darin Adler  <darin@apple.com>
32468
32469        Remove all uses of deprecatedCharacters from WebKit2
32470        https://bugs.webkit.org/show_bug.cgi?id=130197
32471
32472        Reviewed by Andreas Kling.
32473
32474        * Shared/APIString.h: Rewrote getCharacters to use StringView,
32475        substring, and getCharactersWithUpconvert. Added an 8-bit case
32476        to getUTF8CString.
32477
32478        * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
32479        (WebKit::writeByte): Added.
32480        (WebKit::writeCharacter): Added.
32481        (WebKit::writeLine): Added. Uses operator[] instead of characters16 to get
32482        the UTF-16 characters out of the string.
32483        (WebKit::NetscapePluginModule::scanPlugin): Replaced code that writes out
32484        text to stdout with much simpler version using the functions above.
32485
32486        * UIProcess/TextChecker.h: Changed text arguments to use StringView instead
32487        of UChar/int pairs.
32488
32489        * UIProcess/WebPageProxy.cpp:
32490        (WebKit::WebPageProxy::internalShowContextMenu): Updated to pass StringView.
32491
32492        * UIProcess/efl/TextCheckerEfl.cpp:
32493        (WebKit::nextWordOffset): Changed function to use StringView and unsigned.
32494        (WebKit::TextChecker::checkTextOfParagraph): Changed to use StringView and
32495        substring.
32496        (WebKit::TextChecker::checkSpellingOfString): Ditto.
32497        (WebKit::TextChecker::checkGrammarOfString): Ditto.
32498        (WebKit::TextChecker::requestCheckingOfString): Pass in a StringView, so no
32499        need to call deprecatedCharacters.
32500
32501        * UIProcess/ios/TextCheckerIOS.mm:
32502        (WebKit::TextChecker::checkTextOfParagraph): Changed to take StringView.
32503        (WebKit::TextChecker::checkSpellingOfString): Ditto.
32504        (WebKit::TextChecker::checkGrammarOfString): Ditto.
32505
32506        * UIProcess/mac/TextCheckerMac.mm:
32507        (WebKit::TextChecker::checkTextOfParagraph): Changed to take StringView and
32508        use StringView::createNSStringWithoutCopying.
32509        (WebKit::TextChecker::checkSpellingOfString): CHanged to take StringView.
32510        (WebKit::TextChecker::checkGrammarOfString): Ditto.
32511
32512        * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
32513        (WebKit::convertStringToKeyCodes): Changed to take StringView and use
32514        upconvertedCharacters instead of deprecatedCharacters. Also use move instead
32515        of swap.
32516        (WebKit::NetscapePlugin::sendComplexTextInput): Updated to new style for loop.
32517
32518        * WebProcess/WebPage/EncoderAdapter.cpp:
32519        (WebKit::EncoderAdapter::encodeString): Use StringView::upconvertedCharacters
32520        instead of String::deprecatedCharacters.
32521
325222014-03-15  David Kilzer  <ddkilzer@apple.com>
32523
32524        [iOS] Define SYSTEM_VERSION_PREFIX consistently
32525        <http://webkit.org/b/130293>
32526        <rdar://problem/15926359>
32527
32528        Reviewed by Dan Bernstein.
32529
32530        * Configurations/Version.xcconfig:
32531        (SYSTEM_VERSION_PREFIX): Sync with
32532        Source/WebKit/mac/Version.xcconfig.
32533
325342014-03-14  Alexey Proskuryakov  <ap@apple.com>
32535
32536        [Mac] Sync extended attribute related rules with AppSandbox profile
32537        https://bugs.webkit.org/show_bug.cgi?id=130263
32538        <rdar://problem/16318965>
32539
32540        Reviewed by Sam Weinig.
32541
32542        Update the fix to use a different syntax in some OS versions.
32543
32544        * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
32545        * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
32546        * WebProcess/com.apple.WebProcess.sb.in:
32547
325482014-03-14  Ryosuke Niwa  <rniwa@webkit.org>
32549
32550        Revert erroneous changes made to UIProcess/API/Cocoa in r165676.
32551
32552        * UIProcess/API/Cocoa/WKBackForwardList.h:
32553        * UIProcess/API/Cocoa/WKBackForwardListItem.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKBackForwardListItem.h.
32554        * UIProcess/API/Cocoa/WKNavigation.h:
32555        * UIProcess/API/Cocoa/WKNavigationAction.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigationAction.h.
32556        * UIProcess/API/Cocoa/WKNavigationDelegate.h:
32557        (NS_ENUM):
32558        * UIProcess/API/Cocoa/WKNavigationResponse.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponse.h.
32559        * UIProcess/API/Cocoa/WKNavigationTrigger.h: Removed.
32560        * UIProcess/API/Cocoa/WKWebView.h:
32561
325622014-03-14  Mark Rowe  <mrowe@apple.com>
32563
32564        Fix the production build.
32565
32566        Don't rely on USE_INTERNAL_SDK being set for the Production configuration since UseInternalSDK.xcconfig won't
32567        be at the expected relative path when working from installed source.
32568
32569        * Configurations/Base.xcconfig:
32570
325712014-03-14  Maciej Stachowiak  <mjs@apple.com>
32572
32573        Replace "Apple Computer, Inc." with "Apple Inc." in copyright headers
32574        https://bugs.webkit.org/show_bug.cgi?id=130276
32575        <rdar://problem/16266927>
32576        
32577        Reviewed by Simon Fraser.
32578
32579        * Shared/AsyncRequest.cpp:
32580        * Shared/AsyncRequest.h:
32581        * Shared/ContextMenuContextData.cpp:
32582        * Shared/ContextMenuContextData.h:
32583        * Shared/Databases/DatabaseProcessCreationParameters.h:
32584        * Shared/Databases/IndexedDB/IDBUtilities.cpp:
32585        * Shared/Databases/IndexedDB/IDBUtilities.h:
32586        * Shared/mac/RemoteLayerBackingStore.h:
32587        * Shared/mac/RemoteLayerBackingStore.mm:
32588        * UIProcess/API/Cocoa/WKBackForwardList.h:
32589        * UIProcess/API/Cocoa/WKBackForwardListItem.h: Removed.
32590        * UIProcess/API/Cocoa/WKNavigation.h:
32591        * UIProcess/API/Cocoa/WKNavigationAction.h: Removed.
32592        * UIProcess/API/Cocoa/WKNavigationDelegate.h:
32593        * UIProcess/API/Cocoa/WKNavigationResponse.h: Removed.
32594        * UIProcess/API/Cocoa/WKNavigationTrigger.h: Added.
32595        (NS_ENUM):
32596        * UIProcess/API/Cocoa/WKWebView.h:
32597        * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.cpp:
32598        * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.h:
32599        * UIProcess/CoordinatedGraphics/WKCoordinatedSceneAPICast.h:
32600        * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
32601        * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
32602        * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
32603        * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
32604        * WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
32605        * WebProcess/Databases/WebToDatabaseProcessConnection.h:
32606        * WebProcess/WebCoreSupport/WebAlternativeTextClient.h:
32607        * WebProcess/WebCoreSupport/mac/WebAlternativeTextClient.cpp:
32608        * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
32609        * WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
32610        * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
32611        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
32612        * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
32613        * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
32614        * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
32615        * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
32616        * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
32617
326182014-03-14  Simon Fraser  <simon.fraser@apple.com>
32619
32620        [iOS WK2] background-attachment: fixed renders oddly, moves around
32621        https://bugs.webkit.org/show_bug.cgi?id=130277
32622        <rdar://problem/16332883>
32623
32624        Reviewed by Tim Horton.
32625        
32626        Actually send scrolling and counter-scrolling layers to the UI process!
32627
32628        * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
32629        (ArgumentCoder<ScrollingStateScrollingNode>::encode):
32630        (ArgumentCoder<ScrollingStateScrollingNode>::decode):
32631
326322014-03-14  Anders Carlsson  <andersca@apple.com>
32633
32634        Try to fix the iOS build.
32635
32636        * UIProcess/mac/WebContextMac.mm:
32637
326382014-03-14  Anders Carlsson  <andersca@apple.com>
32639
32640        Begin work on the bundle parameter API
32641        https://bugs.webkit.org/show_bug.cgi?id=130267
32642
32643        Reviewed by Dan Bernstein.
32644
32645        * Shared/WebProcessCreationParameters.cpp:
32646        (WebKit::WebProcessCreationParameters::encode):
32647        (WebKit::WebProcessCreationParameters::decode):
32648        * Shared/WebProcessCreationParameters.h:
32649        * UIProcess/API/Cocoa/WKProcessPool.mm:
32650        (-[WKProcessPool _objectForBundleParameter:]):
32651        (-[WKProcessPool _setObject:forBundleParameter:]):
32652        * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
32653        * UIProcess/WebContext.h:
32654        (WebKit::WebContext::bundleParameters):
32655        * UIProcess/mac/WebContextMac.mm:
32656        (WebKit::WebContext::ensureBundleParameters):
32657        (WebKit::WebContext::platformInitializeWebProcess):
32658
326592014-03-14  Alexey Proskuryakov  <ap@apple.com>
32660
32661        [Mac] Sync extended attribute related rules with AppSandbox profile
32662        https://bugs.webkit.org/show_bug.cgi?id=130263
32663        <rdar://problem/16318965>
32664
32665        Reviewed by Sam Weinig.
32666
32667        * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
32668        * Resources/PlugInSandboxProfiles/com.apple.QuickTime Plugin.plugin.sb:
32669        * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
32670        * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
32671        * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
32672        * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb:
32673        * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb:
32674        * WebProcess/com.apple.WebProcess.sb.in:
32675
326762014-03-14  Simon Fraser  <simon.fraser@apple.com>
32677
32678        [iOS WK2] Improve behavior of fixed elments on zooming
32679        https://bugs.webkit.org/show_bug.cgi?id=130253
32680
32681        Reviewed by Beth Dakin.
32682
32683        Correctly reposition right- and bottom-relative position:fixed
32684        elements on zooming in WK2 iOS by telling the scrolling tree
32685        about zoom-related viewport changes.
32686
32687        * Shared/mac/RemoteLayerTreeTransaction.h:
32688        (WebKit::RemoteLayerTreeTransaction::LayerProperties::notePropertiesChanged):
32689        Drive-by cleanup; typedef the flags field to an unsigned, to avoid ugly casting.
32690        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
32691        (WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree): Pass out a flag to say
32692        if the update contained a new fixed or sticky layer.
32693        (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
32694        (WebKit::RemoteScrollingCoordinatorProxy::viewportChangedViaDelegatedScrolling):
32695        Call into the new ScrolingTree::viewportChangedViaDelegatedScrolling().
32696        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
32697        * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm: If we got a new fixed
32698        or sticky layer, set fixedOrStickyLayerChanged to true.
32699        (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers): Ditto.
32700        * UIProcess/ios/WKContentView.mm:
32701        (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
32702        Remember both the old zoomScale and the filteredScale, since the fixed position rect
32703        should be computed using the unfiltered scale.
32704        Some FloatRect -> CGRect changes.
32705        Now call viewportChangedViaDelegatedScrolling() on the scrolling coordinator.
32706        (-[WKContentView fixedPositionRectFromExposedRect:scale:]): Call the
32707        FrameView function to compute the iOS fixed position rect.
32708        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
32709        (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree): If the update
32710        got a new fixed or sticky layer, run the scrolling tree logic to make sure
32711        it gets into the right place.
32712        * UIProcess/mac/RemoteLayerTreeHost.mm:
32713        (WebKit::RemoteLayerTreeHost::updateLayerTree): If we logged here,
32714        we'd log twice if the tiled scrolling indicator was enabled, so 
32715        hoisted the logging out into the caller.
32716
327172014-03-14  Landry Breuil  <landry@openbsd.org>
32718
32719        Use the correct type in webkitSoupRequestInputStreamNew()'s declaration.
32720        Nhttps://bugs.webkit.org/show_bug.cgi?id=129974
32721
32722        Reviewed by Andreas Kling.
32723
32724        * WebProcess/soup/WebKitSoupRequestInputStream.h:
32725
327262014-03-14  Anders Carlsson  <andersca@apple.com>
32727
32728        Fix crash when resizing the visited link table
32729        https://bugs.webkit.org/show_bug.cgi?id=130257
32730        <rdar://problem/16328177>
32731
32732        Reviewed by Dan Bernstein.
32733
32734        We're iterating over the old table, so use currentTableSize in the loop termination condition.
32735
32736        * UIProcess/VisitedLinkProvider.cpp:
32737        (WebKit::VisitedLinkProvider::resizeTable):
32738
327392014-03-14  Dan Bernstein  <mitz@apple.com>
32740
32741        [Cocoa] Expose a way to set the cookie accept policy
32742        https://bugs.webkit.org/show_bug.cgi?id=130251
32743
32744        Reviewed by Anders Carlsson.
32745
32746        * UIProcess/API/Cocoa/WKProcessPool.mm:
32747        (toHTTPCookieAcceptPolicy): Added a helper function that maps from NSHTTPCookieAcceptPolicy
32748        values to WebKit::HTTPCookieAcceptPolicy values.
32749        (-[WKProcessPool _setCookieAcceptPolicy:]): Added. Calls
32750        WebCookieManagerProxy::setHTTPCookieAcceptPolicy. 
32751        * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: Declared new method.
32752
327532014-03-14  Carlos Garcia Campos  <cgarcia@igalia.com>
32754
32755        [GTK] WebKit2WebExtension GIR can't be used in vala
32756        https://bugs.webkit.org/show_bug.cgi?id=127179
32757
32758        Reviewed by Martin Robinson.
32759
32760        Do not include all WebKit2 gir symbols from WebKit2WebExtension gir
32761        file.
32762
32763        * GNUmakefile.am:
32764        * PlatformGTK.cmake:
32765
327662014-03-14  Csaba Osztrogonác  <ossy@webkit.org>
32767
32768        [CMake] URTBF after r165619.
32769
32770        * CMakeLists.txt: Add new files.
32771
327722014-03-14  Anders Carlsson  <andersca@apple.com>
32773
32774        Remove WebContext::addVisitedLink
32775        https://bugs.webkit.org/show_bug.cgi?id=130242
32776
32777        Reviewed by Dan Bernstein.
32778
32779        Fold the function into WKContextAddVisitedLink instead.
32780
32781        * UIProcess/API/C/WKContext.cpp:
32782        (WKContextAddVisitedLink):
32783        * UIProcess/WebContext.cpp:
32784        * UIProcess/WebContext.h:
32785        (WebKit::WebContext::visitedLinkProvider):
32786
327872014-03-13  Anders Carlsson  <andersca@apple.com>
32788
32789        Move visited link handling to VisitedLinkTableController and VisitedLinkProvider
32790        https://bugs.webkit.org/show_bug.cgi?id=130223
32791        <rdar://problem/16315792>
32792
32793        Reviewed by Dan Bernstein.
32794
32795        * DerivedSources.make:
32796        Generate messages for VisitedLinkProvider and VisitedLinkTableController.
32797        
32798        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
32799        (-[WKWebViewConfiguration copyWithZone:]):
32800        Set the visited link provider.
32801
32802        * UIProcess/API/Cocoa/_WKVisitedLinkProvider.h:
32803        Add addVisitedLinkWithURL: method.
32804
32805        * UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm:
32806        (-[_WKVisitedLinkProvider addVisitedLinkWithURL:]):
32807        Compute a link hash from the absolute URL string and pass it to the underlying VisitedLinkProvider object.
32808
32809        * UIProcess/VisitedLinkProvider.cpp:
32810        (WebKit::VisitedLinkProvider::addProcess):
32811        Add the process to the m_processes HashCountedSet. If it's the first time we're adding the process, 
32812        add the VisitedLinkProvider object as a message receiver and send the visited link table to the process.
32813
32814        (WebKit::VisitedLinkProvider::removeProcess):
32815        Remove the process from the m_processes HashCountedSet. If we're removing the last reference to the process,
32816        remove ourselves as a  message receiver.
32817
32818        (WebKit::VisitedLinkProvider::addVisitedLinkHash):
32819        Rename this from addVisitedLink to better indicate what it's doing.
32820
32821        (WebKit::tableSizeForKeyCount):
32822        Update for constant rename.
32823
32824        (WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired):
32825        Compute the new pending visited links table size. If it's bigger than our current table, resize the table
32826        by calling resizeTable. Otherwise, simply try to add the pending hashes to our shared hash table. If successful,
32827        add the link hash to the addedVisitedLinks table and eventually send it to all processes associated with the visited link provider.
32828
32829        (WebKit::VisitedLinkProvider::resizeTable):
32830        Create a new shared memory segment, Set it as the table backing store and add all visited links from the old table. Finally,
32831        add our pending visited link hashes and send the new table memory to all processes associated with the visited link provider.
32832
32833        (WebKit::VisitedLinkProvider::sendTable):
32834        Helper function that creates a shared memory handle and sends it to a given web process.
32835
32836        * UIProcess/VisitedLinkProvider.h:
32837        Add new members.
32838
32839        * UIProcess/VisitedLinkProvider.messages.in:
32840        Add messages.
32841
32842        * UIProcess/WebContext.cpp:
32843        (WebKit::WebContext::processDidFinishLaunching):
32844        (WebKit::WebContext::disconnectProcess):
32845        The WebContext no longer needs to inform the visited link provider about the processes coming and going, that's already handled
32846        by the WebPageProxy objects.
32847
32848        (WebKit::WebContext::addVisitedLink):
32849        Call addVisitedLinkHash on the visited link provider.
32850
32851        * UIProcess/WebContext.h:
32852        * UIProcess/WebContext.messages.in:
32853        Remove a message that is now implemented by the visited link provider.
32854
32855        * WebKit2.xcodeproj/project.pbxproj:
32856        Add new files.
32857
32858        * WebProcess/WebPage/VisitedLinkTableController.cpp:
32859        (WebKit::VisitedLinkTableController::VisitedLinkTableController):
32860        Add the table controller as a message receiver.
32861
32862        (WebKit::VisitedLinkTableController::~VisitedLinkTableController):
32863        Remove the table controller as a message receiver.
32864
32865        (WebKit::VisitedLinkTableController::isLinkVisited):
32866        Check if the link is visited according to the visited link table.
32867
32868        (WebKit::VisitedLinkTableController::addVisitedLink):
32869        Send the link hash to the UI process if it's not already visited.
32870
32871        (WebKit::VisitedLinkTableController::setVisitedLinkTable):
32872        Set the backing store memory and invalidate all styles.
32873
32874        (WebKit::VisitedLinkTableController::visitedLinkStateChanged):
32875        Invalidate the styles for the given links.
32876
32877        (WebKit::VisitedLinkTableController::allVisitedLinkStateChanged):
32878        Invalidate the styles for all links.
32879
32880        * WebProcess/WebPage/VisitedLinkTableController.h:
32881        Add new members.
32882
32883        * WebProcess/WebPage/VisitedLinkTableController.messages.in:
32884        Add new messages.
32885
32886        * WebProcess/WebProcess.cpp:
32887        Remove unused functions; these are handled by VisitedLinkTableController now.
32888
32889        * WebProcess/WebProcess.h:
32890        (WebKit::WebProcess::shouldTrackVisitedLinks):
32891        Add getter.
32892
32893        * WebProcess/WebProcess.messages.in:
32894        Remove messages.
32895
328962014-03-12  Sergio Villar Senin  <svillar@igalia.com>
32897
32898        Rename DEFINE_STATIC_LOCAL to DEPRECATED_DEFINE_STATIC_LOCAL
32899        https://bugs.webkit.org/show_bug.cgi?id=129612
32900
32901        Reviewed by Darin Adler.
32902
32903        For new code use static NeverDestroyed<T> instead.
32904
32905        * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
32906        (WebKit::getIndexStatement):
32907        (WebKit::getObjectStoreStatement):
32908        * Shared/linux/SeccompFilters/SeccompBroker.cpp:
32909        (WebKit::SeccompBrokerClient::shared):
32910        * UIProcess/InspectorServer/WebInspectorServer.cpp:
32911        (WebKit::WebInspectorServer::didReceiveWebSocketUpgradeHTTPRequest):
32912
329132014-03-14  Dan Bernstein  <mitz@apple.com>
32914
32915        <rdar://problem/16319722> [Cocoa] WKHistoryDelegate is being called for subframes
32916        https://bugs.webkit.org/show_bug.cgi?id=130228
32917
32918        Reviewed by Mark Rowe.
32919
32920        * UIProcess/Cocoa/HistoryClient.mm:
32921        (WebKit::HistoryClient::didNavigateWithNavigationData): Bail out if the frame is not the
32922        main frame.
32923        (WebKit::HistoryClient::didPerformClientRedirect): Ditto.
32924        (WebKit::HistoryClient::didPerformServerRedirect): Ditto.
32925        (WebKit::HistoryClient::didUpdateHistoryTitle): Ditto.
32926
329272014-03-13  Jinwoo Jeong  <jw00.jeong@samsung.com>
32928
32929        Refactor Vibration algorithm to use only one timer.
32930        https://bugs.webkit.org/show_bug.cgi?id=130059
32931
32932        Reviewed by Darin Adler.
32933
32934        This patch adds a vibration unit test regression after r161257.
32935        It consists of two short term requests to check
32936        that Vibration could work properly by sequential requests.
32937
32938        Indeed this patch tightens condition of existing tests.
32939
32940        * UIProcess/API/efl/tests/test_ewk2_view.cpp:
32941        (TEST_F):
32942
329432014-03-13  Paul Hankes Drielsma  <phd@apple.com>
32944
32945        Add SPI to set a custom user agent on WKWebView
32946        https://bugs.webkit.org/show_bug.cgi?id=130164
32947
32948        Reviewed by Dan Bernstein.
32949
32950        * UIProcess/API/Cocoa/WKWebView.mm:
32951        (-[WKWebView _customUserAgent]):
32952        (-[WKWebView _setCustomUserAgent:]):
32953        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
32954
329552014-03-13  Paul Hankes Drielsma  <phd@apple.com>
32956
32957        Add SPI to run javascript in main frame on WKWebView
32958        https://bugs.webkit.org/show_bug.cgi?id=130047
32959
32960        Reviewed by Anders Carlsson.
32961
32962        * UIProcess/API/Cocoa/WKWebView.mm:
32963        (-[WKWebView _runJavaScriptInMainFrame:]):
32964
329652014-03-13  Benjamin Poulain  <bpoulain@apple.com>
32966
32967        The viewport code should not depend on WebKitSystemInterface
32968        https://bugs.webkit.org/show_bug.cgi?id=130218
32969
32970        Reviewed by Tim Horton.
32971
32972        Get the viewport size from the UIProcess when creating a new WebProcess.
32973        From there, the value is stored in WebPage and used whenever we need to update
32974        the viewport parameters.
32975
32976        * Shared/WebPageCreationParameters.cpp:
32977        (WebKit::WebPageCreationParameters::encode):
32978        (WebKit::WebPageCreationParameters::decode):
32979        * Shared/WebPageCreationParameters.h:
32980        * UIProcess/WebPageProxy.cpp:
32981        (WebKit::WebPageProxy::internalShowContextMenu):
32982        * UIProcess/WebPageProxy.h:
32983        * UIProcess/ios/WebPageProxyIOS.mm:
32984        (WebKit::WebPageProxy::viewportScreenSize):
32985        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
32986        (WebKit::WebChromeClient::viewportScreenSize):
32987        * WebProcess/WebCoreSupport/WebChromeClient.h:
32988        * WebProcess/WebPage/WebPage.cpp:
32989        (WebKit::WebPage::WebPage):
32990        * WebProcess/WebPage/WebPage.h:
32991        * WebProcess/WebPage/ios/WebPageIOS.mm:
32992        (WebKit::WebPage::viewportScreenSize):
32993
329942014-03-13  Beth Dakin  <bdakin@apple.com>
32995
32996        Do not show extended background during a pinch gesture on iOS
32997        https://bugs.webkit.org/show_bug.cgi?id=130152
32998        -and corresponding-
32999        <rdar://problem/16303819>
33000
33001        Reviewed by Simon Fraser.
33002
33003        This patch refactors the backgroundColor-setting logic into its own method so that 
33004        it can be called from both _didCommitLayerTree and scrollViewDidZoom.
33005
33006        Only set the UIScrollView’s background color when the zoomScale is greater than or 
33007        equal to the minimumZoomScale. Also do not set it during the zoom bounce 
33008        animation. Otherwise, clear the background color by setting it to nil.
33009        * UIProcess/API/Cocoa/WKWebView.mm:
33010        (-[WKWebView updateScrollViewBackground]):
33011        (-[WKWebView _didCommitLayerTree:WebKit::]):
33012        (-[WKWebView scrollViewDidZoom:]):
33013
330142014-03-13  Enrica Casucci  <enrica@apple.com>
33015
33016        [iOS WebKit2] block selection should avoid large blocks.
33017        https://bugs.webkit.org/show_bug.cgi?id=130208
33018        <rdar://problem/16251785>
33019
33020        Reviewed by Benjamin Poulain.
33021
33022        When creating a block selection, we should discard blocks that
33023        are larger than most of the visible portion of the document.
33024        This prevents the accidental selection the entire document, which
33025        is fairly common when tapping over empty areas.
33026
33027        * Shared/InteractionInformationAtPosition.cpp:
33028        (WebKit::InteractionInformationAtPosition::encode):
33029        (WebKit::InteractionInformationAtPosition::decode):
33030        * Shared/InteractionInformationAtPosition.h: Removed selectionRects that was not really needed and
33031        added isSelectable to indicate whether the selection can start.
33032        (WebKit::InteractionInformationAtPosition::InteractionInformationAtPosition):
33033        * UIProcess/ios/WKContentViewInteraction.mm:
33034        (-[WKContentView hasSelectablePositionAtPoint:]): Now uses isSelectable.
33035        * WebProcess/WebPage/ios/WebPageIOS.mm:
33036        (WebKit::WebPage::getPositionInformation): Takes into account the userSelect property
33037        to figure out if the element can be selected and discards blocks that are
33038        larger than 97% of the visible area of the document.
33039
330402014-03-13  Anders Carlsson  <andersca@apple.com>
33041
33042        Rename WKVisitedLinkProvider to _WKVisitedLinkProvider and make it private
33043        https://bugs.webkit.org/show_bug.cgi?id=130207
33044
33045        Reviewed by Dan Bernstein.
33046
33047        * UIProcess/API/Cocoa/WKVisitedLinkProviderPrivate.h: Removed.
33048        * UIProcess/API/Cocoa/WKWebView.mm:
33049        (-[WKWebView initWithFrame:configuration:]):
33050        * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
33051        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
33052        (-[WKWebViewConfiguration _visitedLinkProvider]):
33053        (-[WKWebViewConfiguration _setVisitedLinkProvider:]):
33054        * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
33055        * UIProcess/API/Cocoa/_WKVisitedLinkProvider.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKVisitedLinkProvider.h.
33056        * UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKVisitedLinkProvider.mm.
33057        (-[_WKVisitedLinkProvider init]):
33058        * UIProcess/API/Cocoa/_WKVisitedLinkProviderInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKVisitedLinkProviderInternal.h.
33059        * WebKit2.xcodeproj/project.pbxproj:
33060
330612014-03-13  Anders Carlsson  <andersca@apple.com>
33062
33063        Remove a commented out member function
33064        https://bugs.webkit.org/show_bug.cgi?id=130204
33065
33066        Reviewed by Tim Horton.
33067
33068        * Shared/ChildProcessProxy.h:
33069        (WebKit::ChildProcessProxy::canSendMessage):
33070
330712014-03-13  Enrica Casucci  <enrica@apple.com>
33072
33073        [iOS WebKit2] Crash on iPad when displaying a select element with options.
33074        https://bugs.webkit.org/show_bug.cgi?id=130200
33075        <rdar://problem/16316187>
33076
33077        Reviewed by Simon Fraser.
33078
33079        _singleSelectionIndex should be initialized to NSNotFound for multiSelect elements.
33080
33081        * UIProcess/ios/forms/WKFormSelectPopover.mm:
33082        (-[WKSelectTableViewController initWithView:hasGroups:]):
33083
330842014-03-13  Carlos Garcia Campos  <cgarcia@igalia.com>
33085
33086        [GTK] Close the connection when we fail to read from the socket for any unhandled error
33087        https://bugs.webkit.org/show_bug.cgi?id=130191
33088
33089        Reviewed by Martin Robinson.
33090
33091        We currently show an error message, but we should close the
33092        connection avoid entering an infinite loop. Also provide more
33093        information in the error message to help when debugging the issue.
33094
33095        * Platform/IPC/unix/ConnectionUnix.cpp:
33096        (IPC::Connection::readyReadHandler):
33097
330982014-03-13  Radu Stavila  <stavila@adobe.com>
33099
33100        Webkit not building on XCode 5.1 due to garbage collection no longer being supported
33101        https://bugs.webkit.org/show_bug.cgi?id=130087
33102
33103        Reviewed by Mark Rowe.
33104
33105        Disable garbage collection on macosx when not using internal SDK.
33106
33107        * Configurations/Base.xcconfig:
33108
331092014-03-10  Darin Adler  <darin@apple.com>
33110
33111        Avoid copy-prone idiom "for (auto item : collection)"
33112        https://bugs.webkit.org/show_bug.cgi?id=129990
33113
33114        Reviewed by Geoffrey Garen.
33115
33116        * Shared/mac/RemoteLayerTreePropertyApplier.mm:
33117        (WebKit::RemoteLayerTreePropertyApplier::applyProperties): Use auto&.
33118
33119        * Shared/mac/RemoteLayerTreeTransaction.mm:
33120        (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): Use auto&
33121        even though the type is a scalar. This does no harm and makes it easier
33122        to spot uses that trigger unnecessary copying with grep.
33123        (WebKit::RemoteLayerTreeTransaction::decode): Ditto.
33124        (WebKit::dumpChangedLayers): Ditto.
33125        * UIProcess/mac/RemoteLayerTreeHost.mm:
33126        (WebKit::RemoteLayerTreeHost::updateLayerTree): Ditto.
33127        * WebProcess/WebProcess.cpp:
33128        (WebKit::WebProcess::visitedLinkStateChanged): Ditto.
33129
331302014-03-12  Brian Burg  <bburg@apple.com>
33131
33132        Web Inspector: Remove unused callId parameter from evaluateInWebInspector
33133        https://bugs.webkit.org/show_bug.cgi?id=129744
33134
33135        Reviewed by Timothy Hatcher.
33136
33137        * WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp:
33138        (WKBundleInspectorEvaluateScriptForTest):
33139        * WebProcess/InjectedBundle/API/c/WKBundleInspector.h:
33140        * WebProcess/WebPage/WebInspector.cpp:
33141        (WebKit::WebInspector::evaluateScriptForTest):
33142        * WebProcess/WebPage/WebInspector.h:
33143
331442014-03-13  Laszlo Vidacs  <lvidacs.u-szeged@partner.samsung.com>
33145
33146        Fix the !ENABLE(SQL_DATABASE) build
33147        https://bugs.webkit.org/show_bug.cgi?id=130130
33148
33149        Reviewed by Csaba Osztrogonác.
33150
33151        Add missing #ifdef guard to typedef.
33152
33153        * UIProcess/API/C/WKDatabaseManager.cpp:
33154
331552014-03-12  Dean Jackson  <dino@apple.com>
33156
33157        [WebGL] WebKit1 + WebKit2 iOS clients should check load policy
33158        https://bugs.webkit.org/show_bug.cgi?id=130162
33159
33160        Reviewed by Simon Fraser.
33161
33162        Implement webGLPolicyForURL() methods for iOS.
33163
33164        * Configurations/WebContent-iOS.entitlements: Add the MobileAsset asset type.
33165        * Configurations/WebKit2.xcconfig: Add MobileAsset to iOS link list.
33166        * WebProcess/WebPage/WebPage.cpp: Exclude iOS.
33167        * WebProcess/WebPage/ios/WebPageIOS.mm:
33168        (WebKit::WebPage::webGLPolicyForURL): Call into WKSI.
33169        (WebKit::WebPage::resolveWebGLPolicyForURL):
33170
331712014-03-12  Joseph Pecoraro  <pecoraro@apple.com>
33172
33173        Web Inspector: Disable REMOTE_INSPECTOR in earlier OS X releases
33174        https://bugs.webkit.org/show_bug.cgi?id=130118
33175
33176        Reviewed by Timothy Hatcher.
33177
33178        * Configurations/FeatureDefines.xcconfig:
33179
331802014-03-12  Enrica Casucci  <enrica@apple.com>
33181
33182        [iOS WebKit2] Crash when trying to select inside a video element with longpress..
33183        https://bugs.webkit.org/show_bug.cgi?id=130095
33184        <rdar://problem/16294534>
33185
33186        Reviewed by Benjamin Poulain.
33187
33188        We only need to set the assisted node for nodes that will receive an
33189        input peripheral (keyboard, picker, popover, etc.).
33190
33191        * WebProcess/WebPage/ios/WebPageIOS.mm:
33192        (WebKit::WebPage::rangeForWebSelectionAtPosition):
33193        (WebKit::WebPage::elementDidFocus):
33194
331952014-03-12  Simon Fraser  <simon.fraser@apple.com>
33196
33197        Have the scrolling tree track the viewport size, not the viewport rect
33198        https://bugs.webkit.org/show_bug.cgi?id=130141
33199
33200        Reviewed by Beth Dakin.
33201
33202        The scrolling tree only needs to know the size of the viewport, not its
33203        origin, since the origin is deduced from the updated scroll position.
33204
33205        * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
33206        (ArgumentCoder<ScrollingStateScrollingNode>::encode):
33207        (ArgumentCoder<ScrollingStateScrollingNode>::decode):
33208
332092014-03-12  Commit Queue  <commit-queue@webkit.org>
33210
33211        Unreviewed, rolling out r165481.
33212        https://bugs.webkit.org/show_bug.cgi?id=130151
33213
33214        That didn't go well. (Requested by kling on #webkit).
33215
33216        Reverted changeset:
33217
33218        https://bugs.webkit.org/show_bug.cgi?id=130140
33219        http://trac.webkit.org/changeset/165481
33220
332212014-03-12  Carlos Garcia Campos  <cgarcia@igalia.com>
33222
33223        [GTK] Runtime error when page is closed while print operation is in progress
33224        https://bugs.webkit.org/show_bug.cgi?id=129869
33225
33226        Reviewed by Anders Carlsson.
33227
33228        Sometimes when the page is closed right after printing the web
33229        process aborts with the runtime message "pure virtual method
33230        called terminate called without an active exception".
33231        This happens because the page is closed when the pages have been
33232        printed, but print job is still ongoing sending the data to the
33233        printer. When print job finishes, we try to notify the UI process
33234        sending the print callback message using WebPage::send(), but the
33235        web page object has been destroyed. The virtual method it complains
33236        about is probably MessageSender::messageSenderDestinationID() used
33237        by send(). Since our print operation is always asynchronous, we
33238        need a way to notify the web page when the print operation has
33239        actually finished to clean it up, but also notify the print
33240        operation when the page has been closed to not try to notify the
33241        UI process in that case.
33242
33243        * WebProcess/WebPage/WebPage.cpp:
33244        (WebKit::WebPage::close): Call disconnectFromPage to notify the
33245        print operation in case there's an ongoing print job.
33246        (WebKit::WebPage::endPrinting): Do not cleanup the print operation
33247        here, since the print opertation might not have finished yet.
33248        (WebKit::WebPage::didFinishPrintOperation): Send
33249        PrintFinishedCallback message to the Ui process and cleanup the
33250        print operation.
33251        * WebProcess/WebPage/WebPage.h:
33252        * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
33253        (WebKit::WebPrintOperationGtk::disconnectFromPage): Set m_webPage
33254        to nullptr.
33255        (WebKit::WebPrintOperationGtk::printDone): Call
33256        didFinishPrintOperation() is the web page hasn't been closed.
33257        * WebProcess/WebPage/gtk/WebPrintOperationGtk.h:
33258
332592014-03-12  Andreas Kling  <akling@apple.com>
33260
33261        BundlePageDiagnosticLoggingClient leaks every string passing through it.
33262        <https://webkit.org/b/130140>
33263        <rdar://problem/15416838>
33264
33265        Use toAPI() instead of toCopiedAPI() so the receiving end doesn't need
33266        to worry about adopting the WKStringRef.
33267
33268        Reviewed by Anders Carlsson.
33269
33270        * WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp:
33271        (WebKit::InjectedBundlePageDiagnosticLoggingClient::logDiagnosticMessage):
33272
332732014-03-12  Tim Horton  <timothy_horton@apple.com>
33274
33275        Hook up image controls for WebKit1
33276        https://bugs.webkit.org/show_bug.cgi?id=130062
33277        <rdar://problem/15964809>
33278
33279        Reviewed by Brady Eidson.
33280
33281        * Shared/ContextMenuContextData.cpp:
33282        (WebKit::ContextMenuContextData::ContextMenuContextData):
33283
332842014-03-11  Alexey Proskuryakov  <ap@apple.com>
33285
33286        REGRESSION (r165356): [Mac] Multi-part key bindings don't work
33287        https://bugs.webkit.org/show_bug.cgi?id=130100
33288
33289        Reviewed by Darin Adler.
33290
33291        Restore the previous behavior, where we only interpreted keydowns (including those
33292        coming through performKeyEquivalent).
33293
33294        In the future, we might send all events to input methods, but not to key bindings.
33295
33296        * UIProcess/API/mac/WKView.mm:
33297        (-[WKView keyUp:]):
33298        (-[WKView flagsChanged:]):
33299
333002014-03-11  Beth Dakin  <bdakin@apple.com>
33301
33302        _pageExtendedBackgroundColor should not be exposed on WKWebView
33303        https://bugs.webkit.org/show_bug.cgi?id=130093
33304
33305        Reviewed by Simon Fraser.
33306
33307        Added comment indicating that _pageExtendedBackgroundColor is deprecated.
33308        * UIProcess/API/Cocoa/WKViewPrivate.h:
33309
33310        _pageExtendedBackgroundColor now returns nil, but the conversation functionality 
33311        is maintained with a convenience method pageExtendedBackgroundColor.
33312        * UIProcess/API/Cocoa/WKWebView.mm:
33313        (-[WKWebView pageExtendedBackgroundColor]):
33314        (-[WKWebView _didCommitLayerTree:WebKit::]):
33315        (-[WKWebView _pageExtendedBackgroundColor]):
33316
33317        Added comment indicating that _pageExtendedBackgroundColor is deprecated.
33318        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
33319
33320        Return nil.
33321        * UIProcess/API/ios/WKViewIOS.mm:
33322        (-[WKView _pageExtendedBackgroundColor]):
33323
333242014-03-11  Jae Hyun Park  <jaepark@webkit.org>
33325
33326        [GTK][CMake] Add HARFBUZZ_INCLUDE_DIRS to WebKit and WebKit2
33327        https://bugs.webkit.org/show_bug.cgi?id=130070
33328
33329        Reviewed by Martin Robinson.
33330
33331        * PlatformGTK.cmake:
33332
333332014-03-10  Dan Bernstein  <mitz@apple.com>
33334
33335        [Cocoa] Expose WebPageProxy::close
33336        https://bugs.webkit.org/show_bug.cgi?id=130068
33337
33338        Reviewed by Adele Peterson.
33339
33340        * UIProcess/API/Cocoa/WKWebView.mm:
33341        (-[WKWebView _close]):
33342        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
33343
333442014-03-10  Benjamin Poulain  <bpoulain@apple.com>
33345
33346        [iOS][WebKit 2] Wire the unobscured rect in the WebProcess
33347        https://bugs.webkit.org/show_bug.cgi?id=130058
33348
33349        Reviewed by Simon Fraser.
33350
33351        * WebProcess/WebPage/ios/WebPageIOS.mm:
33352        (WebKit::WebPage::updateVisibleContentRects):
33353
333542014-03-10  Simon Fraser  <simon.fraser@apple.com>
33355
33356        Fix three leaks
33357        https://bugs.webkit.org/show_bug.cgi?id=130048
33358
33359        Reviewed by Anders Carlsson.
33360
33361        * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
33362        (decodeObject): Code is simpler and less leaky without the RetainPtr.
33363        * UIProcess/API/Cocoa/WKNavigationAction.mm: Fix _originalURL leak
33364        by making it a RetainPtr and implementing the getter and setter.
33365        (-[WKNavigationAction _setOriginalURL:]):
33366        (-[WKNavigationAction _originalURL]):
33367
333682014-03-10  Beth Dakin  <bdakin@apple.com>
33369
33370        Set background color of WK2's UIScrollView to the pageExtendedBackgroundColor
33371        https://bugs.webkit.org/show_bug.cgi?id=129919
33372
33373        Reviewed by Benjamin Poulain.
33374
33375        Make the pageExtendedBackgroundColor part of a RemoteLayerTreeTransaction.
33376        * Shared/mac/RemoteLayerTreeTransaction.h:
33377        (WebKit::RemoteLayerTreeTransaction::pageExtendedBackgroundColor):
33378        (WebKit::RemoteLayerTreeTransaction::setPageExtendedBackgroundColor):
33379        * Shared/mac/RemoteLayerTreeTransaction.mm:
33380        (WebKit::RemoteLayerTreeTransaction::encode):
33381        (WebKit::RemoteLayerTreeTransaction::decode):
33382
33383        Set the background color of the UIScrollView based on the 
33384        pageExtendedBackgroundColor.
33385        * UIProcess/API/Cocoa/WKWebView.mm:
33386        (-[WKWebView _didCommitLayerTree:WebKit::]):
33387
33388        For the sake of PLATFORM(MAC), continue to support the fact that this color can be 
33389        set via a message from the WebProcess or the new RemoteLayerTreeTransaction.
33390        * UIProcess/WebPageProxy.h:
33391
33392        Cache the pageExtendedBackgroundColor as provided by the 
33393        RemoteLayerTreeTransaction.
33394        * UIProcess/ios/WebPageProxyIOS.mm:
33395        (WebKit::WebPageProxy::didCommitLayerTree):
33396
33397        It’s not necessary to do anything here in non-Mac platforms anymore.
33398        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
33399        (WebKit::WebChromeClient::pageExtendedBackgroundColorDidChange):
33400
33401        Include the pageExtendedBackgroundColor in the RemoteLayerTreeTransaction.
33402        * WebProcess/WebPage/WebPage.cpp:
33403        (WebKit::WebPage::willCommitLayerTree):
33404
334052014-03-10  Benjamin Poulain  <bpoulain@apple.com>
33406
33407        Generalize unobscured rect to all ports
33408        https://bugs.webkit.org/show_bug.cgi?id=130036
33409
33410        Reviewed by Simon Fraser.
33411
33412        * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
33413        (WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
33414        (WebKit::ViewGestureGeometryCollector::collectGeometryForMagnificationGesture):
33415        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
33416        (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
33417
334182014-03-10  Dan Bernstein  <mitz@apple.com>
33419
33420        <rdar://problem/16278716> [Cocoa] Allow setting a custom group identifier on a WKWebView
33421        https://bugs.webkit.org/show_bug.cgi?id=130033
33422
33423        Reviewed by Tim Horton.
33424
33425        * UIProcess/API/Cocoa/WKWebView.mm:
33426        (-[WKWebView initWithFrame:configuration:]): Create a page group with the group identifier
33427        from the configuration, if it’s non-empty.
33428        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
33429        (-[WKWebViewConfiguration _groupIdentifier]): Added this accessor.
33430        (-[WKWebViewConfiguration _setGroupIdentifier:]): Ditto.
33431        * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: Declared _groupIdentifier property.
33432
334332014-03-10  Enrica Casucci  <enrica@apple.com>
33434
33435        WebKit2: Crash in WebPage::getPositionInformation.
33436        https://bugs.webkit.org/show_bug.cgi?id=129936
33437        <rdar://problem/16264550>
33438 
33439        Reviewed by Eric Carlson.
33440 
33441        Missing null check on the node renderer in one code path.
33442        If the page body is smaller than the document, hit testing
33443        will return HTMLHtmlElement that has no renderer.
33444
33445        * WebProcess/WebPage/ios/WebPageIOS.mm:
33446        (WebKit::WebPage::getPositionInformation):
33447
334482014-03-10  Martin Robinson  <mrobinson@igalia.com>
33449
33450        [GTK] [CMake] Clean up library linking
33451        https://bugs.webkit.org/show_bug.cgi?id=129782
33452
33453        Reviewed by Philippe Normand.
33454
33455        * PlatformGTK.cmake: Use the new macro.
33456
334572014-03-10  Carlos Garcia Campos  <cgarcia@igalia.com>
33458
33459        [GTK] The web process can finish while a print operation is still ongoing
33460        https://bugs.webkit.org/show_bug.cgi?id=129871
33461
33462        Reviewed by Martin Robinson.
33463
33464        This can happen when the last page is closed while the print job
33465        is sending data to the printer.
33466
33467        * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: Disable web
33468        process termination when the print job is sending data to the
33469        printer and enable it again when job finishes.
33470
334712014-03-09  Jeong Yong-uk  <yong@company100.com>
33472
33473        Update comment in NetworkResourceLoader
33474        https://bugs.webkit.org/show_bug.cgi?id=129997
33475
33476        Reviewed by Andreas Kling.
33477
33478        NetworkResourceLoader::resourceHandleStopped() has been renamed to
33479        NetworkResourceLoader::cleanup() but the comment is not updated.
33480
33481        * NetworkProcess/NetworkResourceLoader.cpp:
33482        (WebKit::NetworkResourceLoader::start):
33483
334842014-03-09  Alexey Proskuryakov  <ap@apple.com>
33485
33486        iOS build fix.
33487
33488        * WebProcess/WebPage/ios/WebPageIOS.mm: Include WebCore/KeyboardEvent.h.
33489
334902014-03-06  Alexey Proskuryakov  <ap@apple.com>
33491
33492        [Mac] Don't perform a round-trip through WebProcess before interpreting key events
33493        https://bugs.webkit.org/show_bug.cgi?id=129812
33494
33495        Reviewed by Darin Adler.
33496
33497        * Shared/NativeWebKeyboardEvent.h:
33498        * Shared/WebEvent.h:
33499        (WebKit::WebKeyboardEvent::handledByInputMethod):
33500        (WebKit::WebKeyboardEvent::commands):
33501        * Shared/WebEventConversion.cpp:
33502        (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
33503        * Shared/WebKeyboardEvent.cpp:
33504        (WebKit::WebKeyboardEvent::WebKeyboardEvent):
33505        (WebKit::WebKeyboardEvent::~WebKeyboardEvent):
33506        (WebKit::WebKeyboardEvent::encode):
33507        (WebKit::WebKeyboardEvent::decode):
33508        * Shared/mac/NativeWebKeyboardEventMac.mm:
33509        (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent):
33510        * Shared/mac/WebEventFactory.h:
33511        * Shared/mac/WebEventFactory.mm:
33512        (WebKit::WebEventFactory::createWebKeyboardEvent):
33513        Keyboard events now carry results of interpretation with them.
33514        Ideally, mouse events should also have a handledByInputMethod member, because IMs
33515        can handle events, but that can wait until we have actual bugs caused by not diabling
33516        default processing for these.
33517
33518        * UIProcess/API/mac/WKView.mm:
33519        (-[WKView becomeFirstResponder]): Updated for new NativeWebKeyboardEvent contructor
33520        signature. We don't interpret the event in this code path.
33521        (-[WKView doCommandBySelector:]): Added logging.
33522        (-[WKView performKeyEquivalent:]): Reimplemented Esc and Cmd+period handling to avoid
33523        infinite loops and re-entrancy. These two work in a unique way in AppKit.
33524        Interpret key event before sending it down to WebProcess.
33525        (-[WKView keyUp:]): Interpret key event before sending it down to WebProcess.
33526        We need to tell IMs about the event, but key binding processing is moot, all commands
33527        are executed on keydown.
33528        (-[WKView keyDown:]): Interpret the event.
33529        (-[WKView flagsChanged:]): Ditto.
33530        (-[WKView _interpretKeyEvent:savingCommandsTo:WebCore::]): Added an assertion in
33531        consumedByIM code path.
33532        (-[WKView _executeSavedCommandBySelector:]): Added logging.
33533
33534        * UIProcess/PageClient.h:
33535        * UIProcess/ios/PageClientImplIOS.h:
33536        * UIProcess/ios/PageClientImplIOS.mm:
33537        * UIProcess/mac/PageClientImpl.h:
33538        * UIProcess/mac/PageClientImpl.mm:
33539        * UIProcess/WebPageProxy.h:
33540        * UIProcess/WebPageProxy.messages.in:
33541        * UIProcess/ios/WebPageProxyIOS.mm:
33542        * UIProcess/mac/WebPageProxyMac.mm:
33543        Removed interpretQueuedKeyEvent/interpretKeyEvent, WebProcess no longer asks UIProcess to do this.
33544
33545        * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
33546        (WebKit::WebEditorClient::handleKeyboardEvent):
33547        * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
33548        (WebKit::WebEditorClient::handleKeyboardEvent):
33549        (WebKit::WebEditorClient::handleInputMethodKeydown):
33550        WebPage::handleEditingKeyboardEvent is now one function instead of two with a boolean
33551        switch between two behaviors.
33552
33553        * WebProcess/WebPage/WebPage.cpp:(WebKit::WebPage::WebPage):
33554        * WebProcess/WebPage/WebPage.h:
33555        Removed m_keyboardEventBeingInterpreted, as we no longer send the event for interpretation.
33556        This means that we sometimes have to pass a null event down to WebCore, but I wasn't
33557        able to find any behavior differences from us doing so.
33558
33559        * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::handleEditingKeyboardEvent):
33560        Added a FIXME.
33561
33562        * WebProcess/WebPage/mac/WebPageMac.mm:
33563        (WebKit::WebPage::executeKeypressCommandsInternal): When we don't have an event,
33564        use current frame as a target, just like input method messages do.
33565        (WebKit::WebPage::handleEditingKeyboardEvent): This function no longer saves commands,
33566        it only interprets them.
33567        Added a check for Esc, as we don't want to handle it in keydown event handler.
33568        (WebKit::WebPage::insertText): Pass 0 instead of m_keyboardEventBeingInterpreted.
33569        (WebKit::WebPage::insertDictatedText): Ditto.
33570        (WebKit::WebPage::executeKeypressCommands): Ditto.
33571
335722014-03-09  Zalan Bujtas  <zalan@apple.com>
33573
33574        Subpixel rendering: Pass FloatSize boxsize to transform animations to support device pixel sizing.
33575        https://bugs.webkit.org/show_bug.cgi?id=129985
33576
33577        Reviewed by Simon Fraser.
33578
33579        This is in preparation to stop passing integral positioned boxes to transform animations.
33580
33581        No change in behavior.
33582
33583        * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
33584
335852014-03-08  Simon Fraser  <simon.fraser@apple.com>
33586
33587        [iOS Wk2] Can't scroll after going back to page in page cache
33588        https://bugs.webkit.org/show_bug.cgi?id=129989
33589        <rdar://problem/16217588>
33590
33591        Reviewed by Dan Bernstein.
33592
33593        iOS has a special FrameLoader::forceLayoutWithoutRecalculatingStyle()
33594        function that is called instead of FrameView::forceLayout(). This was unimplemented
33595        for the WK2 FrameLoaderClient, so no layout was forced, with the result
33596        that the contentSize was never updated and scrolling was broken.
33597        
33598        Fix by renaming the client function to forceLayoutOnRestoreFromPageCache()
33599        and having it return a bool to say whether the default forceLayout()
33600        should be done. WK1 can then continue to have its custom behavior,
33601        and Wk2 will simply do a forceLayout().
33602        
33603        Also remove FrameLaoderClient::forceLayout(), which was never called.
33604
33605        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
33606        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
33607        * WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
33608        (WebKit::WebFrameLoaderClient::forceLayoutOnRestoreFromPageCache):
33609
336102014-03-08  Simon Fraser  <simon.fraser@apple.com>
33611
33612        [iOS WK2] Get position:fixed working slighlty better
33613        https://bugs.webkit.org/show_bug.cgi?id=129988
33614
33615        Reviewed by Dan Bernstein.
33616        
33617        iOS uses fixed layout, but does not want fixed elements laid
33618        out relative to the frame.
33619
33620        * WebProcess/WebPage/WebPage.cpp:
33621        (WebKit::WebPage::setUseFixedLayout):
33622
336232014-03-08  Jon Lee  <jonlee@apple.com>
33624
33625        iOS broken after r165342
33626        https://bugs.webkit.org/show_bug.cgi?id=129987
33627
33628        Reviewed by Simon Fraser.
33629
33630        * NetworkProcess/ios/NetworkProcessIOS.mm:
33631        (WebKit::NetworkProcess::platformLowMemoryHandler): Add missing stub implementation for
33632        platformLowMemoryHandler().
33633
336342014-03-08  Eric Carlson  <eric.carlson@apple.com>
33635
33636        [iOS] media preferences not initialized correctly in WebKit2
33637        https://bugs.webkit.org/show_bug.cgi?id=129983
33638
33639        Reviewed by Dan Bernstein.
33640
33641        * Shared/WebPreferencesStore.h: Initialize mediaPlaybackAllowsInline and 
33642        mediaPlaybackRequiresUserGesture correctly for iOS.
33643
336442014-03-08  Jeremy Jones  <jeremyj@apple.com>
33645
33646        Allow media element to supply the video layer after fullscreen transition has already begun.
33647        https://bugs.webkit.org/show_bug.cgi?id=129870
33648
33649        Reviewed by Eric Carlson.
33650
33651        WebVideoFullscreenManager and WebVideoFullscreenManagerProxy do their own remote hosting of the video layer instead of needing the video layer to have already been hosted elsewhere. This allows the removal of the coordination with WebPageProxy via a RemoteLayerTreeTransaction.
33652
33653        * Shared/mac/RemoteLayerTreeTransaction.h:
33654        Remove m_videoLayerIDsPendingFullscreen and accessors.
33655
33656        * Shared/mac/RemoteLayerTreeTransaction.mm:
33657        (WebKit::RemoteLayerTreeTransaction::encode):
33658        Don't encode m_videoLayerIDsPendingFullscreen
33659
33660        (WebKit::RemoteLayerTreeTransaction::decode):
33661        Don't decode m_videoLayerIDsPendingFullscreen
33662
33663        * UIProcess/ios/WebPageProxyIOS.mm:
33664        (WebKit::WebPageProxy::didCommitLayerTree):
33665        Don't forward didCommitLayerTree to m_videoFullscreenManager.
33666
33667        * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
33668        Remove code for synchronizing with the RenderTree.
33669        Add a hosting layer and methods to keep video layer frame and video gravity synchronized.
33670
33671        * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
33672        Change IPC interface to fascilitate rehosting video layer with a instead of coordinating with the RenderTree by PlatformLayerID.
33673
33674        * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
33675        (WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy):
33676        Remove initialization for removed members.
33677
33678        (WebKit::WebVideoFullscreenManagerProxy::enterFullscreenWithID):
33679        Rehost the video layer by id and pass on the layer.
33680        This replaces didCommitLayerTree() and  willLendVideoLayerWithID(). 
33681
33682        (WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen):
33683        Cleanup the hosting layer.
33684
33685        (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
33686        Forward on the video layer's frame to keep the hosted layer in sync with the interface.
33687
33688        (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerGravity):
33689        Forward the videolayer gravity.
33690
33691        * WebKit2.xcodeproj/project.pbxproj:
33692        Rename WebVideoFullscreenManager.cpp to WebVideoFullscreenManager.mm
33693
33694        * WebProcess/WebPage/WebPage.cpp:
33695        (WebKit::WebPage::willCommitLayerTree):
33696        Don't invovle the m_videoFullscreenManager in layer tree transactions.
33697
33698        * WebProcess/ios/WebVideoFullscreenManager.h:
33699        Remove code that synchronizes with the render tree via RemoteLayerTreeTransaction.
33700        Instead rehost the video layer directly.
33701        Instead of hoping the WebVideoFullscreenModel has a videoLayer, supply one into which
33702        it can add whatever it likes as needed.
33703
33704        * WebProcess/ios/WebVideoFullscreenManager.messages.in:
33705        No more explicit borrowing and returning video layers.
33706        Add functions to keep video layer bounds and gravity in sync with the UI. 
33707
33708        * WebProcess/ios/WebVideoFullscreenManager.mm: Renamed from Source/WebKit2/WebProcess/ios/WebVideoFullscreenManager.cpp.
33709        Removed code for synchronizing via RemoteLAyerTreeTransaction.
33710
33711        (WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager):
33712        Remove initialization for removed memeber m_sendUnparentVideoLayerTransaction.
33713
33714        (WebKit::WebVideoFullscreenManager::enterFullscreenForNode):
33715        Creates a fullscreen layer, gives it to the WebVideoFullscreenModel to fill in,
33716        and hosts it in a context to send to the UIProcess.
33717
33718        (WebKit::WebVideoFullscreenManager::exitFullscreenForNode):
33719        remove enterFullscreen() and just directly send the IPC message. 
33720
33721        (WebKit::WebVideoFullscreenManager::didExitFullscreen):
33722        Clean up the hosting context.
33723
33724        (WebKit::WebVideoFullscreenManager::setVideoLayerGravityEnum):
33725        Forward on the video gravity. Type convert from unsigned to MediaPlayer::VideoGravity.
33726
337272014-03-08  Andreas Kling  <akling@apple.com>
33728
33729        [WK2] Improve the network process low memory handler.
33730        <https://webkit.org/b/129977>
33731
33732        Split the network process low memory handler into platform-specific
33733        and shared parts. The shared part tells FastMalloc to release freed
33734        pages back to the OS.
33735
33736        For Mac, added a call to purge the in-memory part of CFURLCache.
33737        Remove the malloc_zone_pressure_relief() since that is now taken care
33738        of by the shared MemoryPressureHandler code.
33739
33740        Reviewed by Darin Adler.
33741
33742        * NetworkProcess/NetworkProcess.cpp:
33743        (WebKit::NetworkProcess::initializeNetworkProcess):
33744        (WebKit::NetworkProcess::lowMemoryHandler):
33745        (WebKit::NetworkProcess::platformLowMemoryHandler):
33746        * NetworkProcess/NetworkProcess.h:
33747        * NetworkProcess/mac/NetworkProcessMac.mm:
33748        (WebKit::NetworkProcess::platformLowMemoryHandler):
33749        (WebKit::NetworkProcess::platformInitializeNetworkProcess):
33750
337512014-03-08  Jae Hyun Park  <jaepark@webkit.org>
33752
33753        Remove unnecessary casting in NetworkProcessMainUnix.cpp
33754        https://bugs.webkit.org/show_bug.cgi?id=129968
33755
33756        Reviewed by Andreas Kling.
33757
33758        * NetworkProcess/unix/NetworkProcessMainUnix.cpp:
33759        Since socket is an int, int casting is not necessary.
33760
33761        (WebKit::NetworkProcessMain):
33762
337632014-03-08  Aaron Golden  <golden@inkling.com>
33764
33765        Prevent processes spawned by WebProcess from trying to insert the SecItem shim.
33766        https://bugs.webkit.org/show_bug.cgi?id=129864
33767
33768        Reviewed by Anders Carlsson.
33769
33770        * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm:
33771        (WebKit::WebContentProcessMainDelegate::doPreInitializationWork):
33772
337732014-03-07  Tim Horton  <timothy_horton@apple.com>
33774
33775        [WebKit2][iOS] PDF
33776        https://bugs.webkit.org/show_bug.cgi?id=129600
33777        <rdar://problem/15260216>
33778
33779        Reviewed by Anders Carlsson.
33780
33781        Add a single custom content provider which installs a very primitive PDF view
33782        in place of the WKContentView if a PDF is loaded in the main frame.
33783
33784        * Configurations/WebKit2.xcconfig:
33785        Link against CorePDF, for UIPDFPageView.
33786
33787        * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:
33788        (-[WKWebViewContentProviderRegistry init]):
33789        Initialize the registry, using WKPDFView for all PDF MIME types.
33790
33791        * WebKit2.xcodeproj/project.pbxproj:
33792        * UIProcess/ios/WKPDFView.h: Added.
33793        * UIProcess/ios/WKPDFView.mm: Added.
33794        Add a very simple PDF view based on UIPDFPageView. Additional functionality
33795        can come in the future; right now, we just create one view for each page, and
33796        depend on CATiledLayer to only paint the pages that are being displayed.
33797
337982014-03-07  Andreas Kling  <akling@apple.com>
33799
33800        ArgumentEncoder and ArgumentDecoder should be fastmalloced.
33801        <https://webkit.org/b/129960>
33802
33803        Reviewed by Ryosuke Niwa.
33804
33805        * Platform/IPC/ArgumentDecoder.h:
33806        * Platform/IPC/ArgumentEncoder.h:
33807
338082014-03-07  Martin Robinson  <mrobinson@igalia.com>
33809
33810        Fix the GTK+ build after the recent iOS merge.
33811
33812        * UIProcess/API/gtk/PageClientImpl.cpp: Make some methods available to non-Cocoa ports and fix some signatures.
33813        * UIProcess/WebPageProxy.h: Ditto.
33814
338152014-03-07  Ryuan Choi  <ryuan.choi@samsung.com>
33816
33817        Unreviewed. Fix build on the EFL port after r165303
33818
33819        * UIProcess/CoordinatedGraphics/WebView.cpp:
33820        (WebKit::WebView::didCommitLoadForMainFrame): Added new parameters.
33821        * UIProcess/CoordinatedGraphics/WebView.h: Ditto.
33822        * UIProcess/WebPageProxy.h:
33823        * UIProcess/efl/WebViewEfl.cpp: Added dummy didFinishLoadingDataForCustomContentProvider()
33824        (WebKit::WebViewEfl::exitFullScreen):
33825        (WebKit::WebViewEfl::didFinishLoadingDataForCustomContentProvider):
33826        * UIProcess/efl/WebViewEfl.h: Ditto.
33827
338282014-03-07  Enrica Casucci  <enrica@apple.com>
33829
33830        [iOS WebKit2] Keyboard accessory comes up when I click a link.
33831        https://bugs.webkit.org/show_bug.cgi?id=129949
33832        <rdar://problem/16265305>
33833
33834        Reviewed by Simon Fraser.
33835
33836        We need to create the accessory view only when needed.
33837
33838        * UIProcess/ios/WKContentViewInteraction.mm:
33839        (-[WKContentView requiresAccessoryView]):
33840        (-[WKContentView inputAccessoryView]):
33841
338422014-03-07  Enrica Casucci  <enrica@apple.com>
33843
33844        [iOS WebKit2] Long-press on a link shows just "Copy".
33845        https://bugs.webkit.org/show_bug.cgi?id=129938
33846        <rdar://problem/16266054>
33847
33848        Reviewed by Benjamin Poulain.
33849
33850        When adding a FIXME comment, I accidentally removed the ! on
33851        the if (!element) condition.
33852
33853        * WebProcess/WebPage/ios/WebPageIOS.mm:
33854        (WebKit::WebPage::getPositionInformation):
33855
338562014-03-07  Tim Horton  <timothy_horton@apple.com>
33857
33858        [WebKit2][iOS] Main-frame custom content providers
33859        https://bugs.webkit.org/show_bug.cgi?id=129809
33860
33861        Reviewed by Dan Bernstein.
33862
33863        Re-introduce custom content providers to WebKit2 (removed in r152841), but
33864        for iOS this time.
33865
33866        * UIProcess/API/Cocoa/WKWebView.mm:
33867        (-[WKWebView initWithFrame:configuration:]):
33868        Send the initial MIME types that have custom content providers to the WebProcess.
33869
33870        (-[WKWebView dealloc]):
33871        Unregister our page from the content provider registry.
33872        
33873        (-[WKWebView _setHasCustomContentView:loadedMIMEType:]):
33874        Install/uninstall the custom content provider. Create a view, if needed,
33875        based on the class that the registry has associated with the given MIME type.
33876        We unparent the WKContentView while the custom content provider is active,
33877        and re-use the existing WKScrollView to contain the custom content provider.
33878
33879        (-[WKWebView _didFinishLoadingDataForCustomContentProviderWithSuggestedFilename:dataReference:]):
33880        Forward loaded data on to the custom content provider for display.
33881
33882        (-[WKWebView _didCommitLayerTree:WebKit::]):
33883        Assert that we aren't getting layer tree commits while using a custom content provider.
33884
33885        (-[WKWebView viewForZoomingInScrollView:]):
33886        If we're using a custom content provider, its view should be used for zooming
33887        instead of the (unparented) web content view.
33888
33889        (-[WKWebView hasContentView]):
33890        (-[WKWebView scrollViewWillBeginZooming:withView:]):
33891        (-[WKWebView scrollViewWillBeginDragging:]):
33892        (-[WKWebView _didFinishScrolling]):
33893        (-[WKWebView _updateVisibleContentRects]):
33894        If we do not have a parented WKContentView because we are using a custom
33895        content provider, we should not forward scroll view related changes to it.
33896
33897        (-[WKWebView _frameOrBoundsChanged]):
33898        Update the minimum size of the custom content provider if the web view size changes.
33899
33900        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
33901        (-[WKWebViewConfiguration copyWithZone:]):
33902        (-[WKWebViewConfiguration _contentProviderRegistry]):
33903        (-[WKWebViewConfiguration _setContentProviderRegistry:]):
33904        * UIProcess/API/Cocoa/WKWebViewConfigurationInternal.h: Added.
33905        Add an internal WKWebViewConfiguration property, the WKWebViewContentProviderRegistry.
33906
33907        * UIProcess/API/Cocoa/WKWebViewInternal.h:
33908
33909        * UIProcess/Cocoa/WKWebViewContentProvider.h: Added.
33910        A minimal protocol for informing custom content providers of changes to
33911        the size of the view, the represented data, and the owning scroll view.
33912
33913        * UIProcess/Cocoa/WKWebViewContentProviderRegistry.h: Added.
33914        * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: Added.
33915        (-[WKWebViewContentProviderRegistry addPage:]):
33916        (-[WKWebViewContentProviderRegistry removePage:]):
33917        (-[WKWebViewContentProviderRegistry registerProvider:forMIMEType:]):
33918        (-[WKWebViewContentProviderRegistry providerForMIMEType:]):
33919        (-[WKWebViewContentProviderRegistry mimeTypesWithContentProviders]):
33920        New class, keeps track of a mapping from MIME types to UIViews that
33921        conform to the WKWebViewContentProvider protocol.
33922
33923        * UIProcess/WebPageProxy.cpp:
33924        (WebKit::WebPageProxy::WebPageProxy):
33925        (WebKit::WebPageProxy::didCommitLoadForFrame):
33926        * UIProcess/WebPageProxy.h:
33927        * UIProcess/WebPageProxy.messages.in:
33928
33929        * UIProcess/PageClient.h:
33930        * UIProcess/ios/PageClientImplIOS.h:
33931        * UIProcess/ios/PageClientImplIOS.mm:
33932        (WebKit::PageClientImpl::PageClientImpl):
33933        (WebKit::PageClientImpl::didCommitLoadForMainFrame):
33934        (WebKit::PageClientImpl::didFinishLoadingDataForCustomContentProvider):
33935        * UIProcess/mac/PageClientImpl.h:
33936        * UIProcess/mac/PageClientImpl.mm:
33937        (WebKit::PageClientImpl::didCommitLoadForMainFrame):
33938        (WebKit::PageClientImpl::didFinishLoadingDataForCustomContentProvider):
33939        Add parameters to didCommitLoadForMainFrame, indicating if we should use
33940        a custom content provider to display the main frame, and what MIME type
33941        was loaded in said frame, and add didFinishLoadingDataForCustomContentProvider.
33942        On iOS, forward these to the WKWebView.
33943        Also, give PageClientImplIOS a reference to the WKWebView.
33944        
33945        * UIProcess/ios/WKContentView.mm:
33946        (-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::webView:]):
33947        
33948        * WebKit2.xcodeproj/project.pbxproj:
33949        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
33950        (-[WKWebProcessPlugInFrame _hasCustomContentProvider]):
33951        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h:
33952        Expose whether or not a given frame has a custom content provider to the plug-in.
33953
33954        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
33955        (WebKit::WebFrameLoaderClient::WebFrameLoaderClient):
33956        (WebKit::WebFrameLoaderClient::hasHTMLView):
33957        (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
33958        (WebKit::WebFrameLoaderClient::committedLoad):
33959        (WebKit::WebFrameLoaderClient::finishedLoading):
33960        (WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
33961        (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
33962        (WebKit::WebFrameLoaderClient::canCachePage):
33963        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
33964        (WebKit::WebFrameLoaderClient::frameHasCustomContentProvider):
33965        Restore WebFrameLoaderClient custom representation code, which ensures
33966        that data is routed correctly (to the UI process, and not to WebCore) and
33967        that we don't try to use the page cache for frames with content providers.
33968
33969        * WebProcess/WebPage/WebPage.cpp:
33970        (WebKit::WebPage::mainFrameHasCustomContentProvider):
33971        (WebKit::WebPage::addMIMETypeWithCustomContentProvider):
33972        (WebKit::WebPage::shouldUseCustomContentProviderForResponse):
33973        (WebKit::WebPage::canShowMIMEType):
33974        * WebProcess/WebPage/WebPage.h:
33975        * WebProcess/WebPage/WebPage.messages.in:
33976        Keep a list of MIME types which can be displayed via custom content providers
33977        in WebPage, which will be pushed down from the registry as new providers
33978        are added. Plug-ins still take precendence over custom content providers.
33979
339802014-03-07  Anders Carlsson  <andersca@apple.com>
33981
33982        MigrateHeaders.make should remove C SPI includes from WebKit2 headers
33983        https://bugs.webkit.org/show_bug.cgi?id=129937
33984        <rdar://problem/15920020>
33985
33986        Reviewed by Tim Horton.
33987
33988        * WebKit2.xcodeproj/project.pbxproj:
33989        Make WKPreferences.h and all headers it includes public. Update the post processing of WKBase.h
33990        to account for WKBase.h now being a public header again.
33991
339922014-03-07  Alexey Proskuryakov  <ap@apple.com>
33993
33994        REGRESSION (r164847): Pressing the command key while hovering an element causes it to un-hover
33995        https://bugs.webkit.org/show_bug.cgi?id=129872
33996
33997        Reviewed by Tim Horton.
33998
33999        * UIProcess/API/Cocoa/WKViewPrivate.h: Changes in performDictionaryLookupAtCurrentMouseLocation
34000        were also not correct, because the current event could be a keyboard one (Cmd+Ctrl+D).
34001        But this SPI is unused, and can be simply removed.
34002
34003        * UIProcess/API/mac/WKView.mm: (-[WKView _postFakeMouseMovedEventForFlagsChangedEvent:]):
34004        locationInWindow is undefined for keyboard events, so we have to use current location.
34005        Thankfully, there is a method that returns the location in appropriate coordinate
34006        space, unlike +[NSEvent mouseLocation] that we used before.
34007
340082014-03-07  Andy Estes  <aestes@apple.com>
34009
34010        [iOS] Install WebKit2 XPC services to the correct place during iOS Simulator builds
34011        https://bugs.webkit.org/show_bug.cgi?id=129914
34012
34013        Reviewed by Dan Bernstein.
34014
34015        We weren't specifying INSTALL_PATH for iOS Simulator builds in
34016        BaseXPCService.xcconfig, and r164576 changed INSTALL_PATH to
34017        INSTALL_PATH_ACTUAL. This caused XPC services to start being installed
34018        to the root of the iOS Simulator SDK. Fix this by setting
34019        INSTALL_PATH_ACTUAL for iphonesimulator.
34020
34021        * Configurations/BaseXPCService.xcconfig:
34022
340232014-03-07  Andreas Kling  <akling@apple.com>
34024
34025        [Mac] Notify system malloc of fake memory pressure.
34026        <https://webkit.org/b/129908>
34027
34028        Reviewed by Anders Carlsson.
34029
34030        * NetworkProcess/mac/NetworkProcessMac.mm:
34031        (WebKit::NetworkProcess::platformInitializeNetworkProcess):
34032
34033            Listen for the fake memory pressure notification and respond by
34034            just forwarding to system malloc. We don't do the full WebCore
34035            memory pressure handling here, since that will cause stuff that
34036            the network process doesn't need to get instantiated.
34037
340382014-03-07  Dean Jackson  <dino@apple.com>
34039
34040        Attempt to fix the iOS build.
34041
34042        * Configurations/WebKit2.xcconfig: Add -framework OpenGLES to linking.
34043
340442014-03-07  Simon Fraser  <simon.fraser@apple.com>
34045
34046        [iOS] Add an updateID to visibleContentRect updates which is passed back in layer transactions, so we know whether transactions are stale
34047        https://bugs.webkit.org/show_bug.cgi?id=129897
34048
34049        Reviewed by Benjamin Poulain.
34050
34051        In WebKit2 on iOS we need to know when layer updates from the web process
34052        are stale with respect to visible rect updates from the UI process. Do so
34053        by adding an updateID to VisibleContentRectUpdateInfo, and storing it
34054        on each side, returning it in RemoteLayerTreeTransaction.
34055        
34056        Did some re-ordering of members and encoding order in RemoteLayerTreeTransaction
34057        to group like data members together.
34058        
34059        * Shared/VisibleContentRectUpdateInfo.cpp:
34060        (WebKit::VisibleContentRectUpdateInfo::encode):
34061        (WebKit::VisibleContentRectUpdateInfo::decode):
34062        * Shared/VisibleContentRectUpdateInfo.h:
34063        (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
34064        (WebKit::VisibleContentRectUpdateInfo::updateID):
34065        (WebKit::operator==):
34066        * Shared/mac/RemoteLayerTreeTransaction.h:
34067        (WebKit::RemoteLayerTreeTransaction::setLastVisibleContentRectUpdateID):
34068        (WebKit::RemoteLayerTreeTransaction::lastVisibleContentRectUpdateID):
34069        * Shared/mac/RemoteLayerTreeTransaction.mm:
34070        (WebKit::RemoteLayerTreeTransaction::encode):
34071        (WebKit::RemoteLayerTreeTransaction::decode):
34072        * UIProcess/WebPageProxy.h:
34073        (WebKit::WebPageProxy::nextVisibleContentRectUpdateID):
34074        (WebKit::WebPageProxy::lastVisibleContentRectUpdateID):
34075        * UIProcess/ios/WKContentView.mm:
34076        (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
34077        * WebProcess/WebPage/WebPage.cpp:
34078        (WebKit::WebPage::WebPage):
34079        (WebKit::WebPage::willCommitLayerTree):
34080        * WebProcess/WebPage/WebPage.h:
34081        * WebProcess/WebPage/ios/WebPageIOS.mm:
34082        (WebKit::WebPage::updateVisibleContentRects):
34083
340842014-03-07  Roger Fong  <roger_fong@apple.com>
34085
34086        Replace setSystemWebGLLoadPolicy API with methods to query for WebGL blocking policy.
34087        https://bugs.webkit.org/show_bug.cgi?id=129873.
34088
34089        Reviewed by Dean Jackson.
34090
34091        Remove setSystemWebGLLoadPolicy API.
34092        * UIProcess/API/APILoaderClient.h:
34093        (API::LoaderClient::resolveWebGLLoadPolicy):
34094        * UIProcess/API/C/WKPage.cpp:
34095        (WKPageSetPageLoaderClient):
34096        * UIProcess/API/C/WKPageLoaderClient.h:
34097        * UIProcess/WebPageProxy.cpp:
34098        (WebKit::WebPageProxy::resolveWebGLPolicyForURL):
34099        * UIProcess/WebPageProxy.h:
34100        * UIProcess/WebPageProxy.messages.in:
34101        * WebProcess/WebPage/mac/WebPageMac.mm:
34102        (WebKit::WebPage::webGLPolicyForURL):
34103
34104        Add API to directly query the WebGL blocking policies from WKSI.
34105        * UIProcess/API/C/mac/WKContextPrivateMac.h:
34106        * UIProcess/API/C/mac/WKContextPrivateMac.mm:
34107        (WKContextShouldBlockWebGL):
34108        (WKContextShouldSuggestBlockWebGL):
34109
341102014-03-07  Eric Carlson  <eric.carlson@apple.com>
34111
34112        Initialize new WKSI functions for WebKit2
34113        https://bugs.webkit.org/show_bug.cgi?id=129889
34114
34115        Reviewed by Simon Fraser.
34116
34117        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
34118        (InitWebCoreSystemInterface):
34119
341202014-03-07  Carlos Garcia Campos  <cgarcia@igalia.com>
34121
34122        [GTK] Use final and override in WebPrintOperationGtk
34123        https://bugs.webkit.org/show_bug.cgi?id=129868
34124
34125        Reviewed by Sergio Villar Senin.
34126
34127        * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
34128
341292014-03-06  Alexey Proskuryakov  <ap@apple.com>
34130
34131        [Mac] Allow com.apple.GSSCred in WebKit sandbox profiles
34132        https://bugs.webkit.org/show_bug.cgi?id=129777
34133        <rdar://problem/16050832>
34134
34135        Reviewed by Anders Carlsson.
34136
34137        * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
34138        * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
34139        * WebProcess/com.apple.WebProcess.sb.in:
34140
341412014-03-06  Filip Pizlo  <fpizlo@apple.com>
34142
34143        If the FTL is build-time enabled then it should be run-time enabled.
34144
34145        Rubber stamped by Geoffrey Garen.
34146
34147        * Shared/WebProcessCreationParameters.cpp:
34148        (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
34149        (WebKit::WebProcessCreationParameters::encode):
34150        (WebKit::WebProcessCreationParameters::decode):
34151        * Shared/WebProcessCreationParameters.h:
34152        * UIProcess/mac/WebContextMac.mm:
34153        (WebKit::registerUserDefaultsIfNeeded):
34154        (WebKit::WebContext::platformInitializeWebProcess):
34155        * WebProcess/cocoa/WebProcessCocoa.mm:
34156        (WebKit::WebProcess::platformInitializeWebProcess):
34157
341582014-03-06  Hyowon Kim  <hw1008.kim@samsung.com>
34159
34160        [EFL] Move EvasGL classes from WebKit to WebCore namespace.
34161        https://bugs.webkit.org/show_bug.cgi?id=129797
34162
34163        Reviewed by Gyuyoung Kim.
34164
34165        * UIProcess/API/efl/EwkView.h: namespace changes for EvasGLContext/Surface.
34166
341672014-03-06  Simon Fraser  <simon.fraser@apple.com>
34168
34169        Remove one more setCustomFixedPositionRect() that I missed.
34170
34171        * UIProcess/DrawingAreaProxy.h:
34172
341732014-03-06  Simon Fraser  <simon.fraser@apple.com>
34174
34175        Send the fixed position rect to the WebProcess along with the other rects
34176        https://bugs.webkit.org/show_bug.cgi?id=129856
34177
34178        Reviewed by Benjamin Poulain.
34179        
34180        Remove the functions that pass the custom fixed position rect through
34181        the DrawingArea, and replace them by adding this rect to the
34182        VisibleContentRectUpdateInfo, along with the "is stable" flag. We
34183        then set the custom fixed position rect in the web process for
34184        stable updates.
34185
34186        * Shared/VisibleContentRectUpdateInfo.cpp:
34187        (WebKit::VisibleContentRectUpdateInfo::encode):
34188        (WebKit::VisibleContentRectUpdateInfo::decode):
34189        * Shared/VisibleContentRectUpdateInfo.h:
34190        (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
34191        (WebKit::VisibleContentRectUpdateInfo::customFixedPositionRect):
34192        (WebKit::VisibleContentRectUpdateInfo::inStableState):
34193        (WebKit::operator==):
34194        * UIProcess/DrawingAreaProxy.cpp:
34195        * UIProcess/ios/WKContentView.mm:
34196        (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
34197        * WebProcess/WebPage/DrawingArea.h:
34198        * WebProcess/WebPage/DrawingArea.messages.in:
34199        * WebProcess/WebPage/ios/WebPageIOS.mm:
34200        (WebKit::WebPage::updateVisibleContentRects):
34201        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
34202        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
34203        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
34204
342052014-03-06  Simon Fraser  <simon.fraser@apple.com>
34206
34207        Remove empty class extension in WKContentViewInteraction
34208        https://bugs.webkit.org/show_bug.cgi?id=129849
34209
34210        Reviewed by Enrica Casucci.
34211        
34212        This empty class extension is cruft left over from refactoring.
34213        It can be removed.
34214
34215        * UIProcess/ios/WKContentViewInteraction.mm:
34216
342172014-03-06  Simon Fraser  <simon.fraser@apple.com>
34218
34219        [iOS] didUpdateVisibleRect: should use fabs, not abs
34220        https://bugs.webkit.org/show_bug.cgi?id=129843
34221
34222        Reviewed by Benjamin Poulain.
34223        
34224        When zooming we sent messages to the web process with an unchanging
34225        zoom scale because of use of abs() rather than fabs().
34226
34227        * UIProcess/ios/WKContentView.mm:
34228        (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
34229
342302014-03-06  Anders Carlsson  <andersca@apple.com>
34231
34232        Remove WebKit1 header includes from WebKit2
34233        https://bugs.webkit.org/show_bug.cgi?id=129824
34234
34235        Reviewed by Dan Bernstein.
34236
34237        * UIProcess/mac/WKFullScreenWindowController.mm:
34238        (makeResponderFirstResponderIfDescendantOfView):
34239        Add a new function instead of calling an NSWindow category method that's defined in WebKit1.
34240
34241        (-[WKFullScreenWindowController enterFullScreen:]):
34242        (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
34243        (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
34244        Call makeResponderFirstResponderIfDescendantOfView.
34245
34246        * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
34247        Remove unused WebKit1 header import.
34248
34249        * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
34250        (WebKit::WebEditorClient::documentFragmentFromAttributedString):
34251        Change a category to be on NSObject instead of WebResource.
34252
342532014-03-06  Jon Lee  <jonlee@apple.com>
34254
34255        iOS build fix.
34256
34257        Reviewed by Simon Fraser.
34258
34259        * UIProcess/ios/SmartMagnificationController.mm:
34260
342612014-03-06  Joseph Pecoraro  <pecoraro@apple.com>
34262
34263        Web Inspector: Expose the console object in JSContexts to interact with Web Inspector
34264        https://bugs.webkit.org/show_bug.cgi?id=127944
34265
34266        Reviewed by Geoffrey Garen.
34267
34268        * WebProcess/WebCoreSupport/WebChromeClient.h:
34269        Update namespaces.
34270
342712014-03-06  Carlos Garcia Campos  <cgarcia@igalia.com>
34272
34273        [GTK] Close the page when the view is disposed instead of when finalized
34274        https://bugs.webkit.org/show_bug.cgi?id=129783
34275
34276        Reviewed by Sergio Villar Senin.
34277
34278        When a GtkWidget is destroyed, the GObject is disposed, but not
34279        finalized if it has additional references. When the destroyed
34280        widget is leaked by the application, we leak the page proxy and
34281        what is more important the web process in multi-process mode.
34282
34283        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
34284        (webkitWebViewBaseDispose): Close the WebPageProxy.
34285
342862014-03-05  Chris Fleizach  <cfleizach@apple.com>
34287
34288        AX: Support IOS Accessibility in WK2
34289        https://bugs.webkit.org/show_bug.cgi?id=129527
34290
34291        Build fix.
34292
34293        * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
34294        (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
34295
342962014-03-05  Chris Fleizach  <cfleizach@apple.com>
34297
34298        AX: Support IOS Accessibility in WK2
34299        https://bugs.webkit.org/show_bug.cgi?id=129527
34300
34301        Address review comments from Simon noted in bug.
34302
34303        * UIProcess/ios/WKContentView.mm:
34304        (-[WKContentView _accessibilityRegisterUIProcessTokens]):
34305        * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:
34306        (-[WKAccessibilityWebPageObject init]):
34307        (-[WKAccessibilityWebPageObject dealloc]):
34308        * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.h:
34309        * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
34310        (-[WKAccessibilityWebPageObject accessibilityAttributeNames]):
34311        (-[WKAccessibilityWebPageObject accessibilitySetValue:forAttribute:]):
34312        (-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):
34313        (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
34314        (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
34315
343162014-03-05  Dean Jackson  <dino@apple.com>
34317
34318        [WebGL] Use WKSI to see what the system policy for WebGL is
34319        https://bugs.webkit.org/show_bug.cgi?id=129722
34320        <rdar://problem/15790542>
34321
34322        Reviewed by Tim Horton.
34323
34324        Use the WebKitSystemInterface methods WKShouldBlockWebGL
34325        and WKShouldSuggestBlockingWebGL to query what the host
34326        system thinks about the hardware. Tell the client about
34327        the result in a new WebPage method setSystemWebGLPolicy.
34328
34329        * UIProcess/API/APILoaderClient.h:
34330        (API::LoaderClient::setSystemWebGLLoadPolicy): New empty definition.
34331        * UIProcess/API/C/WKAPICast.h:
34332        (WebKit::toAPI): Convert a WebGLLoadPolicy into a WKWebGLLoadPolicy.
34333        * UIProcess/API/C/WKPage.cpp: Call setSystemWebGLLoadPolicy.
34334        (WKPageSetPageLoaderClient):
34335        * UIProcess/API/C/WKPageLoaderClient.h: New typedef and entry in client structure.
34336        * UIProcess/WebPageProxy.cpp:
34337        (WebKit::WebPageProxy::setSystemWebGLPolicy):
34338        * UIProcess/WebPageProxy.h:
34339        * UIProcess/WebPageProxy.messages.in: Add SetSystemWebGLPolicy.
34340        * Source/WebKit2/Configurations/WebKit2.xcconfig: We have to link against OpenGL now, because WKSI
34341        uses it for hardware detection.
34342        * WebProcess/WebPage/WebPage.cpp: Remove the implementation here, but leave
34343        empty methods for non-Apple platforms.
34344        (WebKit::WebPage::WebPage):
34345        (WebKit::WebPage::webGLPolicyForURL):
34346        (WebKit::WebPage::resolveWebGLPolicyForURL):
34347        * WebProcess/WebPage/WebPage.h: Add m_systemWebGLPolicy.
34348        * WebProcess/WebPage/mac/WebPageMac.mm:
34349        (WebKit::WebPage::webGLPolicyForURL): Moved in from WebPage, but now they call
34350        into WKSI and send the result to the client if necessary.
34351        (WebKit::WebPage::resolveWebGLPolicyForURL):
34352
343532014-03-05  Simon Fraser  <simon.fraser@apple.com>
34354
34355        Fix a stupid error in r165118 that caused userVisibleString()
34356        to call itself recursively.
34357
34358        * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
34359        (WebKit::WebEditorClient::userVisibleString):
34360
343612014-03-05  Benjamin Poulain  <bpoulain@apple.com>
34362
34363        [iOS] Rename the various VisibleExtent variations to exposedContentRect
34364        https://bugs.webkit.org/show_bug.cgi?id=129728
34365
34366        Reviewed by Simon Fraser.
34367
34368        * WebProcess/WebPage/DrawingArea.h:
34369        * WebProcess/WebPage/ios/WebPageIOS.mm:
34370        (WebKit::WebPage::updateVisibleContentRects):
34371        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
34372        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
34373        (WebKit::RemoteLayerTreeDrawingArea::setExposedContentRect):
34374
343752014-03-05  Dean Jackson  <dino@apple.com>
34376
34377        Unreviewed. Fix the Apple-internal builds.
34378
34379        * Configurations/WebKit2.xcconfig: Add -framework OpenGL.
34380
343812014-03-05  Simon Fraser  <simon.fraser@apple.com>
34382
34383        ObjC exception when dropping files into a WKView: drag and drop uses code from WebKit.framework
34384        https://bugs.webkit.org/show_bug.cgi?id=129752
34385
34386        Reviewed by Enrica Casucci.
34387        
34388        Get WebDragClientMac off of all WebKit headers, and WebEditorClientMac off
34389        all but one by using C functions from WebCoreNSURLExtras.h rather than
34390        the NSURL category.
34391
34392        * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
34393        (WebKit::WebDragClient::declareAndWriteDragImage):
34394        * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
34395        (WebKit::WebEditorClient::userVisibleString):
34396        (WebKit::WebEditorClient::canonicalizeURL):
34397        (WebKit::WebEditorClient::canonicalizeURLString):
34398
343992014-03-05  Martin Hock  <mhock@apple.com>
34400
34401        Add support for sessions to MemoryCache.
34402        https://bugs.webkit.org/show_bug.cgi?id=127794
34403
34404        Reviewed by Sam Weinig.
34405
34406        * NetworkProcess/NetworkResourceLoader.h: Add sessionID() method.
34407        (WebKit::NetworkResourceLoader::sessionID):
34408        * NetworkProcess/mac/DiskCacheMonitor.h: Add sessionID member.
34409        * NetworkProcess/mac/DiskCacheMonitor.mm:
34410        (WebKit::DiskCacheMonitor::DiskCacheMonitor): Send sessionID to NetworkProcessConnection::DidCacheResource.
34411        * WebProcess/Network/NetworkProcessConnection.cpp: Add sessionID parameter to didCacheResource and pass to MemoryCache.
34412        (WebKit::NetworkProcessConnection::didCacheResource):
34413        * WebProcess/Network/NetworkProcessConnection.h: Ditto.
34414        * WebProcess/Network/NetworkProcessConnection.messages.in: Ditto.
34415
344162014-03-05  Enrica Casucci  <enrica@apple.com>
34417
34418        [iOS WebKit2] support multi-select and select with groups for iPhone.
34419        https://bugs.webkit.org/show_bug.cgi?id=129344
34420        <rdar://problem/16206928>
34421
34422        Reviewed by Simon Fraser.
34423
34424        This is the remaining work on select element support on iOS.
34425        This adds multi-select and select with group support with UI
34426        for iPhone that uses UIPickerView.
34427
34428        * UIProcess/ios/WKContentViewInteraction.mm:
34429        (-[WKContentView resignFirstResponder]):
34430        (-[WKContentView inputAccessoryView]): Removed incorrect early return.
34431        (-[WKContentView _stopAssistingNode]):
34432        * UIProcess/ios/forms/WKFormSelectControl.h:
34433        * UIProcess/ios/forms/WKFormSelectControl.mm:
34434        (adjustedFontSize): Moved here to make it available to both picker and
34435        popover based implementations.
34436        (-[WKFormSelectControl initWithView:]):
34437        * UIProcess/ios/forms/WKFormSelectPicker.mm:
34438        (-[WKOptionPickerCell _isSelectable]):
34439        (-[WKOptionPickerCell initCommon]):
34440        (-[WKOptionPickerCell initWithOptionItem:]):
34441        (-[WKOptionGroupPickerCell initWithOptionItem:]):
34442        (-[WKOptionGroupPickerCell labelWidthForBounds:]):
34443        (-[WKOptionGroupPickerCell layoutSubviews]):
34444        (-[WKMultipleSelectPicker initWithView:]):
34445        (-[WKMultipleSelectPicker dealloc]):
34446        (-[WKMultipleSelectPicker controlView]):
34447        (-[WKMultipleSelectPicker controlBeginEditing]):
34448        (-[WKMultipleSelectPicker controlEndEditing]):
34449        (-[WKMultipleSelectPicker layoutSubviews]):
34450        (-[WKMultipleSelectPicker pickerView:viewForRow:forComponent:reusingView:]):
34451        (-[WKMultipleSelectPicker numberOfComponentsInPickerView:]):
34452        (-[WKMultipleSelectPicker pickerView:numberOfRowsInComponent:]):
34453        (-[WKMultipleSelectPicker findItemIndexAt:]):
34454        (-[WKMultipleSelectPicker pickerView:row:column:checked:]):
34455        (-[WKSelectSinglePicker initWithView:]):
34456        (-[WKSelectSinglePicker controlEndEditing]):
34457        * UIProcess/ios/forms/WKFormSelectPopover.mm:
34458
344592014-03-03  Martin Robinson  <mrobinson@igalia.com>
34460
34461        [GTK][CMake] Generate documentation for the DOM bindings
34462        https://bugs.webkit.org/show_bug.cgi?id=126211
34463
34464        Reviewed by Carlos Garcia Campos.
34465
34466        * PlatformGTK.cmake: The list of headers for GIR generation has a better name now.
34467
344682014-03-04  Benjamin Poulain  <bpoulain@apple.com>
34469
34470        Fix the build after r165095
34471
34472        * UIProcess/API/Cocoa/WKWebView.mm:
34473        (-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
34474
344752014-03-04  Benjamin Poulain  <bpoulain@apple.com>
34476
34477        [iOS][WK2] Account for the keyboard when computing the unobscuredRect
34478        https://bugs.webkit.org/show_bug.cgi?id=129660
34479
34480        Reviewed by Enrica Casucci.
34481
34482        Adjust the unobscuredRect when a docked keyboard is on screen.
34483
34484        * UIProcess/API/Cocoa/WKWebView.mm:
34485        (-[WKWebView _updateVisibleContentRectsWithStableState:]):
34486        (-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
34487
344882014-03-04  Andy Estes  <aestes@apple.com>
34489
34490        [iOS][WebKit2] Exclude plug-in sandbox profiles from the build
34491        https://bugs.webkit.org/show_bug.cgi?id=129719
34492
34493        Reviewed by Simon Fraser.
34494
34495        * Configurations/WebKit2.xcconfig:
34496
344972014-03-04  Benjamin Poulain  <bpoulain@apple.com>
34498
34499        [iOS][WK2] WKScrollView should be able to cancel touches in content view
34500        https://bugs.webkit.org/show_bug.cgi?id=129711
34501
34502        Reviewed by Simon Fraser.
34503
34504        * UIProcess/ios/WKScrollView.mm:
34505        We should not override UIWebScrollView behavior regarding touch cancellation otherwise we force
34506        other gesture recognizers to fail if delayed touches have been dispatched.
34507
345082014-03-04  Benjamin Poulain  <bpoulain@apple.com>
34509
34510        [iOS][WK2] Consider the entire view state on update to find if a change is stable or not
34511        https://bugs.webkit.org/show_bug.cgi?id=129721
34512
34513        Reviewed by Simon Fraser.
34514
34515        Changes in scroll, zoom and obscuredRect can happen simultaneously. To compute if the current state
34516        is stable or not, we should consider the complete picture from all the type of updates.
34517
34518        * UIProcess/API/Cocoa/WKWebView.mm:
34519        (-[WKWebView _didFinishScrolling]):
34520        (-[WKWebView scrollViewDidScroll:]):
34521        (-[WKWebView scrollViewDidZoom:]):
34522        (-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
34523        (-[WKWebView _frameOrBoundsChanged]):
34524        (-[WKWebView _updateVisibleContentRects]):
34525        (-[WKWebView _setObscuredInsets:]):
34526        (-[WKWebView _endInteractiveObscuredInsetsChange]):
34527
345282014-03-04  Jeremy Jones  <jeremyj@apple.com>
34529
34530        WebVideoFullscreen, should make the hand off of the video layer explicit.
34531        https://bugs.webkit.org/show_bug.cgi?id=128844
34532
34533        Reviewed by Simon Fraser.
34534
34535        This change introduces a more explicit hand-off of the video layer and fullscreen transition.
34536        This describes the interactions between WebVideoFullscreenInterface and WebVideoFullscreenModel
34537        WebVideoFullscreenModel <-> WebVideoFullscreenInterface
34538              enterFullScreen(*) ->
34539                                <- borrowVideoLayer
34540              willLendVideoLayer ->
34541               didLendVideoLayer ->
34542                                <- didEnterFullscreen
34543                                ...
34544                                <- requestExitFullscreen
34545                  exitFullscreen ->
34546                                <- returnVideoLayer
34547                                <- didExitFullscreen
34548        (*) enterFullScreen actually comes from WebVideoFullscreenControllerAVKit.
34549
34550        * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
34551        Implement WebVideoFullscreenChangeObserver.
34552        Add support for explicit video layer hand-off.
34553        Add m_videoView to retain the videoLayer's UIView.
34554
34555        * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
34556        WillLendVideoLayerWithID replaces SetVideoLayerID
34557
34558        * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
34559        Adopt new methods for explicit video layer hand-off.
34560
34561        (WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy):
34562        Observe fullscreen changes.
34563
34564        (WebKit::WebVideoFullscreenManagerProxy::didCommitLayerTree):
34565        Pending fullscreen transition now does didLendVideoLayer instead of calling enter fullscreen.
34566        It also removes the videoView from it's super view now that it is safe to do so.
34567
34568        (WebKit::WebVideoFullscreenManagerProxy::willLendVideoLayerWithID):
34569        This replaces setVideoLayerID. It retains the UIView for the layer to keep it alive before it is unparented.
34570
34571        (WebKit::WebVideoFullscreenManagerProxy::requestExitFullscreen):
34572        Adopt more explicit fullscreen transition.
34573
34574        (WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen):
34575        Adopt more explicit fullscreen transition.
34576
34577        (WebKit::WebVideoFullscreenManagerProxy::didEnterFullscreen):
34578        Adopt more explicit fullscreen transition.
34579
34580        (WebKit::WebVideoFullscreenManagerProxy::borrowVideoLayer):
34581        Adopt more explicit video layer hand-off.
34582
34583        (WebKit::WebVideoFullscreenManagerProxy::returnVideoLayer):
34584        Adopt more explicit video layer hand-off.
34585
34586        * WebProcess/ios/WebVideoFullscreenManager.cpp:
34587        Manage state of fullscreen transition more competently. Wait till an animation is complete to begin the next one.
34588
34589        (WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager):
34590        Init three new state members.
34591
34592        (WebKit::WebVideoFullscreenManager::enterFullscreenForNode):
34593        Update animation state. Don't procede if animation is in progress.
34594
34595        (WebKit::WebVideoFullscreenManager::exitFullscreenForNode):
34596        Update animation state. Don't procede if animation is in progress.
34597
34598        (WebKit::WebVideoFullscreenManager::willLendVideoLayer):
34599        Adopt more explicit video layer hand-off.
34600        This replaces SetVideoLayer.
34601
34602        (WebKit::WebVideoFullscreenManager::didLendVideoLayer):
34603        This is a no-op as this will be sent through a RemoteLayerTreeTransaction.
34604
34605        (WebKit::WebVideoFullscreenManager::didEnterFullscreen):
34606        Adopt more explicit fullscreen transition.
34607
34608        (WebKit::WebVideoFullscreenManager::didExitFullscreen):
34609        Adopt more explicit fullscreen transition.
34610
34611        * WebProcess/ios/WebVideoFullscreenManager.h:
34612        Adopt more explicit fullscreen transition.
34613
34614        * WebProcess/ios/WebVideoFullscreenManager.messages.in:
34615        Adopt more explicit fullscreen/video layer transition.
34616
346172014-03-04  Simon Fraser  <simon.fraser@apple.com>
34618
34619        Get position:fixed working slightly better on iOS WK2
34620        https://bugs.webkit.org/show_bug.cgi?id=129714
34621
34622        Reviewed by Benjamin Poulain.
34623        
34624        Start telling the RemoteScrollingCoordinatorProxy about scroll position changes
34625        again, so it can update fixed and sticky layers.
34626        
34627        Send the scroll position as a FloatPoint, rather than an IntPoint.
34628
34629        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
34630        (WebKit::RemoteScrollingCoordinatorProxy::scrollPositionChangedViaDelegatedScrolling):
34631        (WebKit::RemoteScrollingCoordinatorProxy::scrollPositionChanged):
34632        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
34633        * UIProcess/WebPageProxy.h:
34634        * UIProcess/ios/WKContentView.mm:
34635        (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
34636        Tell the RemoteScrollingCoordinatorProxy about the scroll update.
34637        Only update the customFixedPositionRect if we've finished scrolling or zooming.
34638        * UIProcess/ios/WebPageProxyIOS.mm:
34639        (WebKit::WebPageProxy::updateVisibleContentRects): Return a bool indicating
34640        whether the visible rects changed.
34641
346422014-03-04  Conrad Shultz  <conrad_shultz@apple.com>
34643
34644        WKPage's pageExtendedBackgroundColor API exposed through WKView/WKWebView should support NSColor
34645        https://bugs.webkit.org/show_bug.cgi?id=129704
34646
34647        Reviewed by Beth Dakin.
34648
34649        Add NSColor-returning methods to complement the existing UIColor-returning methods.
34650
34651        * UIProcess/API/Cocoa/WKViewPrivate.h:
34652        Declare _pageExtendedBackgroundColor for non-TARGET_OS_IPHONE.
34653
34654        * UIProcess/API/Cocoa/WKWebView.mm:
34655        (-[WKWebView _pageExtendedBackgroundColor]):
34656        Return an NSColor created from the pageExtendedBackgroundColor.
34657
34658        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
34659        Declare _pageExtendedBackgroundColor for non-TARGET_OS_IPHONE.
34660
34661        * UIProcess/API/mac/WKView.mm:
34662        (-[WKView _pageExtendedBackgroundColor]):
34663        Return an NSColor created from the pageExtendedBackgroundColor.
34664
346652014-03-04  Joseph Pecoraro  <pecoraro@apple.com>
34666
34667        Web Inspector: Give WebProcess private RWI entitlement
34668        https://bugs.webkit.org/show_bug.cgi?id=129710
34669
34670        Reviewed by Timothy Hatcher.
34671
34672        * Configurations/WebContent-iOS.entitlements:
34673        Add entitlements to "WebProcess" when code signing.
34674
34675        * Configurations/WebContentProcess.xcconfig:
34676        Add the private RWI entitlement.
34677
346782014-03-04  Enrica Casucci  <enrica@apple.com>
34679
34680        [iOS WebKit2]: Next/Prev button in the accessory bar do not work.
34681        https://bugs.webkit.org/show_bug.cgi?id=129690
34682        <rdar://problem/16073569>
34683
34684        Reviewed by Simon Fraser.
34685
34686        Adding support for Next and Previous buttons in the accessory bar.
34687        When the request is processed by the WebProcess, we identify the next
34688        focusable node that needs to be assisted and we call focus() on the element
34689        letting the focus changing machinery take care of updating the assisted node.
34690        This change also add support for the Clear button, when appropriate and hooks up
34691        the call to the WebProcess.
34692
34693        * UIProcess/WebPageProxy.h:
34694        * UIProcess/ios/WKContentViewInteraction.mm:
34695        (-[WKContentView accessoryTab:]):
34696        (-[WKContentView accessoryClear]):
34697        (-[WKContentView _updateAccessory]):
34698        * UIProcess/ios/WebPageProxyIOS.mm:
34699        (WebKit::WebPageProxy::focusNextAssistedNode):
34700        * WebProcess/WebPage/WebPage.h:
34701        * WebProcess/WebPage/WebPage.messages.in:
34702        * WebProcess/WebPage/ios/WebPageIOS.mm:
34703        (WebKit::nextFocusableElement):
34704        (WebKit::hasFocusableElement):
34705        (WebKit::WebPage::focusNextAssistedNode):
34706        (WebKit::WebPage::getAssistedNodeInformation):
34707
347082014-03-04  Simon Fraser  <simon.fraser@apple.com>
34709
34710        Allow iOS DumpRenderTree crashes to show application-specific information
34711        https://bugs.webkit.org/show_bug.cgi?id=129705
34712
34713        Reviewed by David Kilzer.
34714        
34715        Make the WKSI function SetCrashReportApplicationSpecificInformation available
34716        in iOS simulator builds.
34717
34718        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
34719        (InitWebCoreSystemInterface):
34720
347212014-03-04  Mark Hahnenberg  <mhahnenberg@apple.com>
34722
34723        Merge API shims and JSLock
34724        https://bugs.webkit.org/show_bug.cgi?id=129650
34725
34726        Reviewed by Mark Lam.
34727
34728        JSLock is now taking on all of APIEntryShim's responsibilities since there is never a reason 
34729        to take just the JSLock. Ditto for DropAllLocks and APICallbackShim.
34730
34731        * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
34732        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::~UniqueIDBDatabaseBackingStoreSQLite):
34733        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createIndex):
34734
347352014-03-03  Enrica Casucci  <enrica@apple.com>
34736
34737        [WK2] Selection remains after reload.
34738        https://bugs.webkit.org/show_bug.cgi?id=129648
34739        <rdar://problem/16207547>
34740
34741        Reviewed by Sam Weinig.
34742
34743        We normally clear the selection when resigninig first responder but
34744        that doesn't get called when reloading the page or when navigating with
34745        back/forward buttons. The correct place to do this is when we get
34746        _didCommitLoadForMainFrame where we already stop assisting the node.
34747        The method we call into webselectionassistant is resignedFirstResponder
34748        which takes care of clearing the selection and removing the selection view.
34749
34750        * UIProcess/ios/WKContentViewInteraction.mm:
34751        (-[WKContentView _stopAssistingNode]):
34752
347532014-03-04  Hyowon Kim  <hw1008.kim@samsung.com>
34754
34755        Move EvasGLContext and EvasGLSurface files into the efl common directory.
34756        https://bugs.webkit.org/show_bug.cgi?id=129603
34757
34758        Reviewed by Gyuyoung Kim.
34759
34760        * PlatformEfl.cmake: Update for removed files.
34761
347622014-03-03  Benjamin Poulain  <bpoulain@apple.com>
34763
34764        [iOS][WK2] WebPage::updateVisibleContentRects can set the position directly instead of using programmatic scrolling
34765        https://bugs.webkit.org/show_bug.cgi?id=129649
34766
34767        Reviewed by Sam Weinig.
34768
34769        * WebProcess/WebPage/ios/WebPageIOS.mm:
34770        (WebKit::WebPage::updateVisibleContentRects):
34771        Update my workaround from r165003. We should not use programmatic scrolling when the scroll position is changed
34772        from the UI.
34773
347742014-03-03  Benjamin Poulain  <bpoulain@apple.com>
34775
34776        [iOS][WK2] Update UIScrollView's contentSize when a new layer tree is committed
34777        https://bugs.webkit.org/show_bug.cgi?id=129641
34778
34779        Reviewed by Sam Weinig.
34780
34781        * UIProcess/API/Cocoa/WKWebView.mm:
34782        (-[WKWebView _didCommitLayerTree:WebKit::]):
34783        Previously, we relied on [UIScrollView setZoomScale:] to reset the contentSize for us.
34784        In the cases where we would not go through [UIScrollView setZoomScale:], the UIScrollView's contentSize
34785        did not match the actual WKContentView's area on screen.
34786
347872014-03-03  Jeremy Jones  <jeremyj@apple.com>
34788
34789        Forward application suspend resume notifications to the web process.
34790        https://bugs.webkit.org/show_bug.cgi?id=129356
34791
34792        Reviewed by Eric Carlson.
34793
34794        Repost UIApplicationWillEnterForegroundNotification,
34795        UIApplicationDidBecomeActiveNotification and 
34796        UIApplicationWillResignActiveNotification from UIProcess to WebProcess.
34797        As WebUIApplicationWillEnterForegroundNotification,
34798        WebUIApplicationDidBecomeActiveNotification, and
34799        WebUIApplicationWillResignActiveNotification
34800
34801        * UIProcess/WebPageProxy.h:
34802        Add applicationWillEnterForeground()
34803        applicationWillResignActive()
34804        applicationDidBecomeActive()
34805
34806        * UIProcess/ios/WKContentView.mm:
34807        (-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::]):
34808        Observe notifications.
34809
34810        (-[WKContentView dealloc]):
34811        Stop observing notifications.
34812
34813        (-[WKContentView _applicationWillResignActive:]):
34814        Notify WebPageProxy of the event.
34815
34816        (-[WKContentView _applicationWillEnterForeground:]):
34817        Notify WebPageProxy of the event.
34818
34819        (-[WKContentView _applicationDidBecomeActive:]):
34820        Notify WebPageProxy of the event.
34821
34822        * UIProcess/ios/WebPageProxyIOS.mm:
34823        (WebKit::WebPageProxy::applicationWillEnterForeground):
34824        Send corresponding Message to WebPage.
34825
34826        (WebKit::WebPageProxy::applicationWillResignActive):
34827        Send corresponding Message to WebPage.
34828
34829        (WebKit::WebPageProxy::applicationDidBecomeActive):
34830        Send corresponding Message to WebPage.
34831
34832        * WebProcess/WebPage/WebPage.h:
34833        Add applicationWillEnterForeground()
34834        applicationWillResignActive()
34835        applicationDidBecomeActive()
34836
34837        * WebProcess/WebPage/WebPage.messages.in:
34838        Add applicationWillEnterForeground()
34839        applicationWillResignActive()
34840        applicationDidBecomeActive()
34841
34842        * WebProcess/WebPage/ios/WebPageIOS.mm:
34843        (WebKit::WebPage::applicationWillResignActive):
34844        Post corresponding NSNotification.
34845
34846        (WebKit::WebPage::applicationWillEnterForeground):
34847        Post corresponding NSNotification.
34848
34849        (WebKit::WebPage::applicationDidBecomeActive):
34850        Post corresponding NSNotification.
34851
348522014-03-03  Commit Queue  <commit-queue@webkit.org>
34853
34854        Unreviewed, rolling out r165013.
34855        http://trac.webkit.org/changeset/165013
34856        https://bugs.webkit.org/show_bug.cgi?id=129646
34857
34858        New code is not thread safe, asserting on a worker test
34859        (Requested by ap on #webkit).
34860
34861        * NetworkProcess/NetworkResourceLoader.h:
34862        * NetworkProcess/mac/DiskCacheMonitor.h:
34863        * NetworkProcess/mac/DiskCacheMonitor.mm:
34864        (WebKit::DiskCacheMonitor::DiskCacheMonitor):
34865        * WebProcess/Network/NetworkProcessConnection.cpp:
34866        (WebKit::NetworkProcessConnection::didCacheResource):
34867        * WebProcess/Network/NetworkProcessConnection.h:
34868        * WebProcess/Network/NetworkProcessConnection.messages.in:
34869
348702014-03-03  Enrica Casucci  <enrica@apple.com>
34871
34872        [iOS WebKit2]: Text fields don't zoom in when focused
34873        https://bugs.webkit.org/show_bug.cgi?id=129632
34874        <rdar://problem/16185230>
34875
34876        Reviewed by Benjamin Poulain.
34877
34878        When focusing the node we need to zoom and center it and possibly
34879        scroll to make it visible.
34880        On iPad we only scroll, without zooming.
34881
34882        * Shared/AssistedNodeInformation.cpp:
34883        (WebKit::AssistedNodeInformation::encode):
34884        (WebKit::AssistedNodeInformation::decode):
34885        * Shared/AssistedNodeInformation.h:
34886        (WebKit::AssistedNodeInformation::AssistedNodeInformation):
34887        * UIProcess/API/Cocoa/WKWebViewInternal.h:
34888        * UIProcess/ios/WKContentView.h:
34889        * UIProcess/ios/WKContentView.mm:
34890        (-[WKContentView _scrollToRect:withOrigin:minimumScrollDistance:]):
34891        * UIProcess/ios/WKContentViewInteraction.mm:
34892        (-[WKContentView _displayFormNodeInputView]):
34893        (-[WKContentView _startAssistingNode:]):
34894        * WebProcess/WebPage/ios/WebPageIOS.mm:
34895        (WebKit::WebPage::getAssistedNodeInformation):
34896
348972014-03-03  Sam Weinig  <sam@webkit.org>
34898
34899        Fix ASSERT and leaks introduced in recent "Support IOS Accessibility in WK2" patch
34900
34901        Reviewed by Simon Fraser.
34902
34903        * UIProcess/ios/WKContentView.mm:
34904        (-[WKContentView _accessibilityRegisterUIProcessTokens]):
34905        * WebProcess/WebPage/ios/WebPageIOS.mm:
34906        (WebKit::WebPage::platformInitializeAccessibility):
34907
349082014-03-03  Simon Fraser  <simon.fraser@apple.com>
34909
34910        Composited masks not working on iOS after r164890 
34911        https://bugs.webkit.org/show_bug.cgi?id=129630
34912
34913        Reviewed by Jer Noble.
34914        
34915        Fix typo in UIView-related masks code; set the mask layer
34916        on the view, not the maskView.
34917
34918        * Shared/mac/RemoteLayerTreePropertyApplier.mm:
34919        (WebKit::RemoteLayerTreePropertyApplier::applyProperties):
34920
349212014-02-28  Chris Fleizach  <cfleizach@apple.com>
34922
34923        AX: Support IOS Accessibility in WK2
34924        https://bugs.webkit.org/show_bug.cgi?id=129527
34925
34926        Reviewed by Sam Weinig.
34927
34928        Implement enough AX hooks so that accessibility can work in WebKit2.
34929
34930        * Platform/IPC/Connection.h:
34931        * Platform/IPC/mac/ConnectionMac.cpp:
34932        (IPC::Connection::identifier):
34933        * UIProcess/ios/PageClientImplIOS.mm:
34934        (WebKit::PageClientImpl::accessibilityWebProcessTokenReceived):
34935        * UIProcess/ios/WKContentView.h:
34936        * UIProcess/ios/WKContentView.mm:
34937        (-[WKContentView _updateForScreen:]):
34938        (-[WKContentView _setAccessibilityWebProcessToken:]):
34939        (-[WKContentView _accessibilityRegisterUIProcessTokens]):
34940        (-[WKContentView _didRelaunchProcess]):
34941        * UIProcess/ios/WebPageProxyIOS.mm:
34942        (WebKit::WebPageProxy::registerWebProcessAccessibilityToken):
34943        (WebKit::WebPageProxy::registerUIProcessAccessibilityTokens):
34944        * WebKit2.xcodeproj/project.pbxproj:
34945        * WebProcess/Plugins/PDF/PDFPlugin.mm:
34946        * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.h: Added.
34947        * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm: Added.
34948        (-[WKAccessibilityWebPageObject init]):
34949        (-[WKAccessibilityWebPageObject _accessibilityCategoryInstalled:]):
34950        (-[WKAccessibilityWebPageObject pageScale]):
34951        (-[WKAccessibilityWebPageObject dealloc]):
34952        * WebProcess/WebPage/WebPage.h:
34953        * WebProcess/WebPage/ios/WebPageIOS.mm:
34954        (WebKit::WebPage::platformInitialize):
34955        (WebKit::WebPage::platformInitializeAccessibility):
34956        (WebKit::WebPage::accessibilityObjectForMainFramePlugin):
34957        (WebKit::WebPage::registerUIProcessAccessibilityTokens):
34958        * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.h: Copied from Source/WebKit2/WebProcess/WebPage/mac/WKAccessibilityWebPageObject.h.
34959        * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm: Copied from Source/WebKit2/WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm.
34960        (-[WKAccessibilityWebPageObjectBase accessibilityFocusedUIElement]):
34961        * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.h: Added.
34962        * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm: Added.
34963        (-[WKAccessibilityWebPageObject accessibilityIsIgnored]):
34964        (-[WKAccessibilityWebPageObject accessibilityAttributeNames]):
34965        (-[WKAccessibilityWebPageObject accessibilityParameterizedAttributeNames]):
34966        (-[WKAccessibilityWebPageObject accessibilityIsAttributeSettable:]):
34967        (-[WKAccessibilityWebPageObject accessibilitySetValue:forAttribute:]):
34968        (-[WKAccessibilityWebPageObject convertScreenPointToRootView:]):
34969        (-[WKAccessibilityWebPageObject accessibilityActionNames]):
34970        (-[WKAccessibilityWebPageObject accessibilityChildren]):
34971        (-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):
34972        (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
34973        (-[WKAccessibilityWebPageObject accessibilityShouldUseUniqueId]):
34974        (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
34975        * WebProcess/WebPage/mac/WebPageMac.mm:
34976        * WebProcess/cocoa/WebProcessCocoa.mm:
34977        (WebKit::WebProcess::platformInitializeProcess):
34978
349792014-03-03  Martin Hock  <mhock@apple.com>
34980
34981        Add support for sessions to MemoryCache.
34982        https://bugs.webkit.org/show_bug.cgi?id=127794
34983
34984        Reviewed by Sam Weinig.
34985
34986        * NetworkProcess/NetworkResourceLoader.h: Add sessionID() method.
34987        (WebKit::NetworkResourceLoader::sessionID):
34988        * NetworkProcess/mac/DiskCacheMonitor.h: Add sessionID member.
34989        * NetworkProcess/mac/DiskCacheMonitor.mm:
34990        (WebKit::DiskCacheMonitor::DiskCacheMonitor): Send sessionID to NetworkProcessConnection::DidCacheResource.
34991        * WebProcess/Network/NetworkProcessConnection.cpp: Add sessionID parameter to didCacheResource and pass to MemoryCache.
34992        (WebKit::NetworkProcessConnection::didCacheResource):
34993        * WebProcess/Network/NetworkProcessConnection.h: Ditto.
34994        * WebProcess/Network/NetworkProcessConnection.messages.in: Ditto.
34995
349962014-03-03  Benjamin Poulain  <bpoulain@apple.com>
34997
34998        [iOS][WK2] Regression: ScrollView's scroll offset is never set after r164702
34999        https://bugs.webkit.org/show_bug.cgi?id=129620
35000
35001        Reviewed by Simon Fraser.
35002
35003        * WebProcess/WebPage/ios/WebPageIOS.mm:
35004        (WebKit::WebPage::updateVisibleContentRects):
35005
350062014-03-03  Simon Fraser  <simon.fraser@apple.com>
35007
35008        Crash when going into video fullscreen on iOS
35009        https://bugs.webkit.org/show_bug.cgi?id=129613
35010
35011        Reviewed by Dean Jackson.
35012        
35013        We shouldn't reparent a UIView's layer without unparenting
35014        the view first.
35015
35016        * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
35017        (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerID):
35018
350192014-03-03  Carlos Garcia Campos  <cgarcia@igalia.com>
35020
35021        [GTK] WebKit2WebExtension GIR can't be used in vala
35022        https://bugs.webkit.org/show_bug.cgi?id=127179
35023
35024        Reviewed by Martin Robinson.
35025
35026        Add a different pkg-config file for the web extensions API.
35027
35028        * GNUmakefile.am:
35029        * PlatformGTK.cmake:
35030        * webkit2gtk-web-extension.pc.in: Added.
35031
350322014-03-02  Darin Adler  <darin@apple.com>
35033
35034        Streamline use of TextIterator, cutting down includes and use of soon-to-be-deleted functions
35035        https://bugs.webkit.org/show_bug.cgi?id=129592
35036
35037        Reviewed by Sam Weinig.
35038
35039        * UIProcess/WebPageProxy.cpp: Added now-needed include.
35040        * WebProcess/WebPage/WebPage.cpp: Ditto.
35041
350422014-03-02  Enrica Casucci  <enrica@apple.com>
35043
35044        [iOS WebKit2] Keyboard deadlock when accepting/dismissing autocorrection.
35045        https://bugs.webkit.org/show_bug.cgi?id=129594
35046        <rdar://problem/16168978>
35047
35048        Reviewed by Sam Weinig.
35049
35050        As a temporary fix, we are using a synchronous
35051        message to accept autocorrection until we implement
35052        a solution that processes these requests on a thread that
35053        is not the main thread.
35054
35055        * UIProcess/WebPageProxy.h:
35056        * UIProcess/ios/WKContentViewInteraction.mm:
35057        (-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
35058        (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
35059        * UIProcess/ios/WebPageProxyIOS.mm:
35060        (WebKit::WebPageProxy::applyAutocorrection):
35061        * WebProcess/WebPage/WebPage.h:
35062        * WebProcess/WebPage/WebPage.messages.in:
35063        * WebProcess/WebPage/ios/WebPageIOS.mm:
35064        (WebKit::WebPage::applyAutocorrection):
35065        (WebKit::WebPage::syncApplyAutocorrection):
35066
350672014-03-02  Dan Bernstein  <mitz@apple.com>
35068
35069        Try to fix the 32-bit build.
35070
35071        * UIProcess/ios/forms/WKFormSelectPopover.mm:
35072        (adjustedFontSize):
35073
350742014-03-02  Sam Weinig  <sam@webkit.org>
35075
35076        Page Cache is not enabled when using the modern WebKit2 API
35077        https://bugs.webkit.org/show_bug.cgi?id=129585
35078
35079        Reviewed by Dan Bernstein.
35080
35081        * UIProcess/API/Cocoa/WKProcessPool.mm:
35082        (-[WKProcessPool initWithConfiguration:]):
35083        Default to CacheModelPrimaryWebBrowser until there is a way to configure it.
35084
350852014-03-02  Enrica Casucci  <enrica@apple.com>
35086
35087        [iOS WebKit2] Form controls handling
35088        https://bugs.webkit.org/show_bug.cgi?id=129344
35089        <rdar://problem/16053643>
35090
35091        Reviewed by Simon Fraser.
35092
35093        Adding support for select elements on iOS.
35094        There is full support on iPad, while on iPhone it is
35095        still limited to single select with no groups.
35096        The change also fixes the issue of the keyboard appearing
35097        on screen for types of elements that are implemented with
35098        a popover or a picker.
35099
35100        * Scripts/webkit2/messages.py:
35101        * Shared/AssistedNodeInformation.cpp:
35102        (WebKit::WKOptionItem::encode):
35103        (WebKit::WKOptionItem::decode):
35104        (WebKit::AssistedNodeInformation::encode):
35105        (WebKit::AssistedNodeInformation::decode):
35106        * Shared/AssistedNodeInformation.h:
35107        (WebKit::WKOptionItem::WKOptionItem):
35108        * UIProcess/WebPageProxy.h:
35109        * UIProcess/ios/WKContentViewInteraction.h:
35110        * UIProcess/ios/WKContentViewInteraction.mm:
35111        (-[WKContentView inputView]):
35112        (-[WKContentView assistedNodeSelectOptions]):
35113        (-[WKContentView _startAssistingNode:]):
35114        * UIProcess/ios/WebPageProxyIOS.mm:
35115        (WebKit::WebPageProxy::setAssistedNodeSelectedIndex):
35116        * UIProcess/ios/forms/WKFormSelectControl.h:
35117        * UIProcess/ios/forms/WKFormSelectControl.mm: Added.
35118        (-[WKFormSelectControl initWithView:]):
35119        (+[WKFormSelectControl createPeripheralWithView:]):
35120        (-[WKFormSelectControl assistantView]):
35121        (-[WKFormSelectControl beginEditing]):
35122        (-[WKFormSelectControl endEditing]):
35123        * UIProcess/ios/forms/WKFormSelectPicker.mm: Added.
35124        (-[WKSelectSinglePicker initWithView:]):
35125        (-[WKSelectSinglePicker dealloc]):
35126        (-[WKSelectSinglePicker controlView]):
35127        (-[WKSelectSinglePicker controlBeginEditing]):
35128        (-[WKSelectSinglePicker controlEndEditing]):
35129        (-[WKSelectSinglePicker numberOfComponentsInPickerView:]):
35130        (stringByTrimmingWhitespaceAndNewlines):
35131        (-[WKSelectSinglePicker pickerView:numberOfRowsInComponent:]):
35132        (-[WKSelectSinglePicker pickerView:attributedTitleForRow:forComponent:]):
35133        (-[WKSelectSinglePicker pickerView:didSelectRow:inComponent:]):
35134        * UIProcess/ios/forms/WKFormSelectPopover.mm: Added.
35135        (stringWithWritingDirection):
35136        (adjustedFontSize):
35137        (-[WKSelectTableViewController initWithView:hasGroups:]):
35138        (-[WKSelectTableViewController viewWillAppear:]):
35139        (-[WKSelectTableViewController numberOfSectionsInTableView:]):
35140        (-[WKSelectTableViewController tableView:numberOfRowsInSection:]):
35141        (-[WKSelectTableViewController tableView:titleForHeaderInSection:]):
35142        (-[WKSelectTableViewController populateCell:withItem:]):
35143        (-[WKSelectTableViewController findItemIndexAt:]):
35144        (-[WKSelectTableViewController findItemAt:]):
35145        (-[WKSelectTableViewController tableView:cellForRowAtIndexPath:]):
35146        (-[WKSelectTableViewController tableView:didSelectRowAtIndexPath:]):
35147        (-[WKSelectTableViewController hasText]):
35148        (-[WKSelectTableViewController insertText:]):
35149        (-[WKSelectTableViewController deleteBackward]):
35150        (-[WKSelectPopover initWithView:hasGroups:]):
35151        (-[WKSelectPopover dealloc]):
35152        (-[WKSelectPopover controlView]):
35153        (-[WKSelectPopover controlBeginEditing]):
35154        (-[WKSelectPopover controlEndEditing]):
35155        (-[WKSelectPopover _userActionDismissedPopover:]):
35156        * WebKit2.xcodeproj/project.pbxproj:
35157        * WebProcess/WebPage/WebPage.h:
35158        * WebProcess/WebPage/WebPage.messages.in:
35159        * WebProcess/WebPage/ios/WebPageIOS.mm:
35160        (WebKit::WebPage::setAssistedNodeSelectedIndex):
35161        (WebKit::innerFrameQuad):
35162        (WebKit::WebPage::getPositionInformation):
35163        (WebKit::hasFocusableNode):
35164        (WebKit::WebPage::getAssistedNodeInformation):
35165        (WebKit::WebPage::elementDidFocus):
35166
351672014-03-02  Benjamin Poulain  <bpoulain@apple.com>
35168
35169        [iOS][WK2] Pages using tiled compositing layers allocate too many tiles on zoom
35170        https://bugs.webkit.org/show_bug.cgi?id=129471
35171
35172        Reviewed by Simon Fraser.
35173
35174        * WebProcess/WebPage/DrawingArea.h:
35175        * WebProcess/WebPage/ios/WebPageIOS.mm:
35176        (WebKit::WebPage::updateVisibleContentRects):
35177        A few interesting changes here:
35178        -Now that we do not use setExposedRect, we can pass the exposed area directly
35179         to the drawing area since everything is now in content coordinates :)
35180        -The scale is now converted to float before being compared to the Page's scaleFactor.
35181         The page's scalefactor being a float, the comparison was failing most of the time.
35182
35183        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
35184        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
35185        (WebKit::RemoteLayerTreeDrawingArea::setVisibleExtentContentRect):
35186
351872014-03-02  Darin Adler  <darin@apple.com>
35188
35189        Change public text iterator API implementations to not depend on 16-bit character pointers
35190        https://bugs.webkit.org/show_bug.cgi?id=129566
35191
35192        Reviewed by Anders Carlsson.
35193
35194        * WebView/WebTextIterator.mm:
35195        (-[WKDOMTextIterator initWithRange:]): Use make_unique instead of adoptPtr.
35196        (-[WKDOMTextIterator advance]): Clear out the upconverted text since we are moving on to the
35197        next text.
35198        (-[WKDOMTextIterator currentTextPointer]): Upconvert if we have 8-bit text.
35199        (-[WKDOMTextIterator currentTextLength]): Call TextIterator::text().length() since we will
35200        probably be removing TextIterator::length eventually.
35201
35202        * WebProcess/WebCoreSupport/WebEditorClient.cpp: Removed unneded include of TextIterator.h.
35203        * WebProcess/WebPage/WebPage.cpp: Ditto.
35204
352052014-03-02  Carlos Garcia Campos  <cgarcia@igalia.com>
35206
35207        [GTK] Make impossible to build with <webkit2/webkit2.h> and <webkit2/webkit-web-extension.h> included together
35208        https://bugs.webkit.org/show_bug.cgi?id=129549
35209
35210        Reviewed by Martin Robinson.
35211
35212        Add a compile error to prevent mixing the UI and web process APIs.
35213
35214        * UIProcess/API/gtk/webkit2.h:
35215        * WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
35216
352172014-03-02  Carlos Garcia Campos  <cgarcia@igalia.com>
35218
35219        [GTK] Remove the include dir of the C API from the WebKit2 pkg-config file
35220        https://bugs.webkit.org/show_bug.cgi?id=129543
35221
35222        Reviewed by Martin Robinson.
35223
35224        We are not installing the C API headers anymore.
35225
35226        * webkit2gtk.pc.in:
35227
352282014-03-01  Tim Horton  <timothy_horton@apple.com>
35229
35230        Fix the Mac build.
35231
35232        * UIProcess/mac/ViewGestureController.messages.in:
35233
352342014-03-01  Tim Horton  <timothy_horton@apple.com>
35235
35236        WebKit2 View Gestures (Smart Magnification): Support for iOS
35237        https://bugs.webkit.org/show_bug.cgi?id=129146
35238        <rdar://problem/16032668>
35239
35240        Reviewed by Benjamin Poulain.
35241
35242        Add support for double-tap smart magnification on iOS.
35243
35244        * DerivedSources.make:
35245        * UIProcess/API/Cocoa/WKWebView.mm:
35246        (-[WKWebView initWithFrame:configuration:]):
35247        WKContentView is no longer API, so it can know about WKWebView
35248        and will always have one.
35249
35250        (-[WKWebView contentView:didCommitLayerTree:WebKit::]):
35251        Don't replace the zoom scale if we're currently animating.
35252
35253        (-[WKWebView _takeViewSnapshot]):
35254        Rename.
35255
35256        (-[WKWebView _zoomToPoint:WebCore::atScale:]):
35257        (-[WKWebView _zoomToRect:WebCore::atScale:origin:WebCore::]):
35258        (constrainContentOffset):
35259        (-[WKWebView _scrollToRect:WebCore::origin:WebCore::minimumScrollDistance:]):
35260        (-[WKWebView _zoomOutWithOrigin:]):
35261        (-[WKWebView _zoomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:]):
35262        Add _zoomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:
35263        and _zoomOutWithOrigin: as internal API, for use by SmartMagnificationController via WKContentView.
35264        These will use some heuristics to generally center the target rect in the view
35265        in a way that should match WebKit1 fairly closely.
35266
35267        * UIProcess/API/Cocoa/WKWebViewInternal.h:
35268        Don't use the WKContentViewDelegate protocol for things that don't belong there.
35269
35270        * UIProcess/ios/SmartMagnificationController.h: Added.
35271        * UIProcess/ios/SmartMagnificationController.messages.in: Added.
35272        * UIProcess/ios/SmartMagnificationController.mm: Added.
35273        (WebKit::SmartMagnificationController::SmartMagnificationController):
35274        (WebKit::SmartMagnificationController::~SmartMagnificationController):
35275        (WebKit::SmartMagnificationController::handleSmartMagnificationGesture):
35276        (WebKit::SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture):
35277        SmartMagnificationController sits off of WKContentView, and sends/receives
35278        messages to the WebProcess to do the smart magnification hit-testing.
35279
35280        * UIProcess/ios/WKContentView.h:
35281        * UIProcess/ios/WKContentView.mm:
35282        (-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::webView:]):
35283        As before, teach WKContentView about its owning WKWebView.
35284
35285        (-[WKContentView _takeViewSnapshot]):
35286        Rename.
35287
35288        (-[WKContentView _zoomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:]):
35289        (-[WKContentView _zoomOutWithOrigin:]):
35290        Forward _zoomToRect:::::: and _zoomOutWithOrigin: to WKWebView.
35291
35292        * UIProcess/ios/WKContentViewInteraction.h:
35293        * UIProcess/ios/WKContentViewInteraction.mm:
35294        (-[WKContentView setupInteraction]):
35295        (-[WKContentView _doubleTapRecognized:]):
35296        (-[WKContentView _twoFingerDoubleTapRecognized:]):
35297        Forward double tap to the SmartMagnificationController.
35298
35299        * UIProcess/mac/ViewGestureController.h:
35300        * UIProcess/mac/ViewGestureController.messages.in:
35301        * UIProcess/mac/ViewGestureControllerMac.mm:
35302        (WebKit::ViewGestureController::didCollectGeometryForSmartMagnificationGesture):
35303        Retrieve the minimum/maximum viewport scale from the WebProcess.
35304
35305        * WebKit2.xcodeproj/project.pbxproj:
35306        Add new files.
35307
35308        * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
35309        (WebKit::ViewGestureGeometryCollector::ViewGestureGeometryCollector):
35310        (WebKit::ViewGestureGeometryCollector::dispatchDidCollectGeometryForSmartMagnificationGesture):
35311        (WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
35312        (WebKit::ViewGestureGeometryCollector::collectGeometryForMagnificationGesture):
35313        Factor out code to send the geometry back to the UI process.
35314
35315        * WebProcess/WebPage/ViewGestureGeometryCollector.h:
35316        * WebProcess/WebPage/ViewGestureGeometryCollector.messages.in:
35317        * WebProcess/WebPage/WebPage.cpp:
35318        (WebKit::WebPage::WebPage):
35319        * WebProcess/WebPage/WebPage.h:
35320        We should have a ViewGestureGeometryCollector on iOS too.
35321
353222014-03-01  Zan Dobersek  <zdobersek@igalia.com>
35323
35324        Unreviewed follow-up to r164905 and r164912.
35325
35326        * Platform/IPC/Connection.h: Only declare setShouldCloseConnectionOnMachExceptions() for the Mac port.
35327        * UIProcess/Plugins/PluginProcessProxy.cpp:
35328        (WebKit::PluginProcessProxy::didFinishLaunching): Only call setShouldCloseConnectionOnMachExceptions() on the Mac port.
35329
353302014-03-01  Gavin Barraclough  <barraclough@apple.com>
35331
35332        Split UserActivity/CountedUserActivity
35333        https://bugs.webkit.org/show_bug.cgi?id=129520
35334
35335        Reviewed by Sam Weinig.
35336
35337        UserActivity currently provides an interface allowing counted, nested calls to enable/disable.
35338        In some cases it would be easier to use if it were a simpler boolean enabled/disabled interface.
35339
35340        * PluginProcess/PluginProcess.h:
35341        (WebKit::PluginProcess::connectionActivity):
35342            - UserActivity->CountedUserActivity
35343        * PluginProcess/mac/PluginProcessMac.mm:
35344        (WebKit::PluginProcess::platformInitializeProcess):
35345            - beginActivity->start
35346        * Shared/ActivityAssertion.cpp:
35347        (WebKit::ActivityAssertion::ActivityAssertion):
35348        (WebKit::ActivityAssertion::~ActivityAssertion):
35349            - beginActivity->increment, endActivity->decrement.
35350        * Shared/ActivityAssertion.h:
35351            - UserActivity->CountedUserActivity
35352        * Shared/ChildProcess.cpp:
35353        (WebKit::ChildProcess::setProcessSuppressionEnabled):
35354            - beginActivity->start, endActivity->stop.
35355        * Shared/ChildProcess.h:
35356            - removed processSuppressionEnabled()
35357        * WebProcess/WebPage/WebPage.cpp:
35358        (WebKit::WebPage::updatePreferences):
35359            - beginActivity->start, endActivity->stop.
35360
353612014-03-01  Csaba Osztrogonác  <ossy@webkit.org>
35362
35363        Unreviewed trivial Linux buildfix after r164905.
35364
35365        setShouldCloseConnectionOnMachExceptions() is defined in the Mac only
35366        Source/WebKit2/Platform/IPC/mac/ConnectionMac.cpp inside !PLATFORM(IOS)
35367        which means PLATFORM(MAC), because nobody else uses this source file.
35368
35369        But ChildProcessProxy.cpp is used by Linux ports too, so we have to
35370        use the most specific #if guard here, which is PLATFORM(MAC).
35371
35372        * Shared/ChildProcessProxy.cpp:
35373        (WebKit::ChildProcessProxy::didFinishLaunching):
35374
353752014-02-28  Simon Fraser  <simon.fraser@apple.com>
35376
35377        [iOS] Assertions and bad behavior when zooming into an iframe containing apple.com
35378        https://bugs.webkit.org/show_bug.cgi?id=129537
35379
35380        Reviewed by Benjamin Poulain.
35381        
35382        When building RemoteLayerTreeTransactions, the ordering of setting created
35383        layers and doing the recursive tree walk was wrong, such that we failed
35384        to noticed layers created during the recursiveBuildTransaction().
35385        
35386        Also harden the UI-side code against Obj-C exceptions thrown when layers
35387        are missing.
35388
35389        * Shared/mac/RemoteLayerTreePropertyApplier.mm:
35390        (WebKit::RemoteLayerTreePropertyApplier::applyProperties): Assert when 
35391        children are not found, and protect against Obj-C exceptions.
35392        * Shared/mac/RemoteLayerTreeTransaction.mm:
35393        (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties):
35394        Initialize the members.
35395        * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
35396        (WebKit::RemoteLayerTreeContext::buildTransaction): Do the recursive walk
35397        before setting created and destroyed layers, since the walk can create
35398        layers (especially when swapping into tiled layers).
35399
354002014-02-28  Jinwoo Song  <jinwoo7.song@samsung.com>
35401
35402        Fix WebKit2 build after r164890
35403        https://bugs.webkit.org/show_bug.cgi?id=129533
35404
35405        Reviewed by Simon Fraser.
35406
35407        LayerRepresentation.h is included to WebPageProxy.h in r164890
35408        but it is not used in non Mac or iOS port.
35409
35410        * UIProcess/WebPageProxy.h:
35411
354122014-02-28  Alexey Proskuryakov  <ap@apple.com>
35413
35414        [Mac] Extract _data->_thumbnailView checks into a helper function
35415        https://bugs.webkit.org/show_bug.cgi?id=129517
35416
35417        Reviewed by Sam Weinig.
35418
35419        * UIProcess/API/mac/WKView.mm:
35420        (-[WKView shouldIgnoreMouseEvents]):
35421        (-[WKView scrollWheel:]):
35422        (-[WKView mouseMoved:]):
35423        (-[WKView mouseDown:]):
35424        (-[WKView mouseUp:]):
35425        (-[WKView mouseDragged:]):
35426
354272014-02-28  Pratik Solanki  <psolanki@apple.com>
35428
35429        [iOS][WebKit2] Don't use any of the mach exception handling code on iOS
35430        https://bugs.webkit.org/show_bug.cgi?id=129516
35431
35432        Reviewed by Sam Weinig.
35433
35434        This code is not used on iOS after my fix in r164883. We can just move it all under
35435        !PLATFORM(IOS).
35436
35437        * Platform/IPC/Connection.h:
35438        * Platform/IPC/mac/ConnectionMac.cpp:
35439        (IPC::Connection::platformInvalidate):
35440        (IPC::Connection::platformInitialize):
35441        (IPC::Connection::open):
35442        * Shared/ChildProcessProxy.cpp:
35443        (WebKit::ChildProcessProxy::didFinishLaunching):
35444
354452014-02-28  Benjamin Poulain  <bpoulain@apple.com>
35446
35447        [iOS][WK2] highlight rects should never big bigger than the view
35448        https://bugs.webkit.org/show_bug.cgi?id=129472
35449        <rdar://problem/15673655>
35450
35451        Reviewed by Enrica Casucci.
35452
35453        The unobscuredRect on WebPageProxy is the "true" view rect as seen by the user.
35454        Use that to constrain our highlight rects.
35455
35456        * UIProcess/ios/WKContentViewInteraction.mm:
35457        (highlightedQuadsFitInRect):
35458        (-[WKContentView _didGetTapHighlightForRequest:color:WebCore::quads:WebCore::topLeftRadius:WebCore::topRightRadius:WebCore::bottomLeftRadius:WebCore::bottomRightRadius:WebCore::]):
35459
354602014-02-28  Simon Fraser  <simon.fraser@apple.com>
35461
35462        Make UIViews for compositing layers in the UI process on iOS
35463        https://bugs.webkit.org/show_bug.cgi?id=129508
35464
35465        Reviewed by Sam Weinig.
35466        
35467        In order to parent UIScrollViews for -webkit-overflow-scrolling:touch,
35468        we need to use UIViews in the compositing layer hierarchy on iOS.
35469        
35470        Make much of the code that currently uses CALayers layer-or-view
35471        agnostic by using a typedef LayerOrView.
35472        
35473        Fix RemoteLayerTreePropertyApplier to apply properties to UIViews
35474        or CALayers; on iOS, we need both paths because we have to set properties
35475        on CALayer for remotely hosted content.
35476        
35477        Add iOS-specific implementation files for RemoteLayerTreeHost and RemoteScrollingCoordinatorProxy,
35478        since these need to see the UIView implementation. WebVideoFullscreenManagerProxy.cpp also needs
35479        to be come a .mm file.
35480
35481        * Shared/mac/RemoteLayerTreePropertyApplier.h:
35482        * Shared/mac/RemoteLayerTreePropertyApplier.mm:
35483        (-[UIView setSubviews:]):
35484        (WebKit::applyPropertiesToLayer):
35485        (WebKit::RemoteLayerTreePropertyApplier::applyProperties):
35486        * UIProcess/Cocoa/LayerRepresentation.h: Copied from Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.h.
35487        (asLayer):
35488        * UIProcess/PageClient.h:
35489        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
35490        * UIProcess/WebPageProxy.h:
35491        * UIProcess/ios/LayerRepresentation.mm: Copied from Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.h.
35492        (asLayer):
35493        * UIProcess/ios/PageClientImplIOS.h:
35494        * UIProcess/ios/PageClientImplIOS.mm:
35495        (WebKit::PageClientImpl::setAcceleratedCompositingRootLayer):
35496        (WebKit::PageClientImpl::acceleratedCompositingRootLayer):
35497        * UIProcess/ios/RemoteLayerTreeHostIOS.mm: Added.
35498        (+[WKTransformView layerClass]):
35499        (-[WKRemoteView initWithFrame:contextID:]):
35500        (+[WKRemoteView layerClass]):
35501        (WebKit::RemoteLayerTreeHost::createLayer):
35502        * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm: Added.
35503        (WebKit::layerRepresentationFromLayerOrView):
35504        (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
35505        * UIProcess/ios/WKContentView.h:
35506        * UIProcess/ios/WKContentView.mm:
35507        (-[WKContentView _setAcceleratedCompositingRootView:]):
35508        * UIProcess/ios/WebPageProxyIOS.mm:
35509        (WebKit::WebPageProxy::setAcceleratedCompositingRootLayer):
35510        * UIProcess/ios/WebVideoFullscreenManagerProxy.mm: Renamed from Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.cpp.
35511        (WebKit::WebVideoFullscreenManagerProxy::create):
35512        (WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy):
35513        (WebKit::WebVideoFullscreenManagerProxy::~WebVideoFullscreenManagerProxy):
35514        (WebKit::WebVideoFullscreenManagerProxy::didCommitLayerTree):
35515        (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerID):
35516        (WebKit::WebVideoFullscreenManagerProxy::enterFullscreen):
35517        (WebKit::WebVideoFullscreenManagerProxy::requestExitFullScreen):
35518        (WebKit::WebVideoFullscreenManagerProxy::play):
35519        (WebKit::WebVideoFullscreenManagerProxy::pause):
35520        (WebKit::WebVideoFullscreenManagerProxy::togglePlayState):
35521        (WebKit::WebVideoFullscreenManagerProxy::seekToTime):
35522        (WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen):
35523        * UIProcess/mac/PageClientImpl.h:
35524        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
35525        (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
35526        (WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
35527        * UIProcess/mac/RemoteLayerTreeHost.h:
35528        (WebKit::RemoteLayerTreeHost::rootLayer):
35529        * UIProcess/mac/RemoteLayerTreeHost.mm:
35530        (WebKit::RemoteLayerTreeHost::updateLayerTree):
35531        (WebKit::RemoteLayerTreeHost::getLayer):
35532        (WebKit::RemoteLayerTreeHost::createLayer):
35533        * UIProcess/mac/WebPageProxyMac.mm:
35534        (WebKit::WebPageProxy::setAcceleratedCompositingRootLayer):
35535        (WebKit::WebPageProxy::acceleratedCompositingRootLayer):
35536        * WebKit2.xcodeproj/project.pbxproj:
35537        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
35538        (PlatformCALayerRemote::recursiveBuildTransaction):
35539
355402014-02-28  Anders Carlsson  <andersca@apple.com>
35541
35542        WebKit2.TerminateTwice test is failing.
35543
35544        * UIProcess/WebPageProxy.cpp:
35545        (WebKit::WebPageProxy::resetStateAfterProcessExited):
35546        Turns out this can be called even when we're in the launching state so don't try to
35547        remove the process from the visited link provider when in that state.
35548
355492014-02-28  Chris Fleizach  <cfleizach@apple.com>
35550
35551        AX: Crash in WebKit::WebPageProxy::registerWebProcessAccessibilityToken
35552        https://bugs.webkit.org/show_bug.cgi?id=127387
35553
35554        Reviewed by Alexey Proskuryakov.
35555
35556        Speculative fix for crasher. We should check if the connection is still valid before proceeding.
35557
35558        * UIProcess/mac/WebPageProxyMac.mm:
35559        (WebKit::WebPageProxy::registerWebProcessAccessibilityToken):
35560
355612014-02-28  Timothy Hatcher  <timothy@apple.com>
35562
35563        Properly handle when Test.html is not present in Production builds.
35564
35565        https://bugs.webkit.org/show_bug.cgi?id=129506
35566
35567        Reviewed by Joseph Pecoraro.
35568
35569        * UIProcess/WebInspectorProxy.cpp:
35570        (WebKit::isMainOrTestInspectorPage):
35571        * UIProcess/mac/WebInspectorProxyMac.mm:
35572        (WebKit::WebInspectorProxy::inspectorTestPageURL):
35573
355742014-02-28  Pratik Solanki  <psolanki@apple.com>
35575
35576        [iOS][WebKit2] Don't grab mach exception port on iOS
35577        https://bugs.webkit.org/show_bug.cgi?id=129505
35578        <rdar://problem/15972749>
35579
35580        Reviewed by Anders Carlsson.
35581
35582        Don't grab the mach exception port on iOS so we get crash logs for web process and network
35583        process.
35584
35585        * Shared/ChildProcessProxy.cpp:
35586        (WebKit::ChildProcessProxy::didFinishLaunching):
35587
355882014-02-28  Brent Fulgham  <bfulgham@apple.com>
35589
35590        Unreviewed build fix after r164832.
35591
35592        * UIProcess/ios/WebProcessProxyIOS.mm:
35593        (WebKit::WebProcessProxy::updateProcessState): Switch from removed
35594        'isValid' to 'state() != State::Running'
35595
355962014-02-28  Anders Carlsson  <andersca@apple.com>
35597
35598        VisitedLinkProvider should keep track of processes, not pages
35599        https://bugs.webkit.org/show_bug.cgi?id=129497
35600
35601        Reviewed by Dan Bernstein.
35602
35603        Use a counted set of WebProcessProxy pointers instead of a set of pages.
35604
35605        * UIProcess/VisitedLinkProvider.cpp:
35606        (WebKit::VisitedLinkProvider::~VisitedLinkProvider):
35607        Assert that m_processes is null.
35608
35609        (WebKit::VisitedLinkProvider::addProcess):
35610        Add the process to the set.
35611
35612        (WebKit::VisitedLinkProvider::removeProcess):
35613        Remove the process from the set.
35614
35615        * UIProcess/VisitedLinkProvider.h:
35616        
35617        * UIProcess/WebPageProxy.cpp:
35618        (WebKit::WebPageProxy::WebPageProxy):
35619        If our process is currently running, add it to the visited link provider.
35620        Otherwise it will be added in connectionWillOpen.
35621
35622        (WebKit::WebPageProxy::close):
35623        If our process is running, remove it from the visited link provider. 
35624        Otherwise it's either crashed or not yet launched and will not have been added.
35625
35626        (WebKit::WebPageProxy::connectionWillOpen):
35627        Add the process to the visited link provider.
35628
35629        (WebKit::WebPageProxy::resetStateAfterProcessExited):
35630        Remove the process from the visited link provider.
35631
356322014-02-27  Alexey Proskuryakov  <ap@apple.com>
35633
35634        [Mac] Stop using some deprecated functions in WKView.mm
35635        https://bugs.webkit.org/show_bug.cgi?id=129455
35636
35637        Reviewed by Anders Carlsson.
35638
35639        * UIProcess/API/mac/WKView.mm:
35640        (-[WKView firstRectForCharacterRange:actualRange:]): Use convertRectToScreen,
35641        which is a replacement for convertBaseToScreen. Don't check for window being null,
35642        because isn't that crazy talk?
35643        (-[WKView _postFakeMouseMovedEventForFlagsChangedEvent:]): Use event's location
35644        in window instead of current mouse location. Using location that is not synced to
35645        event stream rarely makes sense, and it doesn't look like this is one of those cases.
35646        (-[WKView performDictionaryLookupAtCurrentMouseLocation]): Ditto.
35647
356482014-02-27  Jaehun Lim  <ljaehun.lim@samsung.com>
35649
35650        Unreviewed. Fix build after r164832
35651
35652        * UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp:
35653        (WebKit::CoordinatedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState):
35654
356552014-02-27  Martin Robinson  <mrobinson@igalia.com>
35656
35657        Fix build after r164832
35658
35659        * UIProcess/DrawingAreaProxyImpl.cpp:
35660        (WebKit::DrawingAreaProxyImpl::waitForAndDispatchDidUpdateBackingStoreState): WebProcessProxy::isLaunching() has been replaced
35661        by WebProcessProxy::state().
35662
356632014-02-27  Tim Horton  <timothy_horton@apple.com>
35664
35665        Crash in RemoteLayerTreePropertyApplier::applyPropertiesToLayer
35666        https://bugs.webkit.org/show_bug.cgi?id=129456
35667        <rdar://problem/16182676>
35668
35669        Reviewed by Simon Fraser.
35670
35671        * Shared/mac/RemoteLayerTreePropertyApplier.mm:
35672        (WebKit::RemoteLayerTreePropertyApplier::applyPropertiesToLayer):
35673        We were dereferencing the RemoteLayerBackingStore without checking if it exists,
35674        in the accelerated drawing codepath. This case will occur if a layer
35675        previously drew contents, but now does not.
35676
356772014-02-27  Anders Carlsson  <andersca@apple.com>
35678
35679        Simplify WebProcessProxy state accessors
35680        https://bugs.webkit.org/show_bug.cgi?id=129453
35681
35682        Reviewed by Andreas Kling.
35683
35684        Replace WebProcessProxy::isLaunching() and WebProcessProxy::isValid() with a single
35685        WebProcessProxy::state() that return one of three values: Launching, Running or Terminated.
35686
35687        * Shared/ChildProcessProxy.cpp:
35688        (WebKit::ChildProcessProxy::state):
35689        (WebKit::ChildProcessProxy::sendMessage):
35690        (WebKit::ChildProcessProxy::abortProcessLaunchIfNeeded):
35691        * Shared/ChildProcessProxy.h:
35692        (WebKit::ChildProcessProxy::canSendMessage):
35693        * UIProcess/Databases/DatabaseProcessProxy.cpp:
35694        (WebKit::DatabaseProcessProxy::getDatabaseProcessConnection):
35695        * UIProcess/Network/NetworkProcessProxy.cpp:
35696        (WebKit::NetworkProcessProxy::getNetworkProcessConnection):
35697        * UIProcess/Network/mac/NetworkProcessProxyMac.mm:
35698        (WebKit::NetworkProcessProxy::setProcessSuppressionEnabled):
35699        * UIProcess/Plugins/PluginProcessProxy.cpp:
35700        (WebKit::PluginProcessProxy::getPluginProcessConnection):
35701        (WebKit::PluginProcessProxy::getSitesWithData):
35702        (WebKit::PluginProcessProxy::clearSiteData):
35703        * UIProcess/WebPageProxy.cpp:
35704        (WebKit::WebPageProxy::WebPageProxy):
35705        (WebKit::WebPageProxy::reattachToWebProcess):
35706        (WebKit::WebPageProxy::waitForDidUpdateViewState):
35707        * UIProcess/WebProcessProxy.cpp:
35708        (WebKit::WebProcessProxy::requestTermination):
35709        (WebKit::WebProcessProxy::enableSuddenTermination):
35710        (WebKit::WebProcessProxy::disableSuddenTermination):
35711        * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
35712        (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
35713        * UIProcess/mac/WebPageProxyMac.mm:
35714        (WebKit::WebPageProxy::shouldDelayWindowOrderingForEvent):
35715        * UIProcess/mac/WebProcessProxyMac.mm:
35716        (WebKit::WebProcessProxy::updateProcessSuppressionState):
35717
357182014-02-27  Simon Fraser  <simon.fraser@apple.com>
35719
35720        Crash tapping on play button on video on iOS
35721        https://bugs.webkit.org/show_bug.cgi?id=129452
35722
35723        Reviewed by Benjamin Poulain.
35724        
35725        node->computedStyle() can return null. Just use
35726        renderer->style() to get the tap highlight color.
35727
35728        * WebProcess/WebPage/ios/WebPageIOS.mm:
35729        (WebKit::WebPage::tapHighlightAtPosition):
35730
357312014-02-27  Brian Burg  <bburg@apple.com>
35732
35733        Web Inspector: model tests should use a special Test.html inspector page
35734        https://bugs.webkit.org/show_bug.cgi?id=129190
35735
35736        Reviewed by Timothy Hatcher.
35737
35738        Support creating a separate test inspector page, based on the value of
35739        InspectorController::isUnderTest(). Add this as a separate API call for
35740        WebInspectorProxy. Modify the navigation policy to check the URL against
35741        both normal and test inspector pages.
35742
35743        * UIProcess/WebInspectorProxy.cpp:
35744        (WebKit::isMainOrTestInspectorPage):
35745        (WebKit::decidePolicyForNavigationAction):
35746        (WebKit::WebInspectorProxy::createInspectorPageForTest):
35747        * UIProcess/WebInspectorProxy.h:
35748        * UIProcess/WebInspectorProxy.messages.in:
35749        * UIProcess/efl/WebInspectorProxyEfl.cpp:
35750        (WebKit::WebInspectorProxy::inspectorTestPageURL):
35751        * UIProcess/gtk/WebInspectorProxyGtk.cpp:
35752        (WebKit::WebInspectorProxy::inspectorTestPageURL):
35753        * UIProcess/ios/WebInspectorProxyIOS.mm:
35754        (WebKit::WebInspectorProxy::inspectorTestPageURL):
35755        * UIProcess/mac/WebInspectorProxyMac.mm:
35756        (WebKit::WebInspectorProxy::inspectorTestPageURL):
35757        * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
35758        (WebKit::WebInspectorClient::openInspectorFrontend):
35759        * WebProcess/WebPage/WebInspector.cpp: Some drive-by nullptr refactorings.
35760        (WebKit::WebInspector::WebInspector):
35761        (WebKit::WebInspector::createInspectorPage):
35762        (WebKit::WebInspector::createInspectorPageForTest):
35763        (WebKit::WebInspector::destroyInspectorPage):
35764        * WebProcess/WebPage/WebInspector.h:
35765
357662014-02-27  Anders Carlsson  <andersca@apple.com>
35767
35768        Make WebProcessProxy::pages() return an IteratorRange
35769        https://bugs.webkit.org/show_bug.cgi?id=129440
35770
35771        Reviewed by Dan Bernstein.
35772
35773        * UIProcess/API/C/WKPage.cpp:
35774        (WKPageCopyRelatedPages):
35775        Move the implementation of WebPageProxy::relatedPages here.
35776
35777        * UIProcess/WebContext.cpp:
35778        (WebKit::WebContext::createNewWebProcessRespectingProcessCountLimit):
35779        Use std::min_element here instead of a manual loop.
35780
35781        * UIProcess/WebPageProxy.cpp:
35782        Remove WebPageProxy::relatedPages().
35783
35784        * UIProcess/WebProcessProxy.cpp:
35785        Remove WebProcessProxy::pages().
35786
35787        * UIProcess/WebProcessProxy.h:
35788        (WebKit::WebProcessProxy::pages):
35789        Make this return an IteratorRange.
35790
35791        (WebKit::WebProcessProxy::pageCount):
35792        New function that returns the page count.
35793
357942014-02-27  Alexey Proskuryakov  <ap@apple.com>
35795
35796        [Mac][WK2] Remove hardcoded Cmd+B and Cmd+I from WKView.mm
35797        https://bugs.webkit.org/show_bug.cgi?id=129436
35798
35799        Reviewed by Darin Adler.
35800
35801        * UIProcess/API/mac/WKView.mm: Removed a historic WebKit1 behavior that we don't
35802        need to preserve in WebKit2.
35803
358042014-02-27  Alexey Proskuryakov  <ap@apple.com>
35805
35806        [Mac] Remove unused SPI declarations from WKView.mm
35807        https://bugs.webkit.org/show_bug.cgi?id=129434
35808
35809        Reviewed by Sam Weinig.
35810
35811        * UIProcess/API/mac/WKView.mm:
35812
358132014-02-26  Michael Saboff  <msaboff@apple.com>
35814
35815        Auto generate bytecode information for bytecode parser and LLInt
35816        https://bugs.webkit.org/show_bug.cgi?id=129181
35817
35818        Reviewed by Mark Lam.
35819
35820        Added ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR} to WebKit2_INCLUDE_DIRECTORIES due to new
35821        generated Bytecodes.h include file.
35822
35823        * CMakeLists.txt:
35824
358252014-02-27  Anders Carlsson  <andersca@apple.com>
35826
35827        Look up already existing VisitedLinkTableController objects by identifier
35828        https://bugs.webkit.org/show_bug.cgi?id=129431
35829
35830        Reviewed by Dan Bernstein.
35831
35832        * WebProcess/WebPage/VisitedLinkTableController.cpp:
35833        (WebKit::visitedLinkTableControllers):
35834        (WebKit::VisitedLinkTableController::getOrCreate):
35835        (WebKit::VisitedLinkTableController::VisitedLinkTableController):
35836        (WebKit::VisitedLinkTableController::~VisitedLinkTableController):
35837        * WebProcess/WebPage/VisitedLinkTableController.h:
35838        * WebProcess/WebPage/WebPage.cpp:
35839        (WebKit::WebPage::WebPage):
35840
358412014-02-27  Carlos Garcia Campos  <cgarcia@igalia.com>
35842
35843        [GTK][WK2] Blocks when fetching plugins information
35844        https://bugs.webkit.org/show_bug.cgi?id=115650
35845
35846        Reviewed by Gustavo Noronha Silva.
35847
35848        Use a persistent cache to store the plugins metadata to avoid
35849        having to load all the plugins everytime a plugin is used for the
35850        first time.
35851
35852        * GNUmakefile.am:
35853        * GNUmakefile.list.am:
35854        * PlatformGTK.cmake:
35855        * Shared/Plugins/Netscape/NetscapePluginModule.h:
35856        * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
35857        (WebKit::NetscapePluginModule::parseMIMEDescription): Make this
35858        method public.
35859        (WebKit::NetscapePluginModule::buildMIMEDescription): Added this
35860        helper to build the MIME description string.
35861        * UIProcess/Plugins/gtk/PluginInfoCache.cpp: Added.
35862        (WebKit::PluginInfoCache::shared):
35863        (WebKit::PluginInfoCache::PluginInfoCache):
35864        (WebKit::PluginInfoCache::~PluginInfoCache):
35865        (WebKit::PluginInfoCache::saveToFileIdleCallback):
35866        (WebKit::PluginInfoCache::saveToFile):
35867        (WebKit::PluginInfoCache::getPluginInfo):
35868        (WebKit::PluginInfoCache::updatePluginInfo):
35869        * UIProcess/Plugins/gtk/PluginInfoCache.h: Added.
35870        * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
35871        (WebKit::PluginInfoStore::getPluginInfo): Check first if we have
35872        metadata of the plugin in the cache and update the cache if we
35873        loaded the plugin to get its metadata.
35874
358752014-02-27  Ryan Lortie  <desrt@desrt.ca>
35876
35877        need to #include <libgen.h> for basename
35878        https://bugs.webkit.org/show_bug.cgi?id=128597
35879
35880        Reviewed by Carlos Garcia Campos.
35881
35882        * PluginProcess/unix/PluginProcessMainUnix.cpp: include <libgen.h> as required by POSIX for basename
35883
358842014-02-27  Carlos Garcia Campos  <cgarcia@igalia.com>
35885
35886        [GTK] Web Inspector doesn't work with network process enabled
35887        https://bugs.webkit.org/show_bug.cgi?id=127651
35888
35889        Reviewed by Sergio Villar Senin.
35890
35891        The problem is that the web inspector loads so many resources,
35892        that when using the network process, a lot of IPC traffic is
35893        generated causing the send buffer of the socket to be full. When
35894        that happens sendmsg() fails with EAGAIN, because we are using non
35895        blocking sockets, and we are not handling neither EAGAIN nor
35896        EWOULDBLOCK errors (we do when reading from the socket, though).
35897
35898        * Platform/IPC/unix/ConnectionUnix.cpp:
35899        (IPC::Connection::readyReadHandler): Add a log message to know
35900        when reading from the socket fails for any unhandled error.
35901        (IPC::Connection::sendOutgoingMessage): Handle EAGAIN and
35902        EWOULDBLOCK errors to try again in those cases. Also add a log
35903        message for unhandled errors.
35904
359052014-02-26  Philippe Normand  <pnormand@igalia.com>
35906
35907        Unreviewed GTK build fix after r164751.
35908
35909        * GNUmakefile.list.am:
35910
359112014-02-26  Dan Bernstein  <mitz@apple.com>
35912
35913        iOS build fix.
35914
35915        * UIProcess/ios/forms/WKFormPopover.h:
35916        * UIProcess/ios/forms/WKFormPopover.mm:
35917
359182014-02-26  Dan Bernstein  <mitz@apple.com>
35919
35920        Replaced use of the EXCLUDED_SOURCE_FILE_NAMES build setting with #if PLATFORM(…) guards in
35921        the files themselves.
35922
35923        Rubber-stamped by Sam Weinig.
35924
35925        * Configurations/WebKit2.xcconfig: Cleared out EXCLUDED_SOURCE_FILE_NAMES_macosx, and left
35926        EXCLUDED_SOURCE_FILE_NAMES_iphoneos containing just the names of resources the should be
35927        excluded from Copy Files build phases.
35928        * NetworkProcess/ios/NetworkProcessIOS.mm:
35929        * NetworkProcess/mac/NetworkProcessMac.mm:
35930        * Shared/Downloads/ios/DownloadIOS.mm:
35931        * Shared/Downloads/mac/DownloadMac.mm:
35932        * Shared/NativeWebTouchEvent.h:
35933        * Shared/WebPlatformTouchPoint.cpp:
35934        * Shared/WebTouchEvent.cpp:
35935        * Shared/ios/NativeWebKeyboardEventIOS.mm:
35936        * Shared/ios/NativeWebTouchEventIOS.mm:
35937        * Shared/ios/WebIOSEventFactory.h:
35938        * Shared/ios/WebIOSEventFactory.mm:
35939        * Shared/mac/PasteboardTypes.h:
35940        * Shared/mac/PasteboardTypes.mm:
35941        * Shared/mac/PrintInfoMac.mm:
35942        * UIProcess/API/C/WKInspector.cpp:
35943        * UIProcess/API/Cocoa/WKThumbnailView.h:
35944        * UIProcess/API/Cocoa/WKThumbnailView.mm:
35945        * UIProcess/API/Cocoa/WKThumbnailViewInternal.h:
35946        * UIProcess/API/ios/WKViewIOS.mm:
35947        * UIProcess/API/mac/WKView.mm:
35948        * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
35949        * UIProcess/ios/PageClientImplIOS.h:
35950        * UIProcess/ios/PageClientImplIOS.mm:
35951        * UIProcess/ios/TextCheckerIOS.mm:
35952        * UIProcess/ios/ViewGestureControllerIOS.mm:
35953        * UIProcess/ios/WKActionSheet.h:
35954        * UIProcess/ios/WKActionSheet.mm:
35955        * UIProcess/ios/WKActionSheetAssistant.h:
35956        * UIProcess/ios/WKActionSheetAssistant.mm:
35957        * UIProcess/ios/WKContentView.mm:
35958        * UIProcess/ios/WKContentViewInteraction.h:
35959        * UIProcess/ios/WKContentViewInteraction.mm:
35960        * UIProcess/ios/WKGeolocationProviderIOS.h:
35961        * UIProcess/ios/WKGeolocationProviderIOS.mm:
35962        * UIProcess/ios/WKGeolocationProviderIOSObjCSecurityOrigin.mm:
35963        * UIProcess/ios/WKScrollView.h:
35964        * UIProcess/ios/WKScrollView.mm:
35965        * UIProcess/ios/WebInspectorProxyIOS.mm:
35966        * UIProcess/ios/WebPageProxyIOS.mm:
35967        * UIProcess/ios/WebProcessProxyIOS.mm:
35968        * UIProcess/ios/forms/WKFormInputControl.h:
35969        * UIProcess/ios/forms/WKFormInputControl.mm:
35970        * UIProcess/ios/forms/WKFormPopover.h:
35971        * UIProcess/ios/forms/WKFormPopover.mm:
35972        * UIProcess/mac/FindIndicatorWindow.h:
35973        * UIProcess/mac/FindIndicatorWindow.mm:
35974        * UIProcess/mac/PageClientImpl.h:
35975        * UIProcess/mac/PageClientImpl.mm:
35976        * UIProcess/mac/TextCheckerMac.mm:
35977        * UIProcess/mac/WKFullKeyboardAccessWatcher.h:
35978        * UIProcess/mac/WKFullKeyboardAccessWatcher.mm:
35979        * UIProcess/mac/WKPrintingView.h:
35980        * UIProcess/mac/WKPrintingView.mm:
35981        * UIProcess/mac/WebContextMenuProxyMac.h:
35982        * UIProcess/mac/WebContextMenuProxyMac.mm:
35983        * UIProcess/mac/WebInspectorProxyMac.mm:
35984        * UIProcess/mac/WebPageProxyMac.mm:
35985        * UIProcess/mac/WebProcessProxyMac.mm:
35986        * WebProcess/WebCoreSupport/WebChromeClient.h:
35987        * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
35988        * WebProcess/WebCoreSupport/ios/WebDatabaseManagerIOS.mm:
35989        * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
35990        * WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
35991        * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
35992        * WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm:
35993        * WebProcess/WebPage/ios/WebPageIOS.mm:
35994        * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.h:
35995        * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
35996        * WebProcess/WebPage/mac/WebPageMac.mm:
35997
359982014-02-26  Anders Carlsson  <andersca@apple.com>
35999
36000        VisitedLinkProvider should know which pages it belongs to
36001        https://bugs.webkit.org/show_bug.cgi?id=129410
36002
36003        Reviewed by Dan Bernstein.
36004
36005        * UIProcess/VisitedLinkProvider.cpp:
36006        (WebKit::VisitedLinkProvider::~VisitedLinkProvider):
36007        (WebKit::VisitedLinkProvider::addPage):
36008        (WebKit::VisitedLinkProvider::removePage):
36009        * UIProcess/VisitedLinkProvider.h:
36010        * UIProcess/WebPageProxy.cpp:
36011        (WebKit::WebPageProxy::WebPageProxy):
36012        (WebKit::WebPageProxy::close):
36013
360142014-02-26  Enrica Casucci  <enrica@apple.com>
36015
36016        Build fix.
36017
36018        Unexpected line break.
36019
36020        * Configurations/WebKit2.xcconfig:
36021
360222014-02-26  Enrica Casucci  <enrica@apple.com>
36023
36024        Build fix.
36025
36026        WKFormInputControl.mm and WKFormPopover.mm should be excluded from OS X builds.
36027
36028        * Configurations/WebKit2.xcconfig:
36029
360302014-02-26  Enrica Casucci  <enrica@apple.com>
36031
36032        [iOS WebKit2] Form controls handling: implement date and time controls.
36033        https://bugs.webkit.org/show_bug.cgi?id=129344
36034
36035        Reviewed by Simon Fraser and Joseph Pecoraro.
36036
36037        This is another step in the implementation of form controls on iOS
36038        for WebKit2. This adds support for date and time input elements supporting
36039        the different look and feel for iPhone and iPad.
36040        WKDateTimePicker implements iPhone UI and
36041        WKDateTimePopover implements iPad UI.
36042        WKFormRotatingAccessoryPopover and WKRotatingPopover are
36043        classes that implement the popover object handling the rotation
36044        and they will be used as base class for the select controls as well.
36045
36046        * UIProcess/WebPageProxy.h:
36047        * UIProcess/ios/WKContentViewInteraction.h:
36048        * UIProcess/ios/WKContentViewInteraction.mm:
36049        (-[WKContentView _displayFormNodeInputView]):
36050        (-[WKContentView inputView]):
36051        (-[WKContentView _startAssistingNode:]):
36052        (-[WKContentView _stopAssistingNode]):
36053        * UIProcess/ios/WKFormInputControl.h: Added.
36054        * UIProcess/ios/WKFormInputControl.mm: Added.
36055        (-[WKDateTimePicker datePicker]):
36056        (-[WKDateTimePicker initWithView:datePickerMode:]):
36057        (-[WKDateTimePicker dealloc]):
36058        (-[WKDateTimePicker controlView]):
36059        (-[WKDateTimePicker _timeZoneOffsetFromGMT:]):
36060        (-[WKDateTimePicker _sanitizeInputValueForFormatter:]):
36061        (-[WKDateTimePicker _dateChangedSetAsNumber]):
36062        (-[WKDateTimePicker _dateChangedSetAsString]):
36063        (-[WKDateTimePicker _dateChanged]):
36064        (-[WKDateTimePicker _dateChangeHandler:]):
36065        (-[WKDateTimePicker controlBeginEditing]):
36066        (-[WKDateTimePicker controlEndEditing]):
36067        (-[WKFormInputControl initWithView:]):
36068        (+[WKFormInputControl createPeripheralWithView:]):
36069        (-[WKFormInputControl beginEditing]):
36070        (-[WKFormInputControl endEditing]):
36071        (-[WKFormInputControl assistantView]):
36072        (-[WKDateTimePopoverViewController initWithView:datePickerMode:]):
36073        (-[WKDateTimePopoverViewController innerControl]):
36074        (-[WKDateTimePopoverViewController loadView]):
36075        (-[WKDateTimePopover clear:]):
36076        (-[WKDateTimePopover initWithView:datePickerMode:]):
36077        (-[WKDateTimePopover viewController]):
36078        (-[WKDateTimePopover controlBeginEditing]):
36079        (-[WKDateTimePopover controlEndEditing]):
36080        (-[WKDateTimePopover controlView]):
36081        * UIProcess/ios/WKFormPeripheral.h: Added.
36082        * UIProcess/ios/WKFormPopover.h: Added.
36083        * UIProcess/ios/WKFormPopover.mm: Added.
36084        (-[WKFormRotatingAccessoryPopover initWithView:]):
36085        (-[WKFormRotatingAccessoryPopover accessoryDone]):
36086        (-[WKFormRotatingAccessoryPopover popoverArrowDirections]):
36087        (-[WKFormRotatingAccessoryPopover popoverWasDismissed:]):
36088        (-[WKRotatingPopover initWithView:]):
36089        (-[WKRotatingPopover dealloc]):
36090        (-[WKRotatingPopover popoverController]):
36091        (-[WKRotatingPopover setPopoverController:]):
36092        (-[WKRotatingPopover popoverArrowDirections]):
36093        (-[WKRotatingPopover presentPopoverAnimated:]):
36094        (-[WKRotatingPopover dismissPopoverAnimated:]):
36095        (-[WKRotatingPopover willRotate:]):
36096        (-[WKRotatingPopover didRotate:]):
36097        (-[WKRotatingPopover popoverControllerDidDismissPopover:]):
36098        * UIProcess/ios/WKFormSelectControl.h: Added.
36099        * UIProcess/ios/WebPageProxyIOS.mm:
36100        (WebKit::WebPageProxy::setAssistedNodeValue):
36101        (WebKit::WebPageProxy::setAssistedNodeValueAsNumber):
36102        * WebKit2.xcodeproj/project.pbxproj:
36103        * WebProcess/WebPage/WebPage.h:
36104        * WebProcess/WebPage/WebPage.messages.in:
36105        * WebProcess/WebPage/ios/WebPageIOS.mm:
36106        (WebKit::WebPage::setAssistedNodeValue):
36107        (WebKit::WebPage::setAssistedNodeValueAsNumber):
36108
361092014-02-26  Pratik Solanki  <psolanki@apple.com>
36110
36111        [iOS][Webkit2] Enable codesigning entitlement for web process
36112        https://bugs.webkit.org/show_bug.cgi?id=129401
36113        <rdar://problem/16173873>
36114
36115        Reviewed by Geoffrey Garen.
36116
36117        * Configurations/WebContent-iOS.entitlements:
36118
361192014-02-26  Anders Carlsson  <andersca@apple.com>
36120
36121        Give VisitedLinkProviders an identifier and send them to the web process
36122        https://bugs.webkit.org/show_bug.cgi?id=129400
36123
36124        Reviewed by Dan Bernstein.
36125
36126        * Shared/WebPageCreationParameters.cpp:
36127        (WebKit::WebPageCreationParameters::encode):
36128        (WebKit::WebPageCreationParameters::decode):
36129        * Shared/WebPageCreationParameters.h:
36130        * UIProcess/API/Cocoa/WKVisitedLinkProviderInternal.h:
36131        * UIProcess/VisitedLinkProvider.cpp:
36132        (WebKit::generateIdentifier):
36133        (WebKit::VisitedLinkProvider::VisitedLinkProvider):
36134        * UIProcess/VisitedLinkProvider.h:
36135        (WebKit::VisitedLinkProvider::identifier):
36136        * UIProcess/WebContext.cpp:
36137        (WebKit::WebContext::createWebPage):
36138        * UIProcess/WebPageProxy.cpp:
36139        (WebKit::WebPageProxy::WebPageProxy):
36140        (WebKit::WebPageProxy::internalShowContextMenu):
36141        * UIProcess/WebPageProxy.h:
36142
361432014-02-26  Jinwoo Song  <jinwoo7.song@samsung.com>
36144
36145        Unreviewed CMAKE build fix after r164751.
36146
36147        * CMakeLists.txt: Renamed WebVisitedLinkProvider.cpp to VisitedLinkTableController.cpp.
36148
361492014-02-26  Anders Carlsson  <andersca@apple.com>
36150
36151        Rename WebVisitedLinkProvider to VisitedLinkTableController
36152        https://bugs.webkit.org/show_bug.cgi?id=129396
36153
36154        Reviewed by Dan Bernstein.
36155
36156        * WebKit2.xcodeproj/project.pbxproj:
36157        * WebProcess/WebPage/VisitedLinkTableController.cpp: Renamed from Source/WebKit2/WebProcess/WebPage/WebVisitedLinkProvider.cpp.
36158        (WebKit::VisitedLinkTableController::create):
36159        (WebKit::VisitedLinkTableController::VisitedLinkTableController):
36160        (WebKit::VisitedLinkTableController::~VisitedLinkTableController):
36161        (WebKit::VisitedLinkTableController::isLinkVisited):
36162        (WebKit::VisitedLinkTableController::addVisitedLink):
36163        * WebProcess/WebPage/VisitedLinkTableController.h: Renamed from Source/WebKit2/WebProcess/WebPage/WebVisitedLinkProvider.h.
36164        * WebProcess/WebPage/WebPage.cpp:
36165        (WebKit::WebPage::WebPage):
36166
361672014-02-26  Enrica Casucci  <enrica@apple.com>
36168
36169        Keyboard keeps showing up when clicking links after being shown once.
36170        https://bugs.webkit.org/show_bug.cgi?id=129392
36171
36172        Reviewed by Benjamin Poulain.
36173
36174        This is a regression introduced by http://trac.webkit.org/changeset/164690.
36175        _requiresKeyboardWhenFirstResponder should always return NO, if there is
36176        no assisted node.
36177
36178        * UIProcess/ios/WKContentViewInteraction.mm:
36179        (-[WKContentView _requiresKeyboardWhenFirstResponder]):
36180
361812014-02-26  Myles C. Maxfield  <mmaxfield@apple.com>
36182
36183        WebProcessProxy::updateProcessState() is causing duplicate symbol linker errors
36184        https://bugs.webkit.org/show_bug.cgi?id=129390
36185
36186        Reviewed by Tim Horton.
36187
36188        Caused by r164737. WebProcessProxy::updateProcessState() is defined in a header, outside of
36189        a class, but isn't inlined.
36190
36191        * UIProcess/WebProcessProxy.h:
36192        (WebKit::WebProcessProxy::updateProcessState):
36193
361942014-02-26  Brian Burg  <bburg@apple.com>
36195
36196        Web Replay: route through UserInputBridge when delivering user inputs to WebCore
36197        https://bugs.webkit.org/show_bug.cgi?id=128150
36198
36199        Reviewed by Timothy Hatcher.
36200
36201        When delivering user inputs to WebCore, route calls through the page's UserInputBridge.
36202        This allows us to capture and replay user inputs from WebKit2 solely within WebCore.
36203
36204        * WebProcess/WebPage/WebPage.cpp:
36205        (WebKit::WebPage::tryClose):
36206        (WebKit::WebPage::loadRequest):
36207        (WebKit::WebPage::stopLoadingFrame):
36208        (WebKit::WebPage::stopLoading):
36209        (WebKit::WebPage::reload):
36210        (WebKit::WebPage::contextMenuAtPointInWindow):
36211        (WebKit::handleContextMenuEvent):
36212        (WebKit::handleMouseEvent):
36213        (WebKit::handleWheelEvent):
36214        (WebKit::handleKeyEvent):
36215        (WebKit::WebPage::scroll):
36216        (WebKit::WebPage::logicalScroll):
36217
362182014-02-26  Pratik Solanki  <psolanki@apple.com>
36219
36220        [iOS][WebKit2] Adopt SPI for managing tabs
36221        https://bugs.webkit.org/show_bug.cgi?id=129188
36222        <rdar://problem/15939827>
36223
36224        Reviewed by Gavin Barraclough.
36225
36226        Call into assertions SPI to mark tabs as foreground and background.
36227
36228        * Configurations/WebKit2.xcconfig:
36229        * Platform/IPC/Connection.h:
36230        (IPC::Connection::xpcConnection): Expose the xpc_connection_t.
36231        * UIProcess/WebPageProxy.cpp:
36232        (WebKit::WebPageProxy::viewStateDidChange):
36233        * UIProcess/WebProcessProxy.cpp:
36234        (WebKit::WebProcessProxy::didFinishLaunching):
36235        * UIProcess/WebProcessProxy.h:
36236        (WebKit::WebProcessProxy::updateProcessState):
36237        * UIProcess/ios/WebProcessProxyIOS.mm:
36238        (WebKit::WebProcessProxy::updateProcessState): Added. This goes through the list of
36239        WebPageProxies and sets the process state to foreground if one of them is in a window.
36240        Otherwise, it sets it to background.
36241
362422014-02-26  Commit Queue  <commit-queue@webkit.org>
36243
36244        Unreviewed, rolling out r164725 and r164731.
36245        http://trac.webkit.org/changeset/164725
36246        http://trac.webkit.org/changeset/164731
36247        https://bugs.webkit.org/show_bug.cgi?id=129382
36248
36249        WebKitTestRunner build is broken on IOS (Requested by smfr on
36250        #webkit).
36251
36252        * UIProcess/API/Cocoa/WKView.h:
36253        * UIProcess/API/ios/WKViewIOS.mm: Added.
36254        (-[WKView initWithCoder:]):
36255        (-[WKView initWithFrame:processGroup:browsingContextGroup:]):
36256        (-[WKView initWithFrame:processGroup:browsingContextGroup:relatedToView:]):
36257        (-[WKView dealloc]):
36258        (-[WKView setFrame:]):
36259        (-[WKView setBounds:]):
36260        (-[WKView scrollView]):
36261        (-[WKView browsingContextController]):
36262        (-[WKView setAllowsBackForwardNavigationGestures:]):
36263        (-[WKView allowsBackForwardNavigationGestures]):
36264        (-[WKView viewForZoomingInScrollView:]):
36265        (-[WKView scrollViewWillBeginZooming:withView:]):
36266        (-[WKView scrollViewWillBeginDragging:]):
36267        (-[WKView _didFinishScrolling]):
36268        (-[WKView scrollViewDidEndDragging:willDecelerate:]):
36269        (-[WKView scrollViewDidEndDecelerating:]):
36270        (-[WKView scrollViewDidScrollToTop:]):
36271        (-[WKView scrollViewDidScroll:]):
36272        (-[WKView scrollViewDidZoom:]):
36273        (-[WKView scrollViewDidEndZooming:withView:atScale:]):
36274        (-[WKView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
36275        (-[WKView _frameOrBoundsChanged]):
36276        (-[WKView _updateVisibleContentRects]):
36277        (-[WKView _keyboardChangedWithInfo:adjustScrollView:]):
36278        (-[WKView _keyboardWillChangeFrame:]):
36279        (-[WKView _keyboardDidChangeFrame:]):
36280        (-[WKView _keyboardWillShow:]):
36281        (-[WKView _keyboardWillHide:]):
36282        (-[WKView pageRef]):
36283        (-[WKView initWithFrame:contextRef:pageGroupRef:]):
36284        (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
36285        (-[WKView minimumLayoutSizeOverride]):
36286        (-[WKView setMinimumLayoutSizeOverride:]):
36287        (-[WKView _obscuredInsets]):
36288        (-[WKView _setObscuredInsets:]):
36289        (-[WKView _beginInteractiveObscuredInsetsChange]):
36290        (-[WKView _endInteractiveObscuredInsetsChange]):
36291        (-[WKView _pageExtendedBackgroundColor]):
36292        (-[WKView _setBackgroundExtendsBeyondPage:]):
36293        (-[WKView _backgroundExtendsBeyondPage]):
36294        * WebKit2.xcodeproj/project.pbxproj:
36295
362962014-02-26  Simon Fraser  <simon.fraser@apple.com>
36297
36298        Build fix: ContextMenuContextData.* should not be in the Copy Files
36299        phase.
36300
36301        * WebKit2.xcodeproj/project.pbxproj:
36302
363032014-02-26  Simon Fraser  <simon.fraser@apple.com>
36304
36305        Fix MiniBrowser/WebKitTestRunner link errors; WKView still
36306        needs to be exported while these tools are using it.
36307
36308        * UIProcess/API/Cocoa/WKView.h:
36309
363102014-02-26  Simon Fraser  <simon.fraser@apple.com>
36311
36312        Fix the iOS build by wrapping some context menu stuff in #if ENABLE(CONTEXT_MENUS)
36313
36314        * UIProcess/WebPageProxy.h:
36315
363162014-02-26  Martin Hock  <mhock@apple.com>
36317
36318        Create SessionID value-style class for session IDs.
36319        https://bugs.webkit.org/show_bug.cgi?id=129141
36320
36321        The below changes deal solely with mechanical changes to use the SessionID value class instead of uint64_t except where noted.
36322
36323        Reviewed by Sam Weinig.
36324
36325        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
36326        (WebKit::storageSession):
36327        (WebKit::NetworkConnectionToWebProcess::startDownload):
36328        (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
36329        (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
36330        (WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
36331        (WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
36332        (WebKit::NetworkConnectionToWebProcess::getRawCookies):
36333        (WebKit::NetworkConnectionToWebProcess::deleteCookie):
36334        * NetworkProcess/NetworkConnectionToWebProcess.h:
36335        * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
36336        * NetworkProcess/NetworkProcess.cpp:
36337        (WebKit::NetworkProcess::initializeNetworkProcess):
36338        (WebKit::NetworkProcess::ensurePrivateBrowsingSession):
36339        (WebKit::NetworkProcess::destroyPrivateBrowsingSession):
36340        * NetworkProcess/NetworkProcess.h:
36341        * NetworkProcess/NetworkProcess.messages.in:
36342        * NetworkProcess/NetworkResourceLoader.h:
36343        * NetworkProcess/RemoteNetworkingContext.h:
36344        * NetworkProcess/mac/RemoteNetworkingContext.mm:
36345        (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
36346        * NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:
36347        (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
36348        * Shared/Network/NetworkResourceLoadParameters.cpp:
36349        (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
36350        * Shared/Network/NetworkResourceLoadParameters.h:
36351        * Shared/SessionTracker.cpp:
36352        (WebKit::staticSessionMap):
36353        (WebKit::storageSessionToID):
36354        (WebKit::SessionTracker::sessionMap):
36355        (WebKit::SessionTracker::session):
36356        (WebKit::SessionTracker::sessionID):
36357        (WebKit::SessionTracker::setSession):
36358        (WebKit::SessionTracker::destroySession):
36359        * Shared/SessionTracker.h: Move code to SessionID class.
36360        * Shared/WebCoreArgumentCoders.cpp: Add encode and decode for SessionID.
36361        (IPC::ArgumentCoder<SessionID>::encode):
36362        (IPC::ArgumentCoder<SessionID>::decode):
36363        * Shared/WebCoreArgumentCoders.h:
36364        * Shared/mac/CookieStorageShim.mm:
36365        (WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL):
36366        * UIProcess/APISession.cpp:
36367        (API::generateID):
36368        (API::Session::defaultSession):
36369        (API::Session::legacyPrivateSession):
36370        (API::Session::Session):
36371        (API::Session::isEphemeral):
36372        (API::Session::getID):
36373        * UIProcess/APISession.h:
36374        * UIProcess/WebContext.cpp:
36375        (WebKit::WebContext::setAnyPageGroupMightHavePrivateBrowsingEnabled):
36376        (WebKit::WebContext::createNewWebProcess):
36377        * UIProcess/WebContext.h:
36378        * UIProcess/WebPageProxy.h:
36379        (WebKit::WebPageProxy::sessionID):
36380        * WebProcess/InjectedBundle/InjectedBundle.cpp:
36381        (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
36382        * WebProcess/Network/WebResourceLoadScheduler.cpp:
36383        (WebKit::WebResourceLoadScheduler::scheduleLoad):
36384        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
36385        (WebKit::WebPlatformStrategies::loadResourceSynchronously):
36386        * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
36387        * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
36388        (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
36389        (WebKit::WebFrameNetworkingContext::storageSession):
36390        * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
36391        (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
36392        (WebKit::WebFrameNetworkingContext::storageSession):
36393        * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
36394        * WebProcess/WebPage/WebPage.cpp: Move sessionID to Page to allow WebCore to access it.
36395        (WebKit::WebPage::WebPage):
36396        (WebKit::WebPage::sessionID):
36397        (WebKit::WebPage::isUsingEphemeralSession):
36398        (WebKit::WebPage::setSessionID):
36399        (WebKit::WebPage::updatePreferences):
36400        * WebProcess/WebPage/WebPage.h:
36401        * WebProcess/WebPage/WebPage.messages.in:
36402        * WebProcess/WebProcess.cpp:
36403        (WebKit::WebProcess::ensurePrivateBrowsingSession):
36404        (WebKit::WebProcess::destroyPrivateBrowsingSession):
36405        * WebProcess/WebProcess.h:
36406        * WebProcess/WebProcess.messages.in:
36407
364082014-02-26  Anders Carlsson  <andersca@apple.com>
36409
36410        Get rid of WKViewIOS.mm
36411        https://bugs.webkit.org/show_bug.cgi?id=129378
36412
36413        Reviewed by Simon Fraser.
36414
36415        * UIProcess/API/Cocoa/WKView.h:
36416        * UIProcess/API/ios/WKViewIOS.mm: Removed.
36417        * WebKit2.xcodeproj/project.pbxproj:
36418
364192014-02-26  Alexey Proskuryakov  <ap@apple.com>
36420
36421        [iOS] Remove some erroneously captured blocks
36422        https://bugs.webkit.org/show_bug.cgi?id=129362
36423
36424        Reviewed by Sam Weinig.
36425
36426        Remove unused captured Objective-C block variables (capturing these doesn't work anyway).
36427
36428        * UIProcess/ios/WKContentViewInteraction.mm:
36429        (-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
36430        (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
36431
364322014-02-26  Brady Eidson  <beidson@apple.com>
36433
36434        Pipe experimental image controls menu up to WebKit2
36435        https://bugs.webkit.org/show_bug.cgi?id=129339
36436
36437        Reviewed by Simon Fraser.
36438
36439        Add a WebKit object to represent the data from a ContextMenuContext object that can be shared via IPC:
36440        * Shared/ContextMenuContextData.cpp: Added.
36441        (WebKit::ContextMenuContextData::ContextMenuContextData):
36442        (WebKit::ContextMenuContextData::encode):
36443        (WebKit::ContextMenuContextData::decode):
36444        * Shared/ContextMenuContextData.h: Added.
36445        (WebKit::ContextMenuContextData::webHitTestResultData):
36446        (WebKit::ContextMenuContextData::isImageControl):
36447
36448        Update the rest of WK2 to use this object instead of WebHitTestResult::Data directly:
36449        * UIProcess/WebPageProxy.cpp:
36450        (WebKit::WebPageProxy::showContextMenu):
36451        (WebKit::WebPageProxy::internalShowContextMenu): Also make an ENABLE(IMAGE_CONTROLS) change here.
36452        * UIProcess/WebPageProxy.h:
36453        * UIProcess/WebPageProxy.messages.in:
36454
36455        * WebProcess/WebPage/WebContextMenu.cpp:
36456        (WebKit::WebContextMenu::show):
36457
36458        * CMakeLists.txt:
36459        * GNUmakefile.list.am:
36460        * WebKit2.xcodeproj/project.pbxproj:
36461
364622014-02-26  Enrique Ocaña González  <eocanha@igalia.com>
36463
36464        WebKitFindOptions shouldn't expose WEBKIT_FIND_OPTIONS_SHOW_{OVERLAY,FIND_INDICATOR,HIGHLIGHT}
36465        https://bugs.webkit.org/show_bug.cgi?id=129263
36466
36467        Reviewed by Sergio Villar Senin.
36468
36469        Avoided the need of WEBKIT_FIND_OPTIONS_SHOW_* fields by changing the semantics
36470        of the findOptions field in WebKitFindOptions.
36471
36472        * UIProcess/API/gtk/WebKitFindController.cpp: Now
36473        _WebKitFindControllerPrivate.findOptions is interpreted as WebKit::FindOptions
36474        instead of WebKitFindOptions like before. Now the conversion has to be done in
36475        both ways.
36476        (toWebKitFindOptions): Added conversion function from WebKit::FindOptions to
36477        WebKitFindOptions.
36478        (webkit_find_controller_get_options):
36479        (webKitFindControllerPerform):
36480        (webkit_find_controller_search):
36481        (webkit_find_controller_search_next):
36482        (webkit_find_controller_search_previous):
36483        (webkit_find_controller_count_matches):
36484        * UIProcess/API/gtk/WebKitFindController.h: Removed values that shouldn't be
36485        exposed.
36486
364872014-02-26  Gergo Balogh  <gbalogh.u-szeged@partner.samsung.com>
36488
36489        Inspector server should be enabled only when the web sockets is enabled too.
36490        https://bugs.webkit.org/show_bug.cgi?id=129304
36491
36492        Reviewed by Csaba Osztrogonác.
36493
36494        * config.h:
36495
364962014-02-26  Carlos Garcia Campos  <cgarcia@igalia.com>
36497
36498        Unreviewed. Fix GTK+ build after r164702.
36499
36500        * UIProcess/DrawingAreaProxy.cpp:
36501
365022014-02-26  Martin Robinson  <mrobinson@igalia.com>
36503
36504        [GTK] generate-gtkdoc can fail with WebKit1 or WebKit2 only builds
36505        https://bugs.webkit.org/show_bug.cgi?id=129319
36506
36507        Reviewed by Carlos Garcia Campos.
36508
36509        * GNUmakefile.am: Do not generate the documentation configuration file if the port
36510        is disabled.
36511
365122014-02-25  Benjamin Poulain  <bpoulain@apple.com>
36513
36514        [iOS][WK2] Split the rects/scale updates in 3 internally consistent groups
36515        https://bugs.webkit.org/show_bug.cgi?id=129354
36516
36517        Reviewed by Sam Weinig.
36518
36519        During scaling, the scale and rect of UIScrollView, WebPageProxy, DrawingAreaProxy,
36520        DrawingArea and WebPage were in completely inconsistent states.
36521
36522        Some of those disconnect were temporary (like when setting the rect and scale in two different
36523        messages), some were lasting the time of a tile update (like the UIProcess view of the scale).
36524        This was causing various visual glitches.
36525
36526        To fix this, all the updates from the UIProcess are funneled through a single path and the values
36527        are split into 3 different groups/types.
36528        When updating the scale/rects, the UIProcess sends the new information to the WebProcess on a queue
36529        through ViewUpdateDispatcher. There, the updates are accumulated until the MainThread is available.
36530        Once the main thread is "unblocked" from the previous frame, all the data are updated at once from
36531        the last known state in ViewUpdateDispatcher. The new tiles are created for the new converage information
36532        and they are sent to the UIProcess.
36533
36534        At any point, there are 3 types of scale and rects used for different purpose:
36535        -In the UIProcess, there is the UIScrollView scale and rects which represent the "true" state or what
36536         is currently on screen.
36537         That information is mirrored into WebPageProxy for the other classes needing it like DrawingAreaProxy.
36538        -In the WebProcess, there is the last known state. That state is always lagging a little behind the "true"
36539         state.
36540        -Back in the UIProcess, we have the tile states that is attached to RemoteLayerTreeTransaction. It is used
36541         to setup the rendering.
36542
36543        With this change, there are two paths for updating the page scale factor:
36544        -The UI drives the change, the updates goes WKWebView->WKContentView->WebPageProxy->ViewUpdateDispatcher
36545         ->WebPage->RemoteLayerTreeDrawingArea->RemoteLayerTreeDrawingAreaProxy->WKContentView->WKWebView.
36546        -If changes in the content force scaling parameters, the updates goes: WebPage->RemoteLayerTreeDrawingArea
36547         ->RemoteLayerTreeDrawingAreaProxy->WKContentView->WKWebView.
36548        The two kind of updates frequently conflicts during loading. We differentiate those through the flag
36549        scaleWasSetByUIProcess passed with the updates. In cases of conflicts, the user always wins.
36550
36551        * DerivedSources.make:
36552        * Scripts/webkit2/messages.py:
36553        (struct_or_class):
36554        * Shared/VisibleContentRectUpdateInfo.cpp: Added.
36555        (WebKit::VisibleContentRectUpdateInfo::encode):
36556        (WebKit::VisibleContentRectUpdateInfo::decode):
36557        * Shared/VisibleContentRectUpdateInfo.h: Added.
36558        (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
36559        (WebKit::VisibleContentRectUpdateInfo::exposedRect):
36560        (WebKit::VisibleContentRectUpdateInfo::unobscuredRect):
36561        (WebKit::VisibleContentRectUpdateInfo::scale):
36562        (WebKit::operator==):
36563        * Shared/mac/RemoteLayerTreeTransaction.h:
36564        (WebKit::RemoteLayerTreeTransaction::scaleWasSetByUIProcess):
36565        (WebKit::RemoteLayerTreeTransaction::setScaleWasSetByUIProcess):
36566        * Shared/mac/RemoteLayerTreeTransaction.mm:
36567        (WebKit::RemoteLayerTreeTransaction::encode):
36568        (WebKit::RemoteLayerTreeTransaction::decode):
36569        * UIProcess/API/Cocoa/WKWebView.mm:
36570        (-[WKWebView contentView:didCommitLayerTree:WebKit::]):
36571        (-[WKWebView _didFinishScrolling]):
36572        (-[WKWebView scrollViewDidScroll:]):
36573        (-[WKWebView scrollViewDidZoom:]):
36574        (-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
36575        (-[WKWebView _frameOrBoundsChanged]):
36576        (-[WKWebView _updateVisibleContentRectsWithStableState:]):
36577        (-[WKWebView _setObscuredInsets:]):
36578        (-[WKWebView _endInteractiveObscuredInsetsChange]):
36579        * UIProcess/API/ios/WKViewIOS.mm:
36580        (-[WKView _updateVisibleContentRects]):
36581        * UIProcess/DrawingAreaProxy.cpp:
36582        (WebKit::DrawingAreaProxy::DrawingAreaProxy):
36583        (WebKit::DrawingAreaProxy::setCustomFixedPositionRect):
36584        * UIProcess/DrawingAreaProxy.h:
36585        (WebKit::DrawingAreaProxy::updateDebugIndicator):
36586        * UIProcess/WebPageProxy.h:
36587        (WebKit::WebPageProxy::displayedContentScale):
36588        (WebKit::WebPageProxy::exposedContentRect):
36589        (WebKit::WebPageProxy::unobscuredContentRect):
36590        * UIProcess/ios/WKContentView.h:
36591        * UIProcess/ios/WKContentView.mm:
36592        (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
36593        (-[WKContentView didFinishScrolling]):
36594        (-[WKContentView didZoomToScale:]):
36595        * UIProcess/ios/WebPageProxyIOS.mm:
36596        (WebKit::WebPageProxy::updateVisibleContentRects):
36597        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
36598        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
36599        (WebKit::RemoteLayerTreeDrawingAreaProxy::scaledExposedRect):
36600        (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
36601        (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorScale):
36602        (WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
36603        * WebKit2.xcodeproj/project.pbxproj:
36604        * WebProcess/WebPage/ViewUpdateDispatcher.cpp: Added.
36605        (WebKit::ViewUpdateDispatcher::create):
36606        (WebKit::ViewUpdateDispatcher::ViewUpdateDispatcher):
36607        (WebKit::ViewUpdateDispatcher::~ViewUpdateDispatcher):
36608        (WebKit::ViewUpdateDispatcher::initializeConnection):
36609        (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
36610        (WebKit::ViewUpdateDispatcher::dispatchVisibleContentRectUpdate):
36611        * WebProcess/WebPage/ViewUpdateDispatcher.h: Added.
36612        * WebProcess/WebPage/ViewUpdateDispatcher.messages.in: Added.
36613        * WebProcess/WebPage/WebPage.cpp:
36614        (WebKit::WebPage::WebPage):
36615        (WebKit::WebPage::scalePage):
36616        * WebProcess/WebPage/WebPage.h:
36617        (WebKit::WebPage::scaleWasSetByUIProcess):
36618        * WebProcess/WebPage/WebPage.messages.in:
36619        * WebProcess/WebPage/ios/WebPageIOS.mm:
36620        (WebKit::WebPage::tapHighlightAtPosition):
36621        (WebKit::WebPage::updateVisibleContentRects):
36622        (WebKit::WebPage::willStartUserTriggeredZooming):
36623        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
36624        (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
36625        * WebProcess/WebProcess.cpp:
36626        (WebKit::WebProcess::WebProcess):
36627        (WebKit::WebProcess::initializeConnection):
36628        * WebProcess/WebProcess.h:
36629
366302014-02-25  Anders Carlsson  <andersca@apple.com>
36631
36632        Rename WebCore::VisitedLinkProvider to WebCore::VisitedLinkStore
36633        https://bugs.webkit.org/show_bug.cgi?id=129357
36634
36635        Reviewed by Sam Weinig.
36636
36637        * WebProcess/WebPage/WebPage.cpp:
36638        (WebKit::WebPage::WebPage):
36639        * WebProcess/WebPage/WebVisitedLinkProvider.h:
36640
366412014-02-25  Enrica Casucci  <enrica@apple.com>
36642
36643        [WebKit2] Form controls handling.
36644        https://bugs.webkit.org/show_bug.cgi?id=129344
36645        <rdar://problem/16053643>
36646
36647        Reviewed by Simon Fraser and Joseph Pecoraro.
36648
36649        This is the step toward adding support for
36650        form controls iOS style. It adds the logic to
36651        select the appropriate keyboard type based on the
36652        element type and introduces the AssistedNodeInformation
36653        structure used currently for the keyboard type selection
36654        and that will be used to populate pickers and popovers.
36655        It also provides information to enable/disable next/previous
36656        buttons in the accessory view.
36657
36658        * Scripts/webkit2/messages.py:
36659        (struct_or_class):
36660        * Shared/AssistedNodeInformation.cpp: Added.
36661        (WebKit::AssistedNodeInformation::encode):
36662        (WebKit::AssistedNodeInformation::decode):
36663        * Shared/AssistedNodeInformation.h: Added.
36664        (WebKit::AssistedNodeInformation::AssistedNodeInformation):
36665        * UIProcess/PageClient.h:
36666        * UIProcess/WebPageProxy.h:
36667        * UIProcess/WebPageProxy.messages.in:
36668        * UIProcess/ios/PageClientImplIOS.h:
36669        * UIProcess/ios/PageClientImplIOS.mm:
36670        (WebKit::PageClientImpl::startAssistingNode):
36671        * UIProcess/ios/WKContentViewInteraction.h:
36672        * UIProcess/ios/WKContentViewInteraction.mm:
36673        (-[WKContentView _requiresKeyboardWhenFirstResponder]):
36674        (-[WKContentView _updateAccessory]):
36675        (toUITextAutocapitalize):
36676        (-[WKContentView textInputTraits]):
36677        (-[WKContentView assistedNodeInformation]):
36678        (-[WKContentView _startAssistingNode:]):
36679        (-[WKContentView _stopAssistingNode]):
36680        * UIProcess/ios/WebPageProxyIOS.mm:
36681        (WebKit::WebPageProxy::startAssistingNode):
36682        * WebKit2.xcodeproj/project.pbxproj:
36683        * WebProcess/WebPage/WebPage.h:
36684        * WebProcess/WebPage/ios/WebPageIOS.mm:
36685        (WebKit::isAssistableNode):
36686        (WebKit::hasFocusableNode):
36687        (WebKit::WebPage::getAssistedNodeInformation):
36688        (WebKit::WebPage::elementDidFocus):
36689
366902014-02-25  Anders Carlsson  <andersca@apple.com>
36691
36692        VisitedLinkProvider should be refcounted
36693        https://bugs.webkit.org/show_bug.cgi?id=129351
36694
36695        Reviewed by Sam Weinig.
36696
36697        * UIProcess/VisitedLinkProvider.cpp:
36698        (WebKit::VisitedLinkProvider::create):
36699        (WebKit::VisitedLinkProvider::~VisitedLinkProvider):
36700        * UIProcess/VisitedLinkProvider.h:
36701        * UIProcess/WebContext.cpp:
36702        (WebKit::WebContext::WebContext):
36703        (WebKit::WebContext::processDidFinishLaunching):
36704        (WebKit::WebContext::disconnectProcess):
36705        (WebKit::WebContext::addVisitedLinkHash):
36706        * UIProcess/WebContext.h:
36707
367082014-02-25  Anders Carlsson  <andersca@apple.com>
36709
36710        Make WebContext handle populating visited links
36711        https://bugs.webkit.org/show_bug.cgi?id=129348
36712
36713        Reviewed by Tim Horton.
36714
36715        This makes it possible to decouple VisitedLinkProvider from WebContext.
36716
36717        * UIProcess/VisitedLinkProvider.cpp:
36718        (WebKit::VisitedLinkProvider::VisitedLinkProvider):
36719        (WebKit::VisitedLinkProvider::processDidFinishLaunching):
36720        * UIProcess/VisitedLinkProvider.h:
36721        * UIProcess/WebContext.cpp:
36722        (WebKit::WebContext::WebContext):
36723        (WebKit::WebContext::processDidFinishLaunching):
36724        * UIProcess/WebContext.h:
36725
367262014-02-25  Anders Carlsson  <andersca@apple.com>
36727
36728        DrawingAreaProxy is using WebCore's Timer
36729        https://bugs.webkit.org/show_bug.cgi?id=129347
36730        <rdar://problem/16078133>
36731
36732        Reviewed by Tim Horton.
36733
36734        Use a RunLoop::Timer instead.
36735
36736        * UIProcess/DrawingAreaProxy.cpp:
36737        (WebKit::DrawingAreaProxy::DrawingAreaProxy):
36738        (WebKit::DrawingAreaProxy::exposedRectChangedTimerFired):
36739        * UIProcess/DrawingAreaProxy.h:
36740
367412014-02-25  Anders Carlsson  <andersca@apple.com>
36742
36743        Add WKVisitedLinkProvider
36744        https://bugs.webkit.org/show_bug.cgi?id=129343
36745
36746        Reviewed by Sam Weinig.
36747
36748        * UIProcess/API/Cocoa/WKVisitedLinkProvider.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.h.
36749        * UIProcess/API/Cocoa/WKVisitedLinkProvider.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.h.
36750        * UIProcess/API/Cocoa/WKVisitedLinkProviderInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.h.
36751        * UIProcess/API/Cocoa/WKVisitedLinkProviderPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.h.
36752        * UIProcess/API/Cocoa/WKWebView.mm:
36753        (-[WKWebView initWithFrame:configuration:]):
36754        * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
36755        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
36756        (-[WKWebViewConfiguration visitedLinkProvider]):
36757        (-[WKWebViewConfiguration setVisitedLinkProvider:]):
36758        * WebKit2.xcodeproj/project.pbxproj:
36759
367602014-02-25  Anders Carlsson  <andersca@apple.com>
36761
36762        Simplify visited link style invalidation
36763        https://bugs.webkit.org/show_bug.cgi?id=129340
36764
36765        Reviewed by Dan Bernstein.
36766
36767        * UIProcess/VisitedLinkProvider.cpp:
36768        (WebKit::VisitedLinkProvider::addVisitedLink):
36769        * WebProcess/WebProcess.cpp:
36770        (WebKit::WebProcess::visitedLinkStateChanged):
36771        (WebKit::WebProcess::allVisitedLinkStateChanged):
36772
367732014-02-25  Anders Carlsson  <andersca@apple.com>
36774
36775        Fix build.
36776
36777        Remove VisitedLinkStrategy.
36778
36779        * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
36780        * NetworkProcess/NetworkProcessPlatformStrategies.h:
36781        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
36782        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
36783
367842014-02-25  Alexey Proskuryakov  <ap@apple.com>
36785
36786        Rolling out http://trac.webkit.org/changeset/164611, because it broke
36787        WebKit2.PrivateBrowsingPushStateNoHistoryCallback API test
36788
36789        The change was for:
36790
36791        https://bugs.webkit.org/show_bug.cgi?id=129141
36792        Create SessionID class
36793
367942014-02-25  Dan Bernstein  <mitz@apple.com>
36795
36796        [Cocoa] Add delegate method for customizing actions on activated elements
36797        https://bugs.webkit.org/show_bug.cgi?id=129290
36798
36799        Reviewed by Anders Carlsson.
36800
36801        * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Added. Declared new delegate method.
36802
36803        * UIProcess/API/Cocoa/_WKActivatedElementInfo.h:
36804        (_WKActivatedElementType): Defined enum of element types.
36805        * UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:
36806        (-[_WKActivatedElementInfo _initWithType:URL:location:title:rect:]): Added type parameter
36807        to the initializer, used to set the new type property.
36808        * UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h:
36809
36810        * UIProcess/Cocoa/UIClient.h:
36811        * UIProcess/Cocoa/UIClient.mm:
36812        (WebKit::UIClient::setDelegate): Initialize webViewActionsForElementDefaultActions member
36813        of m_delegateMethods.
36814        (WebKit::UIClient::actionsForElement): Added. Calls out to the new delegate method if
36815        implemented. Otherwise returns the default actions.
36816
36817        * UIProcess/ios/WKActionSheetAssistant.mm:
36818        (-[WKActionSheetAssistant actionSheet:clickedButtonAtIndex:]): Use new _elementInfo ivar
36819        instead of creating element info here.
36820        (-[WKActionSheetAssistant showImageSheet]): Create element info here and assign it to
36821        _elementInfo ivar if presenting a sheet. Call the UI client to get custom actions.
36822        (-[WKActionSheetAssistant showLinkSheet]): Ditto.
36823        (-[WKActionSheetAssistant cleanupSheet]): Clear _elementInfo ivar.
36824        * WebKit2.xcodeproj/project.pbxproj: Added reference to WKUIDelegatePrivate.h.
36825
368262014-02-25  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
36827
36828        Unreviewed EFL build fix attempt after r164562
36829
36830        * CMakeLists.txt: Added WebVisitedLinkProvider.cpp.
36831
368322014-02-25  Sergio Villar Senin  <svillar@igalia.com>
36833
36834        [CSS Grid Layout] Add ENABLE flag
36835        https://bugs.webkit.org/show_bug.cgi?id=129153
36836
36837        Reviewed by Simon Fraser.
36838
36839        Added ENABLE_CSS_GRID_LAYOUT feature flag.
36840
36841        * Configurations/FeatureDefines.xcconfig:
36842        * WebProcess/WebPage/WebPage.cpp:
36843        (WebKit::WebPage::updatePreferences):
36844
368452014-02-25  Zan Dobersek  <zdobersek@igalia.com>
36846
36847        Unreviewed GTK build fix after r164652.
36848
36849        * GNUmakefile.list.am: Add WebVisitedLinkProvider build targets.
36850
368512014-02-24  Anders Carlsson  <andersca@apple.com>
36852
36853        Make it possible to set the visited link provider on a per page basis
36854        https://bugs.webkit.org/show_bug.cgi?id=129288
36855
36856        Reviewed by Andreas Kling.
36857
36858        Add WebVisitedLinkProvider which just calls the web process.
36859
36860        * WebKit2.xcodeproj/project.pbxproj:
36861        * WebProcess/WebPage/WebPage.cpp:
36862        (WebKit::WebPage::WebPage):
36863        * WebProcess/WebPage/WebVisitedLinkProvider.cpp: Added.
36864        (WebKit::WebVisitedLinkProvider::create):
36865        (WebKit::WebVisitedLinkProvider::WebVisitedLinkProvider):
36866        (WebKit::WebVisitedLinkProvider::~WebVisitedLinkProvider):
36867        (WebKit::WebVisitedLinkProvider::isLinkVisited):
36868        (WebKit::WebVisitedLinkProvider::addVisitedLink):
36869        * WebProcess/WebPage/WebVisitedLinkProvider.h: Added.
36870
368712014-02-25  Dan Bernstein  <mitz@apple.com>
36872
36873        Build fix for case-sensitive filesystems.
36874
36875        * WebProcess/ios/WebVideoFullscreenManager.cpp:
36876
368772014-02-24  Carlos Garcia Campos  <cgarcia@igalia.com>
36878
36879        [GTK] Mark view source mode methods as deprecated
36880        https://bugs.webkit.org/show_bug.cgi?id=128920
36881
36882        Reviewed by Martin Robinson.
36883
36884        Mark WEBKIT_VIEW_MODE_SOURCE as deprecated in documentation and
36885        only show warnings when set_view_mode is used with WEBKIT_VIEW_MODE_SOURCE.
36886
36887        * UIProcess/API/gtk/WebKitWebView.cpp:
36888        (webkit_web_view_set_view_mode):
36889        (webkit_web_view_get_view_mode):
36890        * UIProcess/API/gtk/WebKitWebView.h:
36891
368922014-02-24  Alexey Proskuryakov  <ap@apple.com>
36893
36894        [Mac] Stop looking for plug-in profiles in /S/L/Sandbox/Profiles
36895        https://bugs.webkit.org/show_bug.cgi?id=129262
36896        <rdar://problem/16149420>
36897
36898        Reviewed by Sam Weinig.
36899
36900        Remove unused code.
36901
36902        * Shared/Plugins/mac/PluginSandboxProfile.mm:
36903        (WebKit::pluginSandboxProfileDirectory):
36904        (WebKit::pluginSandboxCommonProfile):
36905        (WebKit::pluginSandboxProfile):
36906        (WebKit::pluginHasSandboxProfile):
36907
369082014-02-24  Martin Robinson  <mrobinson@igalia.com>
36909
36910        [GTK] generate-gtkdoc should not generate documentation for source files for unbuilt source files
36911        https://bugs.webkit.org/show_bug.cgi?id=128417
36912
36913        Reviewed by Carlos Garcia Campos.
36914
36915        * GNUmakefile.am: Generate a config file for generate-gtkdoc.
36916        * PlatformGTK.cmake: Ditto.
36917
369182014-02-24  Dan Bernstein  <mitz@apple.com>
36919
36920        32-bit build fix.
36921
36922        * UIProcess/API/Cocoa/_WKElementAction.mm:
36923        (+[_WKElementAction elementActionWithType:customTitle:]):
36924
369252014-02-24  Dan Bernstein  <mitz@apple.com>
36926
36927        [Cocoa] Start adding API for customizing actions on activated elements
36928        https://bugs.webkit.org/show_bug.cgi?id=129284
36929
36930        Reviewed by Anders Carlsson.
36931
36932        * UIProcess/API/Cocoa/_WKActivatedElementInfo.h: Added. Includes the public interface of what
36933        was WKElementActionInfo.
36934        * UIProcess/API/Cocoa/_WKActivatedElementInfo.m: Added.
36935        (-[_WKActivatedElementInfo _initWithURL:location:title:rect:]): Moved and renamed internal
36936        initializer from WKElementActionInfo.
36937        (-[_WKActivatedElementInfo dealloc]): Moved from WKElementActionInfo.
36938        (-[_WKActivatedElementInfo _boundingRect]): Added private accessor.
36939        (-[_WKActivatedElementInfo _interactionLocation]): Ditto.
36940        * UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h: Added.
36941
36942        * UIProcess/API/Cocoa/_WKElementAction.h: Added.
36943        (_WKElementActionType): Moved from WKActionSheet.h and turned into a proper NS_ENUM.
36944        * UIProcess/API/Cocoa/_WKElementAction.mm: Added.
36945        (-[_WKElementAction _initWithTitle:actionHandler:type:]): Moved and renamed internal
36946        initializer from WKActionSheet.mm.
36947        (-[_WKElementAction dealloc]): Moved from WKActionSheet.mm.
36948        (+[_WKElementAction elementActionWithTitle:actionHandler:]): Moved and renamed.
36949        (copyElement): Moved from WKActionSheet.mm.
36950        (saveImage): Ditto.
36951        (addToReadingList): Ditto.
36952        (+[_WKElementAction elementActionWithType:customTitle:]): Moved and renamed.
36953        (+[_WKElementAction elementActionWithType:]): Ditto.
36954        (-[_WKElementAction _runActionWithElementInfo:view:]): Moved from WKActionSheet.mm.
36955        * UIProcess/API/Cocoa/WKElementActionInternal.h: Added.
36956
36957        * UIProcess/ios/WKActionSheet.h: Removed declarations that were moved elsewhere.
36958        * UIProcess/ios/WKActionSheet.mm: Removed code that was moved elsewhere.
36959        * UIProcess/ios/WKActionSheetAssistant.mm:
36960        (-[WKActionSheetAssistant actionSheet:clickedButtonAtIndex:]):
36961        (-[WKActionSheetAssistant showImageSheet]):
36962        (-[WKActionSheetAssistant showLinkSheet]):
36963        (-[WKActionSheetAssistant showDataDetectorsSheet]):
36964
36965        * WebKit2.xcodeproj/project.pbxproj: Added references to new files. Changed the Objective-C
36966        class name check to allow _WK as a class name prefix.
36967
369682014-02-24  Simon Fraser  <simon.fraser@apple.com>
36969
36970        Use RetainPtrs for two WKContentView data members
36971        https://bugs.webkit.org/show_bug.cgi?id=129276
36972
36973        Reviewed by Benjamin Poulain.
36974        
36975        The UITextInputTraits were leaked. Fix with RetainPtr goodness.
36976        
36977        Rename the obscure _accessory to _formAccessoryView and
36978        make it a RetainPtr.
36979        
36980        Rearrange the data members of the WKContentView class extension
36981        for better packing and readability.
36982
36983        * UIProcess/ios/WKContentView.h:
36984        * UIProcess/ios/WKContentViewInteraction.h:
36985        * UIProcess/ios/WKContentViewInteraction.mm:
36986        (-[WKContentView cleanupInteraction]):
36987        (-[WKContentView inputAccessoryView]):
36988        (-[WKContentView _updateAccessory]):
36989        (-[WKContentView textInputTraits]):
36990
369912014-02-24  Simon Fraser  <simon.fraser@apple.com>
36992
36993        Remove WKInteractionView, move code into WKContentView
36994        https://bugs.webkit.org/show_bug.cgi?id=129275
36995
36996        Reviewed by Benjamin Poulain.
36997        
36998        WKInteractionView as an interim solution as WebKit2 on iOS was being
36999        brought up, and should be removed.
37000        
37001        Move its code into a category on WKContentView, mostly unchanged. The
37002        WKContentView (WKInteraction) categroy now implements the various protocols
37003        that WKInteractionView implemented.
37004        
37005        WKContentView is not an API class, so no longer has WK_API_CLASS, and can
37006        have implementation-related data members. WKContentViewInternal.h is removed.
37007        
37008        WKContentView now exposes a WebPageProxy* rather than a WKPageRef.
37009        
37010        Other changes: WKActionSheetAssistant no longer stores a WebPageProxy,
37011        getting it from the WKContentView instead.
37012        
37013        WKAutoCorrectionData and InteractionInformationAtPosition are stored via unique_ptr
37014        to reduce class size, and avoid having to expose their details in the header.
37015
37016        * Configurations/WebKit2.xcconfig:
37017        * UIProcess/API/Cocoa/WKWebViewInternal.h:
37018        * UIProcess/API/ios/WKViewIOS.mm:
37019        (-[WKView setAllowsBackForwardNavigationGestures:]):
37020        (-[WKView pageRef]):
37021        (-[WKView _pageExtendedBackgroundColor]):
37022        (-[WKView _setBackgroundExtendsBeyondPage:]):
37023        (-[WKView _backgroundExtendsBeyondPage]):
37024        * UIProcess/ios/PageClientImplIOS.mm:
37025        * UIProcess/ios/WKActionSheet.h:
37026        * UIProcess/ios/WKActionSheet.mm:
37027        (-[WKActionSheet initWithView:]):
37028        (+[WKElementAction customElementActionWithTitle:actionHandler:]):
37029        (copyElement):
37030        (saveImage):
37031        (+[WKElementAction standardElementActionWithType:customTitle:]):
37032        (-[WKElementAction runActionWithElementInfo:view:]):
37033        * UIProcess/ios/WKActionSheetAssistant.h:
37034        * UIProcess/ios/WKActionSheetAssistant.mm:
37035        (-[WKActionSheetAssistant initWithView:]):
37036        (-[WKActionSheetAssistant dealloc]):
37037        (-[WKActionSheetAssistant initialPresentationRectInHostViewForSheet]):
37038        (-[WKActionSheetAssistant presentationRectInHostViewForSheet]):
37039        (-[WKActionSheetAssistant actionSheet:clickedButtonAtIndex:]):
37040        (-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]):
37041        (-[WKActionSheetAssistant showImageSheet]):
37042        (-[WKActionSheetAssistant showLinkSheet]):
37043        (-[WKActionSheetAssistant showDataDetectorsSheet]):
37044        (-[WKActionSheetAssistant cleanupSheet]):
37045        * UIProcess/ios/WKContentView.h:
37046        * UIProcess/ios/WKContentView.mm:
37047        (-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::]):
37048        (-[WKContentView dealloc]):
37049        (-[WKContentView page]):
37050        (-[WKContentView isAssistingNode]):
37051        (-[WKContentView didFinishScrolling]):
37052        (-[WKContentView willStartZoomOrScroll]):
37053        (-[WKContentView willStartUserTriggeredScroll]):
37054        (-[WKContentView willStartUserTriggeredZoom]):
37055        (-[WKContentView didZoomToScale:]):
37056        (-[WKContentView _didCommitLoadForMainFrame]):
37057        (-[WKContentView _didCommitLayerTree:WebKit::]):
37058        * UIProcess/ios/WKContentViewInteraction.h: Renamed from Source/WebKit2/UIProcess/ios/WKInteractionView.h.
37059        * UIProcess/ios/WKContentViewInteraction.mm: Renamed from Source/WebKit2/UIProcess/ios/WKInteractionView.mm.
37060        (-[WKContentView setupInteraction]):
37061        (-[WKContentView cleanupInteraction]):
37062        (-[WKContentView positionInformation]):
37063        (-[WKContentView setInputDelegate:]):
37064        (-[WKContentView inputDelegate]):
37065        (-[WKContentView isEditable]):
37066        (-[WKContentView canBecomeFirstResponder]):
37067        (-[WKContentView resignFirstResponder]):
37068        (-[WKContentView _webTouchEventsRecognized:]):
37069        (inflateQuad):
37070        (-[WKContentView _webTouchEvent:WebKit::preventsNativeGestures:]):
37071        (-[WKContentView _didGetTapHighlightForRequest:color:WebCore::quads:WebCore::topLeftRadius:WebCore::topRightRadius:WebCore::bottomLeftRadius:WebCore::bottomRightRadius:WebCore::]):
37072        (-[WKContentView _cancelLongPressGestureRecognizer]):
37073        (-[WKContentView _didScroll]):
37074        (-[WKContentView _requiresKeyboardResetOnReload]):
37075        (-[WKContentView gestureRecognizer:canPreventGestureRecognizer:]):
37076        (-[WKContentView gestureRecognizer:canBePreventedByGestureRecognizer:]):
37077        (isSamePair):
37078        (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
37079        (-[WKContentView _showImageSheet]):
37080        (-[WKContentView _showLinkSheet]):
37081        (-[WKContentView _showDataDetectorsSheet]):
37082        (-[WKContentView _actionForLongPress]):
37083        (-[WKContentView ensurePositionInformationIsUpToDate:]):
37084        (-[WKContentView _updatePositionInformation]):
37085        (-[WKContentView gestureRecognizerShouldBegin:]):
37086        (-[WKContentView _cancelInteraction]):
37087        (-[WKContentView hasSelectablePositionAtPoint:]):
37088        (-[WKContentView pointIsInAssistedNode:]):
37089        (-[WKContentView webSelectionRects]):
37090        (-[WKContentView _highlightLongPressRecognized:]):
37091        (-[WKContentView _longPressRecognized:]):
37092        (-[WKContentView _singleTapRecognized:]):
37093        (-[WKContentView _doubleTapRecognized:]):
37094        (-[WKContentView _twoFingerDoubleTapRecognized:]):
37095        (-[WKContentView _twoFingerPanRecognized:]):
37096        (-[WKContentView _attemptClickAtLocation:]):
37097        (-[WKContentView useSelectionAssistantWithMode:]):
37098        (-[WKContentView clearSelection]):
37099        (-[WKContentView _positionInformationDidChange:]):
37100        (-[WKContentView _willStartScrollingOrZooming]):
37101        (-[WKContentView _willStartUserTriggeredScrollingOrZooming]):
37102        (-[WKContentView _didEndScrollingOrZooming]):
37103        (-[WKContentView inputAccessoryView]):
37104        (-[WKContentView supportedPasteboardTypesForCurrentSelection]):
37105        (-[WKContentView _addShortcut:]):
37106        (-[WKContentView _promptForReplace:]):
37107        (-[WKContentView replace:]):
37108        (-[WKContentView canPerformAction:withSender:]):
37109        (-[WKContentView _resetShowingTextStyle:]):
37110        (-[WKContentView _performAction:]):
37111        (-[WKContentView copy:]):
37112        (-[WKContentView cut:]):
37113        (-[WKContentView paste:]):
37114        (-[WKContentView select:]):
37115        (-[WKContentView selectAll:]):
37116        (-[WKContentView toggleBoldface:]):
37117        (-[WKContentView toggleItalics:]):
37118        (-[WKContentView toggleUnderline:]):
37119        (-[WKContentView _showTextStyleOptions:]):
37120        (-[WKContentView _showDictionary:]):
37121        (-[WKContentView _define:]):
37122        (toWKGestureType):
37123        (toUIWKGestureType):
37124        (toWKSelectionTouch):
37125        (toUIWKSelectionTouch):
37126        (toWKGestureRecognizerState):
37127        (toUIGestureRecognizerState):
37128        (toUIWKSelectionFlags):
37129        (toWKHandlePosition):
37130        (selectionChangedWithGesture):
37131        (selectionChangedWithTouch):
37132        (-[WKContentView _didUpdateBlockSelectionWithTouch:WebKit::withFlags:WebKit::growThreshold:shrinkThreshold:]):
37133        (-[WKContentView changeSelectionWithGestureAt:withGesture:withState:]):
37134        (-[WKContentView changeSelectionWithTouchAt:withSelectionTouch:baseIsStart:]):
37135        (-[WKContentView changeSelectionWithTouchesFrom:to:withGesture:withState:]):
37136        (-[WKContentView changeBlockSelectionWithTouchAt:withSelectionTouch:forHandle:]):
37137        (-[WKContentView autocorrectionData]):
37138        (-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
37139        (-[WKContentView textFirstRect]):
37140        (-[WKContentView textLastRect]):
37141        (-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
37142        (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
37143        (-[WKContentView accessoryDone]):
37144        (-[WKContentView accessoryTab:]):
37145        (-[WKContentView accessoryAutoFill]):
37146        (-[WKContentView accessoryClear]):
37147        (-[WKContentView _updateAccessory]):
37148        (-[WKContentView textInRange:]):
37149        (-[WKContentView replaceRange:withText:]):
37150        (-[WKContentView selectedTextRange]):
37151        (-[WKContentView caretRectForPosition:]):
37152        (-[WKContentView selectionRectsForRange:]):
37153        (-[WKContentView setSelectedTextRange:]):
37154        (-[WKContentView hasMarkedText]):
37155        (-[WKContentView markedText]):
37156        (-[WKContentView markedTextRange]):
37157        (-[WKContentView markedTextStyle]):
37158        (-[WKContentView setMarkedTextStyle:]):
37159        (-[WKContentView setMarkedText:selectedRange:]):
37160        (-[WKContentView unmarkText]):
37161        (-[WKContentView beginningOfDocument]):
37162        (-[WKContentView endOfDocument]):
37163        (-[WKContentView textRangeFromPosition:toPosition:]):
37164        (-[WKContentView positionFromPosition:offset:]):
37165        (-[WKContentView positionFromPosition:inDirection:offset:]):
37166        (-[WKContentView comparePosition:toPosition:]):
37167        (-[WKContentView offsetFromPosition:toPosition:]):
37168        (-[WKContentView tokenizer]):
37169        (-[WKContentView positionWithinRange:farthestInDirection:]):
37170        (-[WKContentView characterRangeByExtendingPosition:inDirection:]):
37171        (-[WKContentView baseWritingDirectionForPosition:inDirection:]):
37172        (-[WKContentView setBaseWritingDirection:forRange:]):
37173        (-[WKContentView firstRectForRange:]):
37174        (-[WKContentView closestPositionToPoint:]):
37175        (-[WKContentView closestPositionToPoint:withinRange:]):
37176        (-[WKContentView characterRangeAtPoint:]):
37177        (-[WKContentView deleteBackward]):
37178        (-[WKContentView insertText:]):
37179        (-[WKContentView hasText]):
37180        (-[WKContentView textInputTraits]):
37181        (-[WKContentView interactionAssistant]):
37182        (-[WKContentView webSelectionAssistant]):
37183        (-[WKContentView selectionRange]):
37184        (-[WKContentView rectForNSRange:]):
37185        (-[WKContentView _markedTextNSRange]):
37186        (-[WKContentView selectedDOMRange]):
37187        (-[WKContentView setSelectedDOMRange:affinityDownstream:]):
37188        (-[WKContentView replaceRangeWithTextWithoutClosingTyping:replacementText:]):
37189        (-[WKContentView rectContainingCaretSelection]):
37190        (-[WKContentView requiresKeyEvents]):
37191        (-[WKContentView handleKeyWebEvent:]):
37192        (-[WKContentView _interpretKeyEvent:isCharEvent:]):
37193        (-[WKContentView setBottomBufferHeight:]):
37194        (-[WKContentView automaticallySelectedOverlay]):
37195        (-[WKContentView selectionGranularity]):
37196        (-[WKContentView insertDictationResult:withCorrectionIdentifier:]):
37197        (-[WKContentView metadataDictionariesForDictationResults]):
37198        (-[WKContentView previousUnperturbedDictationResultBoundaryFromPosition:]):
37199        (-[WKContentView nextUnperturbedDictationResultBoundaryFromPosition:]):
37200        (-[WKContentView moveBackward:]):
37201        (-[WKContentView moveForward:]):
37202        (-[WKContentView characterBeforeCaretSelection]):
37203        (-[WKContentView wordContainingCaretSelection]):
37204        (-[WKContentView wordRangeContainingCaretSelection]):
37205        (-[WKContentView setMarkedText:]):
37206        (-[WKContentView hasContent]):
37207        (-[WKContentView selectAll]):
37208        (-[WKContentView textColorForCaretSelection]):
37209        (-[WKContentView fontForCaretSelection]):
37210        (-[WKContentView hasSelection]):
37211        (-[WKContentView isPosition:atBoundary:inDirection:]):
37212        (-[WKContentView positionFromPosition:toBoundary:inDirection:]):
37213        (-[WKContentView isPosition:withinTextUnit:inDirection:]):
37214        (-[WKContentView rangeEnclosingPosition:withGranularity:inDirection:]):
37215        (-[WKContentView takeTraitsFrom:]):
37216        (-[WKContentView _startAssistingKeyboard]):
37217        (-[WKContentView _stopAssistingKeyboard]):
37218        (-[WKContentView _startAssistingNode]):
37219        (-[WKContentView _stopAssistingNode]):
37220        (-[WKContentView _selectionChanged]):
37221        (-[WKContentView shouldIgnoreWebTouch]):
37222        (-[WKContentView isAnyTouchOverActiveArea:]):
37223        (-[WKTextRange _isCaret]):
37224        (-[WKTextRange _isRanged]):
37225        (+[WKTextRange textRangeWithState:isRange:isEditable:startRect:endRect:selectionRects:selectedTextLength:]):
37226        (-[WKTextRange dealloc]):
37227        (-[WKTextRange description]):
37228        (-[WKTextRange start]):
37229        (-[WKTextRange end]):
37230        (-[WKTextRange isEmpty]):
37231        (-[WKTextRange isEqual:]):
37232        (+[WKTextPosition textPositionWithRect:]):
37233        (-[WKTextPosition isEqual:]):
37234        (-[WKTextPosition description]):
37235        (-[WKTextSelectionRect initWithWebRect:]):
37236        (-[WKTextSelectionRect dealloc]):
37237        (+[WKTextSelectionRect textSelectionRectsWithWebRects:]):
37238        (-[WKTextSelectionRect rect]):
37239        (-[WKTextSelectionRect writingDirection]):
37240        (-[WKTextSelectionRect range]):
37241        (-[WKTextSelectionRect containsStart]):
37242        (-[WKTextSelectionRect containsEnd]):
37243        (-[WKTextSelectionRect isVertical]):
37244        (+[WKAutocorrectionRects autocorrectionRectsWithRects:lastRect:]):
37245        (+[WKAutocorrectionContext autocorrectionContextWithData:markedText:selectedText:afterText:selectedRangeInMarkedText:]):
37246        (-[WKAutocorrectionContext dealloc]):
37247        * UIProcess/ios/WKContentViewInternal.h: Removed.
37248        * WebKit2.xcodeproj/project.pbxproj:
37249
372502014-02-24  Anders Carlsson  <andersca@apple.com>
37251
37252        WKProcessPool should use secondary processes + network process
37253        https://bugs.webkit.org/show_bug.cgi?id=129282
37254
37255        Reviewed by Simon Fraser.
37256
37257        * UIProcess/API/Cocoa/WKProcessPool.mm:
37258        (-[WKProcessPool initWithConfiguration:]):
37259
372602014-02-24  Jeremy Jones  <jeremyj@apple.com>
37261
37262        WK2 AVKit fullscreen doesn't display video.
37263        https://bugs.webkit.org/show_bug.cgi?id=128564
37264
37265        Reviewed by Simon Fraser.
37266
37267        * Shared/mac/RemoteLayerTreeTransaction.h:
37268        Add a property to track video layer pending fullscreen.
37269
37270        (WebKit::RemoteLayerTreeTransaction::isVideoLayerIDPendingFullscreen):
37271        (WebKit::RemoteLayerTreeTransaction::addVideoLayerIDPendingFullscreen):
37272        Add a property to track video layer pending fullscreen.
37273
37274        * Shared/mac/RemoteLayerTreeTransaction.mm:
37275        (WebKit::RemoteLayerTreeTransaction::encode):
37276        (WebKit::RemoteLayerTreeTransaction::decode):
37277        Encode and decode m_videoLayerIDsPendingFullscreen.
37278
37279        * UIProcess/ios/WebPageProxyIOS.mm:
37280        (WebKit::WebPageProxy::didCommitLayerTree):
37281        Let WebVideoFullscreenManagerProxy see the RemoteLayerTreeTransaction.
37282
37283        * UIProcess/ios/WebVideoFullscreenManagerProxy.cpp:
37284        (WebKit::WebVideoFullscreenManagerProxy::didCommitLayerTree):
37285        Look for video layer pending fullscreen on the transaction to initiate
37286        fullscreen.
37287
37288        (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerID):
37289        Start looking for the video layer pending fullscreen in the transaction.
37290
37291        (WebKit::WebVideoFullscreenManagerProxy::enterFullscreen):
37292        Override to prevent fullscreen from happening before the layer
37293        is pending fullscreen.
37294
37295        * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
37296        * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
37297        Pass a more specific videoLayerID in SetVideoLayerID,
37298        i.e. WebCore::GraphicsLayer::PlatformLayerID.
37299
37300        * WebProcess/WebPage/WebPage.cpp:
37301        (WebKit::WebPage::willCommitLayerTree):
37302        Move webPage specific transaction building here, including,
37303        giving WebVideoFullscreenManager a chance to modify the transaction.
37304
37305        * WebProcess/WebPage/WebPage.h:
37306        Add willCommitLayerTree();
37307
37308        * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
37309        (PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
37310        (PlatformCALayerRemoteCustom::~PlatformCALayerRemoteCustom):
37311        Make and break the connection from CALayer to PlatformCALayerRemoteCustom,
37312        the same way it is done for PlatformCALayerMac.
37313
37314        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
37315        (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
37316        Move WebPage specific transaction building into WebPage::willCommitLayerTree.
37317
37318        * WebProcess/ios/WebVideoFullscreenManager.cpp:
37319        (WebKit::WebVideoFullscreenManager::willCommitLayerTree):
37320        addVideoLayerIDPendingFullscreen on RemoteLayerTreeTransaction when needed.
37321
37322        (WebKit::WebVideoFullscreenManager::setVideoLayer):
37323        Pass along the video layerID.
37324
37325        * WebProcess/ios/WebVideoFullscreenManager.h:
37326        Add willCommitLayerTree() and remove setVideoLayerID().
37327        Add a member to retain the unparented PlatformCALayer.
37328
373292014-02-24  Martin Hock  <mhock@apple.com>
37330
37331        Create SessionID value-style class for session IDs.
37332        https://bugs.webkit.org/show_bug.cgi?id=129141
37333
37334        The below changes deal solely with mechanical changes to use the SessionID value class instead of uint64_t except where noted.
37335
37336        Reviewed by Brady Eidson.
37337
37338        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
37339        (WebKit::storageSession):
37340        (WebKit::NetworkConnectionToWebProcess::startDownload):
37341        (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
37342        (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
37343        (WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
37344        (WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
37345        (WebKit::NetworkConnectionToWebProcess::getRawCookies):
37346        (WebKit::NetworkConnectionToWebProcess::deleteCookie):
37347        * NetworkProcess/NetworkConnectionToWebProcess.h:
37348        * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
37349        * NetworkProcess/NetworkProcess.cpp:
37350        (WebKit::NetworkProcess::initializeNetworkProcess):
37351        (WebKit::NetworkProcess::ensurePrivateBrowsingSession):
37352        (WebKit::NetworkProcess::destroyPrivateBrowsingSession):
37353        * NetworkProcess/NetworkProcess.h:
37354        * NetworkProcess/NetworkProcess.messages.in:
37355        * NetworkProcess/NetworkResourceLoader.h:
37356        * NetworkProcess/RemoteNetworkingContext.h:
37357        * NetworkProcess/mac/RemoteNetworkingContext.mm:
37358        (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
37359        * NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:
37360        (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
37361        * Shared/Network/NetworkResourceLoadParameters.cpp:
37362        (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
37363        * Shared/Network/NetworkResourceLoadParameters.h:
37364        * Shared/SessionTracker.cpp:
37365        (WebKit::staticSessionMap):
37366        (WebKit::storageSessionToID):
37367        (WebKit::SessionTracker::sessionMap):
37368        (WebKit::SessionTracker::session):
37369        (WebKit::SessionTracker::sessionID):
37370        (WebKit::SessionTracker::setSession):
37371        (WebKit::SessionTracker::destroySession):
37372        * Shared/SessionTracker.h: Move code to SessionID class.
37373        * Shared/WebCoreArgumentCoders.cpp: Add encode and decode for SessionID.
37374        (IPC::ArgumentCoder<SessionID>::encode):
37375        (IPC::ArgumentCoder<SessionID>::decode):
37376        * Shared/WebCoreArgumentCoders.h:
37377        * Shared/mac/CookieStorageShim.mm:
37378        (WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL):
37379        * UIProcess/APISession.cpp:
37380        (API::generateID):
37381        (API::Session::defaultSession):
37382        (API::Session::legacyPrivateSession):
37383        (API::Session::Session):
37384        (API::Session::isEphemeral):
37385        (API::Session::getID):
37386        * UIProcess/APISession.h:
37387        * UIProcess/WebContext.cpp:
37388        (WebKit::WebContext::setAnyPageGroupMightHavePrivateBrowsingEnabled):
37389        (WebKit::WebContext::createNewWebProcess):
37390        * UIProcess/WebContext.h:
37391        * UIProcess/WebPageProxy.h:
37392        (WebKit::WebPageProxy::sessionID):
37393        * WebProcess/InjectedBundle/InjectedBundle.cpp:
37394        (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
37395        * WebProcess/Network/WebResourceLoadScheduler.cpp:
37396        (WebKit::WebResourceLoadScheduler::scheduleLoad):
37397        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
37398        (WebKit::WebPlatformStrategies::loadResourceSynchronously):
37399        * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
37400        * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
37401        (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
37402        (WebKit::WebFrameNetworkingContext::storageSession):
37403        * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
37404        (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
37405        (WebKit::WebFrameNetworkingContext::storageSession):
37406        * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
37407        * WebProcess/WebPage/WebPage.cpp: Move sessionID to Page to allow WebCore to access it.
37408        (WebKit::WebPage::WebPage):
37409        (WebKit::WebPage::sessionID):
37410        (WebKit::WebPage::isUsingEphemeralSession):
37411        (WebKit::WebPage::setSessionID):
37412        (WebKit::WebPage::updatePreferences):
37413        * WebProcess/WebPage/WebPage.h:
37414        * WebProcess/WebPage/WebPage.messages.in:
37415        * WebProcess/WebProcess.cpp:
37416        (WebKit::WebProcess::ensurePrivateBrowsingSession):
37417        (WebKit::WebProcess::destroyPrivateBrowsingSession):
37418        * WebProcess/WebProcess.h:
37419        * WebProcess/WebProcess.messages.in:
37420
374212014-02-24  Simon Fraser  <simon.fraser@apple.com>
37422
37423        Remove PDFViewController.*, which is unused
37424        https://bugs.webkit.org/show_bug.cgi?id=129270
37425
37426        Reviewed by Tim Horton.
37427
37428        * UIProcess/mac/PDFViewController.h: Removed.
37429        * UIProcess/mac/PDFViewController.mm: Removed.
37430
374312014-02-24  Anders Carlsson  <andersca@apple.com>
37432
37433        Rename WKProcessClass to WKProcessPool
37434        https://bugs.webkit.org/show_bug.cgi?id=129268
37435
37436        Reviewed by Dan Bernstein.
37437
37438        Stage this rename by adding back WKProcessClass and WKProcessClassConfiguration as subclasses of the renamed classes.
37439
37440        * Shared/Cocoa/APIObject.mm:
37441        (API::Object::newObject):
37442        * UIProcess/API/Cocoa/WKProcessClass.h:
37443        * UIProcess/API/Cocoa/WKProcessClass.mm:
37444        * UIProcess/API/Cocoa/WKProcessClassConfiguration.h:
37445        * UIProcess/API/Cocoa/WKProcessClassConfiguration.mm:
37446        * UIProcess/API/Cocoa/WKProcessClassConfigurationPrivate.h:
37447        * UIProcess/API/Cocoa/WKProcessClassPrivate.h:
37448        * UIProcess/API/Cocoa/WKProcessPool.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClass.h.
37449        * UIProcess/API/Cocoa/WKProcessPool.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClass.mm.
37450        (-[WKProcessPool init]):
37451        (-[WKProcessPool initWithConfiguration:]):
37452        (-[WKProcessPool dealloc]):
37453        (-[WKProcessPool description]):
37454        (-[WKProcessPool configuration]):
37455        (-[WKProcessPool API::]):
37456        (-[WKProcessPool _setAllowsSpecificHTTPSCertificate:forHost:]):
37457        * UIProcess/API/Cocoa/WKProcessPoolConfiguration.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClassConfiguration.h.
37458        * UIProcess/API/Cocoa/WKProcessPoolConfiguration.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClassConfiguration.mm.
37459        (-[WKProcessPoolConfiguration _injectedBundleURL]):
37460        (-[WKProcessPoolConfiguration _setInjectedBundleURL:]):
37461        (-[WKProcessPoolConfiguration description]):
37462        (-[WKProcessPoolConfiguration copyWithZone:]):
37463        * UIProcess/API/Cocoa/WKProcessPoolConfigurationPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClassConfigurationPrivate.h.
37464        * UIProcess/API/Cocoa/WKProcessPoolInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClassInternal.h.
37465        (WebKit::wrapper):
37466        * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClassPrivate.h.
37467        * UIProcess/API/Cocoa/WKWebView.mm:
37468        (-[WKWebView initWithFrame:configuration:]):
37469        * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
37470        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
37471        (-[WKWebViewConfiguration description]):
37472        (-[WKWebViewConfiguration copyWithZone:]):
37473        (-[WKWebViewConfiguration processPool]):
37474        (-[WKWebViewConfiguration setProcessPool:]):
37475        * UIProcess/API/Cocoa/WKWebViewConfigurationToBeRemoved.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClassPrivate.h.
37476        (-[WKWebViewConfiguration setProcessClass:]):
37477        (-[WKWebViewConfiguration processClass]):
37478        * UIProcess/API/mac/WKView.mm:
37479        * UIProcess/ios/WKContentView.mm:
37480        (-[WKContentView _decidePolicyForGeolocationRequestFromOrigin:frame:request:]):
37481        * WebKit2.xcodeproj/project.pbxproj:
37482
374832014-02-24  Simon Fraser  <simon.fraser@apple.com>
37484
37485        Move non-API files out of WebKit2/UIProcess/API/mac
37486        https://bugs.webkit.org/show_bug.cgi?id=129267
37487
37488        Reviewed by Anders Carlsson.
37489
37490        * UIProcess/mac/FindIndicatorWindow.h: Renamed from Source/WebKit2/UIProcess/API/mac/FindIndicatorWindow.h.
37491        * UIProcess/mac/FindIndicatorWindow.mm: Renamed from Source/WebKit2/UIProcess/API/mac/FindIndicatorWindow.mm.
37492        * UIProcess/mac/PDFViewController.h: Renamed from Source/WebKit2/UIProcess/API/mac/PDFViewController.h.
37493        * UIProcess/mac/PDFViewController.mm: Renamed from Source/WebKit2/UIProcess/API/mac/PDFViewController.mm.
37494        * UIProcess/mac/WKPrintingView.h: Renamed from Source/WebKit2/UIProcess/API/mac/WKPrintingView.h.
37495        * UIProcess/mac/WKPrintingView.mm: Renamed from Source/WebKit2/UIProcess/API/mac/WKPrintingView.mm.
37496        * UIProcess/mac/WKTextInputWindowController.h: Renamed from Source/WebKit2/UIProcess/API/mac/WKTextInputWindowController.h.
37497        * UIProcess/mac/WKTextInputWindowController.mm: Renamed from Source/WebKit2/UIProcess/API/mac/WKTextInputWindowController.mm.
37498        * WebKit2.xcodeproj/project.pbxproj:
37499
375002014-02-24  Simon Fraser  <simon.fraser@apple.com>
37501
37502        Move non-API files in the API/ios directory out to UIProcess/ios
37503        https://bugs.webkit.org/show_bug.cgi?id=129264
37504
37505        Reviewed by Anders Carlsson.
37506
37507        * UIProcess/ios/PageClientImplIOS.h: Renamed from Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.h.
37508        * UIProcess/ios/PageClientImplIOS.mm: Renamed from Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.mm.
37509        * UIProcess/ios/WKActionSheet.h: Renamed from Source/WebKit2/UIProcess/API/ios/WKActionSheet.h.
37510        * UIProcess/ios/WKActionSheet.mm: Renamed from Source/WebKit2/UIProcess/API/ios/WKActionSheet.mm.
37511        * UIProcess/ios/WKContentViewInternal.h: Renamed from Source/WebKit2/UIProcess/API/ios/WKContentViewInternal.h.
37512        * UIProcess/ios/WKGeolocationProviderIOS.h: Renamed from Source/WebKit2/UIProcess/API/ios/WKGeolocationProviderIOS.h.
37513        * UIProcess/ios/WKGeolocationProviderIOS.mm: Renamed from Source/WebKit2/UIProcess/API/ios/WKGeolocationProviderIOS.mm.
37514        * UIProcess/ios/WKInteractionView.h: Renamed from Source/WebKit2/UIProcess/API/ios/WKInteractionView.h.
37515        * UIProcess/ios/WKInteractionView.mm: Renamed from Source/WebKit2/UIProcess/API/ios/WKInteractionView.mm.
37516        * UIProcess/ios/WKScrollView.h: Renamed from Source/WebKit2/UIProcess/API/ios/WKScrollView.h.
37517        * UIProcess/ios/WKScrollView.mm: Renamed from Source/WebKit2/UIProcess/API/ios/WKScrollView.mm.
37518        * WebKit2.xcodeproj/project.pbxproj:
37519
375202014-02-24  Simon Fraser  <simon.fraser@apple.com>
37521
37522        Rename PageClientImplIOS::m_view to m_contentView
37523        https://bugs.webkit.org/show_bug.cgi?id=129124
37524
37525        Reviewed by Benjamin Poulain.
37526        
37527        Simple rename of m_view to m_contentView in preparation for
37528        also holding onto the WKView.
37529
37530        * UIProcess/API/ios/PageClientImplIOS.h:
37531        * UIProcess/API/ios/PageClientImplIOS.mm:
37532        (WebKit::PageClientImpl::PageClientImpl):
37533        (WebKit::PageClientImpl::createDrawingAreaProxy):
37534        (WebKit::PageClientImpl::viewSize):
37535        (WebKit::PageClientImpl::isViewInWindow):
37536        (WebKit::PageClientImpl::processDidExit):
37537        (WebKit::PageClientImpl::didRelaunchProcess):
37538        (WebKit::PageClientImpl::decidePolicyForGeolocationPermissionRequest):
37539        (WebKit::PageClientImpl::didCommitLoadForMainFrame):
37540        (WebKit::PageClientImpl::interpretKeyEvent):
37541        (WebKit::PageClientImpl::positionInformationDidChange):
37542        (WebKit::PageClientImpl::selectionDidChange):
37543        (WebKit::PageClientImpl::screenToRootView):
37544        (WebKit::PageClientImpl::rootViewToScreen):
37545        (WebKit::PageClientImpl::setAcceleratedCompositingRootLayer):
37546        (WebKit::PageClientImpl::takeViewSnapshot):
37547        (WebKit::PageClientImpl::didGetTapHighlightGeometries):
37548        (WebKit::PageClientImpl::didCommitLayerTree):
37549        (WebKit::PageClientImpl::startAssistingNode):
37550        (WebKit::PageClientImpl::stopAssistingNode):
37551
375522014-02-24  Enrique Ocaña González  <eocanha@igalia.com>
37553
37554        REGRESSION(r164438): [GTK] Tests /webkit2/WebKitWebView/tls-errors-policy and /webkit2/WebKitWebContext/uri-scheme fail
37555        https://bugs.webkit.org/show_bug.cgi?id=129252
37556
37557        Reviewed by Carlos Garcia Campos.
37558
37559        * UIProcess/API/gtk/WebKitPrivate.cpp: Manage error values generated by the user application and not present in WebCore
37560        (toWebKitError):
37561        (toWebCoreError):
37562
375632014-02-24  Alexey Proskuryakov  <ap@apple.com>
37564
37565        <rdar://problem/16059894> Update AppleConnect sandbox profile for XPC process names.
37566
37567        Patch by Ivan Krstić, reviewed and landed by me.
37568
37569        * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
37570
375712014-02-24  Tamas Gergely  <tgergely.u-szeged@partner.samsung.com>
37572
37573        Code cleanup: remove leftover ENABLE(WORKERS) macros and support.
37574        https://bugs.webkit.org/show_bug.cgi?id=129255
37575
37576        Reviewed by Csaba Osztrogonác.
37577
37578        ENABLE_WORKERS macro was removed in r159679.
37579        Support is now also removed from xcconfig files.
37580
37581        * Configurations/FeatureDefines.xcconfig:
37582
375832014-02-24  Iago Toral Quiroga  <itoral@igalia.com>
37584
37585        [GTK] Wrong active context when destroying GL objects.
37586        https://bugs.webkit.org/show_bug.cgi?id=129244
37587
37588        Reviewed by Martin Robinson.
37589
37590        * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
37591        (WebKit::LayerTreeHostGtk::invalidate): make context current before destroying GL objects.
37592
375932014-02-24  Koop Mast <kwm@FreeBSD.org>
37594
37595        Remove unused error.h header.
37596        https://bugs.webkit.org/show_bug.cgi?id=126774
37597
37598        Reviewed by Anders Carlsson.
37599
37600        This header doesn't exists on FreeBSD. According to
37601        https://www.gnu.org/software/gnulib/manual/html_node/error_002eh.html
37602        the function that this header implements are not present in the file.
37603        So there isn't any need for this header.
37604
37605        * NetworkProcess/unix/NetworkProcessMainUnix.cpp:
37606
376072014-02-24  David Kilzer  <ddkilzer@apple.com>
37608
37609        Remove redundant setting in FeatureDefines.xcconfig
37610
37611        * Configurations/FeatureDefines.xcconfig:
37612
376132014-02-24  Carlos Garcia Campos  <cgarcia@igalia.com>
37614
37615        [GTK] Remove unneeded method webkitWebViewBaseRequestExitFullScreen
37616        https://bugs.webkit.org/show_bug.cgi?id=129245
37617
37618        Reviewed by Sergio Villar Senin.
37619
37620        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
37621        (webkitWebViewBaseKeyPressEvent): Call FullscreenManager::requestExitFullScreen() directly.
37622        * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
37623
376242014-02-23  Dan Bernstein  <mitz@apple.com>
37625
37626        <rdar://problem/16144508> [iOS] Some definitions of INSTALL_PATH don’t account for INSTALL_PATH_PREFIX
37627        https://bugs.webkit.org/show_bug.cgi?id=129241
37628
37629        Reviewed by Mark Rowe.
37630
37631        * Configurations/Base.xcconfig: Define INSTALL_PATH here in terms of INSTALL_PATH_ACTUAL.
37632        * Configurations/BaseLegacyProcess.xcconfig: Define only INSTALL_PATH_ACTUAL.
37633        * Configurations/BaseTarget.xcconfig: Simplify the definition of
37634        NORMAL_WEBKIT2_FRAMEWORKS_DIR, now that it shouldn’t include SDKROOT for the Simulator.
37635        * Configurations/BaseXPCService.xcconfig: Define only INSTALL_PATH_ACTUAL.
37636        * Configurations/WebKit2.xcconfig: Ditto.
37637
376382014-02-23  Sam Weinig  <sam@webkit.org>
37639
37640        Update FeatureDefines.xcconfig
37641
37642        Rubber-stamped by Anders Carlsson.
37643
37644        * Configurations/FeatureDefines.xcconfig:
37645
376462014-02-23  Sam Weinig  <sam@webkit.org>
37647
37648        [WebKit2] Add C-SPI to enable/disable telephone number detection
37649        https://bugs.webkit.org/show_bug.cgi?id=129239
37650
37651        Reviewed by Dean Jackson.
37652
37653        * UIProcess/API/C/WKPreferences.cpp:
37654        (WKPreferencesSetTelephoneNumberParsingEnabled):
37655        (WKPreferencesGetTelephoneNumberParsingEnabled):
37656        * UIProcess/API/C/WKPreferencesPrivate.h:
37657
376582014-02-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
37659
37660        Change a url parameter type with URL in NavigatorContentUtils
37661        https://bugs.webkit.org/show_bug.cgi?id=129202
37662
37663        Reviewed by Sam Weinig.
37664
37665        It would be good if we use *URL* for url parameters instead of using String.
37666
37667        Merge from blink. https://src.chromium.org/viewvc/blink?view=rev&revision=165458.
37668
37669        * WebProcess/WebCoreSupport/WebNavigatorContentUtilsClient.h:
37670        (WebKit::WebNavigatorContentUtilsClient::isProtocolHandlerRegistered):
37671        (WebKit::WebNavigatorContentUtilsClient::unregisterProtocolHandler):
37672
376732014-02-23  Sam Weinig  <sam@webkit.org>
37674
37675        Move telephone number detection behind its own ENABLE macro
37676        https://bugs.webkit.org/show_bug.cgi?id=129236
37677
37678        Reviewed by Dean Jackson.
37679
37680        * Configurations/FeatureDefines.xcconfig:
37681        Add ENABLE_TELEPHONE_NUMBER_DETECTION.
37682
376832014-02-23  Diego Pino García  <dpino@igalia.com>
37684
37685        [GTK] Fix build after Web Inspector code reorganization (r164543)
37686        https://bugs.webkit.org/show_bug.cgi?id=129231
37687
37688        Reviewed by Dean Jackson.
37689
37690        * PlatformGTK.cmake:
37691        Modify paths to Web Inspector code.
37692
376932014-02-22  Joseph Pecoraro  <pecoraro@apple.com>
37694
37695        Remove some unreachable code (-Wunreachable-code)
37696        https://bugs.webkit.org/show_bug.cgi?id=129220
37697
37698        Reviewed by Eric Carlson.
37699
37700        * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
37701        (WebKit::toAPI):
37702
377032014-02-22  Dan Bernstein  <mitz@apple.com>
37704
37705        [Cocoa] WKUIDelegate.h is a project header
37706        https://bugs.webkit.org/show_bug.cgi?id=129215
37707
37708        Reviewed by Anders Carlsson.
37709
37710        * WebKit2.xcodeproj/project.pbxproj: Make it a public header.
37711
377122014-02-22  Dan Bernstein  <mitz@apple.com>
37713
37714        <rdar://problem/12500358> [Cocoa] Development variants of XPC services should not be installed in WebKit2.framework/XPCServices
37715        https://bugs.webkit.org/show_bug.cgi?id=129197
37716
37717        Reviewed by Sam Weinig.
37718
37719        * Configurations/BaseXPCService.xcconfig: Made INSTALL_PATH vary based on
37720        WK_XPC_SERVICE_VARIANT. For the Development variant, use an install path outside the
37721        framework. Note that engineering builds using the build action continue to have the
37722        Development variants copied into the framework by a script build phase.
37723        * Configurations/DatabaseService.Development.xcconfig: Set WK_XPC_SERVICE_VARIANT.
37724        * Configurations/DatabaseService.xcconfig: Ditto.
37725        * Configurations/NetworkService.Development.xcconfig: Ditto.
37726        * Configurations/NetworkService.xcconfig: Ditto.
37727        * Configurations/PluginService.32.xcconfig: Ditto.
37728        * Configurations/PluginService.64.xcconfig: Ditto.
37729        * Configurations/PluginService.Development.xcconfig: Ditto.
37730        * Configurations/WebContentService.Development.xcconfig: Ditto.
37731        * Configurations/WebContentService.xcconfig: Ditto.
37732
377332014-02-21  Brent Fulgham  <bfulgham@apple.com>
37734
37735        Extend media support for WebVTT sources
37736        https://bugs.webkit.org/show_bug.cgi?id=129156
37737
37738        Reviewed by Eric Carlson.
37739
37740        * Configurations/FeatureDefines.xcconfig: Add new feature define for AVF_CAPTIONS
37741
377422014-02-21  Enrica Casucci  <enrica@apple.com>
37743
37744        [iOS WebKit2] Keyboard appears every time a link is tapped after searching Google
37745        <rdar://problem/16072563>.
37746
37747        Reviewed by Benjamin Poulain.
37748
37749        We need to stop assisting the node if we have
37750        navigated to a different page.
37751
37752        * UIProcess/API/ios/WKContentView.mm:
37753        (-[WKContentView _didCommitLoadForMainFrame]):
37754
377552014-02-21  Dan Bernstein  <mitz@apple.com>
37756
37757        Made WKWebView implement all WKContentViewDelegate methods.
37758
37759        Reviewed by Anders Carlsson.
37760
37761        * UIProcess/API/Cocoa/WKWebView.mm:
37762        (-[WKWebView takeViewSnapshotForContentView:]): Moved from WKViewIOS.mm.
37763        * UIProcess/API/ios/WKContentView.h: Made all protocol methods required.
37764        * UIProcess/API/ios/WKViewIOS.mm:
37765        (-[WKView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]): Removed code
37766        to set self as the delegate on the content view.
37767
377682014-02-21  Sam Weinig  <sam@webkit.org>
37769
37770        <rdar://problem/16073882> Please add _AbandonCoalition key to plugin XPC service Info.plist
37771
37772        Reviewed by Anders Carlsson.
37773
37774        * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
37775        * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/Info.plist:
37776
377772014-02-21  Jeffrey Pfau  <jpfau@apple.com>
37778
37779        [Mac] Cache callbacks for cache partitioning may be passed null
37780        https://bugs.webkit.org/show_bug.cgi?id=129175
37781
37782        Reviewed by Brady Eidson.
37783
37784        * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp:
37785        (WebKit::WebResourceCacheManager::cfURLCacheHostNamesWithCallback):
37786
377872014-02-21  Benjamin Poulain  <bpoulain@apple.com>
37788
37789        [iOS][WK2] Update the visible content rects on zoom
37790        https://bugs.webkit.org/show_bug.cgi?id=129174
37791
37792        Reviewed by Simon Fraser.
37793
37794        Generalize _updateVisibleContentRects to also act during the zoom and not only at the end.
37795
37796        * UIProcess/API/Cocoa/WKWebView.mm:
37797        (-[WKWebView scrollViewDidZoom:]):
37798        * UIProcess/API/ios/WKViewIOS.mm:
37799        (-[WKView scrollViewDidZoom:]):
37800
378012014-02-21  Benjamin Poulain  <benjamin@webkit.org>
37802
37803        jsDocumentPrototypeFunctionGetElementById should not create an AtomicString for the function argument
37804        https://bugs.webkit.org/show_bug.cgi?id=128893
37805
37806        Reviewed by Darin Adler.
37807
37808        * WebProcess/InjectedBundle/InjectedBundle.cpp:
37809        (WebKit::InjectedBundle::pageNumberForElementById): Remove the explicit conversion to use the right overload.
37810
378112014-02-21  Enrica Casucci  <enrica@apple.com>
37812
37813        Support WebSelections in WK2 on iOS.
37814        https://bugs.webkit.org/show_bug.cgi?id=127015
37815        <rdar://problem/15211964>
37816
37817        Reviewed by Benjamin Poulain.
37818
37819        This is the remaining work on block selections for iOS in WK2.
37820        Once a block selection has been created with a long press gesture
37821        on a selectable area, we can interact with it by touching the four
37822        handles at the top, right, bottom and left side of the selection box.
37823        Expanding or shrinking a block selection requires finding the next/previous
37824        block in the direction of the movement, depending on the handle we
37825        are interacting with.
37826        Every time a new block is selected, we compute the thresholds required
37827        to trigger another block change. The thresholds are sent back to the
37828        UIProcess that will use this information to decide when to activate
37829        the new selection, either bigger or smaller.
37830        This patch also fixes a bug in selectWithTwoTouches where the points
37831        were not mapped to the active frame.
37832
37833        * Shared/ios/WKGestureTypes.h:
37834        * UIProcess/API/ios/PageClientImplIOS.h:
37835        * UIProcess/API/ios/PageClientImplIOS.mm:
37836        (WebKit::PageClientImpl::didUpdateBlockSelectionWithTouches):
37837        * UIProcess/API/ios/WKContentView.mm:
37838        (-[WKContentView _didUpdateBlockSelectionWithTouches:withFlags:growThreshold:shrinkThreshold:]):
37839        * UIProcess/API/ios/WKContentViewInternal.h:
37840        * UIProcess/API/ios/WKInteractionView.h:
37841        * UIProcess/API/ios/WKInteractionView.mm:
37842        (-[WKInteractionView hasSelectablePositionAtPoint:]):
37843        (-[WKInteractionView clearSelection]):
37844        (toWKHandlePosition):
37845        (-[WKInteractionView _didUpdateBlockSelectionWithTouches:WebKit::withFlags:WebKit::growThreshold:shrinkThreshold:]):
37846        (-[WKInteractionView changeBlockSelectionWithTouchAt:withSelectionTouch:forHandle:]):
37847        * UIProcess/PageClient.h:
37848        * UIProcess/WebPageProxy.h:
37849        * UIProcess/WebPageProxy.messages.in:
37850        * UIProcess/ios/WebPageProxyIOS.mm:
37851        (WebKit::WebPageProxy::updateBlockSelectionWithTouches):
37852        (WebKit::WebPageProxy::didUpdateBlockSelectionWithTouches):
37853        * WebProcess/WebPage/WebPage.cpp:
37854        * WebProcess/WebPage/WebPage.h:
37855        * WebProcess/WebPage/WebPage.messages.in:
37856        * WebProcess/WebPage/ios/WebPageIOS.mm:
37857        (WebKit::WebPage::rangeForWebSelectionAtPosition):
37858        (WebKit::WebPage::rangeForBlockAtPoint):
37859        (WebKit::WebPage::selectWithGesture):
37860        (WebKit::distanceBetweenRectsForPosition):
37861        (WebKit::rectsEssentiallyTheSame):
37862        (WebKit::containsRange):
37863        (WebKit::unionDOMRanges):
37864        (WebKit::computeEdgeCenter):
37865        (WebKit::WebPage::expandedRangeFromHandle):
37866        (WebKit::WebPage::contractedRangeFromHandle):
37867        (WebKit::WebPage::computeExpandAndShrinkThresholdsForHandle):
37868        (WebKit::shouldExpand):
37869        (WebKit::WebPage::changeBlockSelection):
37870        (WebKit::WebPage::updateBlockSelectionWithTouches):
37871        (WebKit::WebPage::clearSelection):
37872        (WebKit::WebPage::selectWithTwoTouches):
37873        (WebKit::WebPage::getPositionInformation):
37874
378752014-02-21  Anders Carlsson  <andersca@apple.com>
37876
37877        Make sure to invoke the completion handler for JS alerts
37878        https://bugs.webkit.org/show_bug.cgi?id=129158
37879
37880        Reviewed by Alexey Proskuryakov.
37881
37882        * UIProcess/API/C/WKPage.cpp:
37883        (WKPageSetPageUIClient):
37884
378852014-02-20  Zalan Bujtas  <zalan@apple.com>
37886
37887        Remove redundant deviceScaleFactor() functions and make callers use Document::deviceScaleFactor() when accessible.
37888        https://bugs.webkit.org/show_bug.cgi?id=129137
37889
37890        Reviewed by Simon Fraser.
37891
37892        No change in behavior.
37893
37894        * WebProcess/WebPage/FindController.cpp:
37895        (WebKit::FindController::getFindIndicatorBitmapAndRect):
37896
378972014-02-20  Benjamin Poulain  <bpoulain@apple.com>
37898
37899        Add a missing piece of r164469
37900
37901        * UIProcess/API/Cocoa/WKWebView.mm:
37902        (-[WKWebView scrollViewWillBeginDragging:]):
37903        I forgot to duplicate the change from WKViewIOS in r164469.
37904
379052014-02-20  Benjamin Poulain  <bpoulain@apple.com>
37906
37907        WKInteractionView always blocks the main thread when sending touch events
37908        https://bugs.webkit.org/show_bug.cgi?id=129059
37909
37910        Reviewed by Enrica Casucci.
37911
37912        Add the asynchronous dispatching to WebKit2.
37913
37914        * Shared/NativeWebTouchEvent.h:
37915        (WebKit::NativeWebTouchEvent::uniqueId):
37916        * Shared/ios/NativeWebTouchEventIOS.mm:
37917        (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
37918        * UIProcess/API/ios/PageClientImplIOS.mm:
37919        (WebKit::PageClientImpl::doneWithTouchEvent):
37920        * UIProcess/API/ios/WKContentView.h:
37921        * UIProcess/API/ios/WKContentView.mm:
37922        (-[WKContentView willStartUserTriggeredScroll]):
37923        (-[WKContentView willStartUserTriggeredZoom]):
37924        (-[WKContentView _webTouchEvent:WebKit::preventsNativeGestures:]):
37925        * UIProcess/API/ios/WKContentViewInternal.h:
37926        * UIProcess/API/ios/WKInteractionView.h:
37927        * UIProcess/API/ios/WKInteractionView.mm:
37928        (-[WKInteractionView _webTouchEventsRecognized:]):
37929        (-[WKInteractionView _webTouchEvent:WebKit::preventsNativeGestures:]):
37930        (-[WKInteractionView _willStartUserTriggeredScrollingOrZooming]):
37931        * UIProcess/API/ios/WKViewIOS.mm:
37932        (-[WKView scrollViewWillBeginDragging:]):
37933        * WebKit2.xcodeproj/project.pbxproj:
37934
379352014-02-20  Benjamin Poulain  <bpoulain@apple.com>
37936
37937        Start fixing the view states driven by the WKScrollView
37938        https://bugs.webkit.org/show_bug.cgi?id=129140
37939
37940        Reviewed by Tim Horton and Simon Fraser.
37941
37942        WKScrollView creates a "window" over WKContentView with an area that is exposed,
37943        an area that is unobcured and with a certain scale.
37944
37945        Instead of having 3 loosely related paths for updating WKContentView
37946        when the content "window" change, everything is consolidated behind the
37947        single API -[WKContentView didUpdateVisibleRect:unobscuredRect:scale:].
37948
37949        This patch only fixes the content updates from the UI process side to keep things simple.
37950
37951        * UIProcess/API/Cocoa/WKWebView.mm:
37952        (-[WKWebView _didFinishScrolling]):
37953        (-[WKWebView scrollViewDidEndDragging:willDecelerate:]):
37954        (-[WKWebView scrollViewDidEndDecelerating:]):
37955        (-[WKWebView scrollViewDidScrollToTop:]):
37956        (-[WKWebView scrollViewDidScroll:]):
37957        (-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
37958        (-[WKWebView _frameOrBoundsChanged]):
37959        (-[WKWebView _updateContentWindow]):
37960        (-[WKWebView _setObscuredInsets:]):
37961        * UIProcess/API/ios/WKContentView.h:
37962        * UIProcess/API/ios/WKContentView.mm:
37963        (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:]):
37964        (-[WKContentView _updateFixedPositionRect]):
37965        (-[WKContentView didFinishScrolling]):
37966        (-[WKContentView didZoomToScale:]):
37967        * UIProcess/API/ios/WKViewIOS.mm:
37968        (-[WKView contentView:didCommitLayerTree:]):
37969        (-[WKView _didFinishScrolling]):
37970        (-[WKView scrollViewDidEndDragging:willDecelerate:]):
37971        (-[WKView scrollViewDidEndDecelerating:]):
37972        (-[WKView scrollViewDidScrollToTop:]):
37973        (-[WKView scrollViewDidScroll:]):
37974        (-[WKView scrollViewDidEndZooming:withView:atScale:]):
37975        Scrolling is modified to take into account the view position and the obcured content.
37976        Instead of driving the scrolling position from the UIScrollView delegate callbacks,
37977        we use changes in unobscured rect to find changes in "content visible scroll position".
37978
37979        WebPageProxy::didFinishScrolling() is removed. All the scrollOffset updates now go through
37980        the ScrollingCoordinator.
37981
37982        (-[WKView _frameOrBoundsChanged]):
37983        (-[WKView _updateContentWindow]):
37984        (-[WKView _setObscuredInsets:]):
37985        * UIProcess/WebPageProxy.h:
37986        * UIProcess/ios/WebPageProxyIOS.mm:
37987        (WebKit::WebPageProxy::unobscuredContentRect):
37988        (WebKit::WebPageProxy::setUnobscuredContentRect):
37989        * WebProcess/WebPage/WebPage.messages.in:
37990        * WebProcess/WebPage/ios/WebPageIOS.mm:
37991
379922014-02-20  Tim Horton  <timothy_horton@apple.com>
37993
37994        Fix a build warning by moving some WKWebView methods from the private category to WKWebView itself.
37995
37996        Reviewed by Anders Carlsson.
37997
37998        * UIProcess/API/Cocoa/WKWebView.mm:
37999        (-[WKWebView setAllowsBackForwardNavigationGestures:]):
38000        (-[WKWebView allowsBackForwardNavigationGestures]):
38001
380022014-02-20  Enrica Casucci  <enrica@apple.com>
38003
38004        ASSERT on touches callbacks after r164409 on iOS.
38005        https://bugs.webkit.org/show_bug.cgi?id=129135
38006
38007        Reviewed by Alexey Proskuryakov.
38008
38009        The change used incorrecly true and false in TouchesCallbacks and
38010        ImageCallback. It also reintroduced isMainThread() which doesn't work
38011        for iOS.
38012
38013        * UIProcess/GenericCallback.h:
38014        (WebKit::CallbackBase::generateCallbackID):
38015        (WebKit::ImageCallback::performCallbackWithReturnValue):
38016        (WebKit::ImageCallback::invalidate):
38017        * UIProcess/WebPageProxy.h:
38018        (WebKit::TouchesCallback::performCallbackWithReturnValue):
38019        (WebKit::TouchesCallback::invalidate):
38020
380212014-02-20  Anders Carlsson  <andersca@apple.com>
38022
38023        We need something like WKPageUIClient in the Obj-C API
38024        https://bugs.webkit.org/show_bug.cgi?id=129123
38025        <rdar://problem/15338439>
38026
38027        Reviewed by Sam Weinig.
38028
38029        * UIProcess/API/APIUIClient.h:
38030        * UIProcess/API/Cocoa/WKUIDelegate.h: Added.
38031        * UIProcess/API/Cocoa/WKWebView.h:
38032        * UIProcess/API/Cocoa/WKWebView.mm:
38033        (-[WKWebView initWithFrame:configuration:]):
38034        (-[WKWebView UIDelegate]):
38035        (-[WKWebView setUIDelegate:]):
38036        * UIProcess/Cocoa/UIClient.h: Added.
38037        * UIProcess/Cocoa/UIClient.mm: Added.
38038        (WebKit::UIClient::UIClient):
38039        (WebKit::UIClient::~UIClient):
38040        (WebKit::UIClient::delegate):
38041        (WebKit::UIClient::setDelegate):
38042        (WebKit::UIClient::runJavaScriptAlert):
38043        (WebKit::UIClient::runJavaScriptConfirm):
38044        (WebKit::UIClient::runJavaScriptPrompt):
38045        * UIProcess/WebPageProxy.h:
38046        (WebKit::WebPageProxy::uiClient):
38047        * WebKit2.xcodeproj/project.pbxproj:
38048
380492014-02-20  Brady Eidson  <beidson@apple.com>
38050
38051        Add very basic image control rendering
38052        https://bugs.webkit.org/show_bug.cgi?id=129080
38053
38054        Reviewed by Tim Horton.
38055
38056        * WebProcess/InjectedBundle/InjectedBundle.cpp:
38057        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Expose the 
38058          imageControlsEnabled setting to WKTR.
38059
380602014-02-20  Tim Horton  <timothy_horton@apple.com>
38061
38062        Add magnification and swiping properties to WKWebView
38063        https://bugs.webkit.org/show_bug.cgi?id=129117
38064
38065        Reviewed by Dan Bernstein.
38066
38067        * UIProcess/API/Cocoa/WKViewPrivate.h:
38068        Move allowsBackForwardNavigationGestures out of a Mac-only block.
38069
38070        * UIProcess/API/Cocoa/WKWebView.h:
38071        Add allowsBackForwardNavigationGestures to WKWebView for both platforms.
38072        Add magnification properties to WKWebView for Mac.
38073
38074        * UIProcess/API/Cocoa/WKWebView.mm:
38075        (-[WKWebView contentView:didCommitLayerTree:WebKit::]):
38076        (-[WKWebView setAllowsBackForwardNavigationGestures:]):
38077        (-[WKWebView allowsBackForwardNavigationGestures]):
38078        (-[WKWebView setAllowsMagnification:]):
38079        (-[WKWebView allowsMagnification]):
38080        (-[WKWebView setMagnification:]):
38081        (-[WKWebView magnification]):
38082        (-[WKWebView setMagnification:centeredAtPoint:]):
38083        For iOS, copy implementations from WKViewIOS.
38084        For Mac, forward to the inner WKView.
38085
38086        * UIProcess/API/ios/WKViewIOS.mm:
38087        (-[WKView setAllowsBackForwardNavigationGestures:]):
38088        Fix the logic to tear down the ViewGestureController.
38089
38090        * UIProcess/API/mac/WKView.mm:
38091        (-[WKView setMagnification:centeredAtPoint:]):
38092        (-[WKView setMagnification:]):
38093        (-[WKView magnification]):
38094        Use CG types for API.
38095
38096== Rolled over to ChangeLog-2014-02-20 ==
38097