[GTK] Add CSS Grid Layout as experimental feature
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2014-01-17  Manuel Rego Casasnovas  <rego@igalia.com>
2
3         [GTK] Add CSS Grid Layout as experimental feature
4         https://bugs.webkit.org/show_bug.cgi?id=127089
5
6         Reviewed by Martin Robinson.
7
8         Allow CSS Grid Layout to be enabled through the environment variable WEBKITGTK_EXPERIMENTAL_FEATURES.
9
10         Example: WEBKITGTK_EXPERIMENTAL_FEATURES="CSS_GRID_LAYOUT=1"
11
12         * UIProcess/API/gtk/WebKitSettings.cpp:
13         (webKitSettingsConstructed): Use new experimental feature to enable or disable CSS Grid Layout.
14         * UIProcess/gtk/ExperimentalFeatures.cpp: Add new experimental feature.
15         * UIProcess/gtk/ExperimentalFeatures.h: Ditto.
16
17 2014-01-17  Enrica Casucci  <enrica@apple.com>
18
19         Support WebSelections in WK2 on iOS.
20         https://bugs.webkit.org/show_bug.cgi?id=127015
21         <rdar://problem/15843090>
22
23         Reviewed by Dan Bernstein.
24
25         Removing unused variable in selectWithGesture that
26         causes Release build to fail after r162103.
27
28         * WebProcess/WebPage/ios/WebPageIOS.mm:
29         (WebKit::WebPage::selectWithGesture):
30
31 2014-01-17  Yongjun Zhang  <yongjun_zhang@apple.com>
32
33         https://bugs.webkit.org/show_bug.cgi?id=127138
34         Add more delegate callback methods to WKWebProcessPlugInLoadDelegate.
35
36         Reviewed by Sam Weinig.
37
38         Add more WKWebProcessPlugInLoadDelegate callback methods so that a injected
39         bundle can listen/react to more frame loading events.
40
41         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h: Add more delegate callback methods for
42             WKWebProcessPlugInLoadDelegate.
43         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
44         (didCommitLoadForFrame):
45         (didFinishDocumentLoadForFrame):
46         (didFailLoadWithErrorForFrame):
47         (didSameDocumentNavigationForFrame): 
48         (didLayoutForFrame):
49         (setUpPageLoaderClient):
50
51 2014-01-16  Carlos Garcia Campos  <cgarcia@igalia.com>
52
53         [SOUP] Add stubs for CustomProtocol classes
54         https://bugs.webkit.org/show_bug.cgi?id=126343
55
56         Reviewed by Gustavo Noronha Silva.
57
58         * CMakeLists.txt:
59         * GNUmakefile.am:
60         * GNUmakefile.list.am:
61         * PlatformGTK.cmake:
62         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp: Added.
63         (WebKit::generateCustomProtocolID):
64         (WebKit::WebSoupRequestAsyncData::WebSoupRequestAsyncData):
65         (WebKit::WebSoupRequestAsyncData::~WebSoupRequestAsyncData):
66         (WebKit::WebSoupRequestAsyncData::requestFailed):
67         (WebKit::WebSoupRequestAsyncData::releaseTask):
68         (WebKit::CustomProtocolManager::supplementName):
69         (WebKit::CustomProtocolManager::CustomProtocolManager):
70         (WebKit::CustomProtocolManager::initializeConnection):
71         (WebKit::CustomProtocolManager::initialize):
72         * Shared/Network/NetworkProcessCreationParameters.cpp:
73         (WebKit::NetworkProcessCreationParameters::encode): Move
74         urlSchemesRegisteredForCustomProtocols encoding out of platform
75         ifdefs, since it's already guarded by ENABLE(CUSTOM_PROTOCOLS).
76         (WebKit::NetworkProcessCreationParameters::decode): Ditto.
77         * Shared/Network/NetworkProcessCreationParameters.h: Ditto.
78         * UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp: Added.
79         (WebKit::CustomProtocolManagerProxy::CustomProtocolManagerProxy):
80         (WebKit::CustomProtocolManagerProxy::startLoading):
81         (WebKit::CustomProtocolManagerProxy::stopLoading):
82
83 2014-01-16  Tim Horton  <timothy_horton@apple.com>
84
85         On iOS, zooming in with a TileController-backed main frame makes hundreds of tiles
86         https://bugs.webkit.org/show_bug.cgi?id=126531
87         <rdar://problem/15745862>
88
89         Reviewed by Anders Carlsson.
90
91         * UIProcess/API/ios/WKContentView.mm:
92         (-[WKContentView _updateViewExposedRect]):
93         (-[WKContentView setViewportSize:]):
94         (-[WKContentView didFinishScrollTo:]):
95         (-[WKContentView didScrollTo:]):
96         (-[WKContentView didZoomToScale:]):
97         Because zooming is performed by the UIScrollView, we need to transform
98         the exposedRect's offset in order to get it in FrameView-relative coordinates.
99
100         * UIProcess/ios/WebPageProxyIOS.mm:
101         (WebKit::WebPageProxy::didFinishZooming):
102         Save the pageScaleFactor when it changes.
103
104 2014-01-16  Carlos Garcia Campos  <cgarcia@igalia.com>
105
106         [GTK] Remove the weak pointer added to the web view in WebKitPrintOperation
107         https://bugs.webkit.org/show_bug.cgi?id=127098
108
109         Reviewed by Martin Robinson.
110
111         If the print operation finishes and the web view is still alive,
112         the weak pointer added to the view should be removed.
113
114         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
115         (_WebKitPrintOperationPrivate::~_WebKitPrintOperationPrivate):
116
117 2014-01-15  Sam Weinig  <sam@webkit.org>
118
119         TextBreakIterator's should support Latin-1 for all iterator types (Part 3)
120         https://bugs.webkit.org/show_bug.cgi?id=126856
121
122         Reviewed by Ryosuke Niwa.
123
124         Change all the TextBreakIterator creation functions to take StringViews. Remove a few
125         now unnecessary up-conversions to UTF-16 in the process.
126
127         * UIProcess/efl/TextCheckerEfl.cpp:
128         (WebKit::nextWordOffset):
129         (WebKit::TextChecker::checkTextOfParagraph):
130
131 2014-01-16  Eunmi Lee  <eunmi15.lee@samsung.com>
132
133         [EFL][WK2] EwkView can not be shown without re-sizing once it is hidden.
134         https://bugs.webkit.org/show_bug.cgi?id=127084
135
136         Reviewed by Gyuyoung Kim.
137
138         Visibility of EwkView can not be controlled by evas_object_show/hide
139         because EwkView can be shown only if re-sizing is requested, so modify
140         codes to show EwkView directly if we do not wait for re-sizing.
141         Additionally, we have to set default value of m_pendingSurfaceResize
142         to true for accelerated mode to prevent to show black empty view for
143         the first request to show.
144
145         * UIProcess/API/efl/EwkView.cpp:
146         (EwkView::EwkView):
147         (EwkView::handleEvasObjectShow):
148
149 2014-01-16  Andy Estes  <aestes@apple.com>
150
151         Build Fix: Use standard architectures when building for iOS
152
153         Even though we don't use the plug-in services on iOS, we still need
154         them to build (we won't install them). Be sure we specify valid iOS
155         architectures when doing so.
156
157         * Configurations/PluginService.32.xcconfig:
158         * Configurations/PluginService.64.xcconfig:
159
160 2014-01-16  Enrica Casucci  <enrica@apple.com>
161
162         Crash when destroying WKInteractionView.
163         https://bugs.webkit.org/show_bug.cgi?id=127153
164         <rdar://problem/15840761>
165
166         Reviewed by Anders Carlsson.
167
168         UIWKSelectionAssistant is a RetainPtr and it is being 
169         deallocated after the view and its gesture recognizers
170         have been destroyed.
171         The parent class UIWebSelectionAssistant assumes to be
172         deallocated before the view is gone.
173         We deallocate the interaction assistants explicitly to
174         fix the problem.
175
176         * UIProcess/API/ios/WKInteractionView.mm:
177         (-[WKInteractionView dealloc]):
178
179 2014-01-16  Brady Eidson  <beidson@apple.com>
180
181         IDB: delete object store support
182         <rdar://problem/15779641> and https://bugs.webkit.org/show_bug.cgi?id=127123
183
184         Reviewed by Alexey Proskuryakov.
185
186         Pipe through Web -> Database -> Web process messaging for delete object store.
187         Perform dropping the object store in the backing store.
188
189         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
190         (WebKit::DatabaseProcessIDBConnection::deleteObjectStore):
191         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
192         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
193
194         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
195         (WebKit::UniqueIDBDatabase::didDeleteObjectStore):
196         (WebKit::UniqueIDBDatabase::deleteObjectStore):
197         (WebKit::UniqueIDBDatabase::deleteObjectStoreInBackingStore):
198         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
199
200         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
201         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
202         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createObjectStore):
203         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteObjectStore):
204         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
205
206         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
207         (WebKit::WebIDBServerConnection::deleteObjectStore):
208         (WebKit::WebIDBServerConnection::didDeleteObjectStore):
209         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
210         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
211
212 2014-01-16  Alexey Proskuryakov  <ap@apple.com>
213
214         [Mac] [iOS] Add support for CFHTTPCookieStorageAcceptPolicyExclusivelyFromMainDocumentDomain
215         https://bugs.webkit.org/show_bug.cgi?id=127139
216
217         Reviewed by Brady Eidson.
218
219         * Shared/HTTPCookieAcceptPolicy.h:
220         * UIProcess/API/C/WKAPICast.h:
221         (WebKit::toHTTPCookieAcceptPolicy):
222         (WebKit::toAPI):
223         * UIProcess/API/C/WKCookieManager.h:
224         Added the policy to appropriate switches and enums.
225
226 2014-01-16  Jeffrey Pfau  <jpfau@apple.com>
227
228         Fix build after r162161. One FINAL was still present.
229
230         * Shared/cf/KeyedDecoder.h:
231
232 2014-01-16  Anders Carlsson  <andersca@apple.com>
233
234         Change all uses of FINAL to final now that all our compilers support it
235         https://bugs.webkit.org/show_bug.cgi?id=127142
236
237         Reviewed by Benjamin Poulain.
238
239         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
240         * NetworkProcess/RemoteNetworkingContext.h:
241         * Shared/API/Cocoa/RemoteObjectRegistry.h:
242         * Shared/APIArray.h:
243         * Shared/APIString.h:
244         * Shared/AsyncRequest.h:
245         * Shared/AsyncTask.h:
246         * Shared/cf/KeyedEncoder.h:
247         * UIProcess/API/gtk/PageClientImpl.h:
248         * UIProcess/API/mac/PageClientImpl.h:
249         * UIProcess/efl/WebViewEfl.h:
250         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
251         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
252         * WebProcess/Plugins/PDF/PDFPlugin.h:
253         * WebProcess/Storage/StorageAreaImpl.h:
254         * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
255         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
256         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
257
258 2014-01-16  Brady Eidson  <beidson@apple.com>
259
260         Fix the build after r162148
261
262         * Shared/cf/KeyedEncoder.h: s/OVERRIDE/override/
263
264 2014-01-15  Brady Eidson  <beidson@apple.com>
265
266         Use KeyedCoding as a persistent storage mechanism for blobs
267         https://bugs.webkit.org/show_bug.cgi?id=127012
268
269         Reviewed by Anders Carlsson.
270
271         Add a way to get the encoded buffer to save:
272         * Shared/cf/KeyedEncoder.cpp:
273         (WebKit::KeyedEncoder::finishEncoding):
274         * Shared/cf/KeyedEncoder.h:
275
276         Add a WebKit KeyedDecoder for CF platforms that can decode the previously encoded buffer:
277         * Shared/cf/KeyedDecoder.cpp: Added.
278         (WebKit::KeyedDecoder::KeyedDecoder):
279         (WebKit::KeyedDecoder::~KeyedDecoder):
280         (WebKit::KeyedDecoder::decodeInt64):
281         (WebKit::KeyedDecoder::decodeUInt32):
282         (WebKit::KeyedDecoder::decodeString):
283         (WebKit::KeyedDecoder::beginObject):
284         (WebKit::KeyedDecoder::endObject):
285         (WebKit::KeyedDecoder::beginArray):
286         (WebKit::KeyedDecoder::beginArrayElement):
287         (WebKit::KeyedDecoder::endArrayElement):
288         (WebKit::KeyedDecoder::endArray):
289         * Shared/cf/KeyedDecoder.h:
290
291         Create a WebKit KeyedEncoder/Decoder and use to encode/decode IDBKeyPaths:
292         * DatabaseProcess/IndexedDB/IDBSerialization.cpp:
293         (WebKit::serializeIDBKeyPath):
294         (WebKit::deserializeIDBKeyPath):
295         * DatabaseProcess/IndexedDB/IDBSerialization.h:
296
297         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
298         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createObjectStore):
299
300         * WebKit2.xcodeproj/project.pbxproj:
301
302 2014-01-16  Andy Estes  <aestes@apple.com>
303
304         Stop copying WKOriginDataManager.cpp into WebKit2.framework
305         https://bugs.webkit.org/show_bug.cgi?id=127100
306
307         Reviewed by Sam Weinig.
308
309         The file was mistakenly added to the 'All' target. Remove it.
310
311         * WebKit2.xcodeproj/project.pbxproj:
312
313 2014-01-16  Andy Estes  <aestes@apple.com>
314
315         [iOS] Install WebKit2 XPC services correctly
316         https://bugs.webkit.org/show_bug.cgi?id=127097
317
318         Reviewed by Anders Carlsson.
319
320         * Configurations/PluginService.32.xcconfig: Set SKIP_INSTALL to YES on iOS.
321         * Configurations/PluginService.64.xcconfig: Ditto.
322         * Configurations/PluginService.Development.xcconfig: Ditto.
323         * WebKit2.xcodeproj/project.pbxproj: Modified the "Add XPCServices symlink"
324         build phase to only execute on OS X. Modified the
325         "Copy XPC services for engineering builds" build phase to copy files
326         directly to WebKit2.framework/XPCServices/ on iOS, and modified its
327         output file paths to omit "Versions/A/" (since OS X will have a
328         XPCServices symlink at the root of the framework bundle).
329
330 2014-01-16  Roger Fong  <roger_fong@apple.com>
331
332         Build fix for mac following r162141.
333
334         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: Switch OVERRIDE to override.
335
336 2014-01-16  Roger Fong  <roger_fong@apple.com>
337
338         Add support for handling WebGL load policies.
339         https://bugs.webkit.org/show_bug.cgi?id=126935
340         <rdar://problem/15790448>.
341
342         Reviewed by Timothy Horton.
343
344         Boiler plate code for getting the load policy logic from WebProcess to the UIProcess.
345
346         * UIProcess/API/C/WKAPICast.h:
347         (WebKit::toWebGLLoadPolicy):
348         * UIProcess/API/C/WKPageLoaderClient.h: Define a new WKPageLoaderClientV4 struct.
349         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
350         (setUpPageLoaderClient):
351         * UIProcess/WebLoaderClient.cpp:
352         (WebKit::WebLoaderClient::webGLLoadPolicy):
353         * UIProcess/WebLoaderClient.h:
354         * UIProcess/WebPageProxy.cpp:
355         (WebKit::WebPageProxy::webGLPolicyForURL):
356         * UIProcess/WebPageProxy.h:
357         * UIProcess/WebPageProxy.messages.in:
358         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
359         (WebKit::WebFrameLoaderClient::webGLPolicyForURL): 
360         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
361         * WebProcess/WebPage/WebPage.cpp:
362         (WebKit::WebPage::webGLPolicyForURL): We use a sendSync to get the load policy value from the UIProcess.
363         * WebProcess/WebPage/WebPage.h:
364
365 2014-01-16  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
366
367         Remove workaround for compilers not supporting explicit override control
368         https://bugs.webkit.org/show_bug.cgi?id=127111
369
370         Reviewed by Anders Carlsson.
371
372         Now all compilers support explicit override control, this workaround can be removed.
373
374         * DatabaseProcess/DatabaseProcess.h:
375         * DatabaseProcess/DatabaseToWebProcessConnection.h:
376         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
377         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
378         * NetworkProcess/AsynchronousNetworkLoaderClient.h:
379         * NetworkProcess/NetworkProcess.h:
380         * NetworkProcess/NetworkProcessPlatformStrategies.h:
381         * NetworkProcess/NetworkResourceLoader.h:
382         * NetworkProcess/RemoteNetworkingContext.h:
383         * NetworkProcess/SynchronousNetworkLoaderClient.h:
384         * NetworkProcess/mac/DiskCacheMonitor.h:
385         * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm:
386         * PluginProcess/PluginControllerProxy.h:
387         * PluginProcess/PluginProcess.h:
388         * PluginProcess/WebProcessConnection.h:
389         * Shared/API/Cocoa/RemoteObjectRegistry.h:
390         * Shared/APIObject.h:
391         * Shared/AsyncRequest.h:
392         * Shared/AsyncTask.h:
393         * Shared/Authentication/AuthenticationManager.h:
394         * Shared/ChildProcess.h:
395         * Shared/ChildProcessProxy.h:
396         * Shared/CoordinatedGraphics/WebCoordinatedSurface.h:
397         * Shared/Downloads/Download.h:
398         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
399         * Shared/WebConnection.h:
400         * Shared/WebResourceBuffer.h:
401         * Shared/cf/KeyedEncoder.h:
402         * Shared/mac/SecItemShim.h:
403         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
404         * UIProcess/API/gtk/PageClientImpl.h:
405         * UIProcess/API/ios/PageClientImplIOS.h:
406         * UIProcess/API/mac/PageClientImpl.h:
407         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
408         * UIProcess/CoordinatedGraphics/WebView.h:
409         * UIProcess/Databases/DatabaseProcessProxy.h:
410         * UIProcess/Downloads/DownloadProxy.h:
411         * UIProcess/DrawingAreaProxy.h:
412         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
413         * UIProcess/Network/NetworkProcessProxy.h:
414         * UIProcess/Notifications/WebNotificationManagerProxy.h:
415         * UIProcess/Plugins/PluginProcessProxy.h:
416         * UIProcess/Scrolling/RemoteScrollingTree.h:
417         * UIProcess/Storage/StorageManager.h:
418         * UIProcess/WebApplicationCacheManagerProxy.h:
419         * UIProcess/WebBatteryManagerProxy.h:
420         * UIProcess/WebConnectionToWebProcess.h:
421         * UIProcess/WebContext.h:
422         * UIProcess/WebCookieManagerProxy.h:
423         * UIProcess/WebDatabaseManagerProxy.h:
424         * UIProcess/WebFullScreenManagerProxy.h:
425         * UIProcess/WebGeolocationManagerProxy.h:
426         * UIProcess/WebIconDatabase.h:
427         * UIProcess/WebInspectorProxy.h:
428         * UIProcess/WebKeyValueStorageManager.h:
429         * UIProcess/WebMediaCacheManagerProxy.h:
430         * UIProcess/WebNetworkInfoManagerProxy.h:
431         * UIProcess/WebOriginDataManagerProxy.h:
432         * UIProcess/WebPageProxy.h:
433         * UIProcess/WebProcessProxy.h:
434         * UIProcess/WebResourceCacheManagerProxy.h:
435         * UIProcess/WebVibrationProxy.h:
436         * UIProcess/efl/PageViewportControllerClientEfl.h:
437         * UIProcess/efl/WebViewEfl.h:
438         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
439         * UIProcess/mac/SecItemShimProxy.h:
440         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
441         * UIProcess/mac/ViewGestureController.h:
442         * UIProcess/mac/WebColorPickerMac.h:
443         * UIProcess/soup/WebSoupRequestManagerProxy.h:
444         * WebProcess/ApplicationCache/WebApplicationCacheManager.h:
445         * WebProcess/Battery/WebBatteryManager.h:
446         * WebProcess/Cookies/WebCookieManager.h:
447         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
448         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
449         * WebProcess/Databases/WebToDatabaseProcessConnection.h:
450         * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm:
451         * WebProcess/FileAPI/BlobRegistryProxy.h:
452         * WebProcess/Geolocation/WebGeolocationManager.h:
453         * WebProcess/IconDatabase/WebIconDatabaseProxy.h:
454         * WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm:
455         * WebProcess/MediaCache/WebMediaCacheManager.h:
456         * WebProcess/Network/NetworkProcessConnection.h:
457         * WebProcess/Network/WebResourceLoadScheduler.h:
458         * WebProcess/Network/WebResourceLoader.h:
459         * WebProcess/NetworkInfo/WebNetworkInfoManager.h:
460         * WebProcess/Notifications/WebNotificationManager.h:
461         * WebProcess/OriginData/WebOriginDataManager.h:
462         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
463         * WebProcess/Plugins/PDF/PDFPlugin.h:
464         * WebProcess/Plugins/PDF/PDFPluginAnnotation.h:
465         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.h:
466         * WebProcess/Plugins/PDF/PDFPluginPasswordField.h:
467         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.h:
468         * WebProcess/Plugins/PluginProcessConnection.h:
469         * WebProcess/Plugins/PluginProcessConnectionManager.h:
470         * WebProcess/Plugins/PluginProxy.h:
471         * WebProcess/Plugins/PluginView.h:
472         * WebProcess/ResourceCache/WebResourceCacheManager.h:
473         * WebProcess/Scrolling/RemoteScrollingCoordinator.h:
474         * WebProcess/Storage/StorageAreaImpl.h:
475         * WebProcess/Storage/StorageAreaMap.h:
476         * WebProcess/Storage/StorageNamespaceImpl.h:
477         * WebProcess/WebConnectionToUIProcess.h:
478         * WebProcess/WebCoreSupport/WebAlternativeTextClient.h:
479         * WebProcess/WebCoreSupport/WebBatteryClient.h:
480         * WebProcess/WebCoreSupport/WebChromeClient.h:
481         * WebProcess/WebCoreSupport/WebColorChooser.h:
482         * WebProcess/WebCoreSupport/WebContextMenuClient.h:
483         * WebProcess/WebCoreSupport/WebDatabaseManager.h:
484         * WebProcess/WebCoreSupport/WebDeviceProximityClient.h:
485         * WebProcess/WebCoreSupport/WebDragClient.h:
486         * WebProcess/WebCoreSupport/WebEditorClient.h:
487         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
488         * WebProcess/WebCoreSupport/WebGeolocationClient.h:
489         * WebProcess/WebCoreSupport/WebInspectorClient.h:
490         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
491         * WebProcess/WebCoreSupport/WebNavigatorContentUtilsClient.h:
492         * WebProcess/WebCoreSupport/WebNetworkInfoClient.h:
493         * WebProcess/WebCoreSupport/WebNotificationClient.h:
494         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
495         * WebProcess/WebCoreSupport/WebPopupMenu.h:
496         * WebProcess/WebCoreSupport/WebProgressTrackerClient.h:
497         * WebProcess/WebCoreSupport/WebSearchPopupMenu.h:
498         * WebProcess/WebCoreSupport/WebVibrationClient.h:
499         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
500         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
501         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
502         * WebProcess/WebPage/DrawingAreaImpl.h:
503         * WebProcess/WebPage/EventDispatcher.h:
504         * WebProcess/WebPage/ViewGestureGeometryCollector.h:
505         * WebProcess/WebPage/WebBackForwardListProxy.h:
506         * WebProcess/WebPage/WebPage.h:
507         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
508         * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
509         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
510         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
511         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
512         * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
513         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
514         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
515         * WebProcess/WebProcess.h:
516         * WebProcess/soup/WebSoupRequestManager.h:
517
518 2014-01-16  Ian Henderson  <ianh@apple.com>
519
520         Expose scrollView on WKView
521         https://bugs.webkit.org/show_bug.cgi?id=127085
522
523         Reviewed by Antti Koivisto.
524
525         Expose WKView's scroll view as a property.  In order to support
526         clients calling setDelegate:, we create a forwarder object that sends
527         delegate methods to both WKView (the "internal delegate") and the
528         publicly-exposed delegate (the "external delegate").
529
530         * UIProcess/API/Cocoa/WKView.h:
531         * UIProcess/API/ios/WKScrollView.h:
532         * UIProcess/API/ios/WKScrollView.mm:
533         (-[WKScrollViewDelegateForwarder initWithInternalDelegate:externalDelegate:]):
534         (-[WKScrollViewDelegateForwarder methodSignatureForSelector:]):
535         (-[WKScrollViewDelegateForwarder respondsToSelector:]):
536         (-[WKScrollViewDelegateForwarder forwardInvocation:]):
537         (-[WKScrollView setInternalDelegate:]):
538         (-[WKScrollView setDelegate:]):
539         (-[WKScrollView delegate]):
540         Pretend like _externalDelegate is the real delegate to avoid exposing
541         our internal delegate or forwarder object.
542         (-[WKScrollView _updateDelegate]):
543         (-[WKScrollView dealloc]):
544         * UIProcess/API/ios/WKViewIOS.mm:
545         (-[WKView scrollView]):
546         (-[WKView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
547
548 2014-01-15  Carlos Garcia Campos  <cgarcia@igalia.com>
549
550         [GTK][EFL][NIX] Do not use PrintContext, Frame and DocumentLoader in Errors
551         https://bugs.webkit.org/show_bug.cgi?id=127047
552
553         Reviewed by Martin Robinson.
554
555         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
556         (WebKit::WebPrintOperationGtk::frameURL): Helper function to get
557         the URL of the frame being printed.
558         (WebKit::WebPrintOperationGtk::print): Use frameURL() as failing
559         URL for printing errors.
560         * WebProcess/WebPage/gtk/WebPrintOperationGtk.h:
561
562 2014-01-15  Benjamin Poulain  <bpoulain@apple.com>
563
564         Move user agent code to WebCore and unify some code between OS X and iOS
565         https://bugs.webkit.org/show_bug.cgi?id=127080
566
567         Reviewed by Sam Weinig.
568
569         * UIProcess/ios/WebPageProxyIOS.mm:
570         (WebKit::userVisibleWebKitVersionString):
571         (WebKit::WebPageProxy::standardUserAgent):
572         * UIProcess/mac/WebPageProxyMac.mm:
573         (WebKit::WebPageProxy::standardUserAgent):
574         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
575         (InitWebCoreSystemInterface):
576
577 2014-01-15  Eunmi Lee  <eunmi15.lee@samsung.com>
578
579         [EFL][WK2] Use timestamp when event occurs for touch events.
580         https://bugs.webkit.org/show_bug.cgi?id=126424
581
582         Reviewed by Gyuyoung Kim.
583
584         Current time is used for touch event's timestamp instead of timestamp
585         when event occurs. Timestamp of touch event is used to implement flick
586         gesture, so it should be real value for accurate gesture processing.
587
588         * UIProcess/API/efl/EwkView.cpp:
589         Function names for handling touch events are changed to distinguish
590         mouse events and multi events.
591         (EwkView::setTouchEventsEnabled):
592         (EwkView::feedTouchEvents):
593         (EwkView::handleMouseDownForTouch):
594         (EwkView::handleMouseUpForTouch):
595         (EwkView::handleMouseMoveForTouch):
596         (EwkView::handleMultiDownForTouch):
597         (EwkView::handleMultiUpForTouch):
598         (EwkView::handleMultiMoveForTouch):
599         * UIProcess/API/efl/EwkView.h:
600         * UIProcess/API/efl/GestureRecognizer.cpp:
601         (WebKit::GestureHandler::handlePan):
602         (WebKit::GestureRecognizer::processTouchEvent):
603         (WebKit::GestureRecognizer::noGesture):
604         (WebKit::GestureRecognizer::singleTapGesture):
605         (WebKit::GestureRecognizer::doubleTapGesture):
606         (WebKit::GestureRecognizer::panGesture):
607         (WebKit::GestureRecognizer::pinchGesture):
608         * UIProcess/API/efl/GestureRecognizer.h:
609
610 2014-01-15  Gavin Barraclough  <barraclough@apple.com>
611
612         Change Page, FocusController to use ViewState
613         https://bugs.webkit.org/show_bug.cgi?id=126533
614
615         Unreviewed rollout, this caused a regression.
616
617         * WebProcess/WebPage/WebPage.cpp:
618         (WebKit::WebPage::WebPage):
619         (WebKit::WebPage::setActive):
620         (WebKit::WebPage::setViewIsVisible):
621         (WebKit::WebPage::setFocused):
622         (WebKit::WebPage::setIsInWindow):
623         (WebKit::WebPage::setViewStateInternal):
624         (WebKit::WebPage::setIsVisuallyIdle):
625         * WebProcess/WebPage/WebPage.h:
626
627 2014-01-15  Yongjun Zhang  <yongjun_zhang@apple.com>
628
629         https://bugs.webkit.org/show_bug.cgi?id=127072
630         Don't autorelease wrapper object (WebProcessPlugInScriptWorld) for InjectedBundleScriptWorld::normalWorld().
631
632         Reviewed by Geoffrey Garen.
633
634         In [WKWebProcessPlugInScriptWorld normalWorld], InjectedBundleScriptWorld::normalWorld() returns a static
635         instance,  autoreleasing its wrapper object could cause a dangling pointer and crash later.
636
637         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.mm:
638         (+[WKWebProcessPlugInScriptWorld normalWorld]):
639
640 2014-01-15  Andy Estes  <aestes@apple.com>
641
642         [iOS] Properly exclude the shim dylibs this time
643         https://bugs.webkit.org/show_bug.cgi?id=127075
644
645         Reviewed by Anders Carlsson.
646
647         BaseLegacyProcess.xcconfig was setting EXCLUDED_SOURCE_FILE_NAMES in
648         conflict with what I added in r161918, and I misspelled the setting
649         name in two instances. Fix these two bugs.
650
651         Also remove a vestigial OTHER_LDFLAGS from WebContentProcess.xcconfig
652         while we're here.
653
654         * Configurations/BaseLegacyProcess.xcconfig:
655         * Configurations/NetworkProcess.xcconfig:
656         * Configurations/PluginProcess.xcconfig:
657         * Configurations/WebContentProcess.xcconfig:
658
659 2014-01-15  Enrica Casucci  <enrica@apple.com>
660
661         Support WebSelections in WK2 on iOS.
662         https://bugs.webkit.org/show_bug.cgi?id=127015
663
664         Reviewed by Benjamin Poulain.
665
666         This is the first step towards adding support for selections in
667         non editable content on iOS for WK2.
668         In particular, this patch adds the basic plumbing to decide which
669         gesture recognizers are enabled and adds empty stubs for the gestures
670         that we'll need to support.
671         There are two separate assistants for selections, one to be used
672         in editable text (UIWKTextInteractionAssistant) and one for non editable
673         text (UIWKSelectionAssistant) and they are mutually exclusive.
674         UIWKSelectionAssistant is created at the time the view is created, 
675         and swapped with UIWKTextInteraction assistant
676         only when an editable element is focused and the keyboard appears on screen.
677
678         gestureRecognizerShouldBegin is the delegate call used to decide which gestures
679         should begin based on the position the gesture occurred at.
680         We want to avoid as much as possible synchronous calls to the WebProcess to
681         retrieve information about the content and in order to do so, we take advantage
682         of the order in which the gesture recognizers will trigger, based on the delay
683         configured at initialization.
684         The first gesture to trigger is highlightLongPress, followed by longpress in the
685         active assistant and longpress in the WKInteractionView.
686         There are two different scenarios for highlighlongpress based on which assistant is
687         currently active.
688
689         UIWKSelectionAssistant is active:
690             We send a request to the WebProcess to get information on the position
691             and we return YES, allowing the gesture to start.
692             We delegate to the WebProcess the proper handling of highlight based on the element.
693             When longPress gesture fires for the assistant, we assume we have received the reply to our
694             previous request, if not we fetch the information synchronously.
695             We are then able to make an informed decision about whether
696             or not to start the gesture. If the reply is NO, the third and last long press
697             gesture can be evaluated to decide whether to show the action sheet or simply generate
698             a click event.
699
700         UIWKTextInteractionAssistant is active:
701             In this case we must have information about the position immediately and we issue
702             a synchronous request to the WebProcess.
703             If we are not interacting with the same node, we return NO.
704             Then the longpress gesture fires for the assistant which performs the same check.
705             If the node is the same, the loupe gesture will start, otherwise the last longpress
706             gesture will be evaluated to decide about showing the action sheet or generating a
707             click event.
708
709         * Scripts/webkit2/messages.py:
710         * Shared/InteractionInformationAtPosition.cpp: Added.
711         (WebKit::InteractionInformationAtPosition::encode):
712         (WebKit::InteractionInformationAtPosition::decode):
713         * Shared/InteractionInformationAtPosition.h: Added.
714         (WebKit::InteractionInformationAtPosition::InteractionInformationAtPosition):
715         * UIProcess/API/ios/PageClientImplIOS.h:
716         * UIProcess/API/ios/PageClientImplIOS.mm:
717         (WebKit::PageClientImpl::positionInformationDidChange):
718         * UIProcess/API/ios/WKContentView.mm:
719         (-[WKContentView _positionInformationDidChange:]):
720         * UIProcess/API/ios/WKContentViewInternal.h:
721         * UIProcess/API/ios/WKInteractionView.h:
722         * UIProcess/API/ios/WKInteractionView.mm:
723         (-[WKInteractionView initWithFrame:]):
724         (-[WKInteractionView dealloc]):
725         (-[WKInteractionView gestureRecognizer:canPreventGestureRecognizer:]):
726         (-[WKInteractionView gestureRecognizer:canBePreventedByGestureRecognizer:]):
727         (isSamePair):
728         (-[WKInteractionView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
729         (-[WKInteractionView _showImageSheet]):
730         (-[WKInteractionView _showLinkSheet]):
731         (-[WKInteractionView _actionForLongPress]):
732         (-[WKInteractionView ensurePositionInformationIsUpToDate:]):
733         (-[WKInteractionView gestureRecognizerShouldBegin:]):
734         (-[WKInteractionView hasSelectablePositionAtPoint:]):
735         (-[WKInteractionView pointIsInAssistedNode:]):
736         (-[WKInteractionView _longPressRecognized:]):
737         (-[WKInteractionView _doubleTapRecognized:]):
738         (-[WKInteractionView _twoFingerDoubleTapRecognized:]):
739         (-[WKInteractionView _twoFingerPanRecognized:]):
740         (-[WKInteractionView useSelectionAssistantWithMode:]):
741         (-[WKInteractionView _positionInformationDidChange:]):
742         (-[WKInteractionView interactionAssistant]):
743         (-[WKInteractionView _startAssistingKeyboard]):
744         (-[WKInteractionView _stopAssistingKeyboard]):
745         * UIProcess/PageClient.h:
746         * UIProcess/WebPageProxy.h:
747         * UIProcess/WebPageProxy.messages.in:
748         * UIProcess/ios/WebPageProxyIOS.mm:
749         (WebKit::WebPageProxy::didReceivePositionInformation):
750         (WebKit::WebPageProxy::getPositionInformation):
751         (WebKit::WebPageProxy::requestPositionInformation):
752         * WebKit2.xcodeproj/project.pbxproj:
753         * WebProcess/WebPage/WebPage.h:
754         * WebProcess/WebPage/WebPage.messages.in:
755         * WebProcess/WebPage/ios/WebPageIOS.mm:
756         (WebKit::WebPage::selectWithGesture):
757         (WebKit::WebPage::getPositionInformation):
758         (WebKit::WebPage::requestPositionInformation):
759
760 2014-01-15  Yongjun Zhang  <yongjun_zhang@apple.com>
761
762         https://bugs.webkit.org/show_bug.cgi?id=127066
763         Add WKBrowsingContextHandle.h to WebKit2 private headers.
764
765         Reviewed by Dan Bernstein.
766
767         Add WKBrowsingContextHandle.h to WebKit2 private headers so that WebKit2 client
768         can use WKBrowsingContextHandle class.
769
770         * WebKit2.xcodeproj/project.pbxproj:
771
772 2014-01-15  Piotr Grad  <p.grad@samsung.com>
773
774         toStringVector static function definition should not be redundant.
775         https://bugs.webkit.org/show_bug.cgi?id=126872.
776
777         Reviewed by Anders Carlsson.
778
779         toStringVector function was declared twice in InjectedBundle.cpp and WebPageGroup.cpp as static.
780         In order to remove redundant definition this function was moved into API::Array.
781
782         * Shared/APIArray.cpp:
783         (API::Array::toStringVector):
784         * Shared/APIArray.h:
785         * UIProcess/WebPageGroup.cpp:
786         (WebKit::WebPageGroup::addUserStyleSheet):
787         (WebKit::WebPageGroup::addUserScript):
788         * WebProcess/InjectedBundle/InjectedBundle.cpp:
789         (WebKit::InjectedBundle::addUserScript):
790         (WebKit::InjectedBundle::addUserStyleSheet):
791
792 2014-01-10  Gavin Barraclough  <barraclough@apple.com>
793
794         REGRESSION (r158369): Some pop-up windows open at incorrect size (affects GMail, theblaze.com)
795         https://bugs.webkit.org/show_bug.cgi?id=126289
796
797         Reviewed by Anders Carlson.
798
799         Partial revert of https://bugs.webkit.org/show_bug.cgi?id=123557.
800         On window.open, update page when the UIProcess sends the create message
801
802         * UIProcess/WebPageProxy.cpp:
803         (WebKit::WebPageProxy::initializeWebPage):
804         (WebKit::WebPageProxy::creationParameters):
805         * UIProcess/WebPageProxy.h:
806             - creation paraments are not preserved at window.open.
807         * WebProcess/WebPage/WebPage.cpp:
808         (WebKit::WebPage::reinitializeWebPage):
809         (WebKit::WebPage::setViewState):
810         (WebKit::WebPage::setViewStateInternal):
811         * WebProcess/WebPage/WebPage.h:
812             - add interface to update page.
813         * WebProcess/WebProcess.cpp:
814         (WebKit::WebProcess::createWebPage):
815             - if we try to create a page that already exists, update the current page's view state.
816
817 2014-01-15  Carlos Garcia Campos  <cgarcia@igalia.com>
818
819         [GTK] Web process sometimes crashes when printing in synchronous mode
820         https://bugs.webkit.org/show_bug.cgi?id=126979
821
822         Reviewed by Gustavo Noronha Silva.
823
824         When printing synchronously in GTK+ we need to make sure that we
825         have a list of Printers before starting the print operation. Getting
826         the list of printers is done synchronously by GTK+, but using a
827         nested main loop that might process IPC messages comming from the
828         UI process like EndPrinting. When the EndPrinting message is
829         received while the printer list is being populated, the print
830         operation is finished unexpectely and the web process crashes. The
831         PrinterListGtk class gets the list of printers in the constructor
832         so we just need to ensure there's an instance alive during the
833         synchronous print operation. In case of asynchronous printing the
834         printer list will be created during the print operation without
835         any risk, because the EndPrinting message is not sent until the
836         printing callback has been received in the UI process.
837
838         * GNUmakefile.list.am: Add new files to compilation.
839         * PlatformGTK.cmake: Ditto.
840         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
841         (WebKit::WebChromeClient::print): Ensure PrinterListGtk is created
842         before the synchronous printing and destroyed afterwards.
843         * WebProcess/WebPage/gtk/PrinterListGtk.cpp: Added.
844         (WebKit::PrinterListGtk::shared): Return the singleton.
845         (WebKit::PrinterListGtk::enumeratePrintersFunction): Callback
846         called by gtk_enumerate_printers() when a new printer is found.
847         (WebKit::PrinterListGtk::PrinterListGtk): Call
848         gtk_enumerate_printers() in syhchronous mode.
849         (WebKit::PrinterListGtk::~PrinterListGtk):
850         (WebKit::PrinterListGtk::addPrinter): Add the printer to the list
851         and set the default printer if needed.
852         (WebKit::PrinterListGtk::findPrinter): Find the printer for the
853         given name.
854         * WebProcess/WebPage/gtk/PrinterListGtk.h: Added.
855         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: Use
856         PrinterListGtk class to find the printer instead of calling
857         gtk_enumerate_printers().
858
859 2014-01-15  Tomas Popela  <tpopela@redhat.com>
860
861         [SOUP] [WK2] - Disable MemoryCache when the DOCUMENT_VIEWER cache model is set
862         https://bugs.webkit.org/show_bug.cgi?id=126577
863
864         Reviewed by Carlos Garcia Campos.
865
866         As in http://trac.webkit.org/changeset/152483, but this time for
867         WebKit2. When WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER is set we need to
868         disable the MemoryCache completely to prevent caching of the resources.
869
870         * WebProcess/soup/WebProcessSoup.cpp:
871         (WebKit::WebProcess::platformSetCacheModel):
872
873 2014-01-14  Carlos Garcia Campos  <cgarcia@igalia.com>
874
875         [GTK] UI process crashes when closing the window right after printing with javascript
876         https://bugs.webkit.org/show_bug.cgi?id=126981
877
878         Reviewed by Gustavo Noronha Silva.
879
880         The UI process crashes because when the page is closed, the web
881         view is destroyed before the print operation has actually
882         finished. Use a weak pointer to make sure the web view pointer is
883         set to NULL when the it's destroyed and emit the finished callback
884         always so that the user can clean up the operation even when the
885         web view has been closed.
886
887         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
888         (drawPagesForPrintingCompleted):
889
890 2014-01-14  Carlos Garcia Campos  <cgarcia@igalia.com>
891
892         [GTK] UI process crashes when the web process crashes while printing
893         https://bugs.webkit.org/show_bug.cgi?id=126977
894
895         Reviewed by Gustavo Noronha Silva.
896
897         When the web process crashes, the printing callback is
898         invalidated, so the function is called with a NULL error.
899
900         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
901         (drawPagesForPrintingCompleted): Check wkError is not NULL before
902         trying to use it.
903         * UIProcess/API/gtk/WebKitWebView.cpp:
904         (webkitWebViewPrintFrame): Set the print mode of the operation
905         before emitting the print signal.
906
907 2014-01-14  Brady Eidson  <beidson@apple.com>
908
909         IDB: create object store support
910         <rdar://problem/15779639> and https://bugs.webkit.org/show_bug.cgi?id=127011
911
912         Reviewed by Anders Carlsson.
913
914         Add messaging/callback infrastructure for creating object stores:
915         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
916         (WebKit::DatabaseProcessIDBConnection::createObjectStore):
917         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
918         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
919
920         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
921         (WebKit::WebIDBServerConnection::createObjectStore):
922         (WebKit::WebIDBServerConnection::didCreateObjectStore):
923         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
924         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
925
926         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
927         (WebKit::UniqueIDBDatabase::didChangeDatabaseVersion):
928         (WebKit::UniqueIDBDatabase::didCreateObjectStore):
929         (WebKit::UniqueIDBDatabase::didCompleteBoolRequest):
930         (WebKit::UniqueIDBDatabase::createObjectStore):
931         (WebKit::UniqueIDBDatabase::createObjectStoreInBackingStore):
932         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
933
934         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
935
936         Add serialization helpers to save/restore an IDBKeyPath to/from disk:
937         * DatabaseProcess/IndexedDB/IDBSerialization.cpp:
938         (WebKit::serializeIDBKeyPath):
939         (WebKit::deserializeIDBKeyPath):
940         * DatabaseProcess/IndexedDB/IDBSerialization.h:
941
942         Add object store metadata to the schema, and save/restore the metadata:
943         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
944         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createAndPopulateInitialMetadata):
945         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::extractExistingMetadata):
946         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createObjectStore):
947         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
948
949         * Scripts/webkit2/messages.py:
950         (struct_or_class):
951         * WebKit2.xcodeproj/project.pbxproj:
952
953 2014-01-14  Jae Hyun Park  <jae.park@company100.net>
954
955         [GTK] Unreviewed build fix after r162034
956
957         * GNUmakefile.list.am:
958
959 2014-01-14  Ryuan Choi  <ryuan.choi@samsung.com>
960
961         Unreviewed build fix for CMake based ports after r162034.
962
963         * CMakeLists.txt:
964
965 2014-01-14  Jeffrey Pfau  <jpfau@apple.com>
966
967         Build fix after r162034
968
969         Rubber-stamped by Benjamin Poulain.
970
971         * WebProcess/WebCoreSupport/WebProgressTrackerClient.cpp:
972
973 2014-01-14  Anders Carlsson  <andersca@apple.com>
974
975         Create separate progress tracker clients
976         https://bugs.webkit.org/show_bug.cgi?id=127025
977
978         Reviewed by Sam Weinig.
979
980         * WebKit2.xcodeproj/project.pbxproj:
981         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
982         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
983         * WebProcess/WebCoreSupport/WebProgressTrackerClient.cpp: Copied from Source/WebCore/loader/ProgressTrackerClient.h.
984         (WebKit::WebProgressTrackerClient::WebProgressTrackerClient):
985         (WebKit::WebProgressTrackerClient::progressTrackerDestroyed):
986         (WebKit::WebProgressTrackerClient::progressStarted):
987         (WebKit::WebProgressTrackerClient::progressEstimateChanged):
988         (WebKit::WebProgressTrackerClient::progressFinished):
989         * WebProcess/WebCoreSupport/WebProgressTrackerClient.h: Copied from Source/WebCore/loader/ProgressTrackerClient.h.
990         * WebProcess/WebPage/WebPage.cpp:
991         (WebKit::WebPage::WebPage):
992
993 2014-01-14  Benjamin Poulain  <bpoulain@apple.com>
994
995         [WK2] Make WebPageProxy's setUserAgent private
996         https://bugs.webkit.org/show_bug.cgi?id=127013
997
998         Reviewed by Anders Carlsson.
999
1000         * UIProcess/WebPageProxy.h:
1001         The API to modify the user agent already has 3 "setters":
1002         -standardUserAgent
1003         -setApplicationNameForUserAgent
1004         -setCustomUserAgent
1005
1006         The method WebPageProxy::setUserAgent() is supposed to be internal, not used directly.
1007         Using it directly would cause unexpected behaviors, for example:
1008         -Set the user agent with setUserAgent.
1009         -Set CustomUserAgent.
1010         -Reset CustomUserAgent.
1011         ->The user agent is now standardUserAgent instead of the user agent defined initially.
1012
1013 2014-01-14  Commit Queue  <commit-queue@webkit.org>
1014
1015         Unreviewed, rolling out r162000.
1016         http://trac.webkit.org/changeset/162000
1017         https://bugs.webkit.org/show_bug.cgi?id=127009
1018
1019         API versioning is wrong (Requested by rfong on #webkit).
1020
1021         * UIProcess/API/C/WKAPICast.h:
1022         * UIProcess/API/C/WKPageLoaderClient.h:
1023         * UIProcess/API/C/WKPageUIClient.h:
1024         * UIProcess/WebLoaderClient.cpp:
1025         * UIProcess/WebLoaderClient.h:
1026         * UIProcess/WebPageProxy.cpp:
1027         * UIProcess/WebPageProxy.h:
1028         * UIProcess/WebPageProxy.messages.in:
1029         * UIProcess/WebUIClient.cpp:
1030         * UIProcess/WebUIClient.h:
1031         * UIProcess/mac/WebInspectorProxyMac.mm:
1032         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1033         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1034         * WebProcess/WebCoreSupport/WebChromeClient.h:
1035         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1036         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1037         * WebProcess/WebPage/WebPage.cpp:
1038         * WebProcess/WebPage/WebPage.h:
1039
1040 2014-01-14  Csaba Osztrogonác  <ossy@webkit.org>
1041
1042         Speculative buildfix after r161999.
1043
1044         * Shared/APIObject.h:
1045
1046 2014-01-09  Roger Fong  <roger_fong@apple.com>
1047
1048         Add support for handling WebGL load policies.
1049         https://bugs.webkit.org/show_bug.cgi?id=126935
1050         <rdar://problem/15790448>.
1051
1052         Reviewed by Brent Fulgham.
1053
1054         Boiler plate code for sending messages to and from the UI and Web Process. 
1055
1056         * UIProcess/API/C/WKAPICast.h:
1057         (WebKit::toWebGLLoadPolicy):
1058         * UIProcess/API/C/WKPageLoaderClient.h:
1059         * UIProcess/API/C/WKPageUIClient.h:
1060         * UIProcess/WebLoaderClient.cpp:
1061         (WebKit::WebLoaderClient::webGLLoadPolicy):
1062         * UIProcess/WebLoaderClient.h:
1063         * UIProcess/WebPageProxy.cpp:
1064         (WebKit::WebPageProxy::webGLContextCreated):
1065         (WebKit::WebPageProxy::webGLPolicyForHost):
1066         * UIProcess/WebPageProxy.h:
1067         * UIProcess/WebPageProxy.messages.in:
1068         * UIProcess/WebUIClient.cpp:
1069         (WebKit::WebUIClient::webGLContextCreated):
1070         * UIProcess/WebUIClient.h:
1071         * UIProcess/mac/WebInspectorProxyMac.mm:
1072         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1073         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1074         (WebKit::WebChromeClient::webGLContextCreated):
1075         * WebProcess/WebCoreSupport/WebChromeClient.h:
1076         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1077         (WebKit::WebFrameLoaderClient::webGLPolicyForHost):
1078         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1079         * WebProcess/WebPage/WebPage.cpp: A sendSync is used here to get the webGLPolicyForHost message sent between the Web and UI process.
1080                                           In the future this will be replaced with a strategy is non-blocking.
1081         (WebKit::WebPage::getWebGLPolicyForHost):
1082         * WebProcess/WebPage/WebPage.h:
1083
1084 2014-01-14  Mark Rowe  <mrowe@apple.com>
1085
1086         WebKit2 leaks sudden termination assertions when a page with unload handlers is closed.
1087         <https://webkit.org/b/126974> / <rdar://problem/15812954>
1088
1089         When a page with an unload handler is loaded, the web process tells the UI process that it
1090         should disable sudden termination. However, when the page is closed the connection between
1091         the web and UI process is torn down before the web content has a chance to tell the UI
1092         process to reenable sudden termination.
1093
1094         Reviewed by Anders Carlsson.
1095
1096         * UIProcess/WebProcessProxy.cpp:
1097         (WebKit::WebProcessProxy::WebProcessProxy):
1098         (WebKit::WebProcessProxy::~WebProcessProxy): Balance any outstanding disableSuddenTermination calls.
1099         (WebKit::WebProcessProxy::enableSuddenTermination): Decrement the count.
1100         (WebKit::WebProcessProxy::disableSuddenTermination): Increment the count.
1101         * UIProcess/WebProcessProxy.h:
1102
1103 2014-01-14  Joseph Pecoraro  <pecoraro@apple.com>
1104
1105         Web Inspector: For Remote Inspection link WebProcess's to their parent UIProcess
1106         https://bugs.webkit.org/show_bug.cgi?id=126995
1107
1108         Reviewed by Timothy Hatcher.
1109
1110         * WebProcess/WebCoreSupport/WebInspectorClient.h:
1111         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
1112         (WebKit::WebInspectorClient::parentProcessIdentifier):
1113         WebProcesses are proxies for a parent UIProcess.
1114
1115 2014-01-14  Tim Horton  <timothy_horton@apple.com>
1116
1117         iOS WebKit2 build fixes, part 3
1118
1119         * WebKit2.xcodeproj/project.pbxproj:
1120         Remove some files from the 'All' target that should never have been a part of it.
1121
1122 2014-01-14  Tim Horton  <timothy_horton@apple.com>
1123
1124         iOS WebKit2 build fixes, part 2
1125
1126         * WebKit2.xcodeproj/project.pbxproj:
1127         Add some missing files.
1128
1129 2014-01-14  Brian J. Burg  <burg@cs.washington.edu>
1130
1131         Add ENABLE(WEB_REPLAY) feature flag to the build system
1132         https://bugs.webkit.org/show_bug.cgi?id=126949
1133
1134         Reviewed by Joseph Pecoraro.
1135
1136         * Configurations/FeatureDefines.xcconfig:
1137
1138 2014-01-14  Tim Horton  <timothy_horton@apple.com>
1139
1140         Move WKView.mm to WKViewIOS.mm as 161950 was supposed to do.
1141
1142         * UIProcess/API/ios/WKView.mm: Removed.
1143         * UIProcess/API/ios/WKViewIOS.mm: Copied from UIProcess/API/ios/WKView.mm.
1144
1145 2014-01-14  Carlos Garcia Campos  <cgarcia@igalia.com>
1146
1147         [GTK] Test /webkit2/WebKitWebContext/languages crashes with network process enabled
1148         https://bugs.webkit.org/show_bug.cgi?id=126130
1149
1150         Reviewed by Anders Carlsson.
1151
1152         We need to notify the network process when the user preferred
1153         languages have changed to update the SoupSession accordingly.
1154
1155         * NetworkProcess/NetworkProcess.h: Add
1156         userPreferredLanguagesChanged when using soup network backend.
1157         * NetworkProcess/NetworkProcess.messages.in: Add
1158         UserPreferredLanguagesChanged message when using soup network
1159         backend.
1160         * NetworkProcess/soup/NetworkProcessSoup.cpp:
1161         (WebKit::NetworkProcess::userPreferredLanguagesChanged): Update
1162         the SoupSession to use the given languages.
1163         (WebKit::NetworkProcess::platformInitializeNetworkProcess): Call
1164         userPreferredLanguagesChanged() when initialization parameters
1165         contain languages.
1166         (WebKit::NetworkProcess::allowSpecificHTTPSCertificateForHost):
1167         Remove unnedded WebCore prefix.
1168         (WebKit::NetworkProcess::clearCacheForAllOrigins): Simplify using
1169         a single line.
1170         * Shared/Network/NetworkProcessCreationParameters.cpp:
1171         (WebKit::NetworkProcessCreationParameters::encode): Encode the
1172         languages vector.
1173         (WebKit::NetworkProcessCreationParameters::decode): Decode the
1174         languages vector.
1175         * Shared/Network/NetworkProcessCreationParameters.h:
1176         * UIProcess/WebContext.cpp:
1177         (WebKit::WebContext::languageChanged): Send a message also to the
1178         network process.
1179         * UIProcess/soup/WebContextSoup.cpp:
1180         (WebKit::WebContext::platformInitializeNetworkProcess): Set
1181         languages initial parameter.
1182
1183 2014-01-14  Carlos Garcia Campos  <cgarcia@igalia.com>
1184
1185         [SOUP] SoupNetworkSession::setAcceptLanguages should receive a const reference
1186         https://bugs.webkit.org/show_bug.cgi?id=126966
1187
1188         Reviewed by Gustavo Noronha Silva.
1189
1190         * WebProcess/soup/WebProcessSoup.cpp:
1191         (WebKit::setSoupSessionAcceptLanguage): Use const Vector<String>&.
1192
1193 2014-01-14  Andreas Kling  <akling@apple.com>
1194
1195         Remove deprecated DeferrableOneShotTimer constructor.
1196         <https://webkit.org/b/126984>
1197
1198         Reviewed by Anders Carlsson.
1199
1200         * WebProcess/Plugins/PluginView.h:
1201         * WebProcess/Plugins/PluginView.cpp:
1202         (WebKit::PluginView::pluginSnapshotTimerFired):
1203
1204             Take the timer by reference so we can use the new constructor.
1205
1206 2014-01-13  Tim Horton  <timothy_horton@apple.com>
1207
1208         iOS WebKit2 build fixes, part 1
1209
1210         * Configurations/WebKit2.xcconfig:
1211         * NetworkProcess/NetworkResourceLoader.cpp:
1212         * NetworkProcess/NetworkResourceLoader.h:
1213         * NetworkProcess/RemoteNetworkingContext.h:
1214         * Shared/WebEventConversion.h:
1215         * UIProcess/API/ios/WKGeolocationProviderIOS.mm:
1216         * UIProcess/API/ios/WKInteractionView.mm:
1217         (-[WKTextPosition isEqual:]):
1218         * UIProcess/API/ios/WKViewIOS.mm: Renamed from Source/WebKit2/UIProcess/API/ios/WKView.mm.
1219         * UIProcess/ios/WebPageProxyIOS.mm:
1220         * UIProcess/ios/WebProcessProxyIOS.mm:
1221         * WebKit2.xcodeproj/project.pbxproj:
1222         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
1223         * WebProcess/WebPage/WebPage.h:
1224         * WebProcess/WebPage/ios/WebPageIOS.mm:
1225         (WebKit::WebPage::elementDidFocus):
1226         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1227
1228 2014-01-13  Jinwoo Song  <jinwoo7.song@samsung.com>
1229
1230         [EFL][WK2] Disable failing API tests
1231         https://bugs.webkit.org/show_bug.cgi?id=126960
1232
1233         Reviewed by Gyuyoung Kim.
1234
1235         Disable color picker test until bug 119120 is resolved.
1236
1237         * UIProcess/API/efl/tests/test_ewk2_color_picker.cpp:
1238         (TEST_F):
1239
1240 2014-01-13  Jinwoo Song  <jinwoo7.song@samsung.com>
1241
1242         [EFL][WK2] ewk_view_page_contents_get() API test is failing
1243         https://bugs.webkit.org/show_bug.cgi?id=126957
1244
1245         Reviewed by Gyuyoung Kim.
1246
1247         As the day in 'Date' field may be one digit or two digit,
1248         the data length may also be varied by one byte.
1249
1250         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
1251         (EWK2ViewTest::PageContentsAsMHTMLCallback):
1252
1253 2014-01-13  Commit Queue  <commit-queue@webkit.org>
1254
1255         Unreviewed, rolling out r161939.
1256         http://trac.webkit.org/changeset/161939
1257         https://bugs.webkit.org/show_bug.cgi?id=126956
1258
1259         didn't work with mac, of course (Requested by thorton on
1260         #webkit).
1261
1262         * NetworkProcess/NetworkResourceLoader.cpp:
1263         * NetworkProcess/NetworkResourceLoader.h:
1264         * NetworkProcess/RemoteNetworkingContext.h:
1265         * Shared/WebEventConversion.h:
1266         * UIProcess/API/ios/WKGeolocationProviderIOS.mm:
1267         * UIProcess/API/ios/WKInteractionView.mm:
1268         (-[WKTextPosition isEqual:]):
1269         * WebKit2.xcodeproj/project.pbxproj:
1270         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
1271         * WebProcess/WebPage/WebPage.h:
1272         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1273
1274 2014-01-13  Benjamin Poulain  <bpoulain@apple.com>
1275
1276         Update WebPageProxyIOS's user agent string
1277         https://bugs.webkit.org/show_bug.cgi?id=126933
1278
1279         Reviewed by Darin Adler.
1280
1281         * UIProcess/ios/WebPageProxyIOS.mm:
1282         (WebKit::WebPageProxy::standardUserAgent):
1283         Send a more reasonable user agent. The previous one was forcing
1284         iOS 5.1's iPad user-agent.
1285
1286 2014-01-13  Tim Horton  <timothy_horton@apple.com>
1287
1288         iOS WebKit2 build fixes
1289
1290         * NetworkProcess/NetworkResourceLoader.cpp:
1291         * NetworkProcess/NetworkResourceLoader.h:
1292         Introduce/clarify some confusion about CFNETWORK vs. PLATFORM(IOS).
1293
1294         * NetworkProcess/RemoteNetworkingContext.h:
1295         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
1296         Get rid of an override of something that doesn't exist anymore.
1297
1298         * WebKit2.xcodeproj/project.pbxproj:
1299         Add some files. It's likely there are more missing, but this is a start.
1300
1301         * Shared/WebEventConversion.h:
1302         * WebProcess/WebPage/WebPage.h:
1303         Use WebKitAdditions.
1304
1305         * UIProcess/API/ios/WKGeolocationProviderIOS.mm:
1306         Something bizarre is happening with internal deprecation warnings.
1307
1308         * UIProcess/API/ios/WKInteractionView.mm:
1309         (-[WKTextPosition isEqual:]):
1310         Fix a typo.
1311
1312         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1313         Remove an override of something that doesn't exist anymore.
1314
1315 2014-01-13  Andy Estes  <aestes@apple.com>
1316
1317         [iOS] Build Fix: Don't build the 'All-iOS' target on iOS. Just use 'All'.
1318
1319         * Makefile:
1320
1321 2014-01-13  Martin Robinson  <mrobinson@igalia.com>
1322
1323         [CMake] Mark all dependency include paths and libraries as advanced variables
1324         https://bugs.webkit.org/show_bug.cgi?id=126504
1325
1326         Reviewed by Daniel Bates.
1327
1328         * CMakeLists.txt: Mark the LIBRT_LIBRARIES variable as advanced.
1329
1330 2014-01-13  Martin Robinson  <mrobinson@igalia.com>
1331
1332         [GTK][CMake] Circular dependency in generation of WebKitEnumTypes.h
1333         https://bugs.webkit.org/show_bug.cgi?id=126912
1334
1335         Reviewed by Daniel Bates.
1336
1337         * PlatformGTK.cmake: Remove the circular dependency by generating WebKitEnumTypes.h with
1338         all installed headers except for WebKitEnumTypes.h itself.
1339
1340 2014-01-13  Andy Estes  <aestes@apple.com>
1341
1342         [iOS] Exclude shims and PluginProcess.app from the WebKit2 build
1343         https://bugs.webkit.org/show_bug.cgi?id=126936
1344
1345         Reviewed by Daniel Bates.
1346
1347         * Configurations/All.xcconfig: Added. Excluded PluginProcess.app from
1348         being copied into WebKit2.framework on iOS.
1349         * Configurations/NetworkProcess.xcconfig: Excluded SecItemShim.dylib
1350         from being copied into NetworkProcess.app on iOS.
1351         * Configurations/PluginProcess.xcconfig: Excluded
1352         PluginProcessShim.dylib from being copied into PluginProcess.app and
1353         set SKIP_INSTALL to YES on iOS.
1354         * Configurations/PluginProcessShim.xcconfig: Added. Linked the shim
1355         against necessary frameworks on Mac.
1356         * Configurations/SecItemShim.xcconfig: Ditto.
1357         * Configurations/WebProcessShim.xcconfig: Ditto.
1358         * Configurations/WebContentProcess.xcconfig: Excluded
1359         WebProcessShim.dylib from being copied into WebProcess.app on iOS.
1360         * PluginProcess/mac/PluginProcessShim.mm: Added #if !PLATFORM(IOS) guards.
1361         * Shared/mac/CookieStorageShimLibrary.cpp: Ditto.
1362         * WebProcess/mac/SecItemShimLibrary.mm: Ditto.
1363         * WebKit2.xcodeproj/project.pbxproj: Removed Mac-only frameworks from
1364         the shims' 'Link Binary with Libraries' build phases. Added new xcconfigs.
1365
1366 2014-01-13  Jinwoo Song  <jinwoo7.song@samsung.com>
1367
1368         [EFL][WK2] Replace usage of DEFINE_STATIC_LOCAL with NeverDestroyed
1369         https://bugs.webkit.org/show_bug.cgi?id=126882
1370
1371         Reviewed by Gyuyoung Kim.
1372
1373         * Shared/efl/ProcessExecutablePathEfl.cpp:
1374         (WebKit::executablePathOfWebProcess):
1375         (WebKit::executablePathOfPluginProcess):
1376         (WebKit::executablePathOfNetworkProcess):
1377         * UIProcess/API/efl/EwkView.cpp:
1378         (wkPageToEvasObjectMap):
1379         * UIProcess/API/efl/ewk_context.cpp:
1380         (contextMap):
1381         * UIProcess/API/efl/ewk_page_group.cpp:
1382         (pageGroupMap):
1383         * UIProcess/efl/TextCheckerClientEfl.cpp:
1384         (TextCheckerClientEfl::instance):
1385         * UIProcess/efl/TextCheckerClientEfl.h:
1386
1387 2014-01-13  Carlos Garcia Campos  <cgarcia@igalia.com>
1388
1389         [SOUP] Add SoupNetworkSession class to wrap a SoupSession
1390         https://bugs.webkit.org/show_bug.cgi?id=126813
1391
1392         Reviewed by Gustavo Noronha Silva.
1393
1394         Use the new SoupNetworkSession API.
1395
1396         * NetworkProcess/soup/NetworkProcessSoup.cpp:
1397         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
1398         (WebKit::NetworkProcess::platformSetCacheModel):
1399         (WebKit::NetworkProcess::clearCacheForAllOrigins):
1400         * NetworkProcess/unix/NetworkProcessMainUnix.cpp:
1401         (WebKit::NetworkProcessMain):
1402         * WebProcess/Cookies/soup/WebCookieManagerSoup.cpp:
1403         (WebKit::WebCookieManager::setCookiePersistentStorage):
1404         * WebProcess/efl/WebProcessMainEfl.cpp:
1405         (WebKit::WebProcessMainEfl):
1406         * WebProcess/gtk/WebProcessMainGtk.cpp:
1407         (WebKit::WebProcessMainGtk):
1408         * WebProcess/soup/WebProcessSoup.cpp:
1409         (WebKit::WebProcess::platformSetCacheModel):
1410         (WebKit::WebProcess::platformClearResourceCaches):
1411         (WebKit::setSoupSessionAcceptLanguage):
1412         (WebKit::WebProcess::platformInitializeWebProcess):
1413         * WebProcess/soup/WebSoupRequestManager.cpp:
1414         (WebKit::WebSoupRequestManager::registerURIScheme):
1415
1416 2014-01-13  Zalan Bujtas  <zalan@apple.com>
1417
1418         Enable SUBPIXEL_LAYOUT on Mac
1419         <https://webkit.org/b/126283>
1420
1421         Reviewed by Simon Fraser.
1422
1423         * Configurations/FeatureDefines.xcconfig:
1424
1425 2014-01-12  Sergio Correia  <sergio.correia@openbossa.org>
1426
1427         [EFL][WK2] Make API tests work again
1428         https://bugs.webkit.org/show_bug.cgi?id=126769
1429
1430         Reviewed by Gyuyoung Kim.
1431
1432         The EFL and WK2 test binaries are currently being generated at *TestWebKitAPI/
1433         [E]WebKit2, respectively, and this causes problems because the logic to find
1434         where WebProcess is to look in the same directory of the running process and
1435         then proceed to use LIBEXECDIR (typically /usr/loca/bin).
1436
1437         This patch introduces a WEBKIT_EXEC_PATH environment variable, inspired in the
1438         Gtk port, which allows us to look for WebProcess initially in this directory,
1439         if it's defined.
1440
1441         * Shared/efl/ProcessExecutablePathEfl.cpp:
1442         (WebKit::findProcessPath): Change the logic to look initially in
1443         WEBKIT_EXEC_PATH, then proceed with the existing checks.
1444         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp:
1445         (EWK2UnitTest::EWK2UnitTestEnvironment::EWK2UnitTestEnvironment):
1446         Define WEBKIT_EXEC_PATH to be used by EWebKit2 tests.
1447
1448 2014-01-12  Darin Adler  <darin@apple.com>
1449
1450         Add deprecatedCharacters as a synonym for characters and convert most call sites
1451         https://bugs.webkit.org/show_bug.cgi?id=126858
1452
1453         Reviewed by Anders Carlsson.
1454
1455         * Shared/APIString.h:
1456         * UIProcess/WebPageProxy.cpp:
1457         (WebKit::WebPageProxy::checkTextOfParagraph):
1458         (WebKit::WebPageProxy::checkSpellingOfString):
1459         (WebKit::WebPageProxy::checkGrammarOfString):
1460         * WebProcess/WebPage/EncoderAdapter.cpp:
1461         (WebKit::EncoderAdapter::encodeString):
1462         Use deprecatedCharacters instead of characters.
1463
1464 2014-01-12  Darin Adler  <darin@apple.com>
1465
1466         Add type checking to isEqual methods
1467         https://bugs.webkit.org/show_bug.cgi?id=126862
1468
1469         Reviewed by Anders Carlsson.
1470
1471         * UIProcess/API/ios/WKInteractionView.mm:
1472         (-[WKTextRange isEqual:]): Added type checking for the argument. The old
1473         code asserted instead, and it's not clear what guarantees that assertion is
1474         true. Added a FIXME about the lack of a hash method. Added another FIXME
1475         about the fact that this method ignores much of the object state. Removed
1476         an unneeded extra fetch of the isRange property. Deleted some dead code.
1477         (-[WKTextPosition isEqual:]): Ditto.
1478
1479 2014-01-12  Anders Carlsson  <andersca@apple.com>
1480
1481         Remove the last remaining uses of AtomicallyInitializedStatic
1482         https://bugs.webkit.org/show_bug.cgi?id=126863
1483
1484         Reviewed by Darin Adler.
1485
1486         * Shared/mac/SecItemShim.cpp:
1487         (WebKit::responseMap):
1488
1489 2014-01-12  Dan Bernstein  <mitz@apple.com>
1490
1491         Added a reference to WebContentService/Info-OSX.plist to the project.
1492
1493         * WebKit2.xcodeproj/project.pbxproj:
1494
1495 2014-01-12  Dan Bernstein  <mitz@apple.com>
1496
1497         OS X build fix.
1498
1499         * WebKit2.xcodeproj/project.pbxproj:
1500         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist: Copied from WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist.
1501         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist: Removed.
1502
1503 2014-01-12  Andy Estes  <aestes@apple.com>
1504
1505         Build Fix: Objective-C GC should be unsupported in iOS WebKit2
1506
1507         * Configurations/Base.xcconfig:
1508
1509 2014-01-12  Andy Estes  <aestes@apple.com>
1510
1511         [iOS] Upstream WebKit2 xcconfig changes to fix the build
1512
1513         * Configurations/All-iOS.xcconfig: Added.
1514         * Configurations/Base.xcconfig:
1515         * Configurations/BaseLegacyProcess.xcconfig:
1516         * Configurations/BaseTarget.xcconfig:
1517         * Configurations/BaseXPCService.xcconfig:
1518         * Configurations/DebugRelease.xcconfig:
1519         * Configurations/WebContentService.xcconfig:
1520         * Configurations/iOS.xcconfig: Added.
1521
1522 2014-01-12  Carlos Garcia Campos  <cgarcia@igalia.com>
1523
1524         Unreviewed. Fix make distcheck.
1525
1526         * GNUmakefile.am: Add WebKit2InspectorGResourceBundle.xml to
1527         EXTRA_DIST.
1528         * GNUmakefile.list.am: Removed deleted files and add missing ones.
1529         * NetworkProcess/unix/NetworkProcessMainUnix.cpp: Move
1530         ProxyResolverSoup.h to EFL platform ifdef, because GTK port doesn't
1531         build the proxy resolver.
1532
1533 2014-01-12  Carlos Garcia Campos  <cgarcia@igalia.com>
1534
1535         [GTK] Fix return value of WebKitDownload::created-destination
1536         https://bugs.webkit.org/show_bug.cgi?id=126741
1537
1538         Reviewed by Martin Robinson.
1539
1540         WebKitDownload::created-destination signal should be void instead
1541         of gboolean. This doesn't break the API/ABI.
1542
1543         * UIProcess/API/gtk/WebKitDownload.cpp:
1544         (webkit_download_class_init):
1545         (webkitDownloadDestinationCreated):
1546
1547 2014-01-11  Yongjun Zhang  <yongjun_zhang@apple.com>
1548
1549         Support bool argument for encoding/decoding invocations.
1550         https://bugs.webkit.org/show_bug.cgi?id=126823
1551
1552         Reviewed by Sam Weinig.
1553
1554         For remote invocation method argument, current we support int, double and ObjC
1555         object, this patch add support for bool type too.
1556
1557         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
1558         (encodeInvocation):
1559         (decodeInvocationArguments):
1560
1561 2014-01-11  Alexey Proskuryakov  <ap@apple.com>
1562
1563         [Mac] [Windows] Stop scheduling network requests in WebCore
1564         https://bugs.webkit.org/show_bug.cgi?id=126789
1565         <rdar://problem/15114727>
1566
1567         Reviewed by Sam Weinig.
1568
1569         * NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm:
1570         (WebKit::NetworkResourceLoadScheduler::platformInitializeMaximumHTTPConnectionCountPerHost):
1571         We no longer need the trick with 7 connections, as synchronous requests always have
1572         the right of way.
1573
1574         * UIProcess/API/C/WKContext.cpp: Removed long obsolete functions.
1575
1576         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface):
1577         Updated for new WKSI function names.
1578
1579 2014-01-11  Simon Fraser  <simon.fraser@apple.com>
1580
1581         Unfork GraphicsContext::drawNativeImage for iOS
1582         https://bugs.webkit.org/show_bug.cgi?id=126824
1583
1584         Reviewed by Dean Jackson.
1585
1586         GraphicsContext::drawNativeImage had a different signature for iOS,
1587         which required #ifdefs at all the call sites. Unfork by passing the "scale"
1588         parameter everywhere (it's only used on iOS).
1589
1590         * Shared/API/c/cg/WKImageCG.cpp:
1591         (WKImageCreateFromCGImage):
1592
1593 2014-01-11  Sam Weinig  <sam@webkit.org>
1594
1595         Clean up iterator filter / iterator range code
1596         https://bugs.webkit.org/show_bug.cgi?id=126817
1597
1598         Reviewed by Anders Carlsson.
1599
1600         * Shared/APIArray.h:
1601         Update elementsOfType() to use combination of FilterIterator and TransformIterator
1602         (now that FilterIterator no longer has a transform predicate) and make use of the 
1603         makeFoo() helpers.
1604
1605 2014-01-11  Anders Carlsson  <andersca@apple.com>
1606
1607         Simplify Timer and DeferrableOneShotTimer using std::function
1608         https://bugs.webkit.org/show_bug.cgi?id=126816
1609
1610         Reviewed by Sam Weinig.
1611
1612         Add another unexported symbol.
1613
1614         * Configurations/WebKit2.xcconfig:
1615
1616 2014-01-11  Jinwoo Song  <jinwoo7.song@samsung.com>
1617
1618         [EFL][WK2] Use nullptr instead of 0 in EFL API layer
1619         https://bugs.webkit.org/show_bug.cgi?id=126806
1620
1621         Reviewed by Anders Carlsson.
1622
1623         * UIProcess/API/efl/EwkView.cpp:
1624         (EwkView::create):
1625         * UIProcess/API/efl/ewk_auth_request.cpp:
1626         (ewk_auth_request_suggested_username_get):
1627         (ewk_auth_request_realm_get):
1628         (ewk_auth_request_host_get):
1629         * UIProcess/API/efl/ewk_back_forward_list.cpp:
1630         (ewk_back_forward_list_current_item_get):
1631         (ewk_back_forward_list_previous_item_get):
1632         (ewk_back_forward_list_next_item_get):
1633         (ewk_back_forward_list_item_at_index_get):
1634         (ewk_back_forward_list_n_back_items_copy):
1635         (ewk_back_forward_list_n_forward_items_copy):
1636         * UIProcess/API/efl/ewk_back_forward_list_item.cpp:
1637         (ewk_back_forward_list_item_url_get):
1638         (ewk_back_forward_list_item_title_get):
1639         (ewk_back_forward_list_item_original_url_get):
1640         * UIProcess/API/efl/ewk_context.cpp:
1641         (ewk_context_cookie_manager_get):
1642         (ewk_context_database_manager_get):
1643         (ewk_context_favicon_database_get):
1644         (ewk_context_storage_manager_get):
1645         (ewk_context_new_with_injected_bundle_path):
1646         * UIProcess/API/efl/ewk_context_menu.cpp:
1647         (ewk_context_menu_items_get):
1648         * UIProcess/API/efl/ewk_context_menu_item.cpp:
1649         (ewk_context_menu_item_new_with_submenu):
1650         (ewk_context_menu_item_title_get):
1651         (ewk_context_menu_item_parent_menu_get):
1652         (ewk_context_menu_item_submenu_get):
1653         * UIProcess/API/efl/ewk_download_job.cpp:
1654         (ewk_download_job_request_get):
1655         (ewk_download_job_response_get):
1656         (ewk_download_job_destination_get):
1657         (ewk_download_job_suggested_filename_get):
1658         * UIProcess/API/efl/ewk_error.cpp:
1659         (ewk_error_url_get):
1660         (ewk_error_description_get):
1661         * UIProcess/API/efl/ewk_file_chooser_request.cpp:
1662         (ewk_file_chooser_request_accepted_mimetypes_get):
1663         * UIProcess/API/efl/ewk_form_submission_request.cpp:
1664         (ewk_form_submission_request_field_names_get):
1665         (ewk_form_submission_request_field_value_get):
1666         * UIProcess/API/efl/ewk_navigation_data.cpp:
1667         (ewk_navigation_data_title_get):
1668         (ewk_navigation_data_original_request_get):
1669         (ewk_navigation_data_url_get):
1670         * UIProcess/API/efl/ewk_navigation_policy_decision.cpp:
1671         (ewk_navigation_policy_frame_name_get):
1672         (ewk_navigation_policy_request_get):
1673         * UIProcess/API/efl/ewk_object.cpp:
1674         (ewk_object_ref):
1675         * UIProcess/API/efl/ewk_popup_menu.cpp:
1676         (ewk_popup_menu_items_get):
1677         * UIProcess/API/efl/ewk_popup_menu_item.cpp:
1678         (ewk_popup_menu_item_text_get):
1679         (ewk_popup_menu_item_tooltip_get):
1680         (ewk_popup_menu_item_accessibility_text_get):
1681         * UIProcess/API/efl/ewk_security_origin.cpp:
1682         (ewk_security_origin_host_get):
1683         (ewk_security_origin_protocol_get):
1684         * UIProcess/API/efl/ewk_settings.cpp:
1685         (ewk_settings_default_text_encoding_name_get):
1686         * UIProcess/API/efl/ewk_url_request.cpp:
1687         (ewk_url_request_url_get):
1688         (ewk_request_cookies_first_party_get):
1689         (ewk_url_request_http_method_get):
1690         * UIProcess/API/efl/ewk_url_response.cpp:
1691         (ewk_url_response_url_get):
1692         (ewk_url_response_mime_type_get):
1693         * UIProcess/API/efl/ewk_url_scheme_request.cpp:
1694         (ewk_url_scheme_request_scheme_get):
1695         (ewk_url_scheme_request_url_get):
1696         (ewk_url_scheme_request_path_get):
1697         * UIProcess/API/efl/ewk_view.cpp:
1698         (toEwkViewChecked):
1699         (EWKViewGetWKView):
1700         (ewk_view_smart_add):
1701         (ewk_view_add_with_context):
1702         (ewk_view_context_get):
1703         (ewk_view_page_group_get):
1704         (ewk_view_url_get):
1705         (ewk_view_favicon_get):
1706         (ewk_view_settings_get):
1707         (ewk_view_title_get):
1708         (ewk_view_theme_get):
1709         (ewk_view_back_forward_list_get):
1710         (ewk_view_custom_encoding_get):
1711         (ewk_view_user_agent_get):
1712
1713 2014-01-10  Anders Carlsson  <andersca@apple.com>
1714
1715         Tweak ProgressTrackerClient functions
1716         https://bugs.webkit.org/show_bug.cgi?id=126808
1717
1718         Reviewed by Sam Weinig.
1719
1720         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1721         (WebKit::WebFrameLoaderClient::progressStarted):
1722         (WebKit::WebFrameLoaderClient::progressEstimateChanged):
1723         (WebKit::WebFrameLoaderClient::progressFinished):
1724         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1725
1726 2014-01-10  Sam Weinig  <sam@webkit.org>
1727
1728         Convert HandleMessage.h to use variadic templates
1729         https://bugs.webkit.org/show_bug.cgi?id=126469
1730
1731         Reviewed by Anders Carlsson.
1732
1733         * Platform/IPC/HandleMessage.h:
1734         (IPC::callMemberFunctionImpl):
1735         (IPC::callMemberFunction):
1736         Replace massive copy and pasted code with variadic magic.
1737
1738 2014-01-10  Anders Carlsson  <andersca@apple.com>
1739
1740         Move progress tracking functions from FrameLoaderClient to a new ProgressTrackerClient
1741         https://bugs.webkit.org/show_bug.cgi?id=126801
1742
1743         Reviewed by Sam Weinig.
1744
1745         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1746         * WebProcess/WebPage/WebPage.cpp:
1747         (WebKit::WebPage::WebPage):
1748
1749 2014-01-10  Anders Carlsson  <andersca@apple.com>
1750
1751         Remove dead code
1752         https://bugs.webkit.org/show_bug.cgi?id=126782
1753
1754         Reviewed by Tim Horton.
1755
1756         * UIProcess/WebPageProxy.cpp:
1757         * UIProcess/WebPageProxy.h:
1758         * WebProcess/WebPage/WebPage.cpp:
1759         * WebProcess/WebPage/WebPage.h:
1760         * WebProcess/WebPage/WebPage.messages.in:
1761
1762 2014-01-10  Benjamin Poulain  <bpoulain@apple.com>
1763
1764         Remove the BlackBerry port from trunk
1765         https://bugs.webkit.org/show_bug.cgi?id=126715
1766
1767         Reviewed by Anders Carlsson.
1768
1769         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1770         (WebKit::WebChromeClient::setCursor):
1771
1772 2014-01-10  Benjamin Poulain  <bpoulain@apple.com>
1773
1774         Remove the BlackBerry port from trunk
1775         https://bugs.webkit.org/show_bug.cgi?id=126715
1776
1777         Reviewed by Anders Carlsson.
1778
1779         * Scripts/generate-forwarding-headers.pl:
1780
1781 2014-01-10  Carlos Garcia Campos  <cgarcia@igalia.com>
1782
1783         Implement NetworkResourceLoader::receivedCancellation
1784         https://bugs.webkit.org/show_bug.cgi?id=126129
1785
1786         Reviewed Alexey Proskuryakov.
1787
1788         Implement ResourceHandleClient::receivedCancellation() in the
1789         network process to cancel the load when cancellation is received
1790         from the authentication manager like the web process does.
1791
1792         * NetworkProcess/NetworkResourceLoader.cpp:
1793         (WebKit::NetworkResourceLoader::receivedCancellation): Cancel the load.
1794         * NetworkProcess/NetworkResourceLoader.h:
1795
1796 2014-01-09  Jinwoo Song  <jinwoo7.song@samsung.com>
1797
1798         [EFL][WK2] Add APIs for setting and getting the default text encoding name
1799         https://bugs.webkit.org/show_bug.cgi?id=126736
1800
1801         Reviewed by Gyuyoung Kim.
1802
1803         Add APIs to set and get the default text encoding name.
1804
1805         * UIProcess/API/efl/ewk_settings.cpp:
1806         (ewk_settings_default_text_encoding_name_get):
1807         (ewk_settings_default_text_encoding_name_set):
1808         * UIProcess/API/efl/ewk_settings.h:
1809         * UIProcess/API/efl/tests/test_ewk2_settings.cpp:
1810         (TEST_F):
1811
1812 2014-01-09  Simon Fraser  <simon.fraser@apple.com>
1813
1814         Enable async scrolling for iOS
1815         https://bugs.webkit.org/show_bug.cgi?id=126730
1816
1817         Reviewed by Tim Horton.
1818         
1819         Turn on ENABLE_ASYNC_SCROLLING for iOS.
1820         
1821         On iOS, create ScrollingTreeScrollingNodeIOS nodes.
1822
1823         * UIProcess/Scrolling/RemoteScrollingTree.cpp:
1824         (WebKit::RemoteScrollingTree::createNode):
1825         * UIProcess/Scrolling/RemoteScrollingTree.h:
1826
1827 2014-01-06  Gavin Barraclough  <barraclough@apple.com>
1828
1829         Change Page, FocusController to use ViewState
1830         https://bugs.webkit.org/show_bug.cgi?id=126533
1831
1832         Reviewed by Tim Horton.
1833
1834         These classes currently maintain a set of separate fields to represent the view state;
1835         combine these into a single field, and allow WebPage to send the combined update rather
1836         than individual changes.
1837
1838         Maintain existing interface for WebKit1 clients.
1839
1840         * WebProcess/WebPage/WebPage.cpp:
1841         (WebKit::WebPage::WebPage):
1842             - Combined separate calls to Page::setViewState.
1843         (WebKit::WebPage::updateIsInWindow):
1844             - Simplied from setIsInWindow.
1845         (WebKit::WebPage::setViewState):
1846             - Combined separate calls to Page::setViewState.
1847         * WebProcess/WebPage/WebPage.h:
1848             - Declare updateIsInWindow.
1849
1850 2014-01-09  Tim Horton  <timothy_horton@apple.com>
1851
1852         Upstream iOS changes after r161530
1853         https://bugs.webkit.org/show_bug.cgi?id=126728
1854
1855         Reviewed by Dean Jackson.
1856
1857         * UIProcess/API/ios/WKContentView.mm:
1858         (-[WKContentView setViewportSize:]):
1859         (-[WKContentView didFinishScrollTo:]):
1860         (-[WKContentView didScrollTo:]):
1861         Adopt the new approach.
1862
1863 2014-01-09  Brian Burg  <bburg@apple.com>
1864
1865         REGRESSION (r160152): Selection drag snapshot doesn't appear or has the wrong content on Retina
1866         https://bugs.webkit.org/show_bug.cgi?id=125375
1867
1868         Reviewed by Darin Adler.
1869
1870         Remove scaling from WebDragClient because it is now selectively
1871         performed by WebCore according to the drag image source.
1872
1873         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
1874         (WebKit::WebDragClient::startDrag): Don't scale the provided drag image.
1875
1876 2014-01-09  Tim Horton  <timothy_horton@apple.com>
1877
1878         WebKit2 View Gestures: Support plugins that take over the page scale gesture
1879         https://bugs.webkit.org/show_bug.cgi?id=126399
1880         <rdar://problem/15738928>
1881
1882         Reviewed by Sam Weinig.
1883
1884         Teach ViewGestureController how to handle WebFrame::handlesPageScaleGesture=true,
1885         which is used so that PDFPlugin can deal with magnification itself.
1886
1887         * UIProcess/mac/ViewGestureController.cpp:
1888         (WebKit::ViewGestureController::ViewGestureController):
1889         (WebKit::ViewGestureController::didCollectGeometryForMagnificationGesture):
1890         (WebKit::ViewGestureController::handleMagnificationGesture):
1891         (WebKit::ViewGestureController::endMagnificationGesture):
1892         (WebKit::ViewGestureController::didCollectGeometryForSmartMagnificationGesture):
1893         If the WebFrame is going to handle the page scale gesture itself (which currently
1894         simply means that it is a main-frame PDFPlugin), send the magnification information
1895         straight through to it. Also, don't provide smart-zoom in this case, since there
1896         is currently no way to collect geometry information from the plugin.
1897
1898         * UIProcess/mac/ViewGestureController.h:
1899         * UIProcess/mac/ViewGestureController.messages.in:
1900         * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
1901         (WebKit::ViewGestureGeometryCollector::collectGeometryForMagnificationGesture):
1902         (WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
1903         Retrieve WebFrame::handlesPageScaleGesture and return it to the UI process.
1904
1905 2014-01-09  Dan Bernstein  <mitz@apple.com>
1906
1907         [Cocoa] Promote WKBackForwardList{,Item}.h to public
1908         https://bugs.webkit.org/show_bug.cgi?id=126707
1909
1910         Reviewed by Sam Weinig.
1911
1912         * UIProcess/API/Cocoa/WKBackForwardList.h: Stopped including the C API header.
1913         * UIProcess/API/Cocoa/WKBackForwardListItem.h: Ditto.
1914         * WebKit2.xcodeproj/project.pbxproj: Made the headers public.
1915
1916 2014-01-09  Zan Dobersek  <zdobersek@igalia.com>
1917
1918         Revert back to using the -n option when producing symbolic links to the GTK-specific
1919         API directories under Source/WebKit2/. Removing the option in r161497 resulted in
1920         recursive links being created under those directories since the links were dereferenced.
1921
1922         To actually ensure that the link is created anew, remove it so it is reconstructed.
1923
1924         Rubber-stamped by Carlos Garcia Campos.
1925
1926         * GNUmakefile.am:
1927
1928 2014-01-09  Carlos Garcia Campos  <cgarcia@igalia.com>
1929
1930         Crash when starting a download before the network process has been launched
1931         https://bugs.webkit.org/show_bug.cgi?id=126258
1932
1933         Reviewed by Anders Carlsson.
1934
1935         We need to ensure there's a network process running before
1936         starting a new download like we do when using the web process.
1937
1938         * UIProcess/WebContext.cpp:
1939         (WebKit::WebContext::download): Use ChildProcessProxy::send()
1940         instead of using the connection to make sure messages are queued
1941         if the process is still launching.
1942         (WebKit::WebContext::createDownloadProxy): Call
1943         ensureNetworkProcess() before creating the download proxy.
1944
1945 2014-01-09  Carlos Garcia Campos  <cgarcia@igalia.com>
1946
1947         [SOUP] Partial file left on disk after a download fails or is cancelled in WebKit2
1948         https://bugs.webkit.org/show_bug.cgi?id=126686
1949
1950         Reviewed by Martin Robinson.
1951
1952         We are currently writing the downloads directly into the
1953         destination, and when a download fails or is cancelled after the
1954         destination has been decided, the partial file is left on the
1955         disk. Deleting the final file is not safe because there might be a
1956         race condition, so we can use an intermediate file like other
1957         browsers do, a file in the same directory than the target
1958         destination but with .wkdownload suffix, that is removed when the
1959         download fails or is cancelled. If the download finishes
1960         successfully the intermediate file is renamed to the final
1961         destination.
1962
1963         * Shared/Downloads/soup/DownloadSoup.cpp:
1964         (WebKit::DownloadClient::deleteIntermediateFileInNeeded): Delete
1965         the intermdiate file if it's been created already.
1966         (WebKit::DownloadClient::downloadFailed): Call deleteIntermediateFileInNeeded.
1967         (WebKit::DownloadClient::didReceiveResponse): Do not create a
1968         SoupMessage for the given ResourceResponse that is not used, cache
1969         the ResourceResponse instead. Create the intermediate file and use
1970         it instead of the final destination.
1971         (WebKit::DownloadClient::didReceiveData): Use the cached
1972         ResourceResponse directly.
1973         (WebKit::DownloadClient::didFinishLoading): Rename the
1974         intermediate file to the final destination and write the metadata
1975         in the final target destination.
1976         (WebKit::DownloadClient::cancel): Handle the download cancellation
1977         here, removing the intermediate file is needed and cancelling the
1978         ResourceHandle and the download.
1979         (WebKit::DownloadClient::handleResponseLater):
1980         (WebKit::Download::cancel): Let the client handle the cancellation.
1981
1982 2014-01-08  Jinwoo Song  <jinwoo7.song@samsung.com>
1983
1984         WebKit2 EFL build fix after r161530
1985         https://bugs.webkit.org/show_bug.cgi?id=126678
1986
1987         Reviewed by Tim Horton.
1988
1989         Add PLATFORM(MAC) guards around setExposedRect() and exposedRect()
1990         in DrawingArea and WebFrameLoaderClient.
1991
1992         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1993         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
1994         * WebProcess/WebPage/DrawingArea.h:
1995
1996 2014-01-08  Martin Hock  <mhock@apple.com>
1997
1998         Stub for Session API
1999         https://bugs.webkit.org/show_bug.cgi?id=126626
2000
2001         Reviewed by Sam Weinig.
2002
2003         * Shared/API/c/WKBase.h:
2004         * Shared/API/c/WKSharedAPICast.h:
2005         * Shared/APIObject.h:
2006         * UIProcess/API/C/WKSessionRef.cpp: Added.
2007         (WKSessionGetTypeID):
2008         (WKSessionGetEphemeral):
2009         * UIProcess/API/C/WKSessionRef.h: Added.
2010         * UIProcess/API/Cocoa/WKSession.h: Added.
2011         * UIProcess/API/Cocoa/WKSession.mm: Added.
2012         (-[WKSession dealloc]):
2013         (-[WKSession ephemeral]):
2014         (-[WKSession API::]):
2015         * UIProcess/API/Cocoa/WKSessionInternal.h: Added.
2016         (WebKit::wrapper):
2017         * UIProcess/APISession.cpp: Added.
2018         (API::Session::Session):
2019         (API::Session::create):
2020         (API::Session::isEphemeral):
2021         (API::Session::~Session):
2022         * UIProcess/APISession.h: Added.
2023         * WebKit2.xcodeproj/project.pbxproj:
2024
2025 2014-01-08  Claudio Saavedra  <csaavedra@igalia.com>
2026
2027         [GTK] Add xdg.origin.url extended attribute to downloads
2028         https://bugs.webkit.org/show_bug.cgi?id=126638
2029
2030         Reviewed by Carlos Garcia Campos.
2031
2032         This is proposed by fdo in
2033         http://www.freedesktop.org/wiki/CommonExtendedAttributes/
2034
2035         * Shared/Downloads/soup/DownloadSoup.cpp:
2036         (WebKit::DownloadClient::didReceiveResponse):
2037
2038 2014-01-08  Simon Fraser  <simon.fraser@apple.com>
2039
2040         Make WK2 build when ENABLE(ASYNC_SCROLLING) is not defined
2041         https://bugs.webkit.org/show_bug.cgi?id=126675
2042
2043         Reviewed by Tim Horton.
2044         
2045         We need a stub RemoteScrollingCoordinatorTransaction outside
2046         the #ifdef so that RemoteLayerTreeDrawingAreaProxy messages
2047         work.
2048
2049         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
2050         (WebKit::RemoteScrollingCoordinatorTransaction::encode):
2051         (WebKit::RemoteScrollingCoordinatorTransaction::decode):
2052         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.h:
2053         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2054         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
2055         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2056         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
2057
2058 2014-01-08  Tim Horton  <timothy_horton@apple.com>
2059
2060         TileController can fail to receive exposedRect from the drawing area if set at the wrong time
2061         https://bugs.webkit.org/show_bug.cgi?id=126536
2062
2063         Reviewed by Simon Fraser.
2064
2065         * Configurations/WebKit2.xcconfig:
2066         * UIProcess/API/mac/WKView.mm:
2067         (-[WKView _updateViewExposedRect]):
2068         * UIProcess/DrawingAreaProxy.cpp:
2069         (WebKit::DrawingAreaProxy::DrawingAreaProxy):
2070         (WebKit::DrawingAreaProxy::setExposedRect):
2071         (WebKit::DrawingAreaProxy::exposedRectChangedTimerFired):
2072         * UIProcess/DrawingAreaProxy.h:
2073         (WebKit::DrawingAreaProxy::exposedRect):
2074         * UIProcess/WebPageProxy.cpp:
2075         (WebKit::WebPageProxy::WebPageProxy):
2076         (WebKit::WebPageProxy::close):
2077         * UIProcess/WebPageProxy.h:
2078         Move exposedRect stuff from WebPageProxy to DrawingAreaProxy.
2079
2080         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2081         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
2082         Push the exposedRect down into WebCore.
2083
2084         * WebProcess/WebPage/DrawingArea.h:
2085         * WebProcess/WebPage/DrawingArea.messages.in:
2086         * WebProcess/WebPage/WebPage.cpp:
2087         * WebProcess/WebPage/WebPage.h:
2088         * WebProcess/WebPage/WebPage.messages.in:
2089         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2090         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2091         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
2092         (WebKit::RemoteLayerTreeDrawingArea::updateScrolledExposedRect):
2093         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2094         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2095         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
2096         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
2097         (WebKit::TiledCoreAnimationDrawingArea::updateScrolledExposedRect):
2098         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
2099         (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
2100         (WebKit::TiledCoreAnimationDrawingArea::didCommitChangesForLayer):
2101         Get rid of "clipsToExposedRect", we just use infinite-ness of the rect
2102         to indicate that now.
2103         Don't scroll an infinite rect; it won't work.
2104
2105 2014-01-08  Simon Fraser  <simon.fraser@apple.com>
2106
2107         Add ENABLE(ASYNC_SCROLLING) guards around WK2 scrolling files
2108         https://bugs.webkit.org/show_bug.cgi?id=126672
2109
2110         Reviewed by Tim Horton.
2111         
2112         Protected WK2 scrolling files with ENABLE(ASYNC_SCROLLING) guards.
2113
2114         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
2115         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.h:
2116         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
2117         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
2118         * UIProcess/Scrolling/RemoteScrollingTree.cpp:
2119         * UIProcess/Scrolling/RemoteScrollingTree.h:
2120         * WebProcess/Scrolling/RemoteScrollingCoordinator.h:
2121         * WebProcess/Scrolling/RemoteScrollingCoordinator.messages.in:
2122         * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
2123
2124 2014-01-08  Ryuan Choi  <ryuan.choi@samsung.com>
2125
2126         [EFL][WK2] Add API to execute js script
2127         https://bugs.webkit.org/show_bug.cgi?id=101904
2128
2129         Reviewed by Gyuyoung Kim.
2130
2131         Add ewk_view_script_execute() which provides a way to execute user
2132         script.
2133
2134         * UIProcess/API/efl/ewk_context.cpp:
2135         Added JS Global Contexta which is required to deserialize to the script
2136         value from the callback.
2137         (EwkContext::EwkContext):
2138         (EwkContext::~EwkContext):
2139         (EwkContext::jsGlobalContext):
2140         * UIProcess/API/efl/ewk_context_private.h:
2141         * UIProcess/API/efl/ewk_view.cpp:
2142         (Ewk_View_Script_Execute_Callback_Context::Ewk_View_Script_Execute_Callback_Context):
2143         (runJavaScriptCallback):
2144         (ewk_view_script_execute):
2145         * UIProcess/API/efl/ewk_view.h:
2146         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2147         Added unit test for ewk_view_script_execute.
2148         (scriptExecuteCallback):
2149         (TEST_F):
2150
2151 2014-01-08  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2152
2153         [EFL] Move efl API test binaries to TestWebKitAPI/EWebKit|EWebKit2
2154         https://bugs.webkit.org/show_bug.cgi?id=126615
2155
2156         Reviewed by Martin Robinson.
2157
2158         Now EFL API test binaries created in *bin* directory with other executables.
2159         It would be good to move them to their folder. This patch moves them to
2160         *TestWebKitAPI/EWebKit|EWebKit2* directories.
2161
2162         * PlatformEfl.cmake:
2163
2164 2014-01-08  Anders Carlsson  <andersca@apple.com>
2165
2166         Add WTF::StringView and use it for grammar checking
2167         https://bugs.webkit.org/show_bug.cgi?id=126644
2168
2169         Reviewed by Antti Koivisto.
2170
2171         Use a StringView and remove a FIXME.
2172
2173         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2174         (WebKit::WebEditorClient::checkTextOfParagraph):
2175         * WebProcess/WebCoreSupport/WebEditorClient.h:
2176
2177 2014-01-08  Zan Dobersek  <zdobersek@igalia.com>
2178
2179         [Automake] Scripts for generated build targets do not necessarily produce their output
2180         https://bugs.webkit.org/show_bug.cgi?id=126378
2181
2182         Reviewed by Carlos Garcia Campos.
2183
2184         * GNUmakefile.am: Don't pass the -n option to the ln command that links the build's include
2185         directories to actual source directories. This doesn't replace the original symbolic link,
2186         which can lead to the actual link being older than its dependencies and subsequent constant
2187         relinking at every build.
2188
2189 2014-01-07  Eric Carlson  <eric.carlson@apple.com>
2190
2191         Teach MediaSessionManager to manage interruptions
2192         https://bugs.webkit.org/show_bug.cgi?id=126530
2193
2194         Reviewed by Sam Weinig.
2195
2196         * CMakeLists.txt: Add ${WEBCORE_DIR}/platform/animation to WebCore include directories.
2197
2198 2014-01-07  Jinwoo Song  <jinwoo7.song@samsung.com>
2199
2200         [EFL][WK2] Fix failing ewk_view_page_contents_get() API test
2201         https://bugs.webkit.org/show_bug.cgi?id=126609
2202
2203         Reviewed by Gyuyoung Kim.
2204
2205         Compare the amount of bytes in the expected result file with
2206         the size of callback data from the API since the 'Date' field
2207         and the boundaries will be different on each case.
2208         Refered the test case of GTK port.
2209
2210         * UIProcess/API/efl/tests/resources/resultMHTML.mht: Added.
2211         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2212         (EWK2ViewTest::PageContentsAsMHTMLCallback):
2213
2214 2014-01-07  Seokju Kwon  <seokju@webkit.org>
2215
2216         Web Inspector: Remove leftover 'device metrics' code
2217         https://bugs.webkit.org/show_bug.cgi?id=126607
2218
2219         Reviewed by Joseph Pecoraro.
2220
2221         * mac/WebKit2.order: Update after removing InspectorClient::overrideDeviceMetrics().
2222
2223 2014-01-07  Simon Fraser  <simon.fraser@apple.com>
2224
2225         Fix the build. The WebKit2 project copied all of WebKit2/Scripts/webkit2 into WebKit2.framework/PrivateHeaders,
2226         but that's bad because there are test result files in there now. Fix by having the project copy specific
2227         .py files into rivateHeaders/webkit2
2228
2229         * WebKit2.xcodeproj/project.pbxproj:
2230
2231 2014-01-07  Simon Fraser  <simon.fraser@apple.com>
2232
2233         Make it possible for MessageReceivers to pass messages to their superclass, and use it for RemoteLayerTreeDrawingAreaProxy
2234         https://bugs.webkit.org/show_bug.cgi?id=126558
2235
2236         Reviewed by Anders Carlsson.
2237         
2238         In a message.in file it's now possible to say:
2239         
2240         messages -> Subclass : Superclass { ... } and the generated code will
2241         call Superclass::didReceiveMessage().
2242         
2243         Use this to have RemoteLayerTreeDrawingAreaProxy pass messages up to
2244         DrawingAreaProxy.
2245
2246         * Scripts/webkit2/messages.py:
2247         (generate_message_handler):
2248         * Scripts/webkit2/model.py:
2249         (MessageReceiver.__init__):
2250         * Scripts/webkit2/parser.py:
2251         (parse):
2252         * UIProcess/DrawingAreaProxy.h:
2253         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.messages.in:
2254
2255 2014-01-07  Simon Fraser  <simon.fraser@apple.com>
2256
2257         Add message-generation test for non-legacy message receiver
2258         https://bugs.webkit.org/show_bug.cgi?id=126603
2259
2260         Reviewed by Anders Carlsson.
2261         
2262         Add expected output files for a non-legacy message receiver, and add
2263         testing for same.
2264
2265         * Scripts/webkit2/LegacyMessageReceiver-expected.cpp: Copied from Source/WebKit2/Scripts/webkit2/MessageReceiver-expected.cpp.
2266         * Scripts/webkit2/LegacyMessages-expected.h: Added.
2267         * Scripts/webkit2/MessageReceiver-expected.cpp:
2268         (WebKit::WebPage::didReceiveMessage):
2269         (WebKit::WebPage::didReceiveSyncMessage):
2270         * Scripts/webkit2/messages_unittest.py:
2271         (MessagesTest.setUp):
2272         (ParsingTest.test_receiver):
2273         (HeaderTest.test_header):
2274         (ReceiverImplementationTest.test_receiver_implementation):
2275         * Scripts/webkit2/test-legacy-messages.in: Copied from Source/WebKit2/Scripts/webkit2/test-messages.in.
2276         * Scripts/webkit2/test-messages.in:
2277
2278 2014-01-07  Simon Fraser  <simon.fraser@apple.com>
2279
2280         Move expected results out of messages_unittest.py into separate files
2281         https://bugs.webkit.org/show_bug.cgi?id=126602
2282
2283         Reviewed by Anders Carlsson.
2284         
2285         Uninline the test input and output from messages_unittest.py to make
2286         it easier to add more tests.
2287
2288         * Scripts/webkit2/MessageReceiver-expected.cpp: Added.
2289         (WebKit::WebPage::didReceiveWebPageMessage):
2290         (WebKit::WebPage::didReceiveSyncWebPageMessage):
2291         * Scripts/webkit2/Messages-expected.h: Added.
2292         * Scripts/webkit2/messages_unittest.py:
2293         (ParsingTest.test_receiver):
2294         * Scripts/webkit2/test-messages.in: Added.
2295
2296 2014-01-07  Commit Queue  <commit-queue@webkit.org>
2297
2298         Unreviewed, rolling out r161447.
2299         http://trac.webkit.org/changeset/161447
2300         https://bugs.webkit.org/show_bug.cgi?id=126592
2301
2302         needs some more work (Requested by thorton on #webkit).
2303
2304         * UIProcess/API/mac/WKView.mm:
2305         (-[WKView _updateViewExposedRect]):
2306         * UIProcess/DrawingAreaProxy.cpp:
2307         (WebKit::DrawingAreaProxy::DrawingAreaProxy):
2308         * UIProcess/DrawingAreaProxy.h:
2309         * UIProcess/WebPageProxy.cpp:
2310         (WebKit::WebPageProxy::WebPageProxy):
2311         (WebKit::WebPageProxy::close):
2312         (WebKit::WebPageProxy::viewExposedRectChanged):
2313         (WebKit::WebPageProxy::exposedRectChangedTimerFired):
2314         * UIProcess/WebPageProxy.h:
2315         (WebKit::WebPageProxy::viewExposedRect):
2316         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2317         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
2318         * WebProcess/WebPage/DrawingArea.h:
2319         (WebKit::DrawingArea::setExposedRect):
2320         (WebKit::DrawingArea::setClipsToExposedRect):
2321         * WebProcess/WebPage/DrawingArea.messages.in:
2322         * WebProcess/WebPage/WebPage.cpp:
2323         (WebKit::WebPage::viewExposedRectChanged):
2324         * WebProcess/WebPage/WebPage.h:
2325         * WebProcess/WebPage/WebPage.messages.in:
2326         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2327         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2328         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
2329         (WebKit::RemoteLayerTreeDrawingArea::setClipsToExposedRect):
2330         (WebKit::RemoteLayerTreeDrawingArea::updateScrolledExposedRect):
2331         (WebKit::RemoteLayerTreeDrawingArea::updateMainFrameClipsToExposedRect):
2332         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2333         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2334         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
2335         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
2336         (WebKit::TiledCoreAnimationDrawingArea::setClipsToExposedRect):
2337         (WebKit::TiledCoreAnimationDrawingArea::updateScrolledExposedRect):
2338         (WebKit::TiledCoreAnimationDrawingArea::updateMainFrameClipsToExposedRect):
2339         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
2340         (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
2341         (WebKit::TiledCoreAnimationDrawingArea::didCommitChangesForLayer):
2342
2343 2014-01-07  Tim Horton  <timothy_horton@apple.com>
2344
2345         TileController can fail to receive exposedRect from the drawing area if set at the wrong time
2346         https://bugs.webkit.org/show_bug.cgi?id=126536
2347
2348         Reviewed by Anders Carlsson.
2349
2350         * UIProcess/API/mac/WKView.mm:
2351         (-[WKView _updateViewExposedRect]):
2352         * UIProcess/DrawingAreaProxy.cpp:
2353         (WebKit::DrawingAreaProxy::DrawingAreaProxy):
2354         (WebKit::DrawingAreaProxy::setExposedRect):
2355         (WebKit::DrawingAreaProxy::exposedRectChangedTimerFired):
2356         * UIProcess/DrawingAreaProxy.h:
2357         (WebKit::DrawingAreaProxy::exposedRect):
2358         * UIProcess/WebPageProxy.cpp:
2359         (WebKit::WebPageProxy::WebPageProxy):
2360         (WebKit::WebPageProxy::close):
2361         * UIProcess/WebPageProxy.h:
2362         Move exposedRect stuff from WebPageProxy to DrawingAreaProxy.
2363
2364         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2365         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
2366         Push the exposedRect down into WebCore.
2367
2368         * WebProcess/WebPage/DrawingArea.h:
2369         * WebProcess/WebPage/DrawingArea.messages.in:
2370         * WebProcess/WebPage/WebPage.cpp:
2371         * WebProcess/WebPage/WebPage.h:
2372         * WebProcess/WebPage/WebPage.messages.in:
2373         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2374         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2375         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
2376         (WebKit::RemoteLayerTreeDrawingArea::updateScrolledExposedRect):
2377         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2378         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2379         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
2380         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
2381         (WebKit::TiledCoreAnimationDrawingArea::updateScrolledExposedRect):
2382         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
2383         (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
2384         (WebKit::TiledCoreAnimationDrawingArea::didCommitChangesForLayer):
2385         Get rid of "clipsToExposedRect", we just use infinite-ness of the rect
2386         to indicate that now.
2387         Don't scroll an infinite rect; it won't work.
2388
2389 2014-01-07  Carlos Garcia Campos  <cgarcia@igalia.com>
2390
2391         Crash when trying to register a custom scheme before network process has been launched
2392         https://bugs.webkit.org/show_bug.cgi?id=126385
2393
2394         Reviewed by Anders Carlsson.
2395
2396         WebContext::registerSchemeForCustomProtocol() uses
2397         sendToNetworkingProcess() to send the message to the appropriate
2398         networking process. In the case of using web process,
2399         sendToNetworkingProcess() first checks if there's already a web
2400         process, doing nothing otherwise, but when using the network
2401         process it assumes there's already a network process. In both
2402         cases it's safe to do nothing, because the schemes will be passed
2403         as creation parameters to the process when launched.
2404
2405         * UIProcess/WebContext.h:
2406         (WebKit::WebContext::sendToNetworkingProcess):
2407
2408 2014-01-07  Jinwoo Song  <jinwoo7.song@samsung.com>
2409
2410         WebKit2 EFL build fix after r161387
2411         https://bugs.webkit.org/show_bug.cgi?id=126566
2412
2413         Reviewed by Andreas Kling.
2414
2415         Add missing ASYNC_SCROLLING macro.
2416
2417         * UIProcess/WebPageProxy.h:
2418         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2419         * WebProcess/WebCoreSupport/WebChromeClient.h:
2420         * WebProcess/WebPage/WebPage.cpp:
2421         * WebProcess/WebPage/WebPage.h:
2422
2423 2014-01-06  Simon Fraser  <simon.fraser@apple.com>
2424
2425         Hook up the RemoteScrollingCoordinator
2426         https://bugs.webkit.org/show_bug.cgi?id=126547
2427
2428         Reviewed by Tim Horton.
2429         
2430         Hook up the RemoteScrollingCoordinator in WebKit2.
2431         
2432         When the RemoteLayerTreeDrawingArea is in use, WebPageProxy creates
2433         a RemoteScrollingCoordinator, and hands it mouseWheel events. It then
2434         scrolls via a RemoteScrollingTree constructed from state tree commits from the
2435         WebProcess.
2436         
2437         Scrolling tree commits happen via a transaction received by RemoteLayerTreeDrawingAreaProxy,
2438         atomically with layer tree transactions.
2439
2440         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
2441         (WebKit::RemoteScrollingCoordinatorTransaction::encode): Fix encoding for some
2442         cases seen in WebKitTestRunner where a page has no ScrollingCoordinator.
2443         * UIProcess/WebPageProxy.cpp:
2444         (WebKit::WebPageProxy::initializeWebPage): Create the RemoteScrollingCoordinatorProxy
2445         when using a remote layer tree drawing area.
2446         (WebKit::WebPageProxy::handleWheelEvent): Pass to the scrolling coordinator.
2447         * UIProcess/WebPageProxy.h:
2448         (WebKit::WebPageProxy::scrollingCoordinatorProxy):
2449         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h: Include the RemoteScrollingCoordinatorTransaction.
2450         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.messages.in:
2451         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2452         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
2453         * UIProcess/mac/RemoteLayerTreeHost.mm:
2454         (WebKit::RemoteLayerTreeHost::getLayer): It's valid to get a 0 layerID (e.g. when
2455         a layer disappears) so handle this case.
2456         * WebKit2.xcodeproj/project.pbxproj:
2457         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2458         (WebKit::WebChromeClient::createScrollingCoordinator): Override to create the
2459         RemoteScrollingCoordinator in the WebProcess.
2460         * WebProcess/WebCoreSupport/WebChromeClient.h:
2461         * WebProcess/WebPage/WebPage.cpp:
2462         (WebKit::WebPage::scrollingCoordinator): Not inline to avoid polluting the
2463         header with #includes.
2464         * WebProcess/WebPage/WebPage.h:
2465         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h: Say that we want a ScrollingCoordinator.
2466         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2467         (WebKit::RemoteLayerTreeDrawingArea::flushLayers): Add the scrollingTransaction to the
2468         message.
2469
2470 2014-01-06  Jaehun Lim  <ljaehun.lim@samsung.com>
2471
2472         Use hasEnabledVerticalScrollbar instead of hasEnabledHorizontalScrollbar.
2473         https://bugs.webkit.org/show_bug.cgi?id=126546
2474
2475         Reviewed by Simon Fraser.
2476
2477         hasEnabledHorizontalScrollbar is used twice.
2478
2479         * Shared/WebCoreArgumentCoders.cpp:
2480         (IPC::ArgumentCoder<WebCore::ScrollableAreaParameters>::encode):
2481
2482 2014-01-06  Simon Fraser  <simon.fraser@apple.com>
2483
2484         Another build fix.
2485         
2486         Need to look in the WebProcess/Scrolling directory for .messages.in files.
2487
2488         * DerivedSources.make:
2489
2490 2014-01-06  Simon Fraser  <simon.fraser@apple.com>
2491
2492         Fix the build.
2493         
2494         Need to add RemoteScrollingCoordinator to MESSAGE_RECEIVERS so that
2495         RemoteScrollingCoordinatorMessages.h gets generated.
2496
2497         * DerivedSources.make:
2498
2499 2014-01-06  Simon Fraser  <simon.fraser@apple.com>
2500
2501         Rename DrawingArea::supportsThreadedScrolling() to supportsAsyncScrolling()
2502         https://bugs.webkit.org/show_bug.cgi?id=126529
2503
2504         Reviewed by Tim Horton.
2505         
2506         Change function name from using "threaded" to "async" terminology.
2507
2508         * WebProcess/WebPage/DrawingArea.h:
2509         (WebKit::DrawingArea::supportsAsyncScrolling):
2510         * WebProcess/WebPage/WebPage.cpp:
2511         (WebKit::WebPage::WebPage):
2512         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2513
2514 2014-01-06  Simon Fraser  <simon.fraser@apple.com>
2515
2516         Add new files for UI-side scrolling
2517         https://bugs.webkit.org/show_bug.cgi?id=126532
2518
2519         Reviewed by Anders Carlson.
2520         
2521         Add RemoteScrollingCoordinator, RemoteScrollingCoordinatorProxy,
2522         RemoteScrollingCoordinatorTransaction, RemoteScrollingTree. 
2523         
2524         These allow the scrolling tree to be used in the UI process.
2525         RemoteScrollingCoordinator builds a ScrollingStateTree, which is
2526         encoded by RemoteScrollingCoordinatorTransaction. Decoding the
2527         transaction recreates that ScrollingStateTree in the UI process,
2528         and RemoteScrollingCoordinatorProxy "commits" that to update
2529         the RemoteScrollingTree.
2530         
2531         New classes are not hooked up to anything yet.
2532
2533         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp: Added.
2534         (ArgumentCoder<ScrollingStateNode>::encode):
2535         (ArgumentCoder<ScrollingStateNode>::decode):
2536         (ArgumentCoder<ScrollingStateScrollingNode>::encode):
2537         (ArgumentCoder<ScrollingStateScrollingNode>::decode):
2538         (ArgumentCoder<ScrollingStateFixedNode>::encode):
2539         (ArgumentCoder<ScrollingStateFixedNode>::decode):
2540         (ArgumentCoder<ScrollingStateStickyNode>::encode):
2541         (ArgumentCoder<ScrollingStateStickyNode>::decode):
2542         (WebKit::encodeNodeAndDescendants):
2543         (WebKit::RemoteScrollingCoordinatorTransaction::encode):
2544         (WebKit::RemoteScrollingCoordinatorTransaction::decode):
2545         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.h: Added.
2546         (WebKit::RemoteScrollingCoordinatorTransaction::setStateTreeToEncode):
2547         (WebKit::RemoteScrollingCoordinatorTransaction::scrollingStateTree):
2548         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp: Added.
2549         (WebKit::RemoteScrollingCoordinatorProxy::RemoteScrollingCoordinatorProxy):
2550         (WebKit::RemoteScrollingCoordinatorProxy::~RemoteScrollingCoordinatorProxy):
2551         (WebKit::RemoteScrollingCoordinatorProxy::layerTreeHost):
2552         (WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree):
2553         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
2554         (WebKit::RemoteScrollingCoordinatorProxy::handleWheelEvent):
2555         (WebKit::RemoteScrollingCoordinatorProxy::scrollPositionChanged):
2556         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h: Added.
2557         * UIProcess/Scrolling/RemoteScrollingTree.cpp: Added.
2558         (WebKit::RemoteScrollingTree::create):
2559         (WebKit::RemoteScrollingTree::RemoteScrollingTree):
2560         (WebKit::RemoteScrollingTree::~RemoteScrollingTree):
2561         (WebKit::RemoteScrollingTree::tryToHandleWheelEvent):
2562         (WebKit::RemoteScrollingTree::handleWheelEventPhase):
2563         (WebKit::RemoteScrollingTree::updateMainFrameScrollPosition):
2564         (WebKit::RemoteScrollingTree::createNode):
2565         * UIProcess/Scrolling/RemoteScrollingTree.h: Added.
2566         (WebKit::RemoteScrollingTree::scrollingCoordinatorProxy):
2567         * WebKit2.xcodeproj/project.pbxproj:
2568         * WebProcess/Scrolling/RemoteScrollingCoordinator.h: Added.
2569         (WebKit::RemoteScrollingCoordinator::create):
2570         * WebProcess/Scrolling/RemoteScrollingCoordinator.messages.in: Added.
2571         * WebProcess/Scrolling/RemoteScrollingCoordinator.mm: Added.
2572         (WebKit::RemoteScrollingCoordinator::RemoteScrollingCoordinator):
2573         (WebKit::RemoteScrollingCoordinator::~RemoteScrollingCoordinator):
2574         (WebKit::RemoteScrollingCoordinator::scheduleTreeStateCommit):
2575         (WebKit::RemoteScrollingCoordinator::createScrollingTreeNode):
2576         (WebKit::RemoteScrollingCoordinator::isRubberBandInProgress):
2577         (WebKit::RemoteScrollingCoordinator::setScrollPinningBehavior):
2578         (WebKit::RemoteScrollingCoordinator::buildTransaction):
2579         (WebKit::RemoteScrollingCoordinator::scrollPositionChangedForNode):
2580
2581 2014-01-06  Martin Robinson  <mrobinson@igalia.com>
2582
2583         Small build fix for the GTK+ CMake port
2584
2585         * PlatformGTK.cmake: Include a missing GeoClue include directory.
2586
2587 2014-01-06  Simon Fraser  <simon.fraser@apple.com>
2588
2589         Rename DrawingArea::supportsThreadedScrolling() to supportsAsyncScrolling()
2590         https://bugs.webkit.org/show_bug.cgi?id=126529
2591
2592         Reviewed by Tim Horton.
2593         
2594         Change function name from using "threaded" to "async" terminology.
2595
2596         * WebProcess/WebPage/DrawingArea.h:
2597         (WebKit::DrawingArea::supportsAsyncScrolling):
2598         * WebProcess/WebPage/WebPage.cpp:
2599         (WebKit::WebPage::WebPage):
2600         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2601
2602 2014-01-04  Carlos Garcia Campos  <cgarcia@igalia.com>
2603
2604         [GTK] Move all GTK/GObject unit tests to Tools/TestWebKitAPI
2605         https://bugs.webkit.org/show_bug.cgi?id=126342
2606
2607         Reviewed by Gustavo Noronha Silva.
2608
2609         * UIProcess/API/gtk/tests/CMakeLists.txt: Removed.
2610         * UIProcess/API/gtk/tests/GNUmakefile.am: Removed.
2611
2612 2014-01-06  Enrica Casucci  <enrica@apple.com>
2613
2614         Add support to retrieve the autocorrection context.
2615         https://bugs.webkit.org/show_bug.cgi?id=126479
2616
2617         Reviewed by Sam Weinig.
2618         
2619         We are adding the support to retrieve the input context for autocorrection
2620         and input methods on iOS. The implementation is provided both via synchronous
2621         and asynchronous calls to the WebProcess.
2622
2623         * Platform/IPC/HandleMessage.h: Added template with zero input parameters and six reply parameters.
2624         * UIProcess/API/ios/WKInteractionView.mm:
2625         (autocorrectionData):
2626         (-[WKInteractionView requestAutocorrectionRectsForString:withCompletionHandler:]):
2627         (autocorrectionResult):
2628         (-[WKInteractionView applyAutocorrection:toString:withCompletionHandler:]):
2629         (autocorrectionContext):
2630         (-[WKInteractionView requestAutocorrectionContextWithCompletionHandler:]):
2631         (-[WKInteractionView hasMarkedText]):
2632         (-[WKInteractionView _startAssistingNode]):
2633         (+[WKAutocorrectionContext autocorrectionContextWithData:markedText:selectedText:afterText:selectedRangeInMarkedText:]):
2634         (-[WKAutocorrectionContext dealloc]):
2635         * UIProcess/AutoCorrectionCallback.h:
2636         (WebKit::AutocorrectionContextCallback::create):
2637         (WebKit::AutocorrectionContextCallback::~AutocorrectionContextCallback):
2638         (WebKit::AutocorrectionContextCallback::performCallbackWithReturnValue):
2639         (WebKit::AutocorrectionContextCallback::invalidate):
2640         (WebKit::AutocorrectionContextCallback::AutocorrectionContextCallback):
2641         * UIProcess/WebPageProxy.cpp:
2642         (WebKit::WebPageProxy::resetState):
2643         * UIProcess/WebPageProxy.h:
2644         * UIProcess/WebPageProxy.messages.in:
2645         * UIProcess/ios/WebPageProxyIOS.mm:
2646         (WebKit::WebPageProxy::autocorrectionContextCallback):
2647         (WebKit::WebPageProxy::requestAutocorrectionContext):
2648         (WebKit::WebPageProxy::getAutocorrectionContext):
2649         * WebProcess/WebPage/WebPage.h:
2650         * WebProcess/WebPage/WebPage.messages.in:
2651         * WebProcess/WebPage/ios/WebPageIOS.mm:
2652         (WebKit::computeAutocorrectionContext):
2653         (WebKit::WebPage::requestAutocorrectionContext):
2654         (WebKit::WebPage::getAutocorrectionContext):
2655
2656 2014-01-06  Gavin Barraclough  <barraclough@apple.com>
2657
2658         Move ViewState to WebCore
2659         https://bugs.webkit.org/show_bug.cgi?id=126488
2660
2661         Reviewed by Anders Carlson.
2662
2663         This change also partial reverts handling of LayerHostingMode, making this
2664         a separate message again. With hindsight the new way of doing this wasn't
2665         in all ways simpler, and it won't make sense to move this to WebCore.
2666
2667         * Shared/ViewState.h: Removed.
2668             - Moved to WebCore.
2669         * Shared/WebPageCreationParameters.cpp:
2670         (WebKit::WebPageCreationParameters::encode):
2671         (WebKit::WebPageCreationParameters::decode):
2672         * Shared/WebPageCreationParameters.h:
2673             - Added layerHostingMode.
2674         * UIProcess/API/mac/PageClientImpl.h:
2675         * UIProcess/API/mac/PageClientImpl.mm:
2676         (WebKit::PageClientImpl::PageClientImpl):
2677         (WebKit::PageClientImpl::viewLayerHostingMode):
2678         * UIProcess/PageClient.h:
2679         (WebKit::PageClient::viewLayerHostingMode):
2680             - Revert isLayerWindowServerHosted -> viewLayerHostingMode.
2681         * UIProcess/WebPageProxy.cpp:
2682         (WebKit::WebPageProxy::WebPageProxy):
2683             - Added back m_layerHostingMode.
2684         (WebKit::WebPageProxy::updateViewState):
2685             - Removed IsLayerWindowServerHosted from ViewState.
2686         (WebKit::WebPageProxy::viewStateDidChange):
2687             - Added SetLayerHostingMode message.
2688         (WebKit::WebPageProxy::initializeCreationParameters):
2689             - Pass layerHostingMode.
2690         * UIProcess/WebPageProxy.h:
2691         (WebKit::WebPageProxy::isInWindow):
2692         (WebKit::WebPageProxy::isViewVisible):
2693             - ViewState moved to WebCore.
2694         * WebKit2.xcodeproj/project.pbxproj:
2695             - Removed ViewState.
2696         * WebProcess/Plugins/PluginView.cpp:
2697         (WebKit::PluginView::setLayerHostingMode):
2698         (WebKit::PluginView::platformViewStateDidChange):
2699             - Separated setLayerHostingMode from platformViewStateDidChange.
2700         * WebProcess/Plugins/PluginView.h:
2701         * WebProcess/WebPage/DrawingArea.h:
2702         (WebKit::DrawingArea::viewStateDidChange):
2703         (WebKit::DrawingArea::setLayerHostingMode):
2704             - Added virtual function, overridden in TiledCoreAnimationDrawingArea.
2705         * WebProcess/WebPage/WebPage.cpp:
2706         (WebKit::WebPage::WebPage):
2707         (WebKit::WebPage::setLayerHostingMode):
2708             - Separated setLayerHostingMode from platformViewStateDidChange.
2709         * WebProcess/WebPage/WebPage.h:
2710         (WebKit::WebPage::isVisible):
2711         (WebKit::WebPage::layerHostingMode):
2712             - ViewState moved to WebCore.
2713         * WebProcess/WebPage/WebPage.messages.in:
2714             - Added SetLayerHostingMode message.
2715         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2716         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2717         (WebKit::TiledCoreAnimationDrawingArea::viewStateDidChange):
2718             - viewStateDidChange no longer calls setLayerHostingMode (this is called by WebPage).
2719
2720 2014-01-06  Martin Robinson  <mrobinson@igalia.com>
2721
2722         [GTK] [CMake] Parallel builds still fail when building WebKit2 GObject API unit tests
2723         https://bugs.webkit.org/show_bug.cgi?id=126465
2724
2725         Reviewed by Gustavo Noronha Silva.
2726
2727         * UIProcess/API/gtk/tests/CMakeLists.txt: Explicitly link the libWebKit2APITestCore static object against
2728         WebKit2, which seems to be necessary on my new system. Also create an explicit dependency between the
2729         injected bundle tests and WebKit2, because they need to use the generated headers.
2730
2731 2014-01-06  László Langó  <lango@inf.u-szeged.hu>
2732
2733         Use unsigned consistently, and check for invalid casts when calling into SharedBuffer from other code.
2734         https://bugs.webkit.org/show_bug.cgi?id=124579
2735
2736         Reviewed by Anders Carlsson.
2737
2738         * NetworkProcess/NetworkResourceLoader.cpp:
2739         (WebKit::NetworkResourceLoader::didReceiveData):
2740         (WebKit::NetworkResourceLoader::willStopBufferingData):
2741         * NetworkProcess/NetworkResourceLoader.h:
2742         * Shared/Downloads/soup/DownloadSoup.cpp:
2743         (WebKit::DownloadClient::didReceiveData):
2744
2745 2014-01-04  Simon Fraser  <simon.fraser@apple.com>
2746
2747         Add encoding of ViewportConstraint and ScrollingParameter types
2748         https://bugs.webkit.org/show_bug.cgi?id=126497
2749
2750         Reviewed by Andreas Kling.
2751         
2752         Add encoding/decoding of ScrollableAreaParameters, FixedPositionViewportConstraints
2753         and StickyPositionViewportConstraints.
2754
2755         * Shared/WebCoreArgumentCoders.cpp:
2756         (IPC::ArgumentCoder<WebCore::ScrollableAreaParameters>::encode):
2757         (IPC::ArgumentCoder<WebCore::ScrollableAreaParameters>::decode):
2758         (IPC::ArgumentCoder<WebCore::FixedPositionViewportConstraints>::encode):
2759         (IPC::ArgumentCoder<WebCore::FixedPositionViewportConstraints>::decode):
2760         (IPC::ArgumentCoder<WebCore::StickyPositionViewportConstraints>::encode):
2761         (IPC::ArgumentCoder<WebCore::StickyPositionViewportConstraints>::decode):
2762         * Shared/WebCoreArgumentCoders.h:
2763
2764 2014-01-05  Simon Fraser  <simon.fraser@apple.com>
2765
2766         Move responsibility for remote layer tree committing to RemoteLayerTreeDrawingArea
2767         https://bugs.webkit.org/show_bug.cgi?id=126501
2768
2769         Reviewed by Sam Weinig.
2770         
2771         Soon we shall need to do atomic commits of both the remote layer tree, and
2772         the remote scrolling tree. Pave the way by moving responsibility for remote
2773         layer tree committing to RemoteLayerTreeDrawingArea.
2774         
2775         So move the flushing logic from RemoteLayerTreeHost to RemoteLayerTreeDrawingArea.
2776         After this change, RemoteLayerTreeHost doesn't do much and could possibly be
2777         removed in future.
2778         
2779         Also add type-safe casting to GraphicsLayer and DrawingArea.
2780
2781         * DerivedSources.make: Out with RemoteLayerTreeHost, in with RemoteLayerTreeDrawingAreaProxy
2782         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
2783         (WebKit::RemoteLayerTreeDrawingAreaProxy::remoteLayerTreeHost):
2784         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.messages.in: Renamed from Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.messages.in.
2785         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2786         (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy): Add message receiver.
2787         (WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy): Remove message receiver.
2788         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree): Hand the transaction off to the layer
2789         tree host.
2790         * UIProcess/mac/RemoteLayerTreeHost.h:
2791         * UIProcess/mac/RemoteLayerTreeHost.mm:
2792         (WebKit::RemoteLayerTreeHost::RemoteLayerTreeHost): No longer a message receiver.
2793         (WebKit::RemoteLayerTreeHost::~RemoteLayerTreeHost):
2794         (WebKit::RemoteLayerTreeHost::updateLayerTree):
2795         * WebKit2.xcodeproj/project.pbxproj:
2796         * WebProcess/WebPage/DrawingArea.h:
2797         (WebKit::DrawingArea::type):
2798         * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
2799         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
2800         * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
2801         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
2802         (WebKit::RemoteLayerTreeContext::RemoteLayerTreeContext):
2803         (WebKit::RemoteLayerTreeContext::flushOutOfTreeLayers):
2804         (WebKit::RemoteLayerTreeContext::buildTransaction):
2805         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2806         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2807         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
2808         (WebKit::RemoteLayerTreeDrawingArea::setRootCompositingLayer):
2809         (WebKit::RemoteLayerTreeDrawingArea::setLayerTreeStateIsFrozen):
2810         (WebKit::RemoteLayerTreeDrawingArea::forceRepaint):
2811         (WebKit::RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlush):
2812         (WebKit::RemoteLayerTreeDrawingArea::layerFlushTimerFired):
2813         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
2814
2815 2014-01-05  Martin Robinson  <mrobinson@igalia.com>
2816
2817         [GTK] [CMake] Ensure that the autotools build and the CMake install the same files
2818         https://bugs.webkit.org/show_bug.cgi?id=116379
2819
2820         Reviewed by Gustavo Noronha Silva.
2821
2822         * CMakeLists.txt: Install the plugin process to the new LIBEXEC directory, which
2823         for non-GTK+ platforms is the same as EXEC.
2824         * PlatformGTK.cmake: Install API headers, gir files, and the pkg-config file. Move
2825         a couple installed and generated headers to the installed headers list. Rename the
2826         headers list to be consistent with the WebKit1 build. No longer use a variable for
2827         the name of the plugin process, as it's unnecessary.
2828
2829 2014-01-05  Carlos Garcia Campos  <cgarcia@igalia.com>
2830
2831         [GTK] Stop installing WebKit2 C API headers
2832         https://bugs.webkit.org/show_bug.cgi?id=126489
2833
2834         Reviewed by Martin Robinson.
2835
2836         We are not actually maintaining the API/ABI compatibility of the
2837         WebKit2 C API, it's only used internally by the public GTK+ API
2838         and nobody is using it.
2839
2840         * GNUmakefile.am:
2841         * GNUmakefile.list.am:
2842
2843 2014-01-05  Gavin Barraclough  <barraclough@apple.com>
2844
2845         Move process suppression of WebProcess to Page (from UIProcess)
2846         https://bugs.webkit.org/show_bug.cgi?id=126480
2847
2848         Reviewed by Sam Weinig.
2849
2850         Let each page take a UserActivity rather than having to coalesce this state, and take different activity
2851         tokens for normal visibility and suppression disabled, so we can see why the process is not suppressed.
2852
2853         * Shared/mac/ChildProcessMac.mm:
2854         (WebKit::ChildProcess::platformInitialize):
2855             - Don't start with process supression disabled; this is unnecessary,
2856               message from the UIProcess should wake.
2857         * UIProcess/mac/WebProcessProxyMac.mm:
2858         (WebKit::WebProcessProxy::updateProcessSuppressionState):
2859             - Don't send explicit messages to supress the WebProcess, it handles this for itself.
2860         * WebProcess/WebPage/WebPage.cpp:
2861         (WebKit::WebPage::WebPage):
2862             - call setIsVisuallyIdle.
2863         (WebKit::WebPage::setViewState):
2864             - call setIsVisuallyIdle.
2865         (WebKit::WebPage::updatePreferences):
2866             - Use m_suppressionDisabled to disable supression if the WebPreference is set.
2867         (WebKit::WebPage::setIsVisuallyIdle):
2868             - setThrottled -> setIsVisuallyIdle.
2869         * WebProcess/WebPage/WebPage.h:
2870             - setThrottled -> setIsVisuallyIdle, added m_suppressionDisabled.
2871         * WebProcess/WebProcess.cpp:
2872         * WebProcess/WebProcess.h:
2873         (WebKit::WebProcess::shouldForceScreenFontSubstitution):
2874             - Removed setProcessSuppressionEnabled - WebPage now detects the supression change.
2875
2876 2014-01-04  Martin Robinson  <mrobinson@igalia.com>
2877
2878         [GTK] [CMake] Improve the way we locate gobject-introspection
2879         https://bugs.webkit.org/show_bug.cgi?id=126452
2880
2881         Reviewed by Philippe Normand.
2882
2883         * PlatformGTK.cmake: Use the new introspection variables.
2884
2885 2014-01-04  Zan Dobersek  <zdobersek@igalia.com>
2886
2887         Explicitly use the std:: nested name specifier when using std::pair, std::make_pair
2888         https://bugs.webkit.org/show_bug.cgi?id=126439
2889
2890         Reviewed by Andreas Kling.
2891
2892         Instead of relying on std::pair and std::make_pair symbols being present in the current scope
2893         through the pair and make_pair symbols, the std:: specifier should be used explicitly.
2894
2895         * Shared/mac/ArgumentCodersMac.mm:
2896         (IPC::encode):
2897         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
2898         (WebKit::WebNotificationManagerProxy::show):
2899         (WebKit::WebNotificationManagerProxy::cancel):
2900         (WebKit::WebNotificationManagerProxy::didDestroyNotification):
2901         * UIProcess/Notifications/WebNotificationManagerProxy.h:
2902         * UIProcess/WebContext.cpp:
2903         (WebKit::WebContext::createNewWebProcess):
2904         * UIProcess/WebContext.h:
2905
2906 2014-01-03  Piotr Grad  <p.grad@samsung.com>
2907
2908         Build brake after 161045 on EFL port with WebKit2 and gcc 4.6.3
2909         https://bugs.webkit.org/show_bug.cgi?id=126383
2910
2911         Reviewed by Sam Weinig.
2912
2913         Class identifier was missing.
2914
2915         * DatabaseProcess/DatabaseProcess.h:
2916         * NetworkProcess/NetworkProcess.h:
2917         * PluginProcess/PluginProcess.h:
2918         * Shared/mac/CookieStorageShim.h:
2919         * UIProcess/Plugins/PluginProcessManager.h:
2920         * UIProcess/WebPageProxy.cpp:
2921         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2922         * WebProcess/WebProcess.h:
2923
2924 2014-01-03  Seokju Kwon  <seokju@webkit.org>
2925
2926         Unreviewed build fix on non-Mac port
2927
2928         * Shared/API/c/WKDeprecatedFunctions.cpp: Add ENABLE(MAC) guard for "WKContextPrivateMac.h".
2929
2930 2014-01-03  Gavin Barraclough  <barraclough@apple.com>
2931
2932         Simplify process suppression state calculation
2933         https://bugs.webkit.org/show_bug.cgi?id=126473
2934
2935         Reviewed by Geoffrey Garen & Sam Weinig.
2936
2937         Don't check the application occlusion state (this is covered by the pages already),
2938         and let the page check visually idle. Remove layers of functions.
2939
2940         * UIProcess/Network/NetworkProcessProxy.cpp:
2941         (WebKit::NetworkProcessProxy::didFinishLaunching):
2942             - Let the network process nap if all processes in its context are napping.*
2943               (* Except not really. We currently leak a boost onto the process anyway.)
2944         * UIProcess/Plugins/PluginProcessProxy.cpp:
2945         (WebKit::PluginProcessProxy::didFinishLaunching):
2946             - Let the plugin process nap if all processes in all contexts are napping.
2947         * UIProcess/WebContext.h:
2948             - Remove canEnableProcessSuppressionForNetworkProcess & canEnableProcessSuppressionForWebProcess
2949             - canEnableProcessSuppressionForGlobalChildProcesses -> processSuppressionIsEnabledForAllContexts
2950             - combine updateProcessSuppressionStateOfChildProcesses & updateProcessSuppressionStateOfGlobalChildProcesses
2951                 -> updateProcessSuppressionState
2952         * UIProcess/WebPageProxy.cpp:
2953         (WebKit::WebPageProxy::isProcessSuppressible):
2954             - WebProcess is supressible if IsVisuallyIdle.
2955         (WebKit::WebPageProxy::viewStateDidChange):
2956             - WebProcessProxy should updateProcessSuppressionState when IsVisuallyIdle changes.
2957         * UIProcess/WebPageProxy.h:
2958         * UIProcess/WebProcessProxy.cpp:
2959         (WebKit::WebProcessProxy::createWebPage):
2960         (WebKit::WebProcessProxy::addExistingWebPage):
2961         (WebKit::WebProcessProxy::pageSuppressibilityChanged):
2962         (WebKit::WebProcessProxy::pagePreferencesChanged):
2963             - pageIsProcessSuppressible -> isProcessSuppressible
2964         * UIProcess/WebProcessProxy.h:
2965         * UIProcess/mac/WebContextMac.mm:
2966         (WebKit::WebContext::updateProcessSuppressionState):
2967             - Update supression state of network & plugin processes.
2968         (WebKit::WebContext::processSuppressionIsEnabledForAllContexts):
2969             - Changed iterator style, made a static member of WebContext.
2970         * UIProcess/mac/WebProcessProxyMac.mm:
2971         (WebKit::WebProcessProxy::updateProcessSuppressionState):
2972             - Ask the WebContext to update supression state.
2973         * UIProcess/mac/WindowServerConnection.h:
2974         * UIProcess/mac/WindowServerConnection.mm:
2975         (WebKit::WindowServerConnection::windowServerConnectionStateChanged):
2976         (WebKit::WindowServerConnection::WindowServerConnection):
2977             - Remove application occlusion state.
2978
2979 2014-01-03  Tim Horton  <timothy_horton@apple.com>
2980
2981         [iOS] [WK2] TileController creates all tiles on first paint, making it slow and consuming lots of memory
2982         https://bugs.webkit.org/show_bug.cgi?id=126457
2983
2984         Reviewed by Simon Fraser.
2985
2986         Instead of making all of the tiles all of the time, we should use the
2987         view-exposed-rect mechanism to inform TileController about what portion
2988         of the WKContentView is currently exposed by the WKScrollView.
2989
2990         * UIProcess/API/ios/WKContentView.h:
2991         * UIProcess/API/ios/WKContentView.mm:
2992         (-[WKContentView setViewportSize:]):
2993         (-[WKContentView didFinishScrollTo:]):
2994         (-[WKContentView didScrollTo:]):
2995         Inform the WebPageProxy that our exposed rect changed.
2996
2997         * UIProcess/API/ios/WKView.mm:
2998         (-[WKView scrollViewDidScroll:]):
2999         Inform the WKContentView that we've scrolled at all.
3000         Rename the existing WKContentView didScrollTo: to didFinishScrollTo:,
3001         because it is expected to only fire when a scroll lands. Add didScrollTo:,
3002         which fires continually as scrolling progresses.
3003
3004         * UIProcess/WebPageProxy.cpp:
3005         (WebKit::WebPageProxy::WebPageProxy):
3006         (WebKit::WebPageProxy::viewExposedRectChanged):
3007         (WebKit::WebPageProxy::exposedRectChangedTimerFired):
3008         * UIProcess/WebPageProxy.h:
3009         (WebKit::WebPageProxy::viewExposedRect):
3010         * UIProcess/mac/WebPageProxyMac.mm:
3011         Move view-exposed-rect stuff to WebPageProxy so it can be built on both
3012         Mac and iOS, and un-!PLATFORM(IOS) some of the related members.
3013
3014         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
3015         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3016         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
3017         (WebKit::RemoteLayerTreeDrawingArea::setExposedRect):
3018         (WebKit::RemoteLayerTreeDrawingArea::setClipsToExposedRect):
3019         (WebKit::RemoteLayerTreeDrawingArea::updateScrolledExposedRect):
3020         (WebKit::RemoteLayerTreeDrawingArea::updateMainFrameClipsToExposedRect):
3021         (WebKit::RemoteLayerTreeDrawingArea::mainFrameTiledBacking):
3022         Steal TiledCoreAnimationDrawingArea's exposed-rect code.
3023         Note that on iOS, we don't need to manually offset the exposed rect by
3024         the scroll position, because the scroll position is already baked into
3025         the exposed rect, and WebCore's notion of the scroll position will be
3026         inaccurate until the scroll lands.
3027
3028 2014-01-03  Simon Fraser  <simon.fraser@apple.com>
3029
3030         Give all PlatformCALayers a PlatformLayerID, not just remote ones
3031         https://bugs.webkit.org/show_bug.cgi?id=126466
3032
3033         Reviewed by Tim Horton.
3034
3035         The ScrollingStateTree has references to both GraphicsLayers and PlatformLayers
3036         which is confusing, and is necessary because the underlying PlatformLayer
3037         inside a GraphicsLayer can change. In order to hide some of this complexity,
3038         expose GraphicsLayer::primaryLayerID() which is a PlatformLayerID that clients
3039         can hold onto to test for underlying layer swapping.
3040         
3041         GraphicsLayerCARemote and PlatformCALayerRemote can now just use the
3042         primaryLayerID() function exposed via the base class.
3043
3044         * WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
3045         * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
3046         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
3047         (PlatformCALayerRemote::PlatformCALayerRemote):
3048         (PlatformCALayerRemote::recursiveBuildTransaction):
3049         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
3050
3051 2014-01-03  Dan Bernstein  <mitz@apple.com>
3052
3053         [Cocoa] Expose session state API
3054         https://bugs.webkit.org/show_bug.cgi?id=126463
3055
3056         Reviewed by Sam Weinig.
3057
3058         * UIProcess/API/Cocoa/WKBrowsingContextController.h: Declared new property and method.
3059         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
3060         (-[WKBrowsingContextController sessionState]): Added. Calls WebPageProxy::sessionStateData.
3061         (-[WKBrowsingContextController restoreFromSessionState:]): Added. Calls
3062         WebPageProxy::restoreFromSessionState.
3063
3064 2014-01-03  Gavin Barraclough  <barraclough@apple.com>
3065
3066         Remove SPI, user default for disabling process suppression
3067         https://bugs.webkit.org/show_bug.cgi?id=126458
3068
3069         Reviewed by Sam Weinig.
3070
3071         * Shared/API/c/WKDeprecatedFunctions.cpp:
3072         (WKContextGetProcessSuppressionEnabled):
3073         (WKContextSetProcessSuppressionEnabled):
3074             - depracated SPI.
3075         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
3076             - depracated SPI.
3077         * UIProcess/WebContext.cpp:
3078         (WebKit::WebContext::WebContext):
3079             - removed m_processSuppressionEnabled.
3080         * UIProcess/WebContext.h:
3081             - removed setProcessSuppressionEnabled, processSuppressionEnabled implementation,
3082               processSuppressionEnabledChanged, m_processSuppressionEnabled.
3083         * UIProcess/mac/WebContextMac.mm:
3084         (WebKit::WebContext::platformInitialize):
3085             - removed m_processSuppressionEnabled.
3086         (WebKit::WebContext::processSuppressionEnabled):
3087             - check whether all pages in all processes are suppressible.
3088         (WebKit::WebContext::canEnableProcessSuppressionForNetworkProcess):
3089             - removed call to omitProcessSuppression, m_processSuppressionEnabled -> processSuppressionEnabled().
3090         (WebKit::WebContext::canEnableProcessSuppressionForWebProcess):
3091             - removed call to omitProcessSuppression, processSuppressionEnabled (we don't care if a page in a difference process is not suppresible).
3092         (WebKit::WebContext::canEnableProcessSuppressionForGlobalChildProcesses):
3093             - removed call to omitProcessSuppression, s_processSuppressionEnabledForAllContexts -> processSuppressionIsEnabledForAllContexts().
3094
3095 2014-01-03  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
3096
3097         [WK2][CoordinatedGraphics] Removing repeated protected keyword in WebView
3098         https://bugs.webkit.org/show_bug.cgi?id=126462
3099
3100         Reviewed by Simon Fraser.
3101
3102         * UIProcess/CoordinatedGraphics/WebView.h:
3103
3104 2014-01-03  Carlos Garcia Campos  <cgarcia@igalia.com>
3105
3106         Define WebProcess::usesNetworkProcess unconditionally
3107         https://bugs.webkit.org/show_bug.cgi?id=126208
3108
3109         Reviewed by Martin Robinson.
3110
3111         Returning false when network process is not enabled like
3112         WebContext does. This way we reduce the amount of ifdefs used when
3113         checking whether network process is in use.
3114
3115         * UIProcess/gtk/WebContextGtk.cpp:
3116         (WebKit::WebContext::platformInitializeWebProcess): Remove #ifdef
3117         and only setup network features when not using network process.
3118         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3119         (WebKit::WebPlatformStrategies::isAvailable): Remove #ifdef.
3120         * WebProcess/WebProcess.cpp:
3121         (WebKit::WebProcess::downloadManager):
3122         (WebKit::WebProcess::shouldTerminate):
3123         (WebKit::WebProcess::usesNetworkProcess):
3124         * WebProcess/WebProcess.h:
3125         * WebProcess/mac/WebProcessMac.mm:
3126         (WebKit::WebProcess::platformSetCacheModel): Remove #ifdef.
3127         (WebKit::WebProcess::platformInitializeWebProcess): Ditto.
3128         * WebProcess/soup/WebProcessSoup.cpp:
3129         (WebKit::WebProcess::platformSetCacheModel): Ditto.
3130         (WebKit::WebProcess::platformClearResourceCaches): Ditto.
3131         (WebKit::WebProcess::platformInitializeWebProcess): Ditto.
3132         (WebKit::WebProcess::platformTerminate): Only remove the language
3133         observer when not using network process.
3134         (WebKit::WebProcess::setIgnoreTLSErrors): Assert when this is
3135         called with network process enabled.
3136         (WebKit::WebProcess::allowSpecificHTTPSCertificateForHost): Ditto.
3137
3138 2014-01-03  Jinwoo Song  <jinwoo7.song@samsung.com>
3139
3140         VibrationPattern should allocate an single vector instance for single integer input
3141         https://bugs.webkit.org/show_bug.cgi?id=126417
3142
3143         Reviewed by Gyuyoung Kim.
3144
3145         Fix a vibration unit test regression after r161139. Also remove unnecessary test cases. 
3146
3147         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
3148         (EWK2ViewTest::loadVibrationHTMLString):
3149         (TEST_F):
3150
3151 2014-01-02  Carlos Garcia Campos  <cgarcia@igalia.com>
3152
3153         [GTK] Add API to WebKitResponsePolicyDecision to check if the MIME type can be shown
3154         https://bugs.webkit.org/show_bug.cgi?id=124652
3155
3156         Reviewed by Martin Robinson.
3157
3158         * UIProcess/API/gtk/WebKitPolicyClient.cpp:
3159         (decidePolicyForResponse): Pass canShowMIMEType to
3160         webkitResponsePolicyDecisionCreate.
3161         * UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp:
3162         (webkit_response_policy_decision_is_mime_type_supported): Return
3163         canShowMIMEType.
3164         (webkitResponsePolicyDecisionCreate): Set the canShowMIMEType
3165         member from the given parameter.
3166         * UIProcess/API/gtk/WebKitResponsePolicyDecision.h:
3167         * UIProcess/API/gtk/WebKitResponsePolicyDecisionPrivate.h:
3168         * UIProcess/API/gtk/WebKitWebView.cpp:
3169         (webkitWebViewDecidePolicy): Use the new API instead of
3170         webkit_web_view_can_show_mime_type() since it's more efficient.
3171         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol.
3172         * UIProcess/API/gtk/tests/TestWebKitPolicyClient.cpp:
3173         (testResponsePolicy): Test the new API.
3174
3175 2014-01-02  Carlos Garcia Campos  <cgarcia@igalia.com>
3176
3177         REGRESSION(r160304): [GTK] Disable libtool fast install
3178         https://bugs.webkit.org/show_bug.cgi?id=126381
3179
3180         Reviewed by Martin Robinson.
3181
3182         Remove -no-fast-install ld flag since fast install is now disabled
3183         globally.
3184
3185         * GNUmakefile.am:
3186         * UIProcess/API/gtk/tests/GNUmakefile.am:
3187
3188 2014-01-02  Ryuan Choi  <ryuan.choi@samsung.com>
3189
3190         [EFL][WK2] Remove defaultPageGroupIdentifier not to make the confusion
3191         https://bugs.webkit.org/show_bug.cgi?id=126249
3192
3193         Reviewed by Gyuyoung Kim.
3194
3195         ewk_page_group_create always creates new page group,
3196         but the identifiers of page groups will be same as "defaultPageGroupIdentifier" when passed 0 or "".
3197         It is unnecessary and just makes the confusion.
3198
3199         This patch let WebPageGroup generate unique identifier if 0 or "" is passed as argument.
3200
3201         * UIProcess/API/efl/ewk_page_group.cpp:
3202         (EwkPageGroup::create):
3203         * UIProcess/API/efl/ewk_page_group_private.h:
3204
3205 2014-01-02  Zan Dobersek  <zdobersek@igalia.com>
3206
3207         [GTK] Switch from WTF::Function to std::function in WebProcessTest
3208         https://bugs.webkit.org/show_bug.cgi?id=126397
3209
3210         Reviewed by Anders Carlsson.
3211
3212         Use std::function<> and std::bind() instead of WTF::Function and WTF::bind,
3213         following the effort of using STL concepts where possible.
3214
3215         * UIProcess/API/gtk/tests/WebProcessTest.cpp:
3216         (WebProcessTest::add):
3217         * UIProcess/API/gtk/tests/WebProcessTest.h:
3218
3219 2014-01-02  Gavin Barraclough  <barraclough@apple.com>
3220
3221         Refactor NSActivity handling code from ChildProcess to UserActivity
3222         https://bugs.webkit.org/show_bug.cgi?id=126330
3223
3224         Reviewed by Sam Weinig.
3225
3226         UserActivity is a mechanism to express to the operating system (where appropriate)
3227         that a user initiated activity is taking place, and as such that resources should be
3228         made available to the process accordingly.
3229
3230         Currently we hold a single NSActivity, at the WebKit layer. This refactoring allows us
3231         to hold different activity tokens for different user actions (which simplifies the
3232         handling, and aides debugging since the token can more accurately express the activity
3233         taking place), and also will allow us to avoid the layering difficulty of calling back
3234         up the stack to WebKit to register that an activity is taking place.
3235
3236         * Shared/ChildProcess.cpp:
3237         (WebKit::ChildProcess::ChildProcess):
3238             - removed fields to directly manage NSActivity, use UserActivity objects instead.
3239         * Shared/ChildProcess.h:
3240         (WebKit::ChildProcess::processSuppressionEnabled):
3241             - changed to initialize new fields.
3242         * Shared/mac/ChildProcessMac.mm:
3243         (WebKit::ChildProcess::setProcessSuppressionEnabled):
3244             - implemented in terms of UserActivity m_processSuppressionDisabled.
3245         (WebKit::ChildProcess::incrementActiveTaskCount):
3246             - implemented in terms of UserActivity m_activeTasks.
3247         (WebKit::ChildProcess::decrementActiveTaskCount):
3248             - implemented in terms of UserActivity m_activeTasks.
3249         (WebKit::ChildProcess::platformInitialize):
3250             - implemented in terms of UserActivity m_processSuppressionDisabled.
3251
3252 2014-01-02  Gavin Barraclough  <barraclough@apple.com>
3253
3254         Propagate WindowServer modifications state to WebProcess
3255         https://bugs.webkit.org/show_bug.cgi?id=126356
3256
3257         Reviewed by Sam Weinig.
3258
3259         This will be necessary to move control of process suppression to the WebProcess.
3260         IsVisuallyIdle implies the process has stopped painting, or painted rects are
3261         occluded and not actually being composited. State is provided on a per
3262         WindowServer connection basis, and as such may produce (safe) false positives.
3263
3264         * Shared/ViewState.h:
3265             - added IsVisuallyIdle.
3266         * UIProcess/API/mac/PageClientImpl.h:
3267         * UIProcess/API/mac/PageClientImpl.mm:
3268         (WebKit::PageClientImpl::isVisuallyIdle):
3269             - added, on mac checks WindowServerConnection.
3270         * UIProcess/PageClient.h:
3271         (WebKit::PageClient::isVisuallyIdle):
3272             - base implementation purely based on isViewVisible.
3273         * UIProcess/WebContext.cpp:
3274         (WebKit::WebContext::windowServerConnectionStateChanged):
3275             - broadcast the state change.
3276         * UIProcess/WebContext.h:
3277         * UIProcess/WebPageProxy.cpp:
3278         (WebKit::WebPageProxy::updateViewState):
3279         (WebKit::WebPageProxy::viewStateDidChange):
3280             - propagate IsVisuallyIdle.
3281         * UIProcess/WebProcessProxy.cpp:
3282         (WebKit::WebProcessProxy::windowServerConnectionStateChanged):
3283             - broadcast the state change.
3284         * UIProcess/WebProcessProxy.h:
3285             - add windowServerConnectionStateChanged.
3286         * UIProcess/mac/WebContextMac.mm:
3287         (WebKit::WebContext::updateProcessSuppressionStateOfGlobalChildProcesses):
3288             - moved from static in fle to static member of class.
3289         (WebKit::WebContext::platformInitialize):
3290             - no need to enableOcclusionNotifications.
3291         (WebKit::WebContext::canEnableProcessSuppressionForNetworkProcess):
3292         (WebKit::WebContext::canEnableProcessSuppressionForWebProcess):
3293         (WebKit::WebContext::canEnableProcessSuppressionForGlobalChildProcesses):
3294             - changed to call WindowServerConnection.
3295         (WebKit::WebContext::processSuppressionEnabledChanged):
3296             - don't remove/reregister occlusion notifications.
3297         * UIProcess/mac/WindowServerConnection.h: Added.
3298         (WebKit::WindowServerConnection::applicationIsOccluded):
3299         (WebKit::WindowServerConnection::applicationWindowModificationsHaveStopped):
3300             - accessors.
3301         * UIProcess/mac/WindowServerConnection.mm: Added.
3302         (WebKit::WindowServerConnection::applicationBecameOccluded):
3303         (WebKit::WindowServerConnection::applicationWindowModificationsStopped):
3304         (WebKit::WindowServerConnection::applicationBecameVisible):
3305         (WebKit::WindowServerConnection::applicationWindowModificationsStarted):
3306             - handle notifications from the WindowServer.
3307         (WebKit::WindowServerConnection::windowServerConnectionStateChanged):
3308             - broadcast the state change.
3309         (WebKit::WindowServerConnection::shared):
3310             - accessor for singleton object.
3311         (WebKit::WindowServerConnection::WindowServerConnection):
3312             - constructor inizializes fields & register notification handlers.
3313         * WebKit2.xcodeproj/project.pbxproj:
3314             - added new files.
3315         * config.h:
3316             - added HAVE_WINDOW_SERVER_OCCLUSION_NOTIFICATIONS.
3317
3318 2014-01-02  Gavin Barraclough  <barraclough@apple.com>
3319
3320         Remove WindowIsVisible
3321         https://bugs.webkit.org/show_bug.cgi?id=126270
3322
3323         Reviewed by Tim Horton.
3324
3325         We currently track visibility in two ways - ViewState::IsVisible and ViewState::WindowIsVisible.
3326         The latter detects that the content is hidden in fewer cases than the former, and as such, the
3327         former is always preferable.
3328
3329         This affects the hidden state provided to FocusController::contentAreaDidShowOrHide and to
3330         Plugin::windowVisibilityChanged.
3331
3332         * Shared/ViewState.h:
3333             - remove WindowIsVisible.
3334         * UIProcess/API/mac/PageClientImpl.h:
3335         * UIProcess/API/mac/PageClientImpl.mm:
3336             - remove isWindowVisible.
3337         * UIProcess/API/mac/WKView.mm:
3338         (-[WKView viewDidMoveToWindow]):
3339         (-[WKView _windowDidMiniaturize:]):
3340         (-[WKView _windowDidDeminiaturize:]):
3341         (-[WKView _windowDidOrderOffScreen:]):
3342         (-[WKView _windowDidOrderOnScreen:]):
3343             - remove ViewState::WindowIsVisible.
3344         * UIProcess/PageClient.h:
3345             - remove isWindowVisible.
3346         * UIProcess/WebPageProxy.cpp:
3347         (WebKit::WebPageProxy::updateViewState):
3348             - remove handling of ViewState::WindowIsVisible.
3349         * WebProcess/Plugins/PluginView.cpp:
3350         (WebKit::PluginView::setIsVisible):
3351         (WebKit::PluginView::didInitializePlugin):
3352         * WebProcess/Plugins/PluginView.h:
3353             - setWindowIsVisible -> setIsVisible.
3354         * WebProcess/WebPage/WebPage.cpp:
3355         (WebKit::WebPage::WebPage):
3356         (WebKit::WebPage::setViewIsVisible):
3357         (WebKit::WebPage::setViewState):
3358         (WebKit::WebPage::windowAndWebPageAreFocused):
3359         * WebProcess/WebPage/WebPage.h:
3360         (WebKit::WebPage::isVisible):
3361             - remove m_windowIsVisible, setWindowIsVisible (implementation moved to setViewIsVisible).
3362
3363 2014-01-02  Gavin Barraclough  <barraclough@apple.com>
3364
3365         Refactor ViewState handling for drawing area / plugins
3366         https://bugs.webkit.org/show_bug.cgi?id=126272
3367
3368         Reviewed by Tim Horton.
3369
3370         Instead of all ViewState changes being handled by the WebPage, notify the DrawingArea & PluginView to better encapsulate.
3371
3372         * WebProcess/Plugins/PluginView.cpp:
3373         (WebKit::PluginView::viewStateDidChange):
3374         (WebKit::PluginView::platformViewStateDidChange):
3375             - added, handle changes in ViewState relevant to PluginView.
3376         (WebKit::PluginView::didInitializePlugin):
3377             - helper function removed.
3378         * WebProcess/Plugins/PluginView.h:
3379             - added/removed function declarations.
3380         * WebProcess/WebPage/DrawingArea.h:
3381         (WebKit::DrawingArea::viewStateDidChange):
3382             - declare viewStateDidChange.
3383         * WebProcess/WebPage/WebPage.cpp:
3384         (WebKit::WebPage::setActive):
3385             - no need to notify plugin.
3386         (WebKit::WebPage::setViewIsVisible):
3387             - no need to notify drawing area.
3388         (WebKit::WebPage::setViewState):
3389             - send viewStateDidChange to drawing area / plugin.
3390         (WebKit::WebPage::setWindowIsVisible):
3391             - no need to notify plugin.
3392         * WebProcess/WebPage/WebPage.h:
3393         (WebKit::WebPage::layerHostingMode):
3394             - removed setLayerHostingMode.
3395         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
3396             - declare viewStateDidChange.
3397         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3398         (WebKit::TiledCoreAnimationDrawingArea::viewStateDidChange):
3399             - added, handle changes in ViewState relevant to DrawingArea.
3400
3401 2014-01-02  Alexey Proskuryakov  <ap@apple.com>
3402
3403         Merge didMoveOnscreen / page visibility to isVisible
3404         https://bugs.webkit.org/show_bug.cgi?id=126268
3405
3406         Build fix.
3407
3408         * UIProcess/WebContext.h: Removed some accidental input.
3409
3410 2014-01-02  Gavin Barraclough  <barraclough@apple.com>
3411
3412         Merge didMoveOnscreen / page visibility to isVisible
3413         https://bugs.webkit.org/show_bug.cgi?id=126268
3414
3415         Reviewed by Tim Horton.
3416
3417         The onscreen state most closely tracks view visibility (though currently
3418         also tracks a mix of in-window state). Make more consistent, simplify,
3419         and move all animation suspension logic to Page, so it can be controlled
3420         by the PageThrottler.
3421
3422         * WebProcess/WebPage/WebPage.cpp:
3423         (WebKit::WebPage::WebPage):
3424         (WebKit::WebPage::setViewIsVisible):
3425             - updateVisibilityState -> setIsVisible.
3426         (WebKit::WebPage::setIsInWindow):
3427             - remove redundant willMoveOffscreen/didMoveOnscreen calls - this is handled
3428               by setIsVisible.
3429         (WebKit::WebPage::setMayStartMediaWhenInWindow):
3430             - isOnscreen -> isInWindow. We start media when the view is in a window, not
3431               when the view is visible.
3432         (WebKit::WebPage::setVisibilityStatePrerender):
3433             - setVisibilityState -> setIsPrerender.
3434
3435 2013-12-23  Oliver Hunt  <oliver@apple.com>
3436
3437         Refactor PutPropertySlot to be aware of custom properties
3438         https://bugs.webkit.org/show_bug.cgi?id=126187
3439
3440         Reviewed by Antti Koivisto.
3441
3442         Update for new method signatures.
3443
3444         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
3445         (WebKit::NPJSObject::setProperty):
3446
3447 2014-01-02  Simon Fraser  <simon.fraser@apple.com>
3448
3449         Add AsyncScrollingCoordinator, which is a base class for threaded and future remote ScrollingCoordinators
3450         https://bugs.webkit.org/show_bug.cgi?id=126389
3451
3452         Reviewed by Tim Horton.
3453         
3454         Add AsyncScrollingCoordinator, a ScrollingCoordinator that knows about ScrollingStateTrees
3455         and ScrollingTrees, but leaves it up to subclasses to decide when and how to commit.
3456         
3457         * WebProcess/WebPage/EventDispatcher.cpp:
3458         (WebKit::EventDispatcher::addScrollingTreeForPage): The ScrollingTree is exposed on
3459         AsyncScrollingCoordinator now, not ScrollingCoordinator, so we have to cast here.
3460         * WebProcess/WebPage/WebPage.cpp: m_useThreadedScrolling -> m_useAsyncScrolling terminology change.
3461         (WebKit::WebPage::WebPage):