f71b0441f5ab3c369e5617efe281166d2d42c439
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2014-01-23  Anders Carlsson  <andersca@apple.com>
2
3         Move policy client into WKPage.cpp and get rid of WebPolicyClient files
4         https://bugs.webkit.org/show_bug.cgi?id=127536
5
6         Reviewed by Tim Horton.
7
8         * UIProcess/API/C/WKPage.cpp:
9         (WKPageSetPagePolicyClient):
10         * UIProcess/WebPolicyClient.cpp: Removed.
11         * UIProcess/WebPolicyClient.h: Removed.
12         * WebKit2.xcodeproj/project.pbxproj:
13
14 2014-01-23  Joseph Pecoraro  <pecoraro@apple.com>
15
16         Web Inspector: Remove recompileAllJSFunctions timer in ScriptDebugServer
17         https://bugs.webkit.org/show_bug.cgi?id=127409
18
19         Reviewed by Geoffrey Garen.
20
21         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
22         (WebKit::WebInspectorFrontendClient::closeWindow):
23         * WebProcess/WebPage/WebInspector.cpp:
24         (WebKit::WebInspector::remoteFrontendDisconnected):
25         Include InspectorDisconnectReason.
26
27 2014-01-23  Anders Carlsson  <andersca@apple.com>
28
29         Only WKPage should know about WebPolicyClient
30         https://bugs.webkit.org/show_bug.cgi?id=127535
31
32         Reviewed by Andreas Kling.
33
34         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
35         (setUpPagePolicyClient):
36         (-[WKBrowsingContextController setPolicyDelegate:]):
37         * UIProcess/WebInspectorProxy.cpp:
38         (WebKit::WebInspectorProxy::createInspectorPage):
39
40 2014-01-23  Anders Carlsson  <andersca@apple.com>
41
42         Simplify API::LoaderClient management
43         https://bugs.webkit.org/show_bug.cgi?id=127531
44
45         Reviewed by Tim Horton.
46
47         Add default implementations to API::LoaderClient and change WebPageProxy::setLoaderClient to
48         always create a policy client, even if the loader client set is null. That way we don't have to null
49         check the loader client everywhere.
50
51         * UIProcess/API/APILoaderClient.h:
52         (API::LoaderClient::didStartProvisionalLoadForFrame):
53         (API::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
54         (API::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
55         (API::LoaderClient::didCommitLoadForFrame):
56         (API::LoaderClient::didFinishDocumentLoadForFrame):
57         (API::LoaderClient::didFinishLoadForFrame):
58         (API::LoaderClient::didFailLoadWithErrorForFrame):
59         (API::LoaderClient::didSameDocumentNavigationForFrame):
60         (API::LoaderClient::didReceiveTitleForFrame):
61         (API::LoaderClient::didFirstLayoutForFrame):
62         (API::LoaderClient::didFirstVisuallyNonEmptyLayoutForFrame):
63         (API::LoaderClient::didRemoveFrameFromHierarchy):
64         (API::LoaderClient::didDisplayInsecureContentForFrame):
65         (API::LoaderClient::didRunInsecureContentForFrame):
66         (API::LoaderClient::didDetectXSSForFrame):
67         (API::LoaderClient::didLayout):
68         (API::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame):
69         (API::LoaderClient::didReceiveAuthenticationChallengeInFrame):
70         (API::LoaderClient::didStartProgress):
71         (API::LoaderClient::didChangeProgress):
72         (API::LoaderClient::didFinishProgress):
73         (API::LoaderClient::processDidBecomeUnresponsive):
74         (API::LoaderClient::interactionOccurredWhileProcessUnresponsive):
75         (API::LoaderClient::processDidBecomeResponsive):
76         (API::LoaderClient::processDidCrash):
77         (API::LoaderClient::didChangeBackForwardList):
78         (API::LoaderClient::willGoToBackForwardListItem):
79         (API::LoaderClient::pluginLoadPolicy):
80         (API::LoaderClient::didFailToInitializePlugin):
81         (API::LoaderClient::didBlockInsecurePluginVersion):
82         (API::LoaderClient::webGLLoadPolicy):
83         * UIProcess/WebPageProxy.cpp:
84         (WebKit::WebPageProxy::setLoaderClient):
85         (WebKit::WebPageProxy::didChangeBackForwardList):
86         (WebKit::WebPageProxy::willGoToBackForwardListItem):
87         (WebKit::WebPageProxy::findPlugin):
88         (WebKit::WebPageProxy::didStartProgress):
89         (WebKit::WebPageProxy::didChangeProgress):
90         (WebKit::WebPageProxy::didFinishProgress):
91         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
92         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
93         (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
94         (WebKit::WebPageProxy::didCommitLoadForFrame):
95         (WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
96         (WebKit::WebPageProxy::didFinishLoadForFrame):
97         (WebKit::WebPageProxy::didFailLoadForFrame):
98         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
99         (WebKit::WebPageProxy::didReceiveTitleForFrame):
100         (WebKit::WebPageProxy::didFirstLayoutForFrame):
101         (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
102         (WebKit::WebPageProxy::didLayout):
103         (WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
104         (WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
105         (WebKit::WebPageProxy::didRunInsecureContentForFrame):
106         (WebKit::WebPageProxy::didDetectXSSForFrame):
107         (WebKit::WebPageProxy::webGLPolicyForURL):
108         (WebKit::WebPageProxy::processDidBecomeUnresponsive):
109         (WebKit::WebPageProxy::interactionOccurredWhileProcessUnresponsive):
110         (WebKit::WebPageProxy::processDidBecomeResponsive):
111         (WebKit::WebPageProxy::processDidCrash):
112         (WebKit::WebPageProxy::canAuthenticateAgainstProtectionSpaceInFrame):
113         (WebKit::WebPageProxy::didReceiveAuthenticationChallengeProxy):
114         (WebKit::WebPageProxy::didFailToInitializePlugin):
115         (WebKit::WebPageProxy::didBlockInsecurePluginVersion):
116
117 2014-01-23  Anders Carlsson  <andersca@apple.com>
118
119         Simplify API::PolicyClient management
120         https://bugs.webkit.org/show_bug.cgi?id=127529
121
122         Reviewed by Tim Horton.
123
124         Add default implementations to API::PolicyClient and change WebPageProxy::setPolicyClient to
125         always create a policy client, even if the policy object set is null. That way we don't have to null
126         check the policy client everywhere.
127
128         * UIProcess/API/APIPolicyClient.h:
129         (API::PolicyClient::decidePolicyForNavigationAction):
130         (API::PolicyClient::decidePolicyForNewWindowAction):
131         (API::PolicyClient::decidePolicyForResponse):
132         (API::PolicyClient::unableToImplementPolicy):
133         * UIProcess/WebPageProxy.cpp:
134         (WebKit::WebPageProxy::setPolicyClient):
135         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
136         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
137         (WebKit::WebPageProxy::decidePolicyForResponse):
138         (WebKit::WebPageProxy::unableToImplementPolicy):
139
140 2014-01-23  Simon Fraser  <simon.fraser@apple.com>
141
142         Fix GTK.
143
144         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
145         (webkitWebPageDidReceiveMessage):
146
147 2014-01-23  Anders Carlsson  <andersca@apple.com>
148
149         Add an APILoaderClient base class
150         https://bugs.webkit.org/show_bug.cgi?id=127527
151
152         Reviewed by Tim Horton.
153
154         * UIProcess/API/APILoaderClient.h: Added.
155         (API::LoaderClient::~LoaderClient):
156         * UIProcess/API/C/WKPage.cpp:
157         (WKPageSetPageLoaderClient):
158         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
159         (setUpPageLoaderClient):
160         (-[WKBrowsingContextController setLoadDelegate:]):
161         (+[WKBrowsingContextController _browsingContextControllerForPageRef:]):
162         * UIProcess/WebLoaderClient.cpp:
163         (WebKit::WebLoaderClient::WebLoaderClient):
164         * UIProcess/WebLoaderClient.h:
165         * UIProcess/WebPageProxy.cpp:
166         (WebKit::WebPageProxy::setLoaderClient):
167         (WebKit::WebPageProxy::close):
168         (WebKit::WebPageProxy::didChangeBackForwardList):
169         (WebKit::WebPageProxy::willGoToBackForwardListItem):
170         (WebKit::WebPageProxy::findPlugin):
171         (WebKit::WebPageProxy::didStartProgress):
172         (WebKit::WebPageProxy::didChangeProgress):
173         (WebKit::WebPageProxy::didFinishProgress):
174         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
175         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
176         (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
177         (WebKit::WebPageProxy::didCommitLoadForFrame):
178         (WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
179         (WebKit::WebPageProxy::didFinishLoadForFrame):
180         (WebKit::WebPageProxy::didFailLoadForFrame):
181         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
182         (WebKit::WebPageProxy::didReceiveTitleForFrame):
183         (WebKit::WebPageProxy::didFirstLayoutForFrame):
184         (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
185         (WebKit::WebPageProxy::didLayout):
186         (WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
187         (WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
188         (WebKit::WebPageProxy::didRunInsecureContentForFrame):
189         (WebKit::WebPageProxy::didDetectXSSForFrame):
190         (WebKit::WebPageProxy::webGLPolicyForURL):
191         (WebKit::WebPageProxy::processDidBecomeUnresponsive):
192         (WebKit::WebPageProxy::interactionOccurredWhileProcessUnresponsive):
193         (WebKit::WebPageProxy::processDidBecomeResponsive):
194         (WebKit::WebPageProxy::processDidCrash):
195         (WebKit::WebPageProxy::canAuthenticateAgainstProtectionSpaceInFrame):
196         (WebKit::WebPageProxy::didReceiveAuthenticationChallengeProxy):
197         (WebKit::WebPageProxy::didFailToInitializePlugin):
198         (WebKit::WebPageProxy::didBlockInsecurePluginVersion):
199         * UIProcess/WebPageProxy.h:
200         (WebKit::WebPageProxy::loaderClient):
201         * WebKit2.xcodeproj/project.pbxproj:
202
203 2014-01-23  Ryuan Choi  <ryuan.choi@samsung.com>
204
205         Build break after r162650
206         https://bugs.webkit.org/show_bug.cgi?id=127525
207
208         Reviewed by Anders Carlsson.
209
210         WKPreferences.h was renamed to WKPreferencesRef.
211
212         * UIProcess/API/C/WKPreferences.cpp:
213
214 2014-01-23  Anders Carlsson  <andersca@apple.com>
215
216         Fix a refactoring bug that crept in and is causing the inspector to crash.
217
218         * UIProcess/WebPolicyClient.cpp:
219         (WebKit::WebPolicyClient::decidePolicyForResponse):
220
221 2014-01-23  Simon Fraser  <simon.fraser@apple.com>
222
223         Make visibleContentRect() return actualVisibleContentRect() on iOS most of the time
224         https://bugs.webkit.org/show_bug.cgi?id=127456
225         
226         Reviewed by Antti Koivisto.
227         
228         On iOS, visibleContentRect() returns the entire document rect for historical
229         reasons, and actualVisibleContentRect() returns what visibleContentRect()
230         returns on other platforms.
231         
232         In addition, actualVisibleContentRect() was returning an empty rect in WK2.
233         
234         Reduce the confusion of #ifdefs by making visibleContentRect() behave like
235         actualVisibleContentRect() by default on iOS. Where it needs the old behavior,
236         an optional parameter, LegacyIOSDocumentVisibleRect, provides this.
237         
238         Achieve this by having the virtual ScrollableArea::visibleContentRectInternal(),
239         which is called by non-virtual visibleContentRect() and visibleContentRectIncludingScrollbars().
240         
241         Similarly clean up visibleHeight/visibleWidth functions by having visibleSize() be virtual,
242         with non-virtual visibleHeight() and visibleWidth().
243         
244         ScrollableArea subclasses override visibleContentRectInternal() and visibleSize() where necessary.
245         
246         Mechanically change all the call sites of actualVisibleContentRect() to
247         use visibleContentRect(), and the call sites of visibleContentRect()
248         to visibleContentRect(..., LegacyIOSDocumentVisibleRect), adding comments
249         where this may not be appropriate.
250         
251         Change callers of visibleContentRect(IncludeScrollbars...) to visibleContentRectIncludingScrollbars().
252         
253         Also add actualScrollPosition(), and clean up some actualScroll* call sites.
254         
255         No behavior change.
256
257         * WebProcess/Plugins/PDF/PDFPlugin.h:
258         * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
259         (WebKit::ViewGestureGeometryCollector::collectGeometryForMagnificationGesture):
260         (WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
261         * WebProcess/WebPage/WebFrame.cpp:
262         (WebKit::WebFrame::visibleContentBounds):
263         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
264         (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
265         (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
266
267 2014-01-23  Tim Horton  <timothy_horton@apple.com>
268
269         [wk2] Page Overlays: Add API to clear the page overlay (and get rid of its backing store)
270         https://bugs.webkit.org/show_bug.cgi?id=127518
271
272         Reviewed by Anders Carlsson.
273
274         Add WKBundlePageOverlayClear, to allow clients of the page overlay API to
275         manually clear the page overlay's backing store, for memory, power, and performance gains.
276
277         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
278         (WKBundlePageOverlayClear):
279         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
280         * WebProcess/WebPage/DrawingArea.h:
281         (WebKit::DrawingArea::clearPageOverlay):
282         * WebProcess/WebPage/PageOverlay.cpp:
283         (WebKit::PageOverlay::clear):
284         * WebProcess/WebPage/PageOverlay.h:
285         Add WKBundlePageOverlayClear and plumb it through PageOverlay to the DrawingArea.
286
287         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
288         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
289         (WebKit::RemoteLayerTreeDrawingArea::clearPageOverlay):
290         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
291         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
292         (WebKit::TiledCoreAnimationDrawingArea::clearPageOverlay):
293         Set the layer to drawsContent=false and give it 0x0 size, effectively
294         removing its backing store.
295
296 2014-01-23  Anders Carlsson  <andersca@apple.com>
297
298         Explicitly link XPC services with AppKit
299         https://bugs.webkit.org/show_bug.cgi?id=127520
300         <rdar://problem/15759718>
301
302         Reviewed by Mark Rowe.
303
304         Explicitly link XPC services that use the _NSApplicationMain run loop type with AppKit.
305
306         * Configurations/PluginService.32.xcconfig:
307         * Configurations/PluginService.64.xcconfig:
308         * Configurations/PluginService.Development.xcconfig:
309         * Configurations/WebContentService.Development.xcconfig:
310         * Configurations/WebContentService.xcconfig:
311
312 2014-01-23  Anders Carlsson  <andersca@apple.com>
313
314         Fix build again.
315
316         * UIProcess/API/mac/WKView.mm:
317         (-[WKView _windowDidChangeBackingProperties:]):
318
319 2014-01-23  Anders Carlsson  <andersca@apple.com>
320
321         Another 32-bit build fix.
322
323         * UIProcess/API/mac/WKView.mm:
324         (-[WKView _windowDidChangeBackingProperties:]):
325
326 2014-01-23  Anders Carlsson  <andersca@apple.com>
327
328         Clean up WKView.mm a little
329         https://bugs.webkit.org/show_bug.cgi?id=127517
330
331         Reviewed by Tim Horton.
332
333         Remove an unused ivar and migrate to API constants that were added in Lion.
334
335         * UIProcess/API/mac/WKView.mm:
336         (-[WKView setFrameSize:]):
337         (-[WKView addWindowObserversForWindow:]):
338         (-[WKView removeWindowObservers]):
339         (-[WKView viewDidMoveToWindow]):
340         (-[WKView _windowDidMiniaturize:]):
341         (-[WKView _windowDidResize:]):
342         (-[WKView _windowDidChangeBackingProperties:]):
343
344 2014-01-23  Anders Carlsson  <andersca@apple.com>
345
346         Try to fix the 32-bit build.
347
348         * UIProcess/API/Cocoa/WKPreferences.mm:
349
350 2014-01-23  Anders Carlsson  <andersca@apple.com>
351
352         Remove an unneeded synchronous back/forward message
353         https://bugs.webkit.org/show_bug.cgi?id=127516
354
355         Reviewed by Tim Horton.
356
357         * UIProcess/WebLoaderClient.cpp:
358         * UIProcess/WebLoaderClient.h:
359         * UIProcess/WebPageProxy.cpp:
360         (WebKit::WebPageProxy::initializeLoaderClient):
361         * UIProcess/WebPageProxy.h:
362         * UIProcess/WebPageProxy.messages.in:
363         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
364         (WebKit::WebFrameLoaderClient::shouldGoToHistoryItem):
365         * WebProcess/WebPage/WebPage.cpp:
366         (WebKit::WebPage::WebPage):
367         * WebProcess/WebPage/WebPage.h:
368         * WebProcess/WebPage/WebPage.messages.in:
369
370 2014-01-23  Anders Carlsson  <andersca@apple.com>
371
372         Rename WKPreferences.h to WKPreferencesRef.h and add a stubbed out WKPreferences class
373         https://bugs.webkit.org/show_bug.cgi?id=127512
374
375         Reviewed by Dan Bernstein.
376
377         * UIProcess/API/C/WKAPICast.h:
378         * UIProcess/API/C/WKPreferencesRef.h: Renamed from Source/WebKit2/UIProcess/API/C/WKPreferences.h.
379         * UIProcess/API/C/WebKit2_C.h:
380         * UIProcess/API/Cocoa/WKPreferences.h: Added.
381         * UIProcess/API/Cocoa/WKPreferences.mm: Added.
382         * WebKit2.xcodeproj/project.pbxproj:
383
384 2014-01-23  Max Vujovic  <mvujovic@adobe.com>
385
386         Remove CSS Custom Filters code and tests
387         https://bugs.webkit.org/show_bug.cgi?id=127382
388
389         Reviewed by Simon Fraser.
390
391         * CMakeLists.txt:
392         * Configurations/FeatureDefines.xcconfig:
393         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
394         (IPC::ArgumentCoder<WebCore::FilterOperations>::encode):
395         (IPC::ArgumentCoder<WebCore::FilterOperations>::decode):
396         (IPC::ArgumentCoder<CoordinatedGraphicsState>::encode):
397         (IPC::ArgumentCoder<CoordinatedGraphicsState>::decode):
398         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h:
399         * Shared/CoordinatedGraphics/WebCustomFilterProgramProxy.cpp: Removed.
400         * Shared/CoordinatedGraphics/WebCustomFilterProgramProxy.h: Removed.
401         * Shared/WebCoreArgumentCoders.cpp:
402         (IPC::encodeFilterOperation):
403         (IPC::decodeFilterOperation):
404         * Shared/WebPreferencesStore.h:
405         * Shared/mac/RemoteLayerTreeTransaction.mm:
406         (WebKit::RemoteLayerTreeTextStream::operator<<):
407         * UIProcess/API/C/WKPreferences.cpp:
408         * UIProcess/API/C/WKPreferencesPrivate.h:
409         * WebProcess/InjectedBundle/InjectedBundle.cpp:
410         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
411         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
412         (WebKit::CoordinatedLayerTreeHost::~CoordinatedLayerTreeHost):
413         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
414         * WebProcess/WebPage/WebPage.cpp:
415         (WebKit::WebPage::updatePreferences):
416         * mac/WebKit2.order:
417
418 2014-01-23  Anders Carlsson  <andersca@apple.com>
419
420         Add API::PolicyClient base class
421         https://bugs.webkit.org/show_bug.cgi?id=127509
422
423         Reviewed by Tim Horton.
424
425         * UIProcess/API/APIPolicyClient.h: Copied from Source/WebKit2/UIProcess/WebPolicyClient.h.
426         (API::PolicyClient::~PolicyClient):
427         * UIProcess/API/C/WKPage.cpp:
428         (WKPageSetPagePolicyClient):
429         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
430         (setUpPagePolicyClient):
431         (-[WKBrowsingContextController setPolicyDelegate:]):
432         * UIProcess/WebInspectorProxy.cpp:
433         (WebKit::WebInspectorProxy::createInspectorPage):
434         * UIProcess/WebPageProxy.cpp:
435         (WebKit::WebPageProxy::setPolicyClient):
436         (WebKit::WebPageProxy::close):
437         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
438         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
439         (WebKit::WebPageProxy::decidePolicyForResponse):
440         (WebKit::WebPageProxy::unableToImplementPolicy):
441         * UIProcess/WebPageProxy.h:
442         * UIProcess/WebPolicyClient.cpp:
443         (WebKit::WebPolicyClient::WebPolicyClient):
444         (WebKit::WebPolicyClient::decidePolicyForNavigationAction):
445         (WebKit::WebPolicyClient::decidePolicyForNewWindowAction):
446         (WebKit::WebPolicyClient::decidePolicyForResponse):
447         * UIProcess/WebPolicyClient.h:
448         * WebKit2.xcodeproj/project.pbxproj:
449
450 2014-01-23  Anders Carlsson  <andersca@apple.com>
451
452         Add init methods that create default configurations
453         https://bugs.webkit.org/show_bug.cgi?id=127503
454
455         Reviewed by Dan Bernstein.
456
457         * UIProcess/API/Cocoa/WKProcessClass.mm:
458         (-[WKProcessClass init]):
459         * UIProcess/API/Cocoa/WKWebView.mm:
460         (-[WKWebView initWithFrame:]):
461
462 2014-01-23  Brady Eidson  <beidson@apple.com>
463
464         IDB: Implement cross-thread and IPC plumbing for 'get' support
465         https://bugs.webkit.org/show_bug.cgi?id=127501
466
467         Reviewed by Anders Carlsson.
468
469         Make the WebProcess call out to the DatabaseProcess with a get request, and handle the
470         response from the DatabaseProcess:
471         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
472         (WebKit::WebIDBServerConnection::get):
473         (WebKit::WebIDBServerConnection::didGetRecord):
474         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
475         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
476
477         Get the request from the WebProcess and forward it to the appropriate unique IDB database:
478         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
479         (WebKit::DatabaseProcessIDBConnection::getRecord):
480         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
481         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
482
483         Forward the request to the database thread, and response to the result from that thread:
484         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
485         (WebKit::UniqueIDBDatabase::getRecord):
486         (WebKit::UniqueIDBDatabase::getRecordFromBackingStore):
487         (WebKit::UniqueIDBDatabase::didGetRecordFromBackingStore):
488         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
489
490         IPC and asynchronous request infrastructure:
491         * Scripts/webkit2/messages.py:
492         (struct_or_class):
493
494         * Shared/AsyncTask.h:
495         (WebKit::createAsyncTask):
496
497         * Shared/WebCoreArgumentCoders.cpp:
498         (IPC::ArgumentCoder<IDBGetResult>::encode):
499         (IPC::ArgumentCoder<IDBGetResult>::decode):
500         (IPC::ArgumentCoder<IDBKeyRangeData>::encode):
501         (IPC::ArgumentCoder<IDBKeyRangeData>::decode):
502         * Shared/WebCoreArgumentCoders.h:
503
504 2014-01-23  Tim Horton  <timothy_horton@apple.com>
505
506         PDFPlugin: Use PDFPlugin even if there's an external plugin installed, if it's blocked
507         https://bugs.webkit.org/show_bug.cgi?id=127415
508         <rdar://problem/12482452>
509
510         Reviewed by Sam Weinig.
511
512         Allow use of PDFPlugin even if an external plugin is installed but blocked.
513         If an external plugin is installed and not blocked, we will continue to use that.
514
515         Inject a context menu item into the PDFPlugin context menu that allows the client
516         to unblock the plugin and reload the page (via the same mechanism that the
517         unavailable plugin button uses).
518
519         * UIProcess/API/C/WKPageLoaderClient.h:
520         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
521         (setUpPageLoaderClient):
522         * UIProcess/WebLoaderClient.cpp:
523         (WebKit::WebLoaderClient::pluginLoadPolicy):
524         * UIProcess/WebLoaderClient.h:
525         * UIProcess/WebPageProxy.cpp:
526         (WebKit::WebPageProxy::findPlugin):
527         * UIProcess/WebPageProxy.h:
528         * UIProcess/WebPageProxy.messages.in:
529         Add a new PluginLoadPolicy callback for the V4 client with
530         yet another string out-argument, to allow clients to customize the string
531         that will appear in the PDFPlugin context menu when it is used in place
532         of a blocked plugin.
533
534         * WebProcess/Plugins/PDF/PDFPlugin.h:
535         Add setUsedInPlaceOfBlockedPlugin(), which determines whether or not
536         we should include an item in the PDFPlugin context menu that acts identically
537         to the unavailable plugin button, allowing the client to potentially unblock
538         the plugin.
539
540         * WebProcess/Plugins/PDF/PDFPlugin.mm:
541         (-[WKPDFPluginContextMenuTarget initWithPDFPlugin:WebKit::]):
542         (-[WKPDFPluginContextMenuTarget useBlockedPlugin:]):
543         Added WKPDFPluginContextMenuTarget, which is the Objective-C object that the
544         aforementioned context menu item targets.
545
546         (WebKit::PDFPlugin::PDFPlugin):
547         By default, we won't show the extra context menu item.
548
549         (WebKit::PDFPlugin::handleContextMenuEvent):
550         If we were used in place of a blocked plugin, inject our additional context
551         menu item into the menu. If we were handed a custom string via setUsedInPlaceOfBlockedPlugin,
552         use that. Otherwise, use the generic string from WebCore's localized strings.
553
554         (WebKit::PDFPlugin::openWithPlugin):
555         Pretend that the user clicked the unavailable plugin button when they click
556         the injected context menu item.
557
558         (WebKit::PDFPlugin::setUsedInPlaceOfBlockedPlugin):
559
560         * WebProcess/WebPage/WebPage.cpp:
561         (WebKit::WebPage::createPlugin):
562         If we end up with a blocked plugin, but could have used PDFPlugin to display
563         the content, do so instead of showing the unavailable plugin indicator.
564
565         Pass PDFPlugin the custom context menu item title acquired from the client.
566
567         (WebKit::WebPage::canPluginHandleResponse):
568
569 2014-01-23  Tim Horton  <timothy_horton@apple.com>
570
571         [iOS] [WK2] WKContentView has a black background
572         https://bugs.webkit.org/show_bug.cgi?id=127471
573         <rdar://problem/12287363>
574
575         Reviewed by Sam Weinig.
576
577         * UIProcess/API/ios/WKContentView.mm:
578         (-[WKContentView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
579         Instead of giving it a (black!) background to make hit-testing work, use CALayer SPI
580         to tell CA that the whole layer should be treated as opaque when it comes to hit-testing.
581
582 2014-01-22  Carlos Garcia Campos  <cgarcia@igalia.com>
583
584         [GLIB] Use GUniquePtr instead of GOwnPtr
585         https://bugs.webkit.org/show_bug.cgi?id=127431
586
587         Reviewed by Martin Robinson.
588
589         GUniquePtr is a template alias of std::unique_ptr with a custom
590         deleter that replaces GOwnPtr. GOwnPtr is still used for the cases
591         where the output pointer is needed, but it will also be replaced soon.
592
593         * Shared/Downloads/soup/DownloadSoup.cpp:
594         (WebKit::DownloadClient::didReceiveResponse):
595         * Shared/NativeWebKeyboardEvent.h:
596         * Shared/NativeWebMouseEvent.h:
597         * Shared/NativeWebWheelEvent.h:
598         * Shared/gtk/ArgumentCodersGtk.cpp:
599         (IPC::encodeGKeyFile):
600         (IPC::decodeGKeyFile):
601         (IPC::encode):
602         (IPC::decode):
603         * UIProcess/API/gtk/WebKitContextMenuItem.cpp:
604         (webkitContextMenuItemSetSubMenuFromGtkMenu):
605         * UIProcess/API/gtk/WebKitDownload.cpp:
606         (webkitDownloadDecideDestination):
607         (webkitDownloadNotifyProgress):
608         (webkitDownloadFailed):
609         * UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
610         (webkit_file_chooser_request_select_files):
611         * UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
612         (didReceiveWebViewMessageFromInjectedBundle):
613         (getInjectedBundleInitializationUserData):
614         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
615         (didFailProvisionalLoadWithErrorForFrame):
616         (didFailLoadWithErrorForFrame):
617         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
618         (drawPagesForPrintingCompleted):
619         * UIProcess/API/gtk/WebKitURIRequest.cpp:
620         (webkit_uri_request_get_http_headers):
621         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
622         (webkit_uri_scheme_request_get_scheme):
623         (webkit_uri_scheme_request_get_path):
624         * UIProcess/API/gtk/WebKitWebContext.cpp:
625         (injectedBundleFilename):
626         (webkit_web_context_set_favicon_database_directory):
627         * UIProcess/API/gtk/WebKitWebView.cpp:
628         (webkitWebViewLoadFail):
629         (webkitWebViewCreateJavaScriptDialog):
630         (fileChooserDialogResponseCallback):
631         (webkitWebViewLoadChanged):
632         (webkitWebViewLoadFailedWithTLSErrors):
633         (webkitWebViewPopulateContextMenu):
634         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
635         (webkitWebViewBaseButtonPressEvent):
636         (webkitWebViewBaseStartDrag):
637         * UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
638         (WebKit::WebInspectorServer::platformResourceForPath):
639         * UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp:
640         (WebKit::connectionCallback):
641         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
642         (WebKit::ProcessLauncher::launchProcess):
643         * UIProcess/gtk/WebContextGtk.cpp:
644         (WebKit::WebContext::platformDefaultApplicationCacheDirectory):
645         (WebKit::WebContext::platformDefaultDatabaseDirectory):
646         (WebKit::WebContext::platformDefaultIconDatabasePath):
647         (WebKit::WebContext::platformDefaultLocalStorageDirectory):
648         (WebKit::WebContext::platformDefaultDiskCacheDirectory):
649         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
650         (WebKit::contextMenuItemVisibilityChanged):
651         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
652         (WebKit::WebInspectorProxy::platformInspectedURLChanged):
653         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
654         (WebKit::WebPopupMenuProxyGtk::createGtkActionForMenuItem):
655         * WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
656         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
657         (WebKit::WebPage::platformInitialize):
658         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
659         * WebProcess/gtk/WebProcessMainGtk.cpp:
660         * WebProcess/soup/WebSoupRequestManager.cpp:
661         (WebKit::WebSoupRequestManager::send):
662
663 2014-01-22  Simon Fraser  <simon.fraser@apple.com>
664
665         Surround fixedVisibleContentRect code with USE(TILED_BACKING_STORE)
666         https://bugs.webkit.org/show_bug.cgi?id=127461
667
668         Reviewed by Andreas Kling.
669         
670         The "fixedVisibleContentRect" code path is only used by platforms
671         which enabled TILED_BACKING_STORE, so to reduce confusion, surround
672         this code with #if USE(TILED_BACKING_STORE).
673
674         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
675         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
676
677 2014-01-22  Benjamin Poulain  <bpoulain@apple.com>
678
679         Add a minimalistic SPI to control the layout size outside of WKView
680         https://bugs.webkit.org/show_bug.cgi?id=127403
681
682         Reviewed by Sam Weinig.
683
684         The API lets a client of WKView force the layout size. Once the size
685         is set this way, default update is disabled and the client needs to
686         update the size systematically as needed. This is done to avoid double
687         layout or flickering.
688
689         * UIProcess/API/Cocoa/WKViewPrivate.h:
690         * UIProcess/API/ios/WKViewIOS.mm:
691         (-[WKView _frameOrBoundsChanged]):
692         (-[WKView overrideMinimumLayoutSize:]):
693
694 2014-01-22  Jinwoo Song  <jinwoo7.song@samsung.com>
695
696         [EFL][WK2] defaultTextEncodingName should be stored as a member variable of EwkSettings
697         https://bugs.webkit.org/show_bug.cgi?id=127420
698
699         Reviewed by Gyuyoung Kim.
700
701         As the defaultTextEncodingName is returned as a local WKEinaSharedString variable, 
702         the stringshared data is de-refed by eina_stringshare_del().
703         To maintain the reference counter, the defaultTextEncodingName should be stored 
704         as a member variable of EwkSettings class.
705
706         * UIProcess/API/efl/ewk_settings.cpp:
707         (ewk_settings_encoding_detector_enabled_get): Reordering.
708         (ewk_settings_default_text_encoding_name_set):
709         (ewk_settings_default_text_encoding_name_get):
710         (EwkSettings::setDefaultTextEncodingName):
711         (EwkSettings::defaultTextEncodingName):
712         * UIProcess/API/efl/ewk_settings_private.h:
713         (EwkSettings::EwkSettings): Add m_defaultTextEncodingName and setter/getter methods.
714
715 2014-01-22  Enrica Casucci  <enrica@apple.com>
716
717         Support WebSelections in WK2 on iOS.
718         https://bugs.webkit.org/show_bug.cgi?id=127015
719         <rdar://problem/15211964>
720
721         Reviewed by Benjamin Poulain.
722
723         This change adds support for text only (non block mode)
724         selections in non editable content.
725         The main changes consist in hooking up the new gesture type
726         and touches to handle selection creation and interaction.
727         It also includes changes to the way first responder is handled
728         which includes the implementation of the isEditable method
729         to allow iOS to know when to show the keyboard.
730
731         * Shared/ios/WKGestureTypes.h:
732         * UIProcess/API/ios/WKInteractionView.mm:
733         (-[WKInteractionView isEditable]):
734         (-[WKInteractionView canBecomeFirstResponder]):
735         (-[WKInteractionView webSelectionRects]):
736         (-[WKInteractionView _highlightLongPressRecognized:]):
737         (-[WKInteractionView _singleTapRecognized:]):
738         (-[WKInteractionView inputAccessoryView]):
739         (-[WKInteractionView canPerformAction:withSender:]):
740         (-[WKInteractionView _showDictionary:]):
741         (toWKGestureType):
742         (toUIWKGestureType):
743         (selectionChangedWithGesture):
744         (selectionChangedWithTouch):
745         (-[WKInteractionView selectedTextRange]):
746         (-[WKInteractionView webSelectionAssistant]):
747         (-[WKInteractionView _startAssistingNode]):
748         (-[WKInteractionView _stopAssistingNode]):
749         (-[WKInteractionView _selectionChanged]):
750         * WebProcess/WebPage/ios/WebPageIOS.mm:
751         (WebKit::WebPage::selectWithGesture):
752         (WebKit::WebPage::updateSelectionWithTouches):
753
754 2014-01-22  Anders Carlsson  <andersca@apple.com>
755
756         WKBrowsingContextController should not be an API wrapper around WebPageProxy
757         https://bugs.webkit.org/show_bug.cgi?id=127454
758
759         Reviewed by Dan Bernstein.
760
761         * Shared/Cocoa/APIObject.mm:
762         (API::Object::newObject):
763         * Shared/mac/ObjCObjectGraphCoders.mm:
764         (WebKit::WebContextObjCObjectGraphDecoderImpl::decode):
765         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
766         (-[WKBrowsingContextController _initWithPageRef:]):
767         (+[WKBrowsingContextController _browsingContextControllerForPageRef:]):
768         * UIProcess/API/Cocoa/WKBrowsingContextControllerInternal.h:
769         * UIProcess/API/Cocoa/WKProcessGroup.mm:
770         (didNavigateWithNavigationData):
771         (didPerformClientRedirect):
772         (didPerformServerRedirect):
773         (didUpdateHistoryTitle):
774         * UIProcess/API/ios/WKContentView.mm:
775         (-[WKContentView browsingContextController]):
776         * UIProcess/API/mac/WKView.mm:
777         (-[WKView browsingContextController]):
778         * UIProcess/ios/WebPageProxyIOS.mm:
779         (WebKit::WebPageProxy::platformInitialize):
780         * UIProcess/mac/WebPageProxyMac.mm:
781         (WebKit::WebPageProxy::platformInitialize):
782
783 2014-01-22  Myles C. Maxfield  <mmaxfield@apple.com>
784
785         Remove CSS3_TEXT_DECORATION define
786         https://bugs.webkit.org/show_bug.cgi?id=127333
787
788         Reviewed by Simon Fraser.
789
790         This is required for unprefixing the text-decoration-* CSS properties.
791
792         * Configurations/FeatureDefines.xcconfig:
793
794 2014-01-22  Gavin Barraclough  <barraclough@apple.com>
795
796         Debug mechanism to override process QoS on Mac
797         https://bugs.webkit.org/show_bug.cgi?id=127455
798
799         Reviewed by Anders Carlsson.
800
801         * NetworkProcess/NetworkProcess.messages.in:
802             - added message.
803         * PluginProcess/PluginProcess.messages.in:
804             - added message.
805         * Shared/ChildProcess.h:
806         * Shared/mac/ChildProcessMac.mm:
807         (WebKit::ChildProcess::setQOS):
808             - Added implementation of new message.
809         * UIProcess/Plugins/PluginProcessProxy.cpp:
810         (WebKit::PluginProcessProxy::didFinishLaunching):
811             - SetQOS for the PluginProcess.
812         * UIProcess/Plugins/PluginProcessProxy.h:
813         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
814         (WebKit::pluginProcessLatencyQOS):
815         (WebKit::pluginProcessThroughputQOS):
816             - read NSUserDefaults.
817         * UIProcess/WebContext.cpp:
818         (WebKit::WebContext::ensureNetworkProcess):
819             - SetQOS for the NetworkProcess.
820         (WebKit::WebContext::createNewWebProcess):
821             - SetQOS for the WebProcess.
822         * UIProcess/WebContext.h:
823         * UIProcess/mac/WebContextMac.mm:
824         (WebKit::networkProcessLatencyQOS):
825         (WebKit::networkProcessThroughputQOS):
826         (WebKit::webProcessLatencyQOS):
827         (WebKit::webProcessThroughputQOS):
828             - read NSUserDefaults.
829         * WebProcess/WebProcess.messages.in:
830             - added message.
831
832 2014-01-22  David Farler  <dfarler@apple.com>
833
834         ASAN builds are broken - missing flags
835         https://bugs.webkit.org/show_bug.cgi?id=127231
836
837         Reviewed by Andy Estes.
838
839         Add missing $(ASAN_OTHER_LDFLAGS).
840         * Configurations/PluginProcessShim.xcconfig:
841         * Configurations/SecItemShim.xcconfig:
842         * Configurations/WebKit2.xcconfig:
843         * Configurations/WebProcessShim.xcconfig:
844
845 2014-01-22  Brady Eidson  <beidson@apple.com>
846
847         The IDB backing store get() method shouldn't call IDB callbacks directly
848         https://bugs.webkit.org/show_bug.cgi?id=127453
849         
850         Reviewed by Beth Dakin.
851
852         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
853         (WebKit::WebIDBServerConnection::get):
854         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
855
856 2014-01-22  Martin Hock  <mhock@apple.com>
857
858         Enable Session API.
859         https://bugs.webkit.org/show_bug.cgi?id=127255
860
861         Reviewed by Alexey Proskuryakov.
862
863         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
864         (WebKit::storageSession):
865         * NetworkProcess/NetworkResourceLoader.cpp:
866         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
867         (WebKit::NetworkResourceLoader::start):
868         * NetworkProcess/NetworkResourceLoader.h:
869         * NetworkProcess/RemoteNetworkingContext.h:
870         * NetworkProcess/mac/RemoteNetworkingContext.mm:
871         (WebKit::RemoteNetworkingContext::storageSession):
872         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
873         * Shared/Network/NetworkResourceLoadParameters.cpp:
874         (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
875         (WebKit::NetworkResourceLoadParameters::encode):
876         (WebKit::NetworkResourceLoadParameters::decode):
877         * Shared/Network/NetworkResourceLoadParameters.h:
878         * Shared/SessionTracker.cpp:
879         (WebKit::staticSessionMap):
880         (WebKit::SessionTracker::sessionMap):
881         (WebKit::SessionTracker::session):
882         (WebKit::SessionTracker::setSession):
883         (WebKit::SessionTracker::destroySession):
884         * Shared/SessionTracker.h:
885         * UIProcess/API/C/WKPage.cpp:
886         (WKPageSetSession):
887         * UIProcess/API/C/WKPage.h:
888         * UIProcess/API/C/WKSessionRef.cpp:
889         (WKSessionCreate):
890         * UIProcess/API/C/WKSessionRef.h:
891         * UIProcess/WebPageProxy.cpp:
892         (WebKit::WebPageProxy::WebPageProxy):
893         (WebKit::WebPageProxy::setSession):
894         * UIProcess/WebPageProxy.h:
895         * WebProcess/Network/WebResourceLoadScheduler.cpp:
896         (WebKit::WebResourceLoadScheduler::scheduleLoad):
897         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
898         (WebKit::WebPlatformStrategies::loadResourceSynchronously):
899         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
900         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
901         (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
902         (WebKit::WebFrameNetworkingContext::storageSession):
903         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
904         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
905         * WebProcess/WebPage/WebFrame.cpp:
906         (WebKit::WebFrame::startDownload):
907         * WebProcess/WebPage/WebPage.cpp:
908         (WebKit::WebPage::WebPage):
909         (WebKit::WebPage::sessionID):
910         (WebKit::WebPage::updatePreferences):
911         * WebProcess/WebPage/WebPage.h:
912         (WebKit::WebPage::setSessionID):
913         * WebProcess/WebPage/WebPage.messages.in:
914
915 2014-01-21  Brady Eidson  <beidson@apple.com>
916
917         IDB: "Put" support
918         <rdar://problem/15779643> and https://bugs.webkit.org/show_bug.cgi?id=127401
919
920         Reviewed by Alexey Proskuryakov.
921
922         Ship putRecord requests over to the DatabaseProcess, and listen for completion from the DatabaseProcess:
923         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
924         (WebKit::WebIDBServerConnection::put):
925         (WebKit::WebIDBServerConnection::didPutRecord):
926         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
927         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
928
929         Pass off the putRecord request to the Unique IDBDatabase:
930         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
931         (WebKit::DatabaseProcessIDBConnection::putRecord):
932         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
933         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
934
935         Pass off the putRecord request to the backing store:
936         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
937         (WebKit::UniqueIDBDatabase::putRecord):
938         (WebKit::UniqueIDBDatabase::putRecordInBackingStore):
939         (WebKit::UniqueIDBDatabase::didPutRecordInBackingStore):
940         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
941
942         Add backing store methods related to putRecord, though only one is critical right now:
943         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
944         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
945         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createAndPopulateInitialMetadata):
946         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::generateKey):
947         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::keyExistsInObjectStore):
948         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::putRecord):
949         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::updateKeyGenerator):
950         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
951
952         Add the IDBKeyData type to IPC:
953         * Scripts/webkit2/messages.py:
954         (struct_or_class):
955
956         * Shared/WebCoreArgumentCoders.cpp:
957         (IPC::ArgumentCoder<IDBKeyData>::encode):
958         (IPC::ArgumentCoder<IDBKeyData>::decode):
959         * Shared/WebCoreArgumentCoders.h:
960
961         * DatabaseProcess/IndexedDB/IDBSerialization.cpp:
962         (WebKit::serializeIDBKey):
963         * DatabaseProcess/IndexedDB/IDBSerialization.h:
964
965         Implement more cross-thread copying:
966         * Shared/WebCrossThreadCopier.cpp:
967         (WebCore::Vector<uint8_t>>::copy):
968         (WebCore::Vector<Vector<IDBKeyData>>>::copy):
969         (WebCore::ASCIILiteral>::copy):
970         * Shared/WebCrossThreadCopier.h:
971
972         Implement more numbers of generic AsyncTask templates:
973         * Shared/AsyncTask.h:
974         (WebKit::createAsyncTask):
975
976 2014-01-22  Anders Carlsson  <andersca@apple.com>
977
978         WKProcessClass should create a WebContext
979         https://bugs.webkit.org/show_bug.cgi?id=127449
980         <rdar://problem/15885582>
981
982         Reviewed by Dan Bernstein.
983
984         * Shared/Cocoa/APIObject.mm:
985         (API::Object::newObject):
986         * UIProcess/API/Cocoa/WKBrowsingContextController.h:
987         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
988         * UIProcess/API/Cocoa/WKProcessClass.mm:
989         (-[WKProcessClass initWithConfiguration:]):
990         (-[WKProcessClass dealloc]):
991         (-[WKProcessClass API::]):
992         * UIProcess/API/Cocoa/WKProcessClassInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKProcessGroupInternal.h.
993         (WebKit::wrapper):
994         * UIProcess/API/Cocoa/WKProcessGroup.mm:
995         (-[WKProcessGroup initWithInjectedBundleURL:]):
996         * UIProcess/API/ios/WKContentView.mm:
997         (-[WKContentView _decidePolicyForGeolocationRequestFromOrigin:frame:request:]):
998         * WebKit2.xcodeproj/project.pbxproj:
999
1000 2014-01-22  Tim Horton  <timothy_horton@apple.com>
1001
1002         Crashes in DrawingAreaProxy::setExposedRect (null DrawingAreaProxy)
1003         https://bugs.webkit.org/show_bug.cgi?id=127445
1004
1005         Reviewed by Anders Carlsson.
1006
1007         * UIProcess/API/ios/WKContentView.mm:
1008         (-[WKContentView _updateViewExposedRect]):
1009         * UIProcess/API/mac/WKView.mm:
1010         (-[WKView _updateViewExposedRect]):
1011         Null-check.
1012
1013 2014-01-22  Anders Carlsson  <andersca@apple.com>
1014
1015         Add WKWebView class
1016         https://bugs.webkit.org/show_bug.cgi?id=127444
1017         <rdar://problem/15884418>
1018
1019         Reviewed by Dan Bernstein.
1020
1021         * UIProcess/API/Cocoa/WKWebView.h: Added.
1022         * UIProcess/API/Cocoa/WKWebView.mm: Added.
1023         (-[WKWebView initWithFrame:configuration:]):
1024         (-[WKWebView configuration]):
1025         * WebKit2.xcodeproj/project.pbxproj:
1026
1027 2014-01-22  Anders Carlsson  <andersca@apple.com>
1028
1029         Fix 32-bit build.
1030
1031         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1032
1033 2014-01-22  Tim Horton  <timothy_horton@apple.com>
1034
1035         [wk2] Scroll pinning state is wrong until the first scroll event
1036         https://bugs.webkit.org/show_bug.cgi?id=127437
1037
1038         Reviewed by Simon Fraser.
1039
1040         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1041         (WebKit::WebFrameLoaderClient::didChangeScrollOffset):
1042         * WebProcess/WebPage/WebPage.cpp:
1043         (WebKit::WebPage::updateMainFrameScrollOffsetPinning):
1044         (WebKit::WebPage::didCommitLoad):
1045         * WebProcess/WebPage/WebPage.h:
1046         Rename WebPage::didChangeScrollOffsetForMainFrame to
1047         updateMainFrameScrollOffsetPinning, which better describes what it
1048         actually does. Call it when a load is committed, so that we have valid
1049         pinning state before the first scroll event comes in.
1050
1051 2014-01-22  Anders Carlsson  <andersca@apple.com>
1052
1053         Add WKWebViewConfiguration class
1054         https://bugs.webkit.org/show_bug.cgi?id=127436
1055         <rdar://problem/15882923>
1056
1057         Reviewed by Tim Horton.
1058
1059         * UIProcess/API/Cocoa/WKWebViewConfiguration.h: Added.
1060         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: Added.
1061         (-[WKWebViewConfiguration copyWithZone:]):
1062         * WebKit2.xcodeproj/project.pbxproj:
1063
1064 2014-01-22  Alice Barraclough  <alice.liu@apple.com>
1065
1066         [WK2] add cocoa API for private browsing setting
1067         https://bugs.webkit.org/show_bug.cgi?id=127391
1068
1069         Reviewed by Sam Weinig.
1070
1071         * UIProcess/API/Cocoa/WKBrowsingContextGroup.h:
1072         * UIProcess/API/Cocoa/WKBrowsingContextGroup.mm:
1073         (-[WKBrowsingContextGroup privateBrowsingEnabled]):
1074         (-[WKBrowsingContextGroup setPrivateBrowsingEnabled:]):
1075         Adding some API for the private Browsing setting. Reaches through
1076         to the WKPageGroup's preferences.
1077
1078 2014-01-22  Anders Carlsson  <andersca@apple.com>
1079
1080         Add WKProcessClass class
1081         https://bugs.webkit.org/show_bug.cgi?id=127433
1082         <rdar://problem/15882582>
1083
1084         Reviewed by Dan Bernstein.
1085
1086         Add a stubbed out WKProcessClass class.
1087
1088         * Shared/API/Cocoa/WKFoundation.h:
1089         * UIProcess/API/Cocoa/WKProcessClass.h: Added.
1090         * UIProcess/API/Cocoa/WKProcessClass.mm: Added.
1091         (-[WKProcessClass initWithConfiguration:]):
1092         (-[WKProcessClass configuration]):
1093         * UIProcess/API/Cocoa/WKProcessClassConfiguration.mm:
1094         * WebKit2.xcodeproj/project.pbxproj:
1095
1096 2014-01-22  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1097
1098         [EFL][GTK] Get EFL and GTK compiling with ACCESSIBILITY disabled
1099         https://bugs.webkit.org/show_bug.cgi?id=127119
1100
1101         Reviewed by Mario Sanchez Prada.
1102
1103         Guarding ACCESSIBILITY code with HAVE(ACCESSIBILITY).
1104
1105         * WebProcess/WebPage/WebPage.cpp:
1106         (WebKit::WebPage::WebPage):
1107         * WebProcess/WebPage/WebPage.h:
1108         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
1109         (WebKit::WebPage::platformInitialize):
1110
1111 2014-01-22  Martin Robinson  <mrobinson@igalia.com>
1112
1113         [GTK][CMake] Add support for building the NetworkProcess
1114         https://bugs.webkit.org/show_bug.cgi?id=127195
1115
1116         Reviewed by Daniel Bates.
1117
1118         * CMakeLists.txt: Add shared network process build instructions.
1119         * PlatformEfl.cmake: Move build instructions to the platform-independent file.
1120         * PlatformGTK.cmake: Add some files to the source lists.
1121
1122 2014-01-22  Carlos Garcia Campos  <cgarcia@igalia.com>
1123
1124         REGRESSION(r162441): [GTK] ResourceLoader is broken when there aren't user extensions
1125         https://bugs.webkit.org/show_bug.cgi?id=127422
1126
1127         Reviewed by Anders Carlsson.
1128
1129         * WebProcess/gtk/WebGtkExtensionManager.cpp:
1130         (WebKit::WebGtkExtensionManager::initialize): Always create the
1131         WebKitWebExtension object since it's used internally to implement
1132         the ResourceLoader client.
1133
1134 2014-01-22  Jer Noble  <jer.noble@apple.com>
1135
1136         [Mac][WK2] Unable to play video protected by session cookies
1137         https://bugs.webkit.org/show_bug.cgi?id=127207
1138
1139         Reviewed by Sam Weinig.
1140
1141         Recent changes in our underlying media frameworks caused our shimmed methods
1142         in CookieStorageShim to stop being called. Insert an objective-c shim in addition
1143         to our original shim to intercept pulling cookies out of cookie storage.
1144
1145         * Shared/mac/CookieStorageShim.mm: Renamed from Source/WebKit2/Shared/mac/CookieStorageShim.cpp.
1146         (WebKit::CookieStorageShim::initialize): Insert the shim.
1147         (-[WKNSURLSessionLocal _copyCookiesForRequestUsingAllAppropriateStorageSemantics:]):
1148             Pass through to webKitCookieStorageCopyRequestHeaderFieldsForURL().
1149         * WebKit2.xcodeproj/project.pbxproj: Rename CookieStorageShim.cpp -> .mm.
1150
1151 2014-01-22  Yongjun Zhang  <yongjun_zhang@apple.com>
1152
1153         https://bugs.webkit.org/show_bug.cgi?id=127380
1154         Add more methods to WKWebProcessPlugInNodeHandle.
1155
1156         Reviewed by Sam Weinig.
1157
1158         Add a static method that creates a WKWebProcessPlugInNodeHandle from a JSValue* and a JSContext*.  Also
1159         add a method to return the iframe's content frame from a WKWebProcessPlugInNodeHandle.
1160  
1161         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h:
1162         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
1163         (+[WKWebProcessPlugInNodeHandle nodeHandleWithJSValue:inContext:]):
1164         (-[WKWebProcessPlugInNodeHandle htmlIFrameElementContentFrame]):
1165
1166 2014-01-22  Carlos Garcia Campos  <cgarcia@igalia.com>
1167
1168         Unreviewed. Fix GTK+ build with CUSTOM_PROTOCOL enabled after r162449.
1169
1170         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.h:
1171         Use override instead of OVERRIDE.
1172
1173 2014-01-22  Koop Mast <kwm@FreeBSD.org>
1174
1175         Build fixes for FreeBSD.
1176         https://bugs.webkit.org/show_bug.cgi?id=126779
1177
1178         Reviewed by Csaba Osztrogon√°c.
1179
1180         * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
1181         (WebKit::PluginProcessProxy::scanPlugin):
1182
1183 2014-01-22  Jinwoo Song  <jinwoo7.song@samsung.com>
1184
1185         [EFL][WK2] Use std::function in the rest of EFL's WorkQueue implementation
1186         https://bugs.webkit.org/show_bug.cgi?id=127397
1187
1188         Reviewed by Anders Carlsson.
1189
1190         Move to using std::function and move semantics in WorkQueue::registerSocketEventHandler
1191         and DispatchQueue::setSocketEventHandler.
1192
1193         * Platform/IPC/unix/ConnectionUnix.cpp:
1194         (IPC::Connection::open):
1195         * Platform/WorkQueue.h:
1196         * Platform/efl/DispatchQueueEfl.cpp:
1197         (DispatchQueue::setSocketEventHandler):
1198         * Platform/efl/DispatchQueueEfl.h:
1199         * Platform/efl/WorkQueueEfl.cpp:
1200         (WorkQueue::registerSocketEventHandler):
1201
1202 2014-01-21  Tim Horton  <timothy_horton@apple.com>
1203
1204         [wk2] De-.get()ify receivers of Objective-C messages
1205         https://bugs.webkit.org/show_bug.cgi?id=127398
1206
1207         Reviewed by Sam Weinig.
1208
1209         RetainPtr does the right thing when you use it as the
1210         receiver of an Obj-C message, so we don't need .get().
1211
1212         Long and useless file list elided.
1213
1214 2014-01-21  Brady Eidson  <beidson@apple.com>
1215
1216         The IDB backing store put() method shouldn't call IDB callbacks directly
1217         https://bugs.webkit.org/show_bug.cgi?id=127399
1218
1219         Reviewed by Beth Dakin.
1220
1221         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
1222         (WebKit::WebIDBServerConnection::put):
1223         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
1224
1225 2014-01-21  Anders Carlsson  <andersca@apple.com>
1226
1227         Fix 32-bit build.
1228
1229         * UIProcess/API/Cocoa/WKProcessClassConfiguration.mm:
1230
1231 2014-01-21  Jinwoo Song  <jinwoo7.song@samsung.com>
1232
1233         [EFL][WK2] Use nanoseconds in TimerWorkItem class consistently
1234         https://bugs.webkit.org/show_bug.cgi?id=127263
1235
1236         Reviewed by Gyuyoung Kim.
1237
1238         After r162276 and r162300, TimerWorkItem is getting nanoseconds as parameter.
1239         So it would be better to use nanoseconds in TimerWorkItem for consistency.
1240
1241         * Platform/efl/DispatchQueueEfl.cpp:
1242         (DispatchQueue::performTimerWork):
1243         (DispatchQueue::insertTimerWorkItem):
1244         (DispatchQueue::getNextTimeOut):
1245         * Platform/efl/DispatchQueueWorkItemEfl.h:
1246         (TimerWorkItem::create):
1247         (TimerWorkItem::expirationTimeNanoSeconds):
1248         (TimerWorkItem::hasExpired):
1249         (TimerWorkItem::TimerWorkItem):
1250
1251 2014-01-21  Tim Horton  <timothy_horton@apple.com>
1252
1253         Don't copy ViewGestureGeometryCollector.messages.in into the WebProcess bundle.
1254
1255         Reviewed by Simon Fraser.
1256
1257         * WebKit2.xcodeproj/project.pbxproj:
1258
1259 2014-01-21  Anders Carlsson  <andersca@apple.com>
1260
1261         Add a WKProcessClassConfiguration class
1262         https://bugs.webkit.org/show_bug.cgi?id=127378
1263         <rdar://problem/15875413>
1264
1265         Reviewed by Dan Bernstein.
1266
1267         * UIProcess/API/Cocoa/WKProcessClassConfiguration.h: Added.
1268         * UIProcess/API/Cocoa/WKProcessClassConfiguration.mm: Added.
1269         (-[WKProcessClassConfiguration copyWithZone:]):
1270         * UIProcess/API/Cocoa/WKProcessClassConfigurationPrivate.h: Added.
1271         * WebKit2.xcodeproj/project.pbxproj:
1272
1273 2014-01-21  Tim Horton  <timothy_horton@apple.com>
1274
1275         Make ViewGestureController Obj-C++
1276         https://bugs.webkit.org/show_bug.cgi?id=127385
1277
1278         Reviewed by Dean Jackson.
1279
1280         * UIProcess/mac/ViewGestureController.mm: Renamed from Source/WebKit2/UIProcess/mac/ViewGestureController.cpp.
1281         * WebKit2.xcodeproj/project.pbxproj:
1282
1283 2014-01-21  Anders Carlsson  <andersca@apple.com>
1284
1285         Make all the WebKit2 headers private and move Cocoa UIProcess API headers to a Deprecated group
1286         https://bugs.webkit.org/show_bug.cgi?id=127374
1287
1288         Reviewed by Dan Bernstein.
1289
1290         * WebKit2.xcodeproj/project.pbxproj:
1291
1292 2014-01-21  Commit Queue  <commit-queue@webkit.org>
1293
1294         Unreviewed, rolling out r162452.
1295         http://trac.webkit.org/changeset/162452
1296         https://bugs.webkit.org/show_bug.cgi?id=127366
1297
1298         broke a few tests on all Mac WebKit1 bots (Requested by
1299         thorton on #webkit).
1300
1301         * WebProcess/WebPage/WebPage.cpp:
1302         (WebKit::WebPage::WebPage):
1303         (WebKit::WebPage::setActive):
1304         (WebKit::WebPage::setViewIsVisible):
1305         (WebKit::WebPage::setFocused):
1306         (WebKit::WebPage::setIsInWindow):
1307         (WebKit::WebPage::setViewStateInternal):
1308         (WebKit::WebPage::setIsVisuallyIdle):
1309         * WebProcess/WebPage/WebPage.h:
1310
1311 2014-01-21  Martin Hock  <mhock@apple.com>
1312
1313         Trivial Session API cleanup.
1314         https://bugs.webkit.org/show_bug.cgi?id=127356
1315
1316         Reviewed by Alexey Proskuryakov.
1317
1318         * UIProcess/API/C/WKSessionRef.cpp:
1319         (WKSessionIsEphemeral):
1320         * UIProcess/API/C/WKSessionRef.h:
1321
1322 2014-01-16  Simon Fraser  <simon.fraser@apple.com>
1323
1324         Log an error for a common cause of WebProcess early launch crashing in misconfigured development builds
1325         https://bugs.webkit.org/show_bug.cgi?id=127121
1326
1327         Reviewed by Anders Carlsson.
1328         
1329         A common cause of early WebProcess crashes during development is a null return
1330         from CFBundleGetValueForInfoDictionaryKey(), so log and return an error in
1331         this case rather than passing a null C string to dlsym().
1332
1333         * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessMain.mm:
1334         (WebKit::BootstrapMain):
1335
1336 2014-01-21  Tim Horton  <timothy_horton@apple.com>
1337
1338         Sort headers after the rename that happened in r162454.
1339
1340         * UIProcess/mac/RemoteLayerTreeHost.mm:
1341         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
1342
1343 2014-01-21  Tim Horton  <timothy_horton@apple.com>
1344
1345         Address late review naming comments after r162453.
1346
1347         * UIProcess/API/mac/WKView.mm:
1348         And, fix the build by adding an include I accidentally missed.
1349
1350         * UIProcess/mac/RemoteLayerTreeHost.mm:
1351         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
1352
1353 2014-01-21  Tim Horton  <timothy_horton@apple.com>
1354
1355         Keep CALayer implicit animation disabling code in a single place
1356         https://bugs.webkit.org/show_bug.cgi?id=127355
1357
1358         Reviewed by Simon Fraser.
1359
1360         * Shared/mac/RemoteLayerTreePropertyApplier.h:
1361         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
1362         Remove disableActionsForLayer.
1363
1364         * UIProcess/API/mac/WKView.mm:
1365         (-[WKView _rootLayer]):
1366         Disable actions on the root layer. It doesn't need them, and currently
1367         isn't affected by implicit animations, but future patches which animate
1368         the root layer will benefit from this.
1369
1370         * UIProcess/mac/RemoteLayerTreeHost.mm:
1371         (WebKit::RemoteLayerTreeHost::createLayer):
1372         Use web_disableAllActions instead of disableActionsForLayer.
1373
1374         * WebKit2.xcodeproj/project.pbxproj:
1375         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm: Renamed from Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.cpp.
1376         (PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
1377         (PlatformCALayerRemoteCustom::~PlatformCALayerRemoteCustom):
1378         (PlatformCALayerRemoteCustom::hostingContextID):
1379         Use web_disableAllActions instead of disableActionsForLayer.
1380         This requires making this file Obj-C++ but that's OK since it's Mac/iOS only.
1381
1382 2014-01-21  Gavin Barraclough  <barraclough@apple.com>
1383
1384         Change Page, FocusController to use ViewState
1385         https://bugs.webkit.org/show_bug.cgi?id=126533
1386
1387         Reviewed by Tim Horton.
1388
1389         These classes currently maintain a set of separate fields to represent the view state;
1390         combine these into a single field, and allow WebPage to send the combined update rather
1391         than individual changes.
1392
1393         Maintain existing interface for WebKit1 clients.
1394
1395         * WebProcess/WebPage/WebPage.cpp:
1396         (WebKit::WebPage::WebPage):
1397             - Combined separate calls to Page::setViewState.
1398         (WebKit::WebPage::updateIsInWindow):
1399             - Simplied from setIsInWindow.
1400         (WebKit::WebPage::setViewState):
1401             - Combined separate calls to Page::setViewState.
1402         * WebProcess/WebPage/WebPage.h:
1403             - Declare updateIsInWindow.
1404
1405 2014-01-21  Carlos Garcia Campos  <cgarcia@igalia.com>
1406
1407         [SOUP] Implement CUSTOM PROTOCOLS
1408         https://bugs.webkit.org/show_bug.cgi?id=125583
1409
1410         Reviewed by Anders Carlsson.
1411
1412         Add new classes to implement CustomProtocols for soup. The
1413         implementation is the same, but using the CustomProtocol API and
1414         messages. The current implementation can be removed once all ports
1415         using soup switch to using CustomProtocols.
1416
1417         * GNUmakefile.am: Add new include paths.
1418         * GNUmakefile.list.am: Add new files to compilation.
1419         * PlatformGTK.cmake: Add new files to compilation.
1420         * Shared/API/c/soup/WKBaseSoup.h:
1421         * Shared/APIObject.h:
1422         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
1423         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.cpp: Added.
1424         (WebKit::generateCustomProtocolID):
1425         (WebKit::WebSoupRequestAsyncData::WebSoupRequestAsyncData):
1426         (WebKit::WebSoupRequestAsyncData::~WebSoupRequestAsyncData):
1427         (WebKit::WebSoupRequestAsyncData::requestFailed):
1428         (WebKit::WebSoupRequestAsyncData::releaseTask):
1429         (WebKit::CustomProtocolManagerImpl::CustomProtocolManagerImpl):
1430         (WebKit::CustomProtocolManagerImpl::~CustomProtocolManagerImpl):
1431         (WebKit::CustomProtocolManagerImpl::registerScheme):
1432         (WebKit::CustomProtocolManagerImpl::supportsScheme):
1433         (WebKit::CustomProtocolManagerImpl::didFailWithError):
1434         (WebKit::CustomProtocolManagerImpl::didLoadData):
1435         (WebKit::CustomProtocolManagerImpl::didReceiveResponse):
1436         (WebKit::CustomProtocolManagerImpl::didFinishLoading):
1437         (WebKit::CustomProtocolManagerImpl::send):
1438         (WebKit::CustomProtocolManagerImpl::finish):
1439         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.h: Added.
1440         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp:
1441         (WebKit::CustomProtocolManager::CustomProtocolManager):
1442         (WebKit::CustomProtocolManager::initialize):
1443         (WebKit::CustomProtocolManager::registerScheme):
1444         (WebKit::CustomProtocolManager::supportsScheme):
1445         (WebKit::CustomProtocolManager::didFailWithError):
1446         (WebKit::CustomProtocolManager::didLoadData):
1447         (WebKit::CustomProtocolManager::didReceiveResponse):
1448         (WebKit::CustomProtocolManager::didFinishLoading):
1449         * Shared/WebProcessCreationParameters.cpp:
1450         (WebKit::WebProcessCreationParameters::encode):
1451         (WebKit::WebProcessCreationParameters::decode):
1452         * Shared/WebProcessCreationParameters.h:
1453         * UIProcess/API/C/soup/WKAPICastSoup.h:
1454         * UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.cpp: Copied from Source/WebKit2/UIProcess/soup/WebContextSoup.cpp.
1455         (WKSoupCustomProtocolRequestManagerGetTypeID):
1456         (WKSoupCustomProtocolRequestManagerSetClient):
1457         * UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.h: Added.
1458         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
1459         * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
1460         (WebKit::CustomProtocolManagerProxy::CustomProtocolManagerProxy):
1461         * UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp:
1462         (WebKit::CustomProtocolManagerProxy::CustomProtocolManagerProxy):
1463         (WebKit::CustomProtocolManagerProxy::startLoading):
1464         (WebKit::CustomProtocolManagerProxy::stopLoading):
1465         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp: Added.
1466         (WebKit::WebSoupCustomProtocolRequestManager::supplementName):
1467         (WebKit::WebSoupCustomProtocolRequestManager::create):
1468         (WebKit::WebSoupCustomProtocolRequestManager::WebSoupCustomProtocolRequestManager):
1469         (WebKit::WebSoupCustomProtocolRequestManager::~WebSoupCustomProtocolRequestManager):
1470         (WebKit::WebSoupCustomProtocolRequestManager::initializeClient):
1471         (WebKit::WebSoupCustomProtocolRequestManager::contextDestroyed):
1472         (WebKit::WebSoupCustomProtocolRequestManager::processDidClose):
1473         (WebKit::WebSoupCustomProtocolRequestManager::refWebContextSupplement):
1474         (WebKit::WebSoupCustomProtocolRequestManager::derefWebContextSupplement):
1475         (WebKit::WebSoupCustomProtocolRequestManager::registerSchemeForCustomProtocol):
1476         (WebKit::WebSoupCustomProtocolRequestManager::unregisterSchemeForCustomProtocol):
1477         (WebKit::WebSoupCustomProtocolRequestManager::startLoading):
1478         (WebKit::WebSoupCustomProtocolRequestManager::stopLoading):
1479         (WebKit::WebSoupCustomProtocolRequestManager::didReceiveResponse):
1480         (WebKit::WebSoupCustomProtocolRequestManager::didLoadData):
1481         (WebKit::WebSoupCustomProtocolRequestManager::didFailWithError):
1482         (WebKit::WebSoupCustomProtocolRequestManager::didFinishLoading):
1483         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.h: Added.
1484         (WebKit::WebSoupCustomProtocolRequestManager::registeredSchemesForCustomProtocols):
1485         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp: Added.
1486         (WebKit::WebSoupCustomProtocolRequestManagerClient::startLoading):
1487         (WebKit::WebSoupCustomProtocolRequestManagerClient::stopLoading):
1488         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.h: Added.
1489         * UIProcess/Network/NetworkProcessProxy.cpp:
1490         (WebKit::NetworkProcessProxy::NetworkProcessProxy):
1491         * UIProcess/WebContext.cpp:
1492         (WebKit::WebContext::WebContext):
1493         * UIProcess/WebPageProxy.cpp:
1494         * UIProcess/WebPageProxy.h:
1495         * UIProcess/WebPageProxy.messages.in:
1496         * UIProcess/WebProcessProxy.cpp:
1497         (WebKit::WebProcessProxy::WebProcessProxy):
1498         * UIProcess/gtk/WebContextGtk.cpp:
1499         (WebKit::WebContext::platformInitializeWebProcess):
1500         * UIProcess/soup/WebContextSoup.cpp:
1501         (WebKit::WebContext::platformInitializeNetworkProcess):
1502         * WebProcess/WebProcess.cpp:
1503         (WebKit::WebProcess::WebProcess):
1504         * WebProcess/soup/WebKitSoupRequestGeneric.cpp:
1505         (webkitSoupRequestGenericSendAsync):
1506         (webkitSoupRequestGenericSendFinish):
1507         * WebProcess/soup/WebKitSoupRequestGeneric.h:
1508         * WebProcess/soup/WebProcessSoup.cpp:
1509         (WebKit::WebProcess::platformInitializeWebProcess):
1510
1511 2014-01-21  Adrian Perez de Castro  <aperez@igalia.com>
1512
1513         [GTK] Allow passing extra data to web extensions
1514         https://bugs.webkit.org/show_bug.cgi?id=125990
1515
1516         Reviewed by Carlos Garcia Campos.
1517
1518         Allow passing additional information to the injected bundle. On top
1519         of the string containing the path to the web extensions directory,
1520         a GVariant can be set with additional data using
1521         webkit_web_context_set_web_extensions_initialization_user_data().
1522         Also, a new initialize-web-extensions signal is emitted before
1523         launching a new WebProcess to allow setting different user data
1524         for each process. The GVariant is serialized as a string, passed
1525         to the injected bundle, and the injected bundle deserializes back
1526         the data, which is passed to web extensions which define the
1527         webkit_web_extension_initialize_with_user_data() function (for
1528         backwards compatibility, webkit_web_extension_initialize() is
1529         used as a fallback.)
1530
1531         * UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
1532         (getInjectedBundleInitializationUserData): Define new callback
1533         function which causes emission of the initialize-web-extensions
1534         signal, and serializes the data to be passed to the web process.
1535         (attachInjectedBundleClientToContext): Set the
1536         getInjectedBundleInitializationUserData() callback.
1537         * UIProcess/API/gtk/WebKitWebContext.cpp:
1538         (webkit_web_context_class_init): Define the
1539         initialize-web-extensions signal.
1540         (webkit_web_context_set_web_extensions_directory):
1541         Web extensions directory as now member of WebKitWebContextPrivate,
1542         to be able to retrieve it later.
1543         (webkit_web_context_set_web_extensions_initialization_user_data):
1544         New API method to set the user data passed to the web extensions
1545         when initialized.
1546         (webkitWebContextInitializeWebExtensions): Private function used
1547         to trigger emission of the initialize-web-extensions signal.
1548         * UIProcess/API/gtk/WebKitWebContext.h:
1549         Added prototype for new API method
1550         webkit_web_context_set_web_extensions_initialization_user_data().
1551         * UIProcess/API/gtk/WebKitWebContextPrivate.h:
1552         Prototype of the new private function.
1553         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
1554         Add new public API bits to the documentation.
1555         * WebProcess/gtk/WebGtkExtensionManager.cpp:
1556         (WebKit::WebGtkExtensionManager::initialize):
1557         Deserialize the data received from the UI process and pass it to
1558         webkit_web_extension_initialize_with_user_data() if available,
1559         keeping webkit_web_extension_initialize() as fallback.
1560
1561 2014-01-20  Ryuan Choi  <ryuan.choi@samsung.com>
1562
1563         [EFL][WK2] Move isEwkViewEvasObject back to ewk_view.cpp
1564         https://bugs.webkit.org/show_bug.cgi?id=127261
1565
1566         Reviewed by Gyuyoung Kim.
1567
1568         isEwkViewEvasObject is general check routine of EFL and mainly used in
1569         ewk_view.cpp but it was in EwkView.cpp since separated EwkView.cpp from ewk_view.cpp
1570
1571         This patch moves it to EwkView.h as inline function with small refactoring.
1572         In addition, this patch added EINA_UNLIKELY keyword in cold paths.
1573
1574         * UIProcess/API/efl/EwkView.cpp:
1575         (defaultSmartClassInstance):
1576         (toSmartData):
1577         (toEwkView): Moved it from bottom not to expose it to header file.
1578         * UIProcess/API/efl/EwkView.h:
1579         * UIProcess/API/efl/ewk_view.cpp:
1580         (isEwkViewEvasObject):
1581         (toEwkViewChecked):
1582
1583 2014-01-20  Eunmi Lee  <eunmi15.lee@samsung.com>
1584
1585         [EFL][WK2] Amount of scrolling is different from movement of touch when device pixel ratio is not 1.
1586         https://bugs.webkit.org/show_bug.cgi?id=127268
1587
1588         Reviewed by Gyuyoung Kim.
1589
1590         Amount of scrolling should be same with movement of touch even though
1591         device pixel ratio is not 1, so apply device pixel ratio to the new
1592         position of scrollBy().
1593
1594         * UIProcess/API/efl/EwkView.cpp:
1595         (EwkView::scrollBy):
1596
1597 2014-01-20  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1598
1599         [WK2] Setting m_pageScaleFactor directly in WebPageProxy::scalePage
1600         https://bugs.webkit.org/show_bug.cgi?id=127090
1601
1602         Reviewed by Simon Fraser.
1603
1604         When the client side sets the scale factor, the UIProcess will send the message to WebProcess and only after
1605         WebPageProxy::pageScaleFactorDidChange is called the desired scale factor is returned correctly by
1606         WebPageProxy::pageScaleFactor.
1607         This will avoid the client side retrieve a wrong scale factor while UIProcess and WebProcess gets synchronized.
1608
1609         * UIProcess/WebPageProxy.cpp:
1610         (WebKit::WebPageProxy::scalePage):
1611
1612 2014-01-20  Zan Dobersek  <zdobersek@igalia.com>
1613
1614         [GTK][WK2] Move the rest of GTK's WorkQueue implementation to std::function
1615         https://bugs.webkit.org/show_bug.cgi?id=127273
1616
1617         Reviewed by Anders Carlsson.
1618
1619         Move to using std::function and move semantics in WorkQueue::registerSocketEventHandler
1620         and WorkQueue::SocketEventSource.
1621
1622         * Platform/IPC/unix/ConnectionUnix.cpp:
1623         (IPC::Connection::open):
1624         * Platform/WorkQueue.h:
1625         * Platform/gtk/WorkQueueGtk.cpp:
1626         (WorkQueue::SocketEventSource::SocketEventSource):
1627         (WorkQueue::registerSocketEventHandler):
1628         (WorkQueue::dispatchOnSource): Use std::move instead of std::forward<T>.
1629         (WorkQueue::dispatch): Ditto.
1630         (WorkQueue::dispatchAfter): Ditto.
1631
1632 2014-01-20  Zan Dobersek  <zdobersek@igalia.com>
1633
1634         Unreviewed. Additional build fixes after r162276 and r163304.
1635
1636         * Platform/WorkQueue.h:
1637         * Platform/gtk/WorkQueueGtk.cpp:
1638         (WorkQueue::EventSource::EventSource):
1639         (WorkQueue::dispatchOnSource):
1640         (WorkQueue::dispatch):
1641         (WorkQueue::dispatchAfter):
1642
1643 2014-01-19  Zan Dobersek  <zdobersek@igalia.com>
1644
1645         Unreviewed GTK build fix after r162276.
1646
1647         Updating the WorkQueue implementation to use std::function and std::chrono.
1648
1649         * Platform/WorkQueue.h:
1650         * Platform/gtk/WorkQueueGtk.cpp:
1651         (WorkQueue::dispatchOnSource):
1652         (WorkQueue::dispatch):
1653         (WorkQueue::dispatchAfter):
1654
1655 2014-01-19  Jinwoo Song  <jinwoo7.song@samsung.com>
1656
1657         Unreviewed debug build fix on EFL port after r162300.
1658
1659         * Platform/efl/DispatchQueueWorkItemEfl.h:
1660         (TimerWorkItem::create):
1661
1662 2014-01-19  Jinwoo Song  <jinwoo7.song@samsung.com>
1663
1664         [EFL][WK2] build fix after r162276
1665         https://bugs.webkit.org/show_bug.cgi?id=127259
1666
1667         Reviewed by Anders Carlsson.
1668
1669         * Platform/efl/DispatchQueueEfl.cpp:
1670         (DispatchQueue::performTimerWork):
1671         (DispatchQueue::getNextTimeOut):
1672         * Platform/efl/DispatchQueueWorkItemEfl.h:
1673         (WorkItem::create):
1674         (WorkItem::WorkItem):
1675         (TimerWorkItem::create):
1676         (TimerWorkItem::TimerWorkItem):
1677         * Platform/efl/WorkQueueEfl.cpp:
1678         (WorkQueue::dispatch):
1679         (WorkQueue::dispatchAfter):
1680
1681 2014-01-18  Anders Carlsson  <andersca@apple.com>
1682
1683         Replace a couple of uses of WTF::Function with std::function
1684         https://bugs.webkit.org/show_bug.cgi?id=127218
1685
1686         Reviewed by Andreas Kling.
1687
1688         * Platform/IPC/mac/ConnectionMac.cpp:
1689         (IPC::createDataAvailableSource):
1690         * Platform/WorkQueue.h:
1691         * Platform/mac/WorkQueueMac.cpp:
1692         (WorkQueue::dispatch):
1693         (WorkQueue::dispatchAfter):
1694         * Shared/ChildProcess.cpp:
1695         (WebKit::didCloseOnConnectionWorkQueue):
1696         * UIProcess/Storage/LocalStorageDatabase.cpp:
1697         (WebKit::LocalStorageDatabase::scheduleDatabaseUpdate):
1698         * WebProcess/WebPage/DrawingArea.cpp:
1699         (WebKit::DrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):
1700         * WebProcess/WebPage/DrawingArea.h:
1701         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1702         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1703         (WebKit::TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):
1704
1705 2014-01-18  Martin Hock  <mhock@apple.com>
1706
1707         Flesh out session APIs (still not enabled at API level).
1708         https://bugs.webkit.org/show_bug.cgi?id=126918
1709
1710         Reviewed by Alexey Proskuryakov.
1711
1712         * CMakeLists.txt:
1713         * GNUmakefile.list.am:
1714         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1715         (WebKit::storageSession):
1716         (WebKit::NetworkConnectionToWebProcess::startDownload):
1717         (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
1718         (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
1719         (WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
1720         (WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
1721         (WebKit::NetworkConnectionToWebProcess::getRawCookies):
1722         (WebKit::NetworkConnectionToWebProcess::deleteCookie):
1723         * NetworkProcess/NetworkConnectionToWebProcess.h:
1724         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1725         * NetworkProcess/NetworkProcess.cpp:
1726         (WebKit::NetworkProcess::initializeNetworkProcess):
1727         (WebKit::NetworkProcess::ensurePrivateBrowsingSession):
1728         (WebKit::NetworkProcess::destroyPrivateBrowsingSession):
1729         * NetworkProcess/NetworkProcess.h:
1730         * NetworkProcess/NetworkProcess.messages.in:
1731         * NetworkProcess/RemoteNetworkingContext.h:
1732         * NetworkProcess/mac/RemoteNetworkingContext.mm:
1733         (WebKit::RemoteNetworkingContext::storageSession):
1734         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
1735         * NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:
1736         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
1737         * Shared/SessionTracker.cpp: Copied from Source/WebKit2/UIProcess/APISession.cpp.
1738         (WebKit::sessionMap):
1739         (WebKit::identifierBase):
1740         (WebKit::SessionTracker::getSessionMap):
1741         (WebKit::SessionTracker::getIdentifierBase):
1742         (WebKit::SessionTracker::session):
1743         (WebKit::SessionTracker::destroySession):
1744         (WebKit::SessionTracker::setIdentifierBase):
1745         * Shared/SessionTracker.h: Copied from Source/WebKit2/UIProcess/APISession.h.
1746         (WebKit::SessionTracker::isEphemeralID):
1747         * Shared/mac/CookieStorageShim.cpp:
1748         (WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL):
1749         * UIProcess/APISession.cpp:
1750         (API::generateID):
1751         (API::Session::defaultSession):
1752         (API::Session::legacyPrivateSession):
1753         (API::Session::Session):
1754         (API::Session::create):
1755         (API::Session::isEphemeral):
1756         (API::Session::getID):
1757         * UIProcess/APISession.h:
1758         * UIProcess/WebContext.cpp:
1759         (WebKit::WebContext::setAnyPageGroupMightHavePrivateBrowsingEnabled):
1760         (WebKit::WebContext::createNewWebProcess):
1761         (WebKit::WebContext::createWebPage):
1762         * UIProcess/WebContext.h:
1763         * UIProcess/WebPageProxy.cpp:
1764         (WebKit::WebPageProxy::create):
1765         (WebKit::WebPageProxy::WebPageProxy):
1766         * UIProcess/WebPageProxy.h:
1767         (WebKit::WebPageProxy::sessionID):
1768         * UIProcess/WebProcessProxy.cpp:
1769         (WebKit::WebProcessProxy::createWebPage):
1770         * UIProcess/WebProcessProxy.h:
1771         * WebKit2.xcodeproj/project.pbxproj:
1772         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1773         (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
1774         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1775         (WebKit::legacySessionID):
1776         (WebKit::WebPlatformStrategies::cookiesForDOM):
1777         (WebKit::WebPlatformStrategies::setCookiesFromDOM):
1778         (WebKit::WebPlatformStrategies::cookiesEnabled):
1779         (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
1780         (WebKit::WebPlatformStrategies::getRawCookies):
1781         (WebKit::WebPlatformStrategies::deleteCookie):
1782         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
1783         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
1784         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
1785         (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
1786         (WebKit::WebFrameNetworkingContext::storageSession):
1787         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
1788         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
1789         (WebKit::WebFrameNetworkingContext::storageSession):
1790         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
1791         * WebProcess/WebProcess.cpp:
1792         (WebKit::WebProcess::initializeWebProcess):
1793         (WebKit::WebProcess::ensurePrivateBrowsingSession):
1794         (WebKit::WebProcess::destroyPrivateBrowsingSession):
1795         * WebProcess/WebProcess.h:
1796         * WebProcess/WebProcess.messages.in:
1797
1798 2014-01-18  Brian Burg  <bburg@apple.com>
1799
1800         Web Inspector: Page should use std::unique_ptr for InspectorController
1801         https://bugs.webkit.org/show_bug.cgi?id=127068
1802
1803         Reviewed by Joseph Pecoraro.
1804
1805         Convert call sites to use a InspectorController reference.
1806
1807         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
1808         (WebKit::WebInspectorClient::drawRect):
1809         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
1810         (WebKit::WebInspectorFrontendClient::WebInspectorFrontendClient):
1811         (WebKit::WebInspectorFrontendClient::closeWindow):
1812         * WebProcess/WebPage/WebInspector.cpp:
1813         (WebKit::WebInspector::createInspectorPage):
1814         (WebKit::WebInspector::show):
1815         (WebKit::WebInspector::close):
1816         (WebKit::WebInspector::evaluateScriptForTest):
1817         (WebKit::WebInspector::showConsole):
1818         (WebKit::WebInspector::showResources):
1819         (WebKit::WebInspector::showMainResourceForFrame):
1820         (WebKit::WebInspector::startJavaScriptDebugging):
1821         (WebKit::WebInspector::stopJavaScriptDebugging):
1822         (WebKit::WebInspector::setJavaScriptProfilingEnabled):
1823         (WebKit::WebInspector::startJavaScriptProfiling):
1824         (WebKit::WebInspector::stopJavaScriptProfiling):
1825         (WebKit::WebInspector::startPageProfiling):
1826         (WebKit::WebInspector::stopPageProfiling):
1827         (WebKit::WebInspector::dispatchMessageFromRemoteFrontend):
1828         (WebKit::WebInspector::remoteFrontendConnected):
1829         (WebKit::WebInspector::remoteFrontendDisconnected):
1830
1831 2014-01-18  Anders Carlsson  <andersca@apple.com>
1832
1833         Remove ENABLE_THREADED_HTML_PARSER defines everywhere
1834         https://bugs.webkit.org/show_bug.cgi?id=127225
1835
1836         Reviewed by Andreas Kling.
1837
1838         This concludes the removal of over 8.8 million lines of threaded parser code.
1839
1840         * Configurations/FeatureDefines.xcconfig:
1841
1842 2014-01-18  Yongjun Zhang  <yongjun_zhang@apple.com>
1843
1844         Make WKRenderingProgressEvents a shareable API.
1845         https://bugs.webkit.org/show_bug.cgi?id=127213
1846
1847         Reviewed by Dan Bernstein.
1848
1849         Move WKRenderingProgressEvents from UIProcess to Shared, so that an inject bundle
1850         could also use this enum when listening to layout milestones.
1851
1852         * Shared/API/Cocoa/WKRenderingProgressEvents.h: Added.
1853         (NS_OPTIONS):
1854         * Shared/API/Cocoa/WKRenderingProgressEventsInternal.h: Added.
1855         (renderingProgressEvents):
1856         * UIProcess/API/Cocoa/WKBrowsingContextController.h: Move WKRenderingProgressEvents to Shared/API/Cocoa/WKRenderingProgressEvents.h.
1857         * UIProcess/API/Cocoa/WKBrowsingContextController.mm: Move renderingProgressEvents() to WKRenderingProgressEventsInternal.h.
1858         * WebKit2.xcodeproj/project.pbxproj:
1859         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h: Add
1860             webProcessPlugInBrowserContextController:renderingProgressDidChange: to load delegate.
1861         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
1862         (didLayout):
1863         (setUpPageLoaderClient): Also listen to didLayout callback for layout milestones.
1864
1865 2014-01-17  Commit Queue  <commit-queue@webkit.org>
1866
1867         Unreviewed, rolling out r162237 and r162241.
1868         http://trac.webkit.org/changeset/162237
1869         http://trac.webkit.org/changeset/162241
1870         https://bugs.webkit.org/show_bug.cgi?id=127216
1871
1872         Broke lots of API tests (Requested by ap on #webkit).
1873
1874         * CMakeLists.txt:
1875         * GNUmakefile.list.am:
1876         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1877         (WebKit::storageSession):
1878         (WebKit::NetworkConnectionToWebProcess::startDownload):
1879         (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
1880         (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
1881         (WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
1882         (WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
1883         (WebKit::NetworkConnectionToWebProcess::getRawCookies):
1884         (WebKit::NetworkConnectionToWebProcess::deleteCookie):
1885         * NetworkProcess/NetworkConnectionToWebProcess.h:
1886         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1887         * NetworkProcess/NetworkProcess.cpp:
1888         (WebKit::NetworkProcess::initializeNetworkProcess):
1889         (WebKit::NetworkProcess::ensurePrivateBrowsingSession):
1890         (WebKit::NetworkProcess::destroyPrivateBrowsingSession):
1891         * NetworkProcess/NetworkProcess.h:
1892         * NetworkProcess/NetworkProcess.messages.in:
1893         * NetworkProcess/RemoteNetworkingContext.h:
1894         * NetworkProcess/mac/RemoteNetworkingContext.mm:
1895         (WebKit::privateBrowsingStorageSession):
1896         (WebKit::RemoteNetworkingContext::storageSession):
1897         (WebKit::RemoteNetworkingContext::privateBrowsingSession):
1898         (WebKit::privateBrowsingStorageSessionIdentifierBase):
1899         (WebKit::RemoteNetworkingContext::setPrivateBrowsingStorageSessionIdentifierBase):
1900         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
1901         (WebKit::RemoteNetworkingContext::destroyPrivateBrowsingSession):
1902         * NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:
1903         (WebKit::RemoteNetworkingContext::setPrivateBrowsingStorageSessionIdentifierBase):
1904         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
1905         (WebKit::RemoteNetworkingContext::destroyPrivateBrowsingSession):
1906         (WebKit::RemoteNetworkingContext::privateBrowsingSession):
1907         * Shared/SessionTracker.cpp: Removed.
1908         * Shared/SessionTracker.h: Removed.
1909         * UIProcess/APISession.cpp:
1910         (API::Session::Session):
1911         (API::Session::create):
1912         (API::Session::isEphemeral):
1913         * UIProcess/APISession.h:
1914         * UIProcess/WebContext.cpp:
1915         (WebKit::WebContext::setAnyPageGroupMightHavePrivateBrowsingEnabled):
1916         (WebKit::WebContext::createNewWebProcess):
1917         (WebKit::WebContext::createWebPage):
1918         * UIProcess/WebContext.h:
1919         * UIProcess/WebPageProxy.cpp:
1920         (WebKit::WebPageProxy::create):
1921         (WebKit::WebPageProxy::WebPageProxy):
1922         * UIProcess/WebPageProxy.h:
1923         * UIProcess/WebProcessProxy.cpp:
1924         (WebKit::WebProcessProxy::createWebPage):
1925         * UIProcess/WebProcessProxy.h:
1926         * WebKit2.xcodeproj/project.pbxproj:
1927         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1928         (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
1929         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1930         (WebKit::WebPlatformStrategies::cookiesForDOM):
1931         (WebKit::WebPlatformStrategies::setCookiesFromDOM):
1932         (WebKit::WebPlatformStrategies::cookiesEnabled):
1933         (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
1934         (WebKit::WebPlatformStrategies::getRawCookies):
1935         (WebKit::WebPlatformStrategies::deleteCookie):
1936         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
1937         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
1938         (WebKit::privateSession):
1939         (WebKit::identifierBase):
1940         (WebKit::WebFrameNetworkingContext::setPrivateBrowsingStorageSessionIdentifierBase):
1941         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
1942         (WebKit::WebFrameNetworkingContext::destroyPrivateBrowsingSession):
1943         (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
1944         (WebKit::WebFrameNetworkingContext::storageSession):
1945         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
1946         (WebKit::privateSession):
1947         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
1948         (WebKit::WebFrameNetworkingContext::destroyPrivateBrowsingSession):
1949         (WebKit::WebFrameNetworkingContext::storageSession):
1950         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
1951         * WebProcess/WebProcess.cpp:
1952         (WebKit::WebProcess::initializeWebProcess):
1953         (WebKit::WebProcess::ensurePrivateBrowsingSession):
1954         (WebKit::WebProcess::destroyPrivateBrowsingSession):
1955         * WebProcess/WebProcess.h:
1956         * WebProcess/WebProcess.messages.in:
1957
1958 2014-01-17  Ryuan Choi  <ryuan.choi@samsung.com>
1959
1960         Unreviewed build fix on EFL port after r162237
1961
1962         The EFL port disabled NETWORK_PROCESS yet and use -Werror=unused-function.
1963
1964         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1965         Guarded legacySessionID with ENABLE(NETWORK_PROCESS)
1966
1967 2014-01-17  Martin Hock  <mhock@apple.com>
1968
1969         Flesh out session APIs (still not enabled at API level).
1970         https://bugs.webkit.org/show_bug.cgi?id=126918
1971
1972         Reviewed by Alexey Proskuryakov.
1973
1974         * CMakeLists.txt:
1975         * GNUmakefile.list.am:
1976         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1977         (WebKit::storageSession):
1978         (WebKit::NetworkConnectionToWebProcess::startDownload):
1979         (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
1980         (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
1981         (WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
1982         (WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
1983         (WebKit::NetworkConnectionToWebProcess::getRawCookies):
1984         (WebKit::NetworkConnectionToWebProcess::deleteCookie):
1985         * NetworkProcess/NetworkConnectionToWebProcess.h:
1986         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1987         * NetworkProcess/NetworkProcess.cpp:
1988         (WebKit::NetworkProcess::initializeNetworkProcess):
1989         (WebKit::NetworkProcess::ensurePrivateBrowsingSession):
1990         (WebKit::NetworkProcess::destroyPrivateBrowsingSession):
1991         * NetworkProcess/NetworkProcess.h:
1992         * NetworkProcess/NetworkProcess.messages.in:
1993         * NetworkProcess/RemoteNetworkingContext.h:
1994         * NetworkProcess/mac/RemoteNetworkingContext.mm:
1995         (WebKit::RemoteNetworkingContext::storageSession):
1996         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
1997         * NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:
1998         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
1999         * Shared/SessionTracker.cpp: Copied from Source/WebKit2/UIProcess/APISession.cpp.
2000         (WebKit::sessionMap):
2001         (WebKit::identifierBase):
2002         (WebKit::SessionTracker::getSessionMap):
2003         (WebKit::SessionTracker::getIdentifierBase):
2004         (WebKit::SessionTracker::session):
2005         (WebKit::SessionTracker::destroySession):
2006         (WebKit::SessionTracker::setIdentifierBase):
2007         * Shared/SessionTracker.h: Copied from Source/WebKit2/UIProcess/APISession.h.
2008         (WebKit::SessionTracker::isEphemeralID):
2009         * UIProcess/APISession.cpp:
2010         (API::generateID):
2011         (API::Session::defaultSession):
2012         (API::Session::legacyPrivateSession):
2013         (API::Session::Session):
2014         (API::Session::create):
2015         (API::Session::isEphemeral):
2016         (API::Session::getID):
2017         * UIProcess/APISession.h:
2018         * UIProcess/WebContext.cpp:
2019         (WebKit::WebContext::setAnyPageGroupMightHavePrivateBrowsingEnabled):
2020         (WebKit::WebContext::createNewWebProcess):
2021         (WebKit::WebContext::createWebPage):
2022         * UIProcess/WebContext.h:
2023         * UIProcess/WebPageProxy.cpp:
2024         (WebKit::WebPageProxy::create):
2025         (WebKit::WebPageProxy::WebPageProxy):
2026         * UIProcess/WebPageProxy.h:
2027         (WebKit::WebPageProxy::sessionID):
2028         * UIProcess/WebProcessProxy.cpp:
2029         (WebKit::WebProcessProxy::createWebPage):
2030         * UIProcess/WebProcessProxy.h:
2031         * WebKit2.xcodeproj/project.pbxproj:
2032         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2033         (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
2034         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2035         (WebKit::legacySessionID):
2036         (WebKit::WebPlatformStrategies::cookiesForDOM):
2037         (WebKit::WebPlatformStrategies::setCookiesFromDOM):
2038         (WebKit::WebPlatformStrategies::cookiesEnabled):
2039         (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
2040         (WebKit::WebPlatformStrategies::getRawCookies):
2041         (WebKit::WebPlatformStrategies::deleteCookie):
2042         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
2043         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
2044         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
2045         (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
2046         (WebKit::WebFrameNetworkingContext::storageSession):
2047         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
2048         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
2049         (WebKit::WebFrameNetworkingContext::storageSession):
2050         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
2051         * WebProcess/WebProcess.cpp:
2052         (WebKit::WebProcess::initializeWebProcess):
2053         (WebKit::WebProcess::ensurePrivateBrowsingSession):
2054         (WebKit::WebProcess::destroyPrivateBrowsingSession):
2055         * WebProcess/WebProcess.h:
2056         * WebProcess/WebProcess.messages.in:
2057
2058 2014-01-17  Andreas Kling  <akling@apple.com>
2059
2060         Remove unused TOUCH_ADJUSTMENT code.
2061         <https://webkit.org/b/127181>
2062
2063         Reviewed by Anders Carlsson.
2064
2065         * WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp:
2066         (WebKit::WebPage::findZoomableAreaForPoint):
2067
2068 2014-01-17  Anders Carlsson  <andersca@apple.com>
2069
2070         Fix build.
2071
2072         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2073         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2074
2075 2014-01-17  Anders Carlsson  <andersca@apple.com>
2076
2077         Remove FrameLoaderClient::didPerformFirstNavigation()
2078         https://bugs.webkit.org/show_bug.cgi?id=127191
2079
2080         Reviewed by Dan Bernstein.
2081
2082         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2083         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2084
2085 2014-01-17  Manuel Rego Casasnovas  <rego@igalia.com>
2086
2087         [GTK] Add CSS Grid Layout as experimental feature
2088         https://bugs.webkit.org/show_bug.cgi?id=127089
2089
2090         Reviewed by Martin Robinson.
2091
2092         Allow CSS Grid Layout to be enabled through the environment variable WEBKITGTK_EXPERIMENTAL_FEATURES.
2093
2094         Example: WEBKITGTK_EXPERIMENTAL_FEATURES="CSS_GRID_LAYOUT=1"
2095
2096         * UIProcess/API/gtk/WebKitSettings.cpp:
2097         (webKitSettingsConstructed): Use new experimental feature to enable or disable CSS Grid Layout.
2098         * UIProcess/gtk/ExperimentalFeatures.cpp: Add new experimental feature.
2099         * UIProcess/gtk/ExperimentalFeatures.h: Ditto.
2100
2101 2014-01-17  Enrica Casucci  <enrica@apple.com>
2102
2103         Support WebSelections in WK2 on iOS.
2104         https://bugs.webkit.org/show_bug.cgi?id=127015
2105         <rdar://problem/15843090>
2106
2107         Reviewed by Dan Bernstein.
2108
2109         Removing unused variable in selectWithGesture that
2110         causes Release build to fail after r162103.
2111
2112         * WebProcess/WebPage/ios/WebPageIOS.mm:
2113         (WebKit::WebPage::selectWithGesture):
2114
2115 2014-01-17  Yongjun Zhang  <yongjun_zhang@apple.com>
2116
2117         https://bugs.webkit.org/show_bug.cgi?id=127138
2118         Add more delegate callback methods to WKWebProcessPlugInLoadDelegate.
2119
2120         Reviewed by Sam Weinig.
2121
2122         Add more WKWebProcessPlugInLoadDelegate callback methods so that a injected
2123         bundle can listen/react to more frame loading events.
2124
2125         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h: Add more delegate callback methods for
2126             WKWebProcessPlugInLoadDelegate.
2127         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
2128         (didCommitLoadForFrame):
2129         (didFinishDocumentLoadForFrame):
2130         (didFailLoadWithErrorForFrame):
2131         (didSameDocumentNavigationForFrame): 
2132         (didLayoutForFrame):
2133         (setUpPageLoaderClient):
2134
2135 2014-01-16  Carlos Garcia Campos  <cgarcia@igalia.com>
2136
2137         [SOUP] Add stubs for CustomProtocol classes
2138         https://bugs.webkit.org/show_bug.cgi?id=126343
2139
2140         Reviewed by Gustavo Noronha Silva.
2141
2142         * CMakeLists.txt:
2143         * GNUmakefile.am:
2144         * GNUmakefile.list.am:
2145         * PlatformGTK.cmake:
2146         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp: Added.
2147         (WebKit::generateCustomProtocolID):
2148         (WebKit::WebSoupRequestAsyncData::WebSoupRequestAsyncData):
2149         (WebKit::WebSoupRequestAsyncData::~WebSoupRequestAsyncData):
2150         (WebKit::WebSoupRequestAsyncData::requestFailed):
2151         (WebKit::WebSoupRequestAsyncData::releaseTask):
2152         (WebKit::CustomProtocolManager::supplementName):
2153         (WebKit::CustomProtocolManager::CustomProtocolManager):
2154         (WebKit::CustomProtocolManager::initializeConnection):
2155         (WebKit::CustomProtocolManager::initialize):
2156         * Shared/Network/NetworkProcessCreationParameters.cpp:
2157         (WebKit::NetworkProcessCreationParameters::encode): Move
2158         urlSchemesRegisteredForCustomProtocols encoding out of platform
2159         ifdefs, since it's already guarded by ENABLE(CUSTOM_PROTOCOLS).
2160         (WebKit::NetworkProcessCreationParameters::decode): Ditto.
2161         * Shared/Network/NetworkProcessCreationParameters.h: Ditto.
2162         * UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp: Added.
2163         (WebKit::CustomProtocolManagerProxy::CustomProtocolManagerProxy):
2164         (WebKit::CustomProtocolManagerProxy::startLoading):
2165         (WebKit::CustomProtocolManagerProxy::stopLoading):
2166
2167 2014-01-16  Tim Horton  <timothy_horton@apple.com>
2168
2169         On iOS, zooming in with a TileController-backed main frame makes hundreds of tiles
2170         https://bugs.webkit.org/show_bug.cgi?id=126531
2171         <rdar://problem/15745862>
2172
2173         Reviewed by Anders Carlsson.
2174
2175         * UIProcess/API/ios/WKContentView.mm:
2176         (-[WKContentView _updateViewExposedRect]):
2177         (-[WKContentView setViewportSize:]):
2178         (-[WKContentView didFinishScrollTo:]):
2179         (-[WKContentView didScrollTo:]):
2180         (-[WKContentView didZoomToScale:]):
2181         Because zooming is performed by the UIScrollView, we need to transform
2182         the exposedRect's offset in order to get it in FrameView-relative coordinates.
2183
2184         * UIProcess/ios/WebPageProxyIOS.mm:
2185         (WebKit::WebPageProxy::didFinishZooming):
2186         Save the pageScaleFactor when it changes.
2187
2188 2014-01-16  Carlos Garcia Campos  <cgarcia@igalia.com>
2189
2190         [GTK] Remove the weak pointer added to the web view in WebKitPrintOperation
2191         https://bugs.webkit.org/show_bug.cgi?id=127098
2192
2193         Reviewed by Martin Robinson.
2194
2195         If the print operation finishes and the web view is still alive,
2196         the weak pointer added to the view should be removed.
2197
2198         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
2199         (_WebKitPrintOperationPrivate::~_WebKitPrintOperationPrivate):
2200
2201 2014-01-15  Sam Weinig  <sam@webkit.org>
2202
2203         TextBreakIterator's should support Latin-1 for all iterator types (Part 3)
2204         https://bugs.webkit.org/show_bug.cgi?id=126856
2205
2206         Reviewed by Ryosuke Niwa.
2207
2208         Change all the TextBreakIterator creation functions to take StringViews. Remove a few
2209         now unnecessary up-conversions to UTF-16 in the process.
2210
2211         * UIProcess/efl/TextCheckerEfl.cpp:
2212         (WebKit::nextWordOffset):
2213         (WebKit::TextChecker::checkTextOfParagraph):
2214
2215 2014-01-16  Eunmi Lee  <eunmi15.lee@samsung.com>
2216
2217         [EFL][WK2] EwkView can not be shown without re-sizing once it is hidden.
2218         https://bugs.webkit.org/show_bug.cgi?id=127084
2219
2220         Reviewed by Gyuyoung Kim.
2221
2222         Visibility of EwkView can not be controlled by evas_object_show/hide
2223         because EwkView can be shown only if re-sizing is requested, so modify
2224         codes to show EwkView directly if we do not wait for re-sizing.
2225         Additionally, we have to set default value of m_pendingSurfaceResize
2226         to true for accelerated mode to prevent to show black empty view for
2227         the first request to show.
2228
2229         * UIProcess/API/efl/EwkView.cpp:
2230         (EwkView::EwkView):
2231         (EwkView::handleEvasObjectShow):
2232
2233 2014-01-16  Andy Estes  <aestes@apple.com>
2234
2235         Build Fix: Use standard architectures when building for iOS
2236
2237         Even though we don't use the plug-in services on iOS, we still need
2238         them to build (we won't install them). Be sure we specify valid iOS
2239         architectures when doing so.
2240
2241         * Configurations/PluginService.32.xcconfig:
2242         * Configurations/PluginService.64.xcconfig:
2243
2244 2014-01-16  Enrica Casucci  <enrica@apple.com>
2245
2246         Crash when destroying WKInteractionView.
2247         https://bugs.webkit.org/show_bug.cgi?id=127153
2248         <rdar://problem/15840761>
2249
2250         Reviewed by Anders Carlsson.
2251
2252         UIWKSelectionAssistant is a RetainPtr and it is being 
2253         deallocated after the view and its gesture recognizers
2254         have been destroyed.
2255         The parent class UIWebSelectionAssistant assumes to be
2256         deallocated before the view is gone.
2257         We deallocate the interaction assistants explicitly to
2258         fix the problem.
2259
2260         * UIProcess/API/ios/WKInteractionView.mm:
2261         (-[WKInteractionView dealloc]):
2262
2263 2014-01-16  Brady Eidson  <beidson@apple.com>
2264
2265         IDB: delete object store support
2266         <rdar://problem/15779641> and https://bugs.webkit.org/show_bug.cgi?id=127123
2267
2268         Reviewed by Alexey Proskuryakov.
2269
2270         Pipe through Web -> Database -> Web process messaging for delete object store.
2271         Perform dropping the object store in the backing store.
2272
2273         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
2274         (WebKit::DatabaseProcessIDBConnection::deleteObjectStore):
2275         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
2276         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
2277
2278         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
2279         (WebKit::UniqueIDBDatabase::didDeleteObjectStore):
2280         (WebKit::UniqueIDBDatabase::deleteObjectStore):
2281         (WebKit::UniqueIDBDatabase::deleteObjectStoreInBackingStore):
2282         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
2283
2284         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
2285         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
2286         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createObjectStore):
2287         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteObjectStore):
2288         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
2289
2290         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
2291         (WebKit::WebIDBServerConnection::deleteObjectStore):
2292         (WebKit::WebIDBServerConnection::didDeleteObjectStore):
2293         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
2294         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
2295
2296 2014-01-16  Alexey Proskuryakov  <ap@apple.com>
2297
2298         [Mac] [iOS] Add support for CFHTTPCookieStorageAcceptPolicyExclusivelyFromMainDocumentDomain
2299         https://bugs.webkit.org/show_bug.cgi?id=127139
2300
2301         Reviewed by Brady Eidson.
2302
2303         * Shared/HTTPCookieAcceptPolicy.h:
2304         * UIProcess/API/C/WKAPICast.h:
2305         (WebKit::toHTTPCookieAcceptPolicy):
2306         (WebKit::toAPI):
2307         * UIProcess/API/C/WKCookieManager.h:
2308         Added the policy to appropriate switches and enums.
2309
2310 2014-01-16  Jeffrey Pfau  <jpfau@apple.com>
2311
2312         Fix build after r162161. One FINAL was still present.
2313
2314         * Shared/cf/KeyedDecoder.h:
2315
2316 2014-01-16  Anders Carlsson  <andersca@apple.com>
2317
2318         Change all uses of FINAL to final now that all our compilers support it
2319         https://bugs.webkit.org/show_bug.cgi?id=127142
2320
2321         Reviewed by Benjamin Poulain.
2322
2323         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
2324         * NetworkProcess/RemoteNetworkingContext.h:
2325         * Shared/API/Cocoa/RemoteObjectRegistry.h:
2326         * Shared/APIArray.h:
2327         * Shared/APIString.h:
2328         * Shared/AsyncRequest.h:
2329         * Shared/AsyncTask.h:
2330         * Shared/cf/KeyedEncoder.h:
2331         * UIProcess/API/gtk/PageClientImpl.h:
2332         * UIProcess/API/mac/PageClientImpl.h:
2333         * UIProcess/efl/WebViewEfl.h:
2334         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
2335         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
2336         * WebProcess/Plugins/PDF/PDFPlugin.h:
2337         * WebProcess/Storage/StorageAreaImpl.h:
2338         * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
2339         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
2340         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
2341
2342 2014-01-16  Brady Eidson  <beidson@apple.com>
2343
2344         Fix the build after r162148
2345
2346         * Shared/cf/KeyedEncoder.h: s/OVERRIDE/override/
2347
2348 2014-01-15  Brady Eidson  <beidson@apple.com>
2349
2350         Use KeyedCoding as a persistent storage mechanism for blobs
2351         https://bugs.webkit.org/show_bug.cgi?id=127012
2352
2353         Reviewed by Anders Carlsson.
2354
2355         Add a way to get the encoded buffer to save:
2356         * Shared/cf/KeyedEncoder.cpp:
2357         (WebKit::KeyedEncoder::finishEncoding):
2358         * Shared/cf/KeyedEncoder.h:
2359
2360         Add a WebKit KeyedDecoder for CF platforms that can decode the previously encoded buffer:
2361         * Shared/cf/KeyedDecoder.cpp: Added.
2362         (WebKit::KeyedDecoder::KeyedDecoder):
2363         (WebKit::KeyedDecoder::~KeyedDecoder):
2364         (WebKit::KeyedDecoder::decodeInt64):
2365         (WebKit::KeyedDecoder::decodeUInt32):
2366         (WebKit::KeyedDecoder::decodeString):
2367         (WebKit::KeyedDecoder::beginObject):
2368         (WebKit::KeyedDecoder::endObject):
2369         (WebKit::KeyedDecoder::beginArray):
2370         (WebKit::KeyedDecoder::beginArrayElement):
2371         (WebKit::KeyedDecoder::endArrayElement):
2372         (WebKit::KeyedDecoder::endArray):
2373         * Shared/cf/KeyedDecoder.h:
2374
2375         Create a WebKit KeyedEncoder/Decoder and use to encode/decode IDBKeyPaths:
2376         * DatabaseProcess/IndexedDB/IDBSerialization.cpp:
2377         (WebKit::serializeIDBKeyPath):
2378         (WebKit::deserializeIDBKeyPath):
2379         * DatabaseProcess/IndexedDB/IDBSerialization.h:
2380
2381         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
2382         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createObjectStore):
2383
2384         * WebKit2.xcodeproj/project.pbxproj:
2385
2386 2014-01-16  Andy Estes  <aestes@apple.com>
2387
2388         Stop copying WKOriginDataManager.cpp into WebKit2.framework
2389         https://bugs.webkit.org/show_bug.cgi?id=127100
2390
2391         Reviewed by Sam Weinig.
2392
2393         The file was mistakenly added to the 'All' target. Remove it.
2394
2395         * WebKit2.xcodeproj/project.pbxproj:
2396
2397 2014-01-16  Andy Estes  <aestes@apple.com>
2398
2399         [iOS] Install WebKit2 XPC services correctly
2400         https://bugs.webkit.org/show_bug.cgi?id=127097
2401
2402         Reviewed by Anders Carlsson.
2403
2404         * Configurations/PluginService.32.xcconfig: Set SKIP_INSTALL to YES on iOS.
2405         * Configurations/PluginService.64.xcconfig: Ditto.
2406         * Configurations/PluginService.Development.xcconfig: Ditto.
2407         * WebKit2.xcodeproj/project.pbxproj: Modified the "Add XPCServices symlink"
2408         build phase to only execute on OS X. Modified the
2409         "Copy XPC services for engineering builds" build phase to copy files
2410         directly to WebKit2.framework/XPCServices/ on iOS, and modified its
2411         output file paths to omit "Versions/A/" (since OS X will have a
2412         XPCServices symlink at the root of the framework bundle).
2413
2414 2014-01-16  Roger Fong  <roger_fong@apple.com>
2415
2416         Build fix for mac following r162141.
2417
2418         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: Switch OVERRIDE to override.
2419
2420 2014-01-16  Roger Fong  <roger_fong@apple.com>
2421
2422         Add support for handling WebGL load policies.
2423         https://bugs.webkit.org/show_bug.cgi?id=126935
2424         <rdar://problem/15790448>.
2425
2426         Reviewed by Timothy Horton.
2427
2428         Boiler plate code for getting the load policy logic from WebProcess to the UIProcess.
2429
2430         * UIProcess/API/C/WKAPICast.h:
2431         (WebKit::toWebGLLoadPolicy):
2432         * UIProcess/API/C/WKPageLoaderClient.h: Define a new WKPageLoaderClientV4 struct.
2433         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
2434         (setUpPageLoaderClient):
2435         * UIProcess/WebLoaderClient.cpp:
2436         (WebKit::WebLoaderClient::webGLLoadPolicy):
2437         * UIProcess/WebLoaderClient.h:
2438         * UIProcess/WebPageProxy.cpp:
2439         (WebKit::WebPageProxy::webGLPolicyForURL):
2440         * UIProcess/WebPageProxy.h:
2441         * UIProcess/WebPageProxy.messages.in:
2442         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2443         (WebKit::WebFrameLoaderClient::webGLPolicyForURL): 
2444         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2445         * WebProcess/WebPage/WebPage.cpp:
2446         (WebKit::WebPage::webGLPolicyForURL): We use a sendSync to get the load policy value from the UIProcess.
2447         * WebProcess/WebPage/WebPage.h:
2448
2449 2014-01-16  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
2450
2451         Remove workaround for compilers not supporting explicit override control
2452         https://bugs.webkit.org/show_bug.cgi?id=127111
2453
2454         Reviewed by Anders Carlsson.
2455
2456         Now all compilers support explicit override control, this workaround can be removed.
2457
2458         * DatabaseProcess/DatabaseProcess.h:
2459         * DatabaseProcess/DatabaseToWebProcessConnection.h:
2460         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
2461         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
2462         * NetworkProcess/AsynchronousNetworkLoaderClient.h:
2463         * NetworkProcess/NetworkProcess.h:
2464         * NetworkProcess/NetworkProcessPlatformStrategies.h:
2465         * NetworkProcess/NetworkResourceLoader.h:
2466         * NetworkProcess/RemoteNetworkingContext.h:
2467         * NetworkProcess/SynchronousNetworkLoaderClient.h:
2468         * NetworkProcess/mac/DiskCacheMonitor.h:
2469         * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm:
2470         * PluginProcess/PluginControllerProxy.h:
2471         * PluginProcess/PluginProcess.h:
2472         * PluginProcess/WebProcessConnection.h:
2473         * Shared/API/Cocoa/RemoteObjectRegistry.h:
2474         * Shared/APIObject.h:
2475         * Shared/AsyncRequest.h:
2476         * Shared/AsyncTask.h:
2477         * Shared/Authentication/AuthenticationManager.h:
2478         * Shared/ChildProcess.h:
2479         * Shared/ChildProcessProxy.h:
2480         * Shared/CoordinatedGraphics/WebCoordinatedSurface.h:
2481         * Shared/Downloads/Download.h:
2482         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
2483         * Shared/WebConnection.h:
2484         * Shared/WebResourceBuffer.h:
2485         * Shared/cf/KeyedEncoder.h:
2486         * Shared/mac/SecItemShim.h:
2487         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
2488         * UIProcess/API/gtk/PageClientImpl.h:
2489         * UIProcess/API/ios/PageClientImplIOS.h:
2490         * UIProcess/API/mac/PageClientImpl.h:
2491         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
2492         * UIProcess/CoordinatedGraphics/WebView.h:
2493         * UIProcess/Databases/DatabaseProcessProxy.h:
2494         * UIProcess/Downloads/DownloadProxy.h:
2495         * UIProcess/DrawingAreaProxy.h:
2496         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
2497         * UIProcess/Network/NetworkProcessProxy.h:
2498         * UIProcess/Notifications/WebNotificationManagerProxy.h:
2499         * UIProcess/Plugins/PluginProcessProxy.h:
2500         * UIProcess/Scrolling/RemoteScrollingTree.h:
2501         * UIProcess/Storage/StorageManager.h:
2502         * UIProcess/WebApplicationCacheManagerProxy.h:
2503         * UIProcess/WebBatteryManagerProxy.h:
2504         * UIProcess/WebConnectionToWebProcess.h:
2505         * UIProcess/WebContext.h:
2506         * UIProcess/WebCookieManagerProxy.h:
2507         * UIProcess/WebDatabaseManagerProxy.h:
2508         * UIProcess/WebFullScreenManagerProxy.h:
2509         * UIProcess/WebGeolocationManagerProxy.h:
2510         * UIProcess/WebIconDatabase.h:
2511         * UIProcess/WebInspectorProxy.h:
2512         * UIProcess/WebKeyValueStorageManager.h:
2513         * UIProcess/WebMediaCacheManagerProxy.h:
2514         * UIProcess/WebNetworkInfoManagerProxy.h:
2515         * UIProcess/WebOriginDataManagerProxy.h:
2516         * UIProcess/WebPageProxy.h:
2517         * UIProcess/WebProcessProxy.h:
2518         * UIProcess/WebResourceCacheManagerProxy.h:
2519         * UIProcess/WebVibrationProxy.h:
2520         * UIProcess/efl/PageViewportControllerClientEfl.h:
2521         * UIProcess/efl/WebViewEfl.h:
2522         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
2523         * UIProcess/mac/SecItemShimProxy.h:
2524         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
2525         * UIProcess/mac/ViewGestureController.h:
2526         * UIProcess/mac/WebColorPickerMac.h:
2527         * UIProcess/soup/WebSoupRequestManagerProxy.h:
2528         * WebProcess/ApplicationCache/WebApplicationCacheManager.h:
2529         * WebProcess/Battery/WebBatteryManager.h:
2530         * WebProcess/Cookies/WebCookieManager.h:
2531         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
2532         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
2533         * WebProcess/Databases/WebToDatabaseProcessConnection.h:
2534         * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm:
2535         * WebProcess/FileAPI/BlobRegistryProxy.h:
2536         * WebProcess/Geolocation/WebGeolocationManager.h:
2537         * WebProcess/IconDatabase/WebIconDatabaseProxy.h:
2538         * WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm:
2539         * WebProcess/MediaCache/WebMediaCacheManager.h:
2540         * WebProcess/Network/NetworkProcessConnection.h:
2541         * WebProcess/Network/WebResourceLoadScheduler.h:
2542         * WebProcess/Network/WebResourceLoader.h:
2543         * WebProcess/NetworkInfo/WebNetworkInfoManager.h:
2544         * WebProcess/Notifications/WebNotificationManager.h:
2545         * WebProcess/OriginData/WebOriginDataManager.h:
2546         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2547         * WebProcess/Plugins/PDF/PDFPlugin.h:
2548         * WebProcess/Plugins/PDF/PDFPluginAnnotation.h:
2549         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.h:
2550         * WebProcess/Plugins/PDF/PDFPluginPasswordField.h:
2551         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.h:
2552         * WebProcess/Plugins/PluginProcessConnection.h:
2553         * WebProcess/Plugins/PluginProcessConnectionManager.h:
2554         * WebProcess/Plugins/PluginProxy.h:
2555         * WebProcess/Plugins/PluginView.h:
2556         * WebProcess/ResourceCache/WebResourceCacheManager.h:
2557         * WebProcess/Scrolling/RemoteScrollingCoordinator.h:
2558         * WebProcess/Storage/StorageAreaImpl.h:
2559         * WebProcess/Storage/StorageAreaMap.h:
2560         * WebProcess/Storage/StorageNamespaceImpl.h:
2561         * WebProcess/WebConnectionToUIProcess.h:
2562         * WebProcess/WebCoreSupport/WebAlternativeTextClient.h:
2563         * WebProcess/WebCoreSupport/WebBatteryClient.h:
2564         * WebProcess/WebCoreSupport/WebChromeClient.h:
2565         * WebProcess/WebCoreSupport/WebColorChooser.h:
2566         * WebProcess/WebCoreSupport/WebContextMenuClient.h:
2567         * WebProcess/WebCoreSupport/WebDatabaseManager.h:
2568         * WebProcess/WebCoreSupport/WebDeviceProximityClient.h:
2569         * WebProcess/WebCoreSupport/WebDragClient.h:
2570         * WebProcess/WebCoreSupport/WebEditorClient.h:
2571         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2572         * WebProcess/WebCoreSupport/WebGeolocationClient.h:
2573         * WebProcess/WebCoreSupport/WebInspectorClient.h:
2574         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
2575         * WebProcess/WebCoreSupport/WebNavigatorContentUtilsClient.h:
2576         * WebProcess/WebCoreSupport/WebNetworkInfoClient.h:
2577         * WebProcess/WebCoreSupport/WebNotificationClient.h:
2578         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2579         * WebProcess/WebCoreSupport/WebPopupMenu.h:
2580         * WebProcess/WebCoreSupport/WebProgressTrackerClient.h:
2581         * WebProcess/WebCoreSupport/WebSearchPopupMenu.h:
2582         * WebProcess/WebCoreSupport/WebVibrationClient.h:
2583         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
2584         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
2585         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
2586         * WebProcess/WebPage/DrawingAreaImpl.h:
2587         * WebProcess/WebPage/EventDispatcher.h:
2588         * WebProcess/WebPage/ViewGestureGeometryCollector.h:
2589         * WebProcess/WebPage/WebBackForwardListProxy.h:
2590         * WebProcess/WebPage/WebPage.h:
2591         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
2592         * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
2593         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
2594         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
2595         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
2596         * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
2597         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2598         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2599         * WebProcess/WebProcess.h:
2600         * WebProcess/soup/WebSoupRequestManager.h:
2601
2602 2014-01-16  Ian Henderson  <ianh@apple.com>
2603
2604         Expose scrollView on WKView
2605         https://bugs.webkit.org/show_bug.cgi?id=127085
2606
2607         Reviewed by Antti Koivisto.
2608
2609         Expose WKView's scroll view as a property.  In order to support
2610         clients calling setDelegate:, we create a forwarder object that sends
2611         delegate methods to both WKView (the "internal delegate") and the
2612         publicly-exposed delegate (the "external delegate").
2613
2614         * UIProcess/API/Cocoa/WKView.h:
2615         * UIProcess/API/ios/WKScrollView.h:
2616         * UIProcess/API/ios/WKScrollView.mm:
2617         (-[WKScrollViewDelegateForwarder initWithInternalDelegate:externalDelegate:]):
2618         (-[WKScrollViewDelegateForwarder methodSignatureForSelector:]):
2619         (-[WKScrollViewDelegateForwarder respondsToSelector:]):
2620         (-[WKScrollViewDelegateForwarder forwardInvocation:]):
2621         (-[WKScrollView setInternalDelegate:]):
2622         (-[WKScrollView setDelegate:]):
2623         (-[WKScrollView delegate]):
2624         Pretend like _externalDelegate is the real delegate to avoid exposing
2625         our internal delegate or forwarder object.
2626         (-[WKScrollView _updateDelegate]):
2627         (-[WKScrollView dealloc]):
2628         * UIProcess/API/ios/WKViewIOS.mm:
2629         (-[WKView scrollView]):
2630         (-[WKView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
2631
2632 2014-01-15  Carlos Garcia Campos  <cgarcia@igalia.com>
2633
2634         [GTK][EFL][NIX] Do not use PrintContext, Frame and DocumentLoader in Errors
2635         https://bugs.webkit.org/show_bug.cgi?id=127047
2636
2637         Reviewed by Martin Robinson.
2638
2639         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
2640         (WebKit::WebPrintOperationGtk::frameURL): Helper function to get
2641         the URL of the frame being printed.
2642         (WebKit::WebPrintOperationGtk::print): Use frameURL() as failing
2643         URL for printing errors.
2644         * WebProcess/WebPage/gtk/WebPrintOperationGtk.h:
2645
2646 2014-01-15  Benjamin Poulain  <bpoulain@apple.com>
2647
2648         Move user agent code to WebCore and unify some code between OS X and iOS
2649         https://bugs.webkit.org/show_bug.cgi?id=127080
2650
2651         Reviewed by Sam Weinig.
2652
2653         * UIProcess/ios/WebPageProxyIOS.mm:
2654         (WebKit::userVisibleWebKitVersionString):
2655         (WebKit::WebPageProxy::standardUserAgent):
2656         * UIProcess/mac/WebPageProxyMac.mm:
2657         (WebKit::WebPageProxy::standardUserAgent):
2658         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2659         (InitWebCoreSystemInterface):
2660
2661 2014-01-15  Eunmi Lee  <eunmi15.lee@samsung.com>
2662
2663         [EFL][WK2] Use timestamp when event occurs for touch events.
2664         https://bugs.webkit.org/show_bug.cgi?id=126424
2665
2666         Reviewed by Gyuyoung Kim.
2667
2668         Current time is used for touch event's timestamp instead of timestamp
2669         when event occurs. Timestamp of touch event is used to implement flick
2670         gesture, so it should be real value for accurate gesture processing.
2671
2672         * UIProcess/API/efl/EwkView.cpp:
2673         Function names for handling touch events are changed to distinguish
2674         mouse events and multi events.
2675         (EwkView::setTouchEventsEnabled):
2676         (EwkView::feedTouchEvents):
2677         (EwkView::handleMouseDownForTouch):
2678         (EwkView::handleMouseUpForTouch):
2679         (EwkView::handleMouseMoveForTouch):
2680         (EwkView::handleMultiDownForTouch):
2681         (EwkView::handleMultiUpForTouch):
2682         (EwkView::handleMultiMoveForTouch):
2683         * UIProcess/API/efl/EwkView.h:
2684         * UIProcess/API/efl/GestureRecognizer.cpp:
2685         (WebKit::GestureHandler::handlePan):
2686         (WebKit::GestureRecognizer::processTouchEvent):
2687         (WebKit::GestureRecognizer::noGesture):
2688         (WebKit::GestureRecognizer::singleTapGesture):
2689         (WebKit::GestureRecognizer::doubleTapGesture):
2690         (WebKit::GestureRecognizer::panGesture):
2691         (WebKit::GestureRecognizer::pinchGesture):
2692         * UIProcess/API/efl/GestureRecognizer.h:
2693
2694 2014-01-15  Gavin Barraclough  <barraclough@apple.com>
2695
2696         Change Page, FocusController to use ViewState
2697         https://bugs.webkit.org/show_bug.cgi?id=126533
2698
2699         Unreviewed rollout, this caused a regression.
2700
2701         * WebProcess/WebPage/WebPage.cpp:
2702         (WebKit::WebPage::WebPage):
2703         (WebKit::WebPage::setActive):
2704         (WebKit::WebPage::setViewIsVisible):
2705         (WebKit::WebPage::setFocused):
2706         (WebKit::WebPage::setIsInWindow):
2707         (WebKit::WebPage::setViewStateInternal):
2708         (WebKit::WebPage::setIsVisuallyIdle):
2709         * WebProcess/WebPage/WebPage.h:
2710
2711 2014-01-15  Yongjun Zhang  <yongjun_zhang@apple.com>
2712
2713         https://bugs.webkit.org/show_bug.cgi?id=127072
2714         Don't autorelease wrapper object (WebProcessPlugInScriptWorld) for InjectedBundleScriptWorld::normalWorld().
2715
2716         Reviewed by Geoffrey Garen.
2717
2718         In [WKWebProcessPlugInScriptWorld normalWorld], InjectedBundleScriptWorld::normalWorld() returns a static
2719         instance,  autoreleasing its wrapper object could cause a dangling pointer and crash later.
2720
2721         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.mm:
2722         (+[WKWebProcessPlugInScriptWorld normalWorld]):
2723
2724 2014-01-15  Andy Estes  <aestes@apple.com>
2725
2726         [iOS] Properly exclude the shim dylibs this time
2727         https://bugs.webkit.org/show_bug.cgi?id=127075
2728
2729         Reviewed by Anders Carlsson.
2730
2731         BaseLegacyProcess.xcconfig was setting EXCLUDED_SOURCE_FILE_NAMES in
2732         conflict with what I added in r161918, and I misspelled the setting
2733         name in two instances. Fix these two bugs.
2734
2735         Also remove a vestigial OTHER_LDFLAGS from WebContentProcess.xcconfig
2736         while we're here.
2737
2738         * Configurations/BaseLegacyProcess.xcconfig:
2739         * Configurations/NetworkProcess.xcconfig:
2740         * Configurations/PluginProcess.xcconfig:
2741         * Configurations/WebContentProcess.xcconfig:
2742
2743 2014-01-15  Enrica Casucci  <enrica@apple.com>
2744
2745         Support WebSelections in WK2 on iOS.
2746         https://bugs.webkit.org/show_bug.cgi?id=127015
2747
2748         Reviewed by Benjamin Poulain.
2749
2750         This is the first step towards adding support for selections in
2751         non editable content on iOS for WK2.
2752         In particular, this patch adds the basic plumbing to decide which
2753         gesture recognizers are enabled and adds empty stubs for the gestures
2754         that we'll need to support.
2755         There are two separate assistants for selections, one to be used
2756         in editable text (UIWKTextInteractionAssistant) and one for non editable
2757         text (UIWKSelectionAssistant) and they are mutually exclusive.
2758         UIWKSelectionAssistant is created at the time the view is created, 
2759         and swapped with UIWKTextInteraction assistant
2760         only when an editable element is focused and the keyboard appears on screen.
2761
2762         gestureRecognizerShouldBegin is the delegate call used to decide which gestures
2763         should begin based on the position the gesture occurred at.
2764         We want to avoid as much as possible synchronous calls to the WebProcess to
2765         retrieve information about the content and in order to do so, we take advantage
2766         of the order in which the gesture recognizers will trigger, based on the delay
2767         configured at initialization.
2768         The first gesture to trigger is highlightLongPress, followed by longpress in the
2769         active assistant and longpress in the WKInteractionView.
2770         There are two different scenarios for highlighlongpress based on which assistant is
2771         currently active.
2772
2773         UIWKSelectionAssistant is active:
2774             We send a request to the WebProcess to get information on the position
2775             and we return YES, allowing the gesture to start.
2776             We delegate to the WebProcess the proper handling of highlight based on the element.
2777             When longPress gesture fires for the assistant, we assume we have received the reply to our
2778             previous request, if not we fetch the information synchronously.
2779             We are then able to make an informed decision about whether
2780             or not to start the gesture. If the reply is NO, the third and last long press
2781             gesture can be evaluated to decide whether to show the action sheet or simply generate
2782             a click event.
2783
2784         UIWKTextInteractionAssistant is active:
2785             In this case we must have information about the position immediately and we issue
2786             a synchronous request to the WebProcess.
2787             If we are not interacting with the same node, we return NO.
2788             Then the longpress gesture fires for the assistant which performs the same check.
2789             If the node is the same, the loupe gesture will start, otherwise the last longpress
2790             gesture will be evaluated to decide about showing the action sheet or generating a
2791             click event.
2792
2793         * Scripts/webkit2/messages.py:
2794         * Shared/InteractionInformationAtPosition.cpp: Added.
2795         (WebKit::InteractionInformationAtPosition::encode):
2796         (WebKit::InteractionInformationAtPosition::decode):
2797         * Shared/InteractionInformationAtPosition.h: Added.
2798         (WebKit::InteractionInformationAtPosition::InteractionInformationAtPosition):
2799         * UIProcess/API/ios/PageClientImplIOS.h:
2800         * UIProcess/API/ios/PageClientImplIOS.mm:
2801         (WebKit::PageClientImpl::positionInformationDidChange):
2802         * UIProcess/API/ios/WKContentView.mm:
2803         (-[WKContentView _positionInformationDidChange:]):
2804         * UIProcess/API/ios/WKContentViewInternal.h:
2805         * UIProcess/API/ios/WKInteractionView.h:
2806         * UIProcess/API/ios/WKInteractionView.mm:
2807         (-[WKInteractionView initWithFrame:]):
2808         (-[WKInteractionView dealloc]):
2809         (-[WKInteractionView gestureRecognizer:canPreventGestureRecognizer:]):
2810         (-[WKInteractionView gestureRecognizer:canBePreventedByGestureRecognizer:]):
2811         (isSamePair):
2812         (-[WKInteractionView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
2813         (-[WKInteractionView _showImageSheet]):
2814         (-[WKInteractionView _showLinkSheet]):
2815         (-[WKInteractionView _actionForLongPress]):
2816         (-[WKInteractionView ensurePositionInformationIsUpToDate:]):
2817         (-[WKInteractionView gestureRecognizerShouldBegin:]):
2818         (-[WKInteractionView hasSelectablePositionAtPoint:]):
2819         (-[WKInteractionView pointIsInAssistedNode:]):
2820         (-[WKInteractionView _longPressRecognized:]):
2821         (-[WKInteractionView _doubleTapRecognized:]):
2822         (-[WKInteractionView _twoFingerDoubleTapRecognized:]):
2823         (-[WKInteractionView _twoFingerPanRecognized:]):
2824         (-[WKInteractionView useSelectionAssistantWithMode:]):
2825         (-[WKInteractionView _positionInformationDidChange:]):
2826         (-[WKInteractionView interactionAssistant]):
2827         (-[WKInteractionView _startAssistingKeyboard]):
2828         (-[WKInteractionView _stopAssistingKeyboard]):
2829         * UIProcess/PageClient.h:
2830         * UIProcess/WebPageProxy.h:
2831         * UIProcess/WebPageProxy.messages.in:
2832         * UIProcess/ios/WebPageProxyIOS.mm:
2833         (WebKit::WebPageProxy::didReceivePositionInformation):
2834         (WebKit::WebPageProxy::getPositionInformation):
2835         (WebKit::WebPageProxy::requestPositionInformation):
2836         * WebKit2.xcodeproj/project.pbxproj:
2837         * WebProcess/WebPage/WebPage.h:
2838         * WebProcess/WebPage/WebPage.messages.in:
2839         * WebProcess/WebPage/ios/WebPageIOS.mm:
2840         (WebKit::WebPage::selectWithGesture):
2841         (WebKit::WebPage::getPositionInformation):
2842         (WebKit::WebPage::requestPositionInformation):
2843
2844 2014-01-15  Yongjun Zhang  <yongjun_zhang@apple.com>
2845
2846         https://bugs.webkit.org/show_bug.cgi?id=127066
2847         Add WKBrowsingContextHandle.h to WebKit2 private headers.
2848
2849         Reviewed by Dan Bernstein.
2850
2851         Add WKBrowsingContextHandle.h to WebKit2 private headers so that WebKit2 client
2852         can use WKBrowsingContextHandle class.
2853
2854         * WebKit2.xcodeproj/project.pbxproj:
2855
2856 2014-01-15  Piotr Grad  <p.grad@samsung.com>
2857
2858         toStringVector static function definition should not be redundant.
2859         https://bugs.webkit.org/show_bug.cgi?id=126872.
2860
2861         Reviewed by Anders Carlsson.
2862
2863         toStringVector function was declared twice in InjectedBundle.cpp and WebPageGroup.cpp as static.
2864         In order to remove redundant definition this function was moved into API::Array.
2865
2866         * Shared/APIArray.cpp:
2867         (API::Array::toStringVector):
2868         * Shared/APIArray.h:
2869         * UIProcess/WebPageGroup.cpp:
2870         (WebKit::WebPageGroup::addUserStyleSheet):
2871         (WebKit::WebPageGroup::addUserScript):
2872         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2873         (WebKit::InjectedBundle::addUserScript):
2874         (WebKit::InjectedBundle::addUserStyleSheet):
2875
2876 2014-01-10  Gavin Barraclough  <barraclough@apple.com>
2877
2878         REGRESSION (r158369): Some pop-up windows open at incorrect size (affects GMail, theblaze.com)
2879         https://bugs.webkit.org/show_bug.cgi?id=126289
2880
2881         Reviewed by Anders Carlson.
2882
2883         Partial revert of https://bugs.webkit.org/show_bug.cgi?id=123557.
2884         On window.open, update page when the UIProcess sends the create message
2885
2886         * UIProcess/WebPageProxy.cpp:
2887         (WebKit::WebPageProxy::initializeWebPage):
2888         (WebKit::WebPageProxy::creationParameters):
2889         * UIProcess/WebPageProxy.h:
2890             - creation paraments are not preserved at window.open.
2891         * WebProcess/WebPage/WebPage.cpp:
2892         (WebKit::WebPage::reinitializeWebPage):
2893         (WebKit::WebPage::setViewState):
2894         (WebKit::WebPage::setViewStateInternal):
2895         * WebProcess/WebPage/WebPage.h:
2896             - add interface to update page.
2897         * WebProcess/WebProcess.cpp:
2898         (WebKit::WebProcess::createWebPage):
2899             - if we try to create a page that already exists, update the current page's view state.
2900
2901 2014-01-15  Carlos Garcia Campos  <cgarcia@igalia.com>
2902
2903         [GTK] Web process sometimes crashes when printing in synchronous mode
2904         https://bugs.webkit.org/show_bug.cgi?id=126979
2905
2906         Reviewed by Gustavo Noronha Silva.
2907
2908         When printing synchronously in GTK+ we need to make sure that we
2909         have a list of Printers before starting the print operation. Getting
2910         the list of printers is done synchronously by GTK+, but using a
2911         nested main loop that might process IPC messages comming from the
2912         UI process like EndPrinting. When the EndPrinting message is
2913         received while the printer list is being populated, the print
2914         operation is finished unexpectely and the web process crashes. The
2915         PrinterListGtk class gets the list of printers in the constructor
2916         so we just need to ensure there's an instance alive during the
2917         synchronous print operation. In case of asynchronous printing the
2918         printer list will be created during the print operation without
2919         any risk, because the EndPrinting message is not sent until the
2920         printing callback has been received in the UI process.
2921
2922         * GNUmakefile.list.am: Add new files to compilation.
2923         * PlatformGTK.cmake: Ditto.
2924         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2925         (WebKit::WebChromeClient::print): Ensure PrinterListGtk is created
2926         before the synchronous printing and destroyed afterwards.
2927         * WebProcess/WebPage/gtk/PrinterListGtk.cpp: Added.
2928         (WebKit::PrinterListGtk::shared): Return the singleton.
2929         (WebKit::PrinterListGtk::enumeratePrintersFunction): Callback
2930         called by gtk_enumerate_printers() when a new printer is found.
2931         (WebKit::PrinterListGtk::PrinterListGtk): Call
2932         gtk_enumerate_printers() in syhchronous mode.
2933         (WebKit::PrinterListGtk::~PrinterListGtk):
2934         (WebKit::PrinterListGtk::addPrinter): Add the printer to the list
2935         and set the default printer if needed.
2936         (WebKit::PrinterListGtk::findPrinter): Find the printer for the
2937         given name.
2938         * WebProcess/WebPage/gtk/PrinterListGtk.h: Added.
2939         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: Use
2940         PrinterListGtk class to find the printer instead of calling
2941         gtk_enumerate_printers().
2942
2943 2014-01-15  Tomas Popela  <tpopela@redhat.com>
2944
2945         [SOUP] [WK2] - Disable MemoryCache when the DOCUMENT_VIEWER cache model is set
2946         https://bugs.webkit.org/show_bug.cgi?id=126577
2947
2948         Reviewed by Carlos Garcia Campos.
2949
2950         As in http://trac.webkit.org/changeset/152483, but this time for
2951         WebKit2. When WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER is set we need to
2952         disable the MemoryCache completely to prevent caching of the resources.
2953
2954         * WebProcess/soup/WebProcessSoup.cpp:
2955         (WebKit::WebProcess::platformSetCacheModel):
2956
2957 2014-01-14  Carlos Garcia Campos  <cgarcia@igalia.com>
2958
2959         [GTK] UI process crashes when closing the window right after printing with javascript
2960         https://bugs.webkit.org/show_bug.cgi?id=126981
2961
2962         Reviewed by Gustavo Noronha Silva.
2963
2964         The UI process crashes because when the page is closed, the web
2965         view is destroyed before the print operation has actually
2966         finished. Use a weak pointer to make sure the web view pointer is
2967         set to NULL when the it's destroyed and emit the finished callback
2968         always so that the user can clean up the operation even when the
2969         web view has been closed.
2970
2971         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
2972         (drawPagesForPrintingCompleted):
2973
2974 2014-01-14  Carlos Garcia Campos  <cgarcia@igalia.com>
2975
2976         [GTK] UI process crashes when the web process crashes while printing
2977         https://bugs.webkit.org/show_bug.cgi?id=126977
2978
2979         Reviewed by Gustavo Noronha Silva.
2980
2981         When the web process crashes, the printing callback is
2982         invalidated, so the function is called with a NULL error.
2983
2984         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
2985         (drawPagesForPrintingCompleted): Check wkError is not NULL before
2986         trying to use it.
2987         * UIProcess/API/gtk/WebKitWebView.cpp:
2988         (webkitWebViewPrintFrame): Set the print mode of the operation
2989         before emitting the print signal.
2990
2991 2014-01-14  Brady Eidson  <beidson@apple.com>
2992
2993         IDB: create object store support
2994         <rdar://problem/15779639> and https://bugs.webkit.org/show_bug.cgi?id=127011
2995
2996         Reviewed by Anders Carlsson.
2997
2998         Add messaging/callback infrastructure for creating object stores:
2999         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
3000         (WebKit::DatabaseProcessIDBConnection::createObjectStore):
3001         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
3002         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
3003
3004         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
3005         (WebKit::WebIDBServerConnection::createObjectStore):
3006         (WebKit::WebIDBServerConnection::didCreateObjectStore):
3007         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
3008         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
3009
3010         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
3011         (WebKit::UniqueIDBDatabase::didChangeDatabaseVersion):
3012         (WebKit::UniqueIDBDatabase::didCreateObjectStore):
3013         (WebKit::UniqueIDBDatabase::didCompleteBoolRequest):
3014         (WebKit::UniqueIDBDatabase::createObjectStore):
3015         (WebKit::UniqueIDBDatabase::createObjectStoreInBackingStore):
3016         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
3017
3018         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
3019
3020         Add serialization helpers to save/restore an IDBKeyPath to/from disk:
3021         * DatabaseProcess/IndexedDB/IDBSerialization.cpp:
3022         (WebKit::serializeIDBKeyPath):
3023         (WebKit::deserializeIDBKeyPath):
3024         * DatabaseProcess/IndexedDB/IDBSerialization.h:
3025
3026         Add object store metadata to the schema, and save/restore the metadata:
3027         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
3028         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createAndPopulateInitialMetadata):
3029         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::extractExistingMetadata):
3030         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createObjectStore):
3031         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
3032
3033         * Scripts/webkit2/messages.py:
3034         (struct_or_class):
3035         * WebKit2.xcodeproj/project.pbxproj:
3036
3037 2014-01-14  Jae Hyun Park  <jae.park@company100.net>
3038
3039         [GTK] Unreviewed build fix after r162034
3040
3041         * GNUmakefile.list.am:
3042
3043 2014-01-14  Ryuan Choi  <ryuan.choi@samsung.com>
3044
3045         Unreviewed build fix for CMake based ports after r162034.
3046
3047         * CMakeLists.txt:
3048
3049 2014-01-14  Jeffrey Pfau  <jpfau@apple.com>
3050
3051         Build fix after r162034
3052
3053         Rubber-stamped by Benjamin Poulain.
3054
3055         * WebProcess/WebCoreSupport/WebProgressTrackerClient.cpp:
3056
3057 2014-01-14  Anders Carlsson  <andersca@apple.com>
3058
3059         Create separate progress tracker clients
3060         https://bugs.webkit.org/show_bug.cgi?id=127025
3061
3062         Reviewed by Sam Weinig.
3063
3064         * WebKit2.xcodeproj/project.pbxproj:
3065         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3066         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3067         * WebProcess/WebCoreSupport/WebProgressTrackerClient.cpp: Copied from Source/WebCore/loader/ProgressTrackerClient.h.
3068         (WebKit::WebProgressTrackerClient::WebProgressTrackerClient):
3069         (WebKit::WebProgressTrackerClient::progressTrackerDestroyed):
3070         (WebKit::WebProgressTrackerClient::progressStarted):
3071         (WebKit::WebProgressTrackerClient::progressEstimateChanged):
3072         (WebKit::WebProgressTrackerClient::progressFinished):
3073         * WebProcess/WebCoreSupport/WebProgressTrackerClient.h: Copied from Source/WebCore/loader/ProgressTrackerClient.h.
3074         * WebProcess/WebPage/WebPage.cpp:
3075         (WebKit::WebPage::WebPage):
3076
3077 2014-01-14  Benjamin Poulain  <bpoulain@apple.com>
3078
3079         [WK2] Make WebPageProxy's setUserAgent private
3080         https://bugs.webkit.org/show_bug.cgi?id=127013
3081
3082         Reviewed by Anders Carlsson.
3083
3084         * UIProcess/WebPageProxy.h:
3085         The API to modify the user agent already has 3 "setters":
3086         -standardUserAgent
3087         -setApplicationNameForUserAgent
3088         -setCustomUserAgent
3089
3090         The method WebPageProxy::setUserAgent() is supposed to be internal, not used directly.
3091         Using it directly would cause unexpected behaviors, for example:
3092         -Set the user agent with setUserAgent.
3093         -Set CustomUserAgent.
3094         -Reset CustomUserAgent.
3095         ->The user agent is now standardUserAgent instead of the user agent defined initially.
3096
3097 2014-01-14  Commit Queue  <commit-queue@webkit.org>
3098
3099         Unreviewed, rolling out r162000.
3100         http://trac.webkit.org/changeset/162000
3101         https://bugs.webkit.org/show_bug.cgi?id=127009
3102
3103         API versioning is wrong (Requested by rfong on #webkit).
3104
3105         * UIProcess/API/C/WKAPICast.h:
3106         * UIProcess/API/C/WKPageLoaderClient.h:
3107         * UIProcess/API/C/WKPageUIClient.h:
3108         * UIProcess/WebLoaderClient.cpp:
3109         * UIProcess/WebLoaderClient.h:
3110         * UIProcess/WebPageProxy.cpp:
3111         * UIProcess/WebPageProxy.h:
3112         * UIProcess/WebPageProxy.messages.in:
3113         * UIProcess/WebUIClient.cpp:
3114         * UIProcess/WebUIClient.h:
3115         * UIProcess/mac/WebInspectorProxyMac.mm:
3116         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
3117         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3118         * WebProcess/WebCoreSupport/WebChromeClient.h:
3119         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3120         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3121         * WebProcess/WebPage/WebPage.cpp:
3122         * WebProcess/WebPage/WebPage.h:
3123
3124 2014-01-14  Csaba Osztrogon√°c  <ossy@webkit.org>
3125
3126         Speculative buildfix after r161999.
3127
3128         * Shared/APIObject.h:
3129
3130 2014-01-09  Roger Fong  <roger_fong@apple.com>
3131
3132         Add support for handling WebGL load policies.
3133         https://bugs.webkit.org/show_bug.cgi?id=126935
3134         <rdar://problem/15790448>.
3135
3136         Reviewed by Brent Fulgham.
3137
3138         Boiler plate code for sending messages to and from the UI and Web Process. 
3139
3140         * UIProcess/API/C/WKAPICast.h:
3141         (WebKit::toWebGLLoadPolicy):
3142         * UIProcess/API/C/WKPageLoaderClient.h:
3143         * UIProcess/API/C/WKPageUIClient.h:
3144         * UIProcess/WebLoaderClient.cpp:
3145         (WebKit::WebLoaderClient::webGLLoadPolicy):
3146         * UIProcess/WebLoaderClient.h:
3147         * UIProcess/WebPageProxy.cpp:
3148         (WebKit::WebPageProxy::webGLContextCreated):
3149         (WebKit::WebPageProxy::webGLPolicyForHost):
3150         * UIProcess/WebPageProxy.h:
3151         * UIProcess/WebPageProxy.messages.in:
3152         * UIProcess/WebUIClient.cpp:
3153         (WebKit::WebUIClient::webGLContextCreated):
3154         * UIProcess/WebUIClient.h:
3155         * UIProcess/mac/WebInspectorProxyMac.mm:
3156         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
3157         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3158         (WebKit::WebChromeClient::webGLContextCreated):
3159         * WebProcess/WebCoreSupport/WebChromeClient.h:
3160         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3161         (WebKit::WebFrameLoaderClient::webGLPolicyForHost):
3162         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3163         * WebProcess/WebPage/WebPage.cpp: A sendSync is used here to get the webGLPolicyForHost message sent between the Web and UI process.
3164                                           In the future this will be replaced with a strategy is non-blocking.
3165         (WebKit::WebPage::getWebGLPolicyForHost):
3166         * WebProcess/WebPage/WebPage.h:
3167
3168 2014-01-14  Mark Rowe  <mrowe@apple.com>
3169
3170         WebKit2 leaks sudden termination assertions when a page with unload handlers is closed.
3171         <https://webkit.org/b/126974> / <rdar://problem/15812954>
3172
3173         When a page with an unload handler is loaded, the web process tells the UI process that it
3174         should disable sudden termination. However, when the page is closed the connection between
3175         the web and UI process is torn down before the web content has a chance to tell the UI
3176         process to reenable sudden termination.
3177
3178         Reviewed by Anders Carlsson.
3179
3180         * UIProcess/WebProcessProxy.cpp:
3181         (WebKit::WebProcessProxy::WebProcessProxy):
3182         (WebKit::WebProcessProxy::~WebProcessProxy): Balance any outstanding disableSuddenTermination calls.
3183         (WebKit::WebProcessProxy::enableSuddenTermination): Decrement the count.
3184         (WebKit::WebProcessProxy::disableSuddenTermination): Increment the count.
3185         * UIProcess/WebProcessProxy.h:
3186
3187 2014-01-14  Joseph Pecoraro  <pecoraro@apple.com>
3188
3189         Web Inspector: For Remote Inspection link WebProcess's to their parent UIProcess
3190         https://bugs.webkit.org/show_bug.cgi?id=126995
3191
3192         Reviewed by Timothy Hatcher.
3193
3194         * WebProcess/WebCoreSupport/WebInspectorClient.h:
3195         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
3196         (WebKit::WebInspectorClient::parentProcessIdentifier):
3197         WebProcesses are proxies for a parent UIProcess.
3198
3199 2014-01-14  Tim Horton  <timothy_horton@apple.com>
3200
3201         iOS WebKit2 build fixes, part 3
3202
3203         * WebKit2.xcodeproj/project.pbxproj:
3204         Remove some files from the 'All' target that should never have been a part of it.
3205
3206 2014-01-14  Tim Horton  <timothy_horton@apple.com>
3207
3208         iOS WebKit2 build fixes, part 2
3209
3210         * WebKit2.xcodeproj/project.pbxproj:
3211         Add some missing files.
3212
3213 2014-01-14  Brian J. Burg  <burg@cs.washington.edu>
3214
3215         Add ENABLE(WEB_REPLAY) feature flag to the build system
3216         https://bugs.webkit.org/show_bug.cgi?id=126949
3217
3218         Reviewed by Joseph Pecoraro.
3219
3220         * Configurations/FeatureDefines.xcconfig:
3221
3222 2014-01-14  Tim Horton  <timothy_horton@apple.com>
3223
3224         Move WKView.mm to WKViewIOS.mm as 161950 was supposed to do.
3225
3226         * UIProcess/API/ios/WKView.mm: Removed.
3227         * UIProcess/API/ios/WKViewIOS.mm: Copied from UIProcess/API/ios/WKView.mm.
3228
3229 2014-01-14  Carlos Garcia Campos  <cgarcia@igalia.com>
3230
3231         [GTK] Test /webkit2/WebKitWebContext/languages crashes with network process enabled
3232         https://bugs.webkit.org/show_bug.cgi?id=126130
3233
3234         Reviewed by Anders Carlsson.
3235
3236         We need to notify the network process when the user preferred
3237         languages have changed to update the SoupSession accordingly.
3238
3239         * NetworkProcess/NetworkProcess.h: Add
3240         userPreferredLanguagesChanged when using soup network backend.
3241         * NetworkProcess/NetworkProcess.messages.in: Add
3242         UserPreferredLanguagesChanged message when using soup network
3243         backend.
3244         * NetworkProcess/soup/NetworkProcessSoup.cpp:
3245         (WebKit::NetworkProcess::userPreferredLanguagesChanged): Update
3246         the SoupSession to use the given languages.
3247         (WebKit::NetworkProcess::platformInitializeNetworkProcess): Call
3248         userPreferredLanguagesChanged() when initialization parameters
3249         contain languages.
3250         (WebKit::NetworkProcess::allowSpecificHTTPSCertificateForHost):
3251         Remove unnedded WebCore prefix.
3252         (WebKit::NetworkProcess::clearCacheForAllOrigins): Simplify using
3253         a single line.
3254         * Shared/Network/NetworkProcessCreationParameters.cpp:
3255         (WebKit::NetworkProcessCreationParameters::encode): Encode the
3256         languages vector.
3257         (WebKit::NetworkProcessCreationParameters::decode): Decode the
3258         languages vector.
3259         * Shared/Network/NetworkProcessCreationParameters.h:
3260         * UIProcess/WebContext.cpp:
3261         (WebKit::WebContext::languageChanged): Send a message also to the
3262         network process.
3263         * UIProcess/soup/WebContextSoup.cpp:
3264         (WebKit::WebContext::platformInitializeNetworkProcess): Set
3265         languages initial parameter.
3266
3267 2014-01-14  Carlos Garcia Campos  <cgarcia@igalia.com>
3268
3269         [SOUP] SoupNetworkSession::setAcceptLanguages should receive a const reference
3270         https://bugs.webkit.org/show_bug.cgi?id=126966
3271
3272         Reviewed by Gustavo Noronha Silva.
3273
3274         * WebProcess/soup/WebProcessSoup.cpp:
3275         (WebKit::setSoupSessionAcceptLanguage): Use const Vector<String>&.
3276
3277 2014-01-14  Andreas Kling  <akling@apple.com>
3278
3279         Remove deprecated DeferrableOneShotTimer constructor.
3280         <https://webkit.org/b/126984>
3281
3282         Reviewed by Anders Carlsson.
3283
3284         * WebProcess/Plugins/PluginView.h:
3285         * WebProcess/Plugins/PluginView.cpp:
3286         (WebKit::PluginView::pluginSnapshotTimerFired):
3287
3288             Take the timer by reference so we can use the new constructor.
3289
3290 2014-01-13  Tim Horton  <timothy_horton@apple.com>
3291
3292         iOS WebKit2 build fixes, part 1
3293
3294         * Configurations/WebKit2.xcconfig:
3295         * NetworkProcess/NetworkResourceLoader.cpp:
3296         * NetworkProcess/NetworkResourceLoader.h:
3297         * NetworkProcess/RemoteNetworkingContext.h:
3298         * Shared/WebEventConversion.h:
3299         * UIProcess/API/ios/WKGeolocationProviderIOS.mm:
3300         * UIProcess/API/ios/WKInteractionView.mm:
3301         (-[WKTextPosition isEqual:]):
3302         * UIProcess/API/ios/WKViewIOS.mm: Renamed from Source/WebKit2/UIProcess/API/ios/WKView.mm.
3303         * UIProcess/ios/WebPageProxyIOS.mm:
3304         * UIProcess/ios/WebProcessProxyIOS.mm:
3305         * WebKit2.xcodeproj/project.pbxproj:
3306         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
3307         * WebProcess/WebPage/WebPage.h:
3308         * WebProcess/WebPage/ios/WebPageIOS.mm:
3309         (WebKit::WebPage::elementDidFocus):
3310         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
3311
3312 2014-01-13  Jinwoo Song  <jinwoo7.song@samsung.com>
3313
3314         [EFL][WK2] Disable failing API tests
3315         https://bugs.webkit.org/show_bug.cgi?id=126960
3316
3317         Reviewed by Gyuyoung Kim.
3318
3319         Disable color picker test until bug 119120 is resolved.
3320
3321         * UIProcess/API/efl/tests/test_ewk2_color_picker.cpp:
3322         (TEST_F):
3323
3324 2014-01-13  Jinwoo Song  <jinwoo7.song@samsung.com>
3325
3326         [EFL][WK2] ewk_view_page_contents_get() API test is failing
3327         https://bugs.webkit.org/show_bug.cgi?id=126957
3328
3329         Reviewed by Gyuyoung Kim.
3330
3331         As the day in 'Date' field may be one digit or two digit,
3332         the data length may also be varied by one byte.
3333
3334         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
3335         (EWK2ViewTest::PageContentsAsMHTMLCallback):
3336
3337 2014-01-13  Commit Queue  <commit-queue@webkit.org>
3338
3339         Unreviewed, rolling out r161939.
3340         http://trac.webkit.org/changeset/161939
3341         https://bugs.webkit.org/show_bug.cgi?id=126956
3342
3343         didn't work with mac, of course (Requested by thorton on
3344         #webkit).
3345
3346         * NetworkProcess/NetworkResourceLoader.cpp:
3347         * NetworkProcess/NetworkResourceLoader.h:
3348         * NetworkProcess/RemoteNetworkingContext.h:
3349         * Shared/WebEventConversion.h:
3350         * UIProcess/API/ios/WKGeolocationProviderIOS.mm:
3351         * UIProcess/API/ios/WKInteractionView.mm:
3352         (-[WKTextPosition isEqual:]):
3353         * WebKit2.xcodeproj/project.pbxproj:
3354         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
3355         * WebProcess/WebPage/WebPage.h:
3356         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
3357
3358 2014-01-13  Benjamin Poulain  <bpoulain@apple.com>
3359
3360         Update WebPageProxyIOS's user agent string
3361         https://bugs.webkit.org/show_bug.cgi?id=126933
3362
3363         Reviewed by Darin Adler.
3364
3365         * UIProcess/ios/WebPageProxyIOS.mm:
3366         (WebKit::WebPageProxy::standardUserAgent):
3367         Send a more reasonable user agent. The previous one was forcing
3368         iOS 5.1's iPad user-agent.
3369
3370 2014-01-13  Tim Horton  <timothy_horton@apple.com>
3371
3372         iOS WebKit2 build fixes
3373
3374         * NetworkProcess/NetworkResourceLoader.cpp:
3375         * NetworkProcess/NetworkResourceLoader.h:
3376         Introduce/clarify some confusion about CFNETWORK vs. PLATFORM(IOS).
3377
3378         * NetworkProcess/RemoteNetworkingContext.h:
3379         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
3380         Get rid of an override of something that doesn't exist anymore.
3381
3382         * WebKit2.xcodeproj/project.pbxproj:
3383         Add some files. It's likely there are more missing, but this is a start.
3384
3385         * Shared/WebEventConversion.h:
3386         * WebProcess/WebPage/WebPage.h:
3387         Use WebKitAdditions.
3388
3389         * UIProcess/API/ios/WKGeolocationProviderIOS.mm:
3390         Something bizarre is happening with internal deprecation warnings.
3391
3392         * UIProcess/API/ios/WKInteractionView.mm:
3393         (-[WKTextPosition isEqual:]):
3394         Fix a typo.
3395
3396         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
3397         Remove an override of something that doesn't exist anymore.
3398
3399 2014-01-13  Andy Estes  <aestes@apple.com>
3400
3401         [iOS] Build Fix: Don't build the 'All-iOS' target on iOS. Just use 'All'.
3402
3403         * Makefile:
3404
3405 2014-01-13  Martin Robinson  <mrobinson@igalia.com>
3406
3407         [CMake] Mark all dependency include paths and libraries as advanced variables
3408         https://bugs.webkit.org/show_bug.cgi?id=126504
3409
3410         Reviewed by Daniel Bates.
3411
3412         * CMakeLists.txt: Mark the LIBRT_LIBRARIES variable as advanced.
3413
3414 2014-01-13  Martin Robinson  <mrobinson@igalia.com>
3415
3416         [GTK][CMake] Circular dependency in generation of WebKitEnumTypes.h
3417         https://bugs.webkit.org/show_bug.cgi?id=126912
3418
3419         Reviewed by Daniel Bates.
3420
3421         * PlatformGTK.cmake: Remove the circular dependency by generating WebKitEnumTypes.h with
3422         all installed headers except for WebKitEnumTypes.h itself.
3423
3424 2014-01-13  Andy Estes  <aestes@apple.com>
3425
3426         [iOS] Exclude shims and PluginProcess.app from the WebKit2 build
3427         https://bugs.webkit.org/show_bug.cgi?id=126936
3428
3429         Reviewed by Daniel Bates.
3430
3431         * Configurations/All.xcconfig: Added. Excluded PluginProcess.app from
3432         being copied into WebKit2.framework on iOS.
3433         * Configurations/NetworkProcess.xcconfig: Excluded SecItemShim.dylib
3434         from being copied into NetworkProcess.app on iOS.
3435         * Configurations/PluginProcess.xcconfig: Excluded
3436         PluginProcessShim.dylib from being copied into PluginProcess.app and
3437         set SKIP_INSTALL to YES on iOS.
3438         * Configurations/PluginProcessShim.xcconfig: Added. Linked the shim
3439         against necessary frameworks on Mac.
3440         * Configurations/SecItemShim.xcconfig: Ditto.
3441         * Configurations/WebProcessShim.xcconfig: Ditto.
3442         * Configurations/WebContentProcess.xcconfig: Excluded
3443         WebProcessShim.dylib from being copied into WebProcess.app on iOS.
3444         * PluginProcess/mac/PluginProcessShim.mm: Added #if !PLATFORM(IOS) guards.
3445         * Shared/mac/CookieStorageShimLibrary.cpp: Ditto.
3446         * WebProcess/mac/SecItemShimLibrary.mm: Ditto.
3447         * WebKit2.xcodeproj/project.pbxproj: Removed Mac-only frameworks from
3448         the shims' 'Link Binary with Libraries' build phases. Added new xcconfigs.
3449
3450 2014-01-13  Jinwoo Song  <jinwoo7.song@samsung.com>
3451
3452         [EFL][WK2] Replace usage of DEFINE_STATIC_LOCAL with NeverDestroyed
3453         https://bugs.webkit.org/show_bug.cgi?id=126882
3454
3455         Reviewed by Gyuyoung Kim.
3456
3457         * Shared/efl/ProcessExecutablePathEfl.cpp:
3458         (WebKit::executablePathOfWebProcess):
3459         (WebKit::executablePathOfPluginProcess):
3460         (WebKit::executablePathOfNetworkProcess):
3461         * UIProcess/API/efl/EwkView.cpp:
3462         (wkPageToEvasObjectMap):
3463         * UIProcess/API/efl/ewk_context.cpp:
3464         (contextMap):
3465         * UIProcess/API/efl/ewk_page_group.cpp:
3466         (pageGroupMap):
3467         * UIProcess/efl/TextCheckerClientEfl.cpp:
3468         (TextCheckerClientEfl::instance):
3469         * UIProcess/efl/TextCheckerClientEfl.h:
3470
3471 2014-01-13  Carlos Garcia Campos  <cgarcia@igalia.com>
3472
3473         [SOUP] Add SoupNetworkSession class to wrap a SoupSession
3474         https://bugs.webkit.org/show_bug.cgi?id=126813
3475
3476         Reviewed by Gustavo Noronha Silva.
3477
3478         Use the new SoupNetworkSession API.
3479
3480         * NetworkProcess/soup/NetworkProcessSoup.cpp:
3481         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
3482         (WebKit::NetworkProcess::platformSetCacheModel):
3483         (WebKit::NetworkProcess::clearCacheForAllOrigins):
3484         * NetworkProcess/unix/NetworkProcessMainUnix.cpp:
3485         (WebKit::NetworkProcessMain):
3486         * WebProcess/Cookies/soup/WebCookieManagerSoup.cpp:
3487         (WebKit::WebCookieManager::setCookiePersistentStorage):
3488         * WebProcess/efl/WebProcessMainEfl.cpp:
3489         (WebKit::WebProcessMainEfl):
3490         * WebProcess/gtk/WebProcessMainGtk.cpp:
3491         (WebKit::WebProcessMainGtk):
3492         * WebProcess/soup/WebProcessSoup.cpp:
3493         (WebKit::WebProcess::platformSetCacheModel):
3494         (WebKit::WebProcess::platformClearResourceCaches):
3495         (WebKit::setSoupSessionAcceptLanguage):
3496         (WebKit::WebProcess::platformInitializeWebProcess):
3497         * WebProcess/soup/WebSoupRequestManager.cpp:
3498         (WebKit::WebSoupRequestManager::registerURIScheme):
3499
3500 2014-01-13  Zalan Bujtas  <zalan@apple.com>
3501
3502         Enable SUBPIXEL_LAYOUT on Mac
3503         <https://webkit.org/b/126283>
3504
3505         Reviewed by Simon Fraser.
3506
3507         * Configurations/FeatureDefines.xcconfig:
3508
3509 2014-01-12  Sergio Correia  <sergio.correia@openbossa.org>
3510
3511         [EFL][WK2] Make API tests work again
3512         https://bugs.webkit.org/show_bug.cgi?id=126769
3513
3514         Reviewed by Gyuyoung Kim.
3515
3516         The EFL and WK2 test binaries are currently being generated at *TestWebKitAPI/
3517         [E]WebKit2, respectively, and this causes problems because the logic to find
3518         where WebProcess is to look in the same directory of the running process and
3519         then proceed to use LIBEXECDIR (typically /usr/loca/bin).
3520
3521         This patch introduces a WEBKIT_EXEC_PATH environment variable, inspired in the
3522         Gtk port, which allows us to look for WebProcess initially in this directory,
3523         if it's defined.
3524
3525         * Shared/efl/ProcessExecutablePathEfl.cpp:
3526         (WebKit::findProcessPath): Change the logic to look initially in
3527         WEBKIT_EXEC_PATH, then proceed with the existing checks.
3528         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp:
3529         (EWK2UnitTest::EWK2UnitTestEnvironment::EWK2UnitTestEnvironment):
3530         Define WEBKIT_EXEC_PATH to be used by EWebKit2 tests.
3531
3532 2014-01-12  Darin Adler  <darin@apple.com>
3533
3534         Add deprecatedCharacters as a synonym for characters and convert most call sites
3535         https://bugs.webkit.org/show_bug.cgi?id=126858
3536
3537         Reviewed by Anders Carlsson.
3538
3539         * Shared/APIString.h:
3540         * UIProcess/WebPageProxy.cpp:
3541         (WebKit::WebPageProxy::checkTextOfParagraph):
3542         (WebKit::WebPageProxy::checkSpellingOfString):
3543         (WebKit::WebPageProxy::checkGrammarOfString):
3544         * WebProcess/WebPage/EncoderAdapter.cpp:
3545         (WebKit::EncoderAdapter::encodeString):
3546         Use deprecatedCharacters instead of characters.
3547
3548 2014-01-12  Darin Adler  <darin@apple.com>
3549
3550         Add type checking to isEqual methods
3551         https://bugs.webkit.org/show_bug.cgi?id=126862
3552
3553         Reviewed by Anders Carlsson.
3554
3555         * UIProcess/API/ios/WKInteractionView.mm:
3556         (-[WKTextRange isEqual:]): Added type checking for the argument. The old
3557         code asserted instead, and it's not clear what guarantees that assertion is
3558         true. Added a FIXME about the lack of a hash method. Added another FIXME
3559         about the fact that this method ignores much of the object state. Removed
3560         an unneeded extra fetch of the isRange property. Deleted some dead code.
3561         (-[WKTextPosition isEqual:]): Ditto.
3562
3563 2014-01-12  Anders Carlsson  <andersca@apple.com>
3564
3565         Remove the last remaining uses of AtomicallyInitializedStatic
3566         https://bugs.webkit.org/show_bug.cgi?id=126863
3567
3568         Reviewed by Darin Adler.
3569
3570         * Shared/mac/SecItemShim.cpp:
3571         (WebKit::responseMap):
3572
3573 2014-01-12  Dan Bernstein  <mitz@apple.com>
3574
3575         Added a reference to WebContentService/Info-OSX.plist to the project.
3576
3577         * WebKit2.xcodeproj/project.pbxproj:
3578
3579 2014-01-12  Dan Bernstein  <mitz@apple.com>
3580
3581         OS X build fix.
3582
3583         * WebKit2.xcodeproj/project.pbxproj:
3584         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist: Copied from WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist.
3585         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist: Removed.
3586
3587 2014-01-12  Andy Estes  <aestes@apple.com>
3588
3589         Build Fix: Objective-C GC should be unsupported in iOS WebKit2
3590
3591         * Configurations/Base.xcconfig:
3592
3593 2014-01-12  Andy Estes  <aestes@apple.com>
3594
3595         [iOS] Upstream WebKit2 xcconfig changes to fix the build
3596
3597         * Configurations/All-iOS.xcconfig: Added.
3598         * Configurations/Base.xcconfig:
3599         * Configurations/BaseLegacyProcess.xcconfig:
3600         * Configurations/BaseTarget.xcconfig:
3601         * Configurations/BaseXPCService.xcconfig:
3602         * Configurations/DebugRelease.xcconfig:
3603         * Configurations/WebContentService.xcconfig:
3604         * Configurations/iOS.xcconfig: Added.
3605
3606 2014-01-12  Carlos Garcia Campos  <cgarcia@igalia.com>
3607
3608         Unreviewed. Fix make distcheck.
3609
3610         * GNUmakefile.am: Add WebKit2InspectorGResourceBundle.xml to
3611         EXTRA_DIST.
3612         * GNUmakefile.list.am: Removed deleted files and add missing ones.
3613         * NetworkProcess/unix/NetworkProcessMainUnix.cpp: Move
3614         ProxyResolverSoup.h to EFL platform ifdef, because GTK port doesn't
3615         build the proxy resolver.
3616
3617 2014-01-12  Carlos Garcia Campos  <cgarcia@igalia.com>
3618
3619         [GTK] Fix return value of WebKitDownload::created-destination
3620         https://bugs.webkit.org/show_bug.cgi?id=126741
3621
3622         Reviewed by Martin Robinson.
3623
3624         WebKitDownload::created-destination signal should be void instead
3625         of gboolean. This doesn't break the API/ABI.
3626
3627         * UIProcess/API/gtk/WebKitDownload.cpp:
3628         (webkit_download_class_init):
3629         (webkitDownloadDestinationCreated):
3630
3631 2014-01-11  Yongjun Zhang  <yongjun_zhang@apple.com>
3632
3633         Support bool argument for encoding/decoding invocations.
3634         https://bugs.webkit.org/show_bug.cgi?id=126823
3635
3636         Reviewed by Sam Weinig.
3637
3638         For remote invocation method argument, current we support int, double and ObjC
3639         object, this patch add support for bool type too.
3640
3641         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
3642         (encodeInvocation):
3643         (decodeInvocationArguments):
3644
3645 2014-01-11  Alexey Proskuryakov  <ap@apple.com>
3646
3647         [Mac] [Windows] Stop scheduling network requests in WebCore
3648         https://bugs.webkit.org/show_bug.cgi?id=126789
3649         <rdar://problem/15114727>
3650
3651         Reviewed by Sam Weinig.
3652
3653         * NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm:
3654         (WebKit::NetworkResourceLoadScheduler::platformInitializeMaximumHTTPConnectionCountPerHost):
3655         We no longer need the trick with 7 connections, as synchronous requests always have
3656         the right of way.
3657
3658         * UIProcess/API/C/WKContext.cpp: Removed long obsolete functions.
3659
3660         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface):
3661         Updated for new WKSI function names.
3662
3663 2014-01-11  Simon Fraser  <simon.fraser@apple.com>
3664
3665         Unfork GraphicsContext::drawNativeImage for iOS
3666         https://bugs.webkit.org/show_bug.cgi?id=126824
3667
3668         Reviewed by Dean Jackson.
3669
3670         GraphicsContext::drawNativeImage had a different signature for iOS,
3671         which required #ifdefs at all the call sites. Unfork by passing the "scale"
3672         parameter everywhere (it's only used on iOS).
3673
3674         * Shared/API/c/cg/WKImageCG.cpp:
3675         (WKImageCreateFromCGImage):
3676
3677 2014-01-11  Sam Weinig  <sam@webkit.org>
3678
3679         Clean up iterator filter / iterator range code
3680         https://bugs.webkit.org/show_bug.cgi?id=126817
3681
3682         Reviewed by Anders Carlsson.
3683
3684         * Shared/APIArray.h:
3685         Update elementsOfType() to use combination of FilterIterator and TransformIterator
3686         (now that FilterIterator no longer has a transform predicate) and make use of the 
3687         makeFoo() helpers.
3688
3689 2014-01-11  Anders Carlsson  <andersca@apple.com>
3690
3691         Simplify Timer and DeferrableOneShotTimer using std::function
3692         https://bugs.webkit.org/show_bug.cgi?id=126816
3693
3694         Reviewed by Sam Weinig.
3695
3696         Add another unexported symbol.
3697
3698         * Configurations/WebKit2.xcconfig:
3699
3700 2014-01-11  Jinwoo Song  <jinwoo7.song@samsung.com>
3701
3702         [EFL][WK2] Use nullptr instead of 0 in EFL API layer
3703         https://bugs.webkit.org/show_bug.cgi?id=126806
3704
3705         Reviewed by Anders Carlsson.
3706
3707         * UIProcess/API/efl/EwkView.cpp:
3708         (EwkView::create):
3709         * UIProcess/API/efl/ewk_auth_request.cpp:
3710         (ewk_auth_request_suggested_username_get):
3711         (ewk_auth_request_realm_get):
3712         (ewk_auth_request_host_get):
3713         * UIProcess/API/efl/ewk_back_forward_list.cpp:
3714         (ewk_back_forward_list_current_item_get):
3715         (ewk_back_forward_list_previous_item_get):
3716         (ewk_back_forward_list_next_item_get):
3717         (ewk_back_forward_list_item_at_index_get):
3718         (ewk_back_forward_list_n_back_items_copy):
3719         (ewk_back_forward_list_n_forward_items_copy):
3720         * UIProcess/API/efl/ewk_back_forward_list_item.cpp:
3721         (ewk_back_forward_list_item_url_get):
3722         (ewk_back_forward_list_item_title_get):
3723         (ewk_back_forward_list_item_original_url_get):
3724         * UIProcess/API/efl/ewk_context.cpp:
3725         (ewk_context_cookie_manager_get):
3726         (ewk_context_database_manager_get):
3727         (ewk_context_favicon_database_get):
3728         (ewk_context_storage_manager_get):
3729         (ewk_context_new_with_injected_bundle_path):
3730         * UIProcess/API/efl/ewk_context_menu.cpp:
3731         (ewk_context_menu_items_get):
3732         * UIProcess/API/efl/ewk_context_menu_item.cpp:
3733         (ewk_context_menu_item_new_with_submenu):
3734         (ewk_context_menu_item_title_get):
3735         (ewk_context_menu_item_parent_menu_get):
3736         (ewk_context_menu_item_submenu_get):
3737         * UIProcess/API/efl/ewk_download_job.cpp:
3738         (ewk_download_job_request_get):
3739         (ewk_download_job_response_get):
3740         (ewk_download_job_destination_get):
3741         (ewk_download_job_suggested_filename_get):
3742         * UIProcess/API/efl/ewk_error.cpp:
3743         (ewk_error_url_get):
3744         (ewk_error_description_get):
3745         * UIProcess/API/efl/ewk_file_chooser_request.cpp:
3746         (ewk_file_chooser_request_accepted_mimetypes_get):
3747         * UIProcess/API/efl/ewk_form_submission_request.cpp:
3748         (ewk_form_submission_request_field_names_get):
3749         (ewk_form_submission_request_field_value_get):
3750         * UIProcess/API/efl/ewk_navigation_data.cpp:
3751         (ewk_navigation_data_title_get):
3752         (ewk_navigation_data_original_request_get):
3753         (ewk_navigation_data_url_get):
3754         * UIProcess/API/efl/ewk_navigation_policy_decision.cpp:
3755         (ewk_navigation_policy_frame_name_get):
3756         (ewk_navigation_policy_request_get):
3757         * UIProcess/API/efl/ewk_object.cpp:
3758         (ewk_object_ref):
3759         * UIProcess/API/efl/ewk_popup_menu.cpp:
3760         (ewk_popup_menu_items_get):
3761         * UIProcess/API/efl/ewk_popup_menu_item.cpp:
3762         (ewk_popup_menu_item_text_get):
3763         (ewk_popup_menu_item_tooltip_get):
3764         (ewk_popup_menu_item_accessibility_text_get):
3765         * UIProcess/API/efl/ewk_security_origin.cpp:
3766         (ewk_security_origin_host_get):
3767         (ewk_security_origin_protocol_get):
3768         * UIProcess/API/efl/ewk_settings.cpp:
3769         (ewk_settings_default_text_encoding_name_get):
3770         * UIProcess/API/efl/ewk_url_request.cpp:
3771         (ewk_url_request_url_get):
3772         (ewk_request_cookies_first_party_get):
3773         (ewk_url_request_http_method_get):
3774         * UIProcess/API/efl/ewk_url_response.cpp:
3775         (ewk_url_response_url_get):
3776         (ewk_url_response_mime_type_get):
3777         * UIProcess/API/efl/ewk_url_scheme_request.cpp:
3778         (ewk_url_scheme_request_scheme_get):
3779         (ewk_url_scheme_request_url_get):
3780         (ewk_url_scheme_request_path_get):
3781         * UIProcess/API/efl/ewk_view.cpp:
3782         (toEwkViewChecked):
3783         (EWKViewGetWKView):
3784         (ewk_view_smart_add):
3785         (ewk_view_add_with_context):
3786         (ewk_view_context_get):
3787         (ewk_view_page_group_get):
3788         (ewk_view_url_get):
3789         (ewk_view_favicon_get):
3790         (ewk_view_settings_get):
3791         (ewk_view_title_get):
3792         (ewk_view_theme_get):
3793         (ewk_view_back_forward_list_get):
3794         (ewk_view_custom_encoding_get):
3795         (ewk_view_user_agent_get):
3796
3797 2014-01-10  Anders Carlsson  <andersca@apple.com>
3798
3799         Tweak ProgressTrackerClient functions
3800         https://bugs.webkit.org/show_bug.cgi?id=126808
3801
3802         Reviewed by Sam Weinig.
3803
3804         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3805         (WebKit::WebFrameLoaderClient::progressStarted):
3806         (WebKit::WebFrameLoaderClient::progressEstimateChanged):
3807         (WebKit::WebFrameLoaderClient::progressFinished):
3808         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3809
3810 2014-01-10  Sam Weinig  <sam@webkit.org>
3811
3812         Convert HandleMessage.h to use variadic templates
3813         https://bugs.webkit.org/show_bug.cgi?id=126469
3814
3815         Reviewed by Anders Carlsson.
3816
3817         * Platform/IPC/HandleMessage.h:
3818         (IPC::callMemberFunctionImpl):
3819         (IPC::callMemberFunction):
3820         Replace massive copy and pasted code with variadic magic.
3821
3822 2014-01-10  Anders Carlsson  <andersca@apple.com>
3823
3824         Move progress tracking functions from FrameLoaderClient to a new ProgressTrackerClient
3825         https://bugs.webkit.org/show_bug.cgi?id=126801
3826
3827         Reviewed by Sam Weinig.
3828
3829         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3830         * WebProcess/WebPage/WebPage.cpp:
3831         (WebKit::WebPage::WebPage):
3832
3833 2014-01-10  Anders Carlsson  <andersca@apple.com>
3834
3835         Remove dead code
3836         https://bugs.webkit.org/show_bug.cgi?id=126782
3837
3838         Reviewed by Tim Horton.
3839
3840         * UIProcess/WebPageProxy.cpp:
3841         * UIProcess/WebPageProxy.h:
3842         * WebProcess/WebPage/WebPage.cpp:
3843         * WebProcess/WebPage/WebPage.h:
3844         * WebProcess/WebPage/WebPage.messages.in:
3845
3846 2014-01-10  Benjamin Poulain  <bpoulain@apple.com>
3847
3848         Remove the BlackBerry port from trunk
3849         https://bugs.webkit.org/show_bug.cgi?id=126715
3850
3851         Reviewed by Anders Carlsson.
3852
3853         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3854         (WebKit::WebChromeClient::setCursor):
3855
3856 2014-01-10  Benjamin Poulain  <bpoulain@apple.com>
3857
3858         Remove the BlackBerry port from trunk
3859         https://bugs.webkit.org/show_bug.cgi?id=126715
3860
3861         Reviewed by Anders Carlsson.
3862
3863         * Scripts/generate-forwarding-headers.pl:
3864
3865 2014-01-10  Carlos Garcia Campos  <cgarcia@igalia.com>
3866
3867         Implement NetworkResourceLoader::receivedCancellation
3868         https://bugs.webkit.org/show_bug.cgi?id=126129
3869
3870         Reviewed Alexey Proskuryakov.
3871
3872         Implement ResourceHandleClient::receivedCancellation() in the
3873         network process to cancel the load when cancellation is received
3874         from the authentication manager like the web process does.
3875
3876         * NetworkProcess/NetworkResourceLoader.cpp:
3877         (WebKit::NetworkResourceLoader::receivedCancellation): Cancel the load.
3878         * NetworkProcess/NetworkResourceLoader.h:
3879
3880 2014-01-09  Jinwoo Song  <jinwoo7.song@samsung.com>
3881
3882         [EFL][WK2] Add APIs for setting and getting the default text encoding name
3883         https://bugs.webkit.org/show_bug.cgi?id=126736
3884
3885         Reviewed by Gyuyoung Kim.
3886
3887         Add APIs to set and get the default text encoding name.
3888
3889         * UIProcess/API/efl/ewk_settings.cpp:
3890         (ewk_settings_default_text_encoding_name_get):
3891         (ewk_settings_default_text_encoding_name_set):
3892         * UIProcess/API/efl/ewk_settings.h:
3893         * UIProcess/API/efl/tests/test_ewk2_settings.cpp:
3894         (TEST_F):
3895
3896 2014-01-09  Simon Fraser  <simon.fraser@apple.com>
3897
3898         Enable async scrolling for iOS
3899         https://bugs.webkit.org/show_bug.cgi?id=126730
3900
3901         Reviewed by Tim Horton.
3902         
3903         Turn on ENABLE_ASYNC_SCROLLING for iOS.
3904         
3905         On iOS, create ScrollingTreeScrollingNodeIOS nodes.
3906
3907         * UIProcess/Scrolling/RemoteScrollingTree.cpp:
3908         (WebKit::RemoteScrollingTree::createNode):
3909         * UIProcess/Scrolling/RemoteScrollingTree.h:
3910
3911 2014-01-06  Gavin Barraclough  <barraclough@apple.com>
3912
3913         Change Page, FocusController to use ViewState
3914         https://bugs.webkit.org/show_bug.cgi?id=126533
3915
3916         Reviewed by Tim Horton.
3917
3918         These classes currently maintain a set of separate fields to represent the view state;
3919         combine these into a single field, and allow WebPage to send the combined update rather
3920         than individual changes.
3921
3922         Maintain existing interface for WebKit1 clients.
3923
3924         * WebProcess/WebPage/WebPage.cpp:
3925         (WebKit::WebPage::WebPage):
3926             - Combined separate calls to Page::setViewState.
3927         (WebKit::WebPage::updateIsInWindow):
3928             - Simplied from setIsInWindow.
3929         (WebKit::WebPage::setViewState):
3930             - Combined separate calls to Page::setViewState.
3931         * WebProcess/WebPage/WebPage.h:
3932             - Declare updateIsInWindow.
3933
3934 2014-01-09  Tim Horton  <timothy_horton@apple.com>
3935
3936         Upstream iOS changes after r161530
3937         https://bugs.webkit.org/show_bug.cgi?id=126728
3938
3939         Reviewed by Dean Jackson.
3940
3941         * UIProcess/API/ios/WKContentView.mm:
3942         (-[WKContentView setViewportSize:]):
3943         (-[WKContentView didFinishScrollTo:]):
3944         (-[WKContentView didScrollTo:]):
3945         Adopt the new approach.
3946
3947 2014-01-09  Brian Burg  <bburg@apple.com>
3948
3949         REGRESSION (r160152): Selection drag snapshot doesn't appear or has the wrong content on Retina
3950         https://bugs.webkit.org/show_bug.cgi?id=125375
3951
3952         Reviewed by Darin Adler.
3953
3954         Remove scaling from WebDragClient because it is now selectively
3955         performed by WebCore according to the drag image source.
3956
3957         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
3958         (WebKit::WebDragClient::startDrag): Don't scale the provided drag image.
3959
3960 2014-01-09  Tim Horton  <timothy_horton@apple.com>
3961
3962         WebKit2 View Gestures: Support plugins that take over the page scale gesture
3963         https://bugs.webkit.org/show_bug.cgi?id=126399
3964         <rdar://problem/15738928>
3965
3966         Reviewed by Sam Weinig.
3967
3968         Teach ViewGestureController how to handle WebFrame::handlesPageScaleGesture=true,
3969         which is used so that PDFPlugin can deal with magnification itself.
3970
3971         * UIProcess/mac/ViewGestureController.cpp:
3972         (WebKit::ViewGestureController::ViewGestureController):
3973         (WebKit::ViewGestureController::didCollectGeometryForMagnificationGesture):
3974         (WebKit::ViewGestureController::handleMagnificationGesture):
3975         (WebKit::ViewGestureController::endMagnificationGesture):
3976         (WebKit::ViewGestureController::didCollectGeometryForSmartMagnificationGesture):
3977         If the WebFrame is going to handle the page scale gesture itself (which currently
3978         simply means that it is a main-frame PDFPlugin), send the magnification information
3979         straight through to it. Also, don't provide smart-zoom in this case, since there
3980         is currently no way to collect geometry information from the plugin.
3981
3982         * UIProcess/mac/ViewGestureController.h:
3983         * UIProcess/mac/ViewGestureController.messages.in:
3984         * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
3985         (WebKit::ViewGestureGeometryCollector::collectGeometryForMagnificationGesture):
3986         (WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
3987         Retrieve WebFrame::handlesPageScaleGesture and return it to the UI process.
3988
3989 2014-01-09  Dan Bernstein  <mitz@apple.com>
3990
3991         [Cocoa] Promote WKBackForwardList{,Item}.h to public
3992         https://bugs.webkit.org/show_bug.cgi?id=126707
3993
3994         Reviewed by Sam Weinig.
3995
3996         * UIProcess/API/Cocoa/WKBackForwardList.h: Stopped including the C API header.
3997         * UIProcess/API/Cocoa/WKBackForwardListItem.h: Ditto.
3998         * WebKit2.xcodeproj/project.pbxproj: Made the headers public.
3999
4000 2014-01-09  Zan Dobersek  <zdobersek@igalia.com>
4001
4002         Revert back to using the -n option when producing symbolic links to the GTK-specific
4003         API directories under Source/WebKit2/. Removing the option in r161497 resulted in
4004         recursive links being created under those directories since the links were dereferenced.
4005
4006         To actually ensure that the link is created anew, remove it so it is reconstructed.
4007
4008         Rubber-stamped by Carlos Garcia Campos.
4009
4010         * GNUmakefile.am:
4011
4012 2014-01-09  Carlos Garcia Campos  <cgarcia@igalia.com>
4013
4014         Crash when starting a download before the network process has been launched
4015         https://bugs.webkit.org/show_bug.cgi?id=126258
4016
4017         Reviewed by Anders Carlsson.
4018
4019         We need to ensure there's a network process running before
4020         starting a new download like we do when using the web process.
4021
4022         * UIProcess/WebContext.cpp:
4023         (WebKit::WebContext::download): Use ChildProcessProxy::send()
4024         instead of using the connection to make sure messages are queued
4025         if the process is still launching.
4026         (WebKit::WebContext::createDownloadProxy): Call
4027         ensureNetworkProcess() before creating the download proxy.
4028
4029 2014-01-09  Carlos Garcia Campos  <cgarcia@igalia.com>
4030
4031         [SOUP] Partial file left on disk after a download fails or is cancelled in WebKit2
4032         https://bugs.webkit.org/show_bug.cgi?id=126686
4033
4034         Reviewed by Martin Robinson.
4035
4036         We are currently writing the downloads directly into the
4037         destination, and when a download fails or is cancelled after the
4038         destination has been decided, the partial file is left on the
4039         disk. Deleting the final file is not safe because there might be a
4040         race condition, so we can use an intermediate file like other
4041         browsers do, a file in the same directory than the target
4042         destination but with .wkdownload suffix, that is removed when the
4043         download fails or is cancelled. If the download finishes
4044         successfully the intermediate file is renamed to the final
4045         destination.
4046
4047         * Shared/Downloads/soup/DownloadSoup.cpp:
4048         (WebKit::DownloadClient::deleteIntermediateFileInNeeded): Delete
4049         the intermdiate file if it's been created already.
4050         (WebKit::DownloadClient::downloadFailed): Call deleteIntermediateFileInNeeded.
4051         (WebKit::DownloadClient::didReceiveResponse): Do not create a
4052         SoupMessage for the given ResourceResponse that is not used, cache
4053         the ResourceResponse instead. Create the intermediate file and use
4054         it instead of the final destination.
4055         (WebKit::DownloadClient::didReceiveData): Use the cached
4056         ResourceResponse directly.
4057         (WebKit::DownloadClient::didFinishLoading): Rename the
4058         intermediate file to the final destination and write the metadata
4059         in the final target destination.
4060         (WebKit::DownloadClient::cancel): Handle the download cancellation
4061         here, removing the intermediate file is needed and cancelling the
4062         ResourceHandle and the download.
4063         (WebKit::DownloadClient::handleResponseLater):
4064         (WebKit::Download::cancel): Let the client handle the cancellation.
4065
4066 2014-01-08  Jinwoo Song  <jinwoo7.song@samsung.com>
4067
4068         WebKit2 EFL build fix after r161530
4069         https://bugs.webkit.org/show_bug.cgi?id=126678
4070
4071         Reviewed by Tim Horton.
4072
4073         Add PLATFORM(MAC) guards around setExposedRect() and exposedRect()
4074         in DrawingArea and WebFrameLoaderClient.
4075
4076         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
4077         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
4078         * WebProcess/WebPage/DrawingArea.h:
4079
4080 2014-01-08  Martin Hock  <mhock@apple.com>
4081
4082         Stub for Session API
4083         https://bugs.webkit.org/show_bug.cgi?id=126626
4084
4085         Reviewed by Sam Weinig.
4086
4087         * Shared/API/c/WKBase.h:
4088         * Shared/API/c/WKSharedAPICast.h:
4089         * Shared/APIObject.h:
4090         * UIProcess/API/C/WKSessionRef.cpp: Added.
4091         (WKSessionGetTypeID):
4092         (WKSessionGetEphemeral):
4093         * UIProcess/API/C/WKSessionRef.h: Added.
4094         * UIProcess/API/Cocoa/WKSession.h: Added.
4095         * UIProcess/API/Cocoa/WKSession.mm: Added.
4096         (-[WKSession dealloc]):
4097         (-[WKSession ephemeral]):
40