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