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