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