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