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