[CoordinatedGraphics][EFL] Remove view_source functions.
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2014-02-17  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2
3         [CoordinatedGraphics][EFL] Remove view_source functions.
4         https://bugs.webkit.org/show_bug.cgi?id=128945
5
6         Reviewed by Anders Carlsson.
7
8         EFL port has been broken since r164254 because of removing view source files in WK2.
9         This patch is to follow to remove remained view source functions.
10
11         * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
12         * UIProcess/API/C/CoordinatedGraphics/WKView.h:
13         * UIProcess/API/efl/ewk_view.cpp:
14         * UIProcess/API/efl/ewk_view.h:
15         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
16         * UIProcess/CoordinatedGraphics/WebView.cpp:
17         * UIProcess/CoordinatedGraphics/WebView.h:
18
19 2014-02-17  Tim Horton  <timothy_horton@apple.com>
20
21         [iOS][wk2] Custom layers are sometimes put on-screen without being parented
22         https://bugs.webkit.org/show_bug.cgi?id=128935
23         <rdar://problem/16022336>
24
25         Reviewed by Sam Weinig.
26
27         * Platform/mac/LayerHostingContext.mm:
28         (WebKit::LayerHostingContext::createForExternalHostingProcess):
29         Give an explicit and unlikely display ID, so that the layer will never
30         be brought on-screen unless explicitly parented.
31
32 2014-02-17  Anders Carlsson  <andersca@apple.com>
33
34         Add history delegate to WKWebView
35         https://bugs.webkit.org/show_bug.cgi?id=128930
36
37         Reviewed by Dan Bernstein.
38
39         * UIProcess/API/Cocoa/WKHistoryDelegatePrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h.
40         * UIProcess/API/Cocoa/WKProcessClass.mm:
41         (-[WKProcessClass initWithConfiguration:]):
42         * UIProcess/API/Cocoa/WKWebView.mm:
43         (-[WKWebView _historyDelegate]):
44         (-[WKWebView _setHistoryDelegate:]):
45         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
46         * UIProcess/Cocoa/HistoryClient.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h.
47         * UIProcess/Cocoa/HistoryClient.mm: Added.
48         (WebKit::HistoryClient::HistoryClient):
49         (WebKit::HistoryClient::~HistoryClient):
50         (WebKit::HistoryClient::didNavigateWithNavigationData):
51         (WebKit::HistoryClient::didPerformClientRedirect):
52         (WebKit::HistoryClient::didPerformServerRedirect):
53         (WebKit::HistoryClient::didUpdateHistoryTitle):
54         (WebKit::HistoryClient::populateVisitedLinks):
55         (WebKit::HistoryClient::shouldTrackVisitedLinks):
56         * UIProcess/Cocoa/NavigationState.h:
57         * UIProcess/Cocoa/NavigationState.mm:
58         (WebKit::navigationStates):
59         (WebKit::NavigationState::NavigationState):
60         (WebKit::NavigationState::~NavigationState):
61         (WebKit::NavigationState::fromWebPage):
62         (WebKit::NavigationState::historyDelegate):
63         (WebKit::NavigationState::setHistoryDelegate):
64         (WebKit::NavigationState::didNavigateWithNavigationData):
65         (WebKit::NavigationState::didPerformClientRedirect):
66         (WebKit::NavigationState::didPerformServerRedirect):
67         (WebKit::NavigationState::didUpdateHistoryTitle):
68         * WebKit2.xcodeproj/project.pbxproj:
69
70 2014-02-17  Sam Weinig  <sam@webkit.org>
71
72         [WebKit2] Merge WebProcessMac and WebProcessIOS into WebProcessCocoa
73         https://bugs.webkit.org/show_bug.cgi?id=128939
74
75         Reviewed by Dan Bernstein.
76
77         * WebKit2.xcodeproj/project.pbxproj:
78         Add/remove files/groups.
79
80         * WebProcess/WebProcess.h:
81         Change stopRunLoop() to be AppKit only.
82
83         * WebProcess/cocoa: Added.
84         * WebProcess/cocoa/WebProcessCocoa.mm: Copied from Source/WebKit2/WebProcess/mac/WebProcessMac.mm.
85         (WebKit::WebProcess::platformInitializeWebProcess):
86         (WebKit::WebProcess::initializeProcessName):
87         (WebKit::WebProcess::platformInitializeProcess):
88         (WebKit::WebProcess::initializeSandbox):
89         (WebKit::WebProcess::updateActivePages):
90         * WebProcess/ios/WebProcessIOS.mm: Removed.
91         * WebProcess/mac/WebProcessMac.mm: Removed.
92         Copy mac/WebProcessMac.mm to cocoa/WebProcessCocoa.mm, and add #if USE(APPKIT) where appropriate.
93
94 2014-02-17  Anders Carlsson  <andersca@apple.com>
95
96         Stop using isMainThread() in WebKit2
97         https://bugs.webkit.org/show_bug.cgi?id=128940
98         <rdar://problem/15963666>
99
100         Reviewed by Enrica Casucci.
101
102         Since isMainThread() has a different meaning when the web thread is enabled on iOS,
103         just use RunLoop::isMain() to check if we're executing on the main thread.
104
105         * DatabaseProcess/DatabaseProcess.cpp:
106         (WebKit::DatabaseProcess::ensurePathExists):
107         (WebKit::DatabaseProcess::postDatabaseTask):
108         (WebKit::DatabaseProcess::performNextDatabaseTask):
109         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
110         (WebKit::UniqueIDBDatabase::shutdown):
111         (WebKit::UniqueIDBDatabase::shutdownBackingStore):
112         (WebKit::UniqueIDBDatabase::didShutdownBackingStore):
113         (WebKit::UniqueIDBDatabase::deleteDatabase):
114         (WebKit::UniqueIDBDatabase::getOrEstablishIDBDatabaseMetadata):
115         (WebKit::UniqueIDBDatabase::openBackingStoreAndReadMetadata):
116         (WebKit::UniqueIDBDatabase::didOpenBackingStoreAndReadMetadata):
117         (WebKit::UniqueIDBDatabase::postTransactionOperation):
118         (WebKit::UniqueIDBDatabase::didCompleteTransactionOperation):
119         (WebKit::UniqueIDBDatabase::changeDatabaseVersion):
120         (WebKit::UniqueIDBDatabase::createObjectStore):
121         (WebKit::UniqueIDBDatabase::deleteObjectStore):
122         (WebKit::UniqueIDBDatabase::clearObjectStore):
123         (WebKit::UniqueIDBDatabase::createIndex):
124         (WebKit::UniqueIDBDatabase::deleteIndex):
125         (WebKit::UniqueIDBDatabase::putRecord):
126         (WebKit::UniqueIDBDatabase::getRecord):
127         (WebKit::UniqueIDBDatabase::openCursor):
128         (WebKit::UniqueIDBDatabase::cursorAdvance):
129         (WebKit::UniqueIDBDatabase::cursorIterate):
130         (WebKit::UniqueIDBDatabase::count):
131         (WebKit::UniqueIDBDatabase::deleteRange):
132         (WebKit::UniqueIDBDatabase::openBackingStoreTransaction):
133         (WebKit::UniqueIDBDatabase::beginBackingStoreTransaction):
134         (WebKit::UniqueIDBDatabase::commitBackingStoreTransaction):
135         (WebKit::UniqueIDBDatabase::resetBackingStoreTransaction):
136         (WebKit::UniqueIDBDatabase::rollbackBackingStoreTransaction):
137         (WebKit::UniqueIDBDatabase::changeDatabaseVersionInBackingStore):
138         (WebKit::UniqueIDBDatabase::createObjectStoreInBackingStore):
139         (WebKit::UniqueIDBDatabase::deleteObjectStoreInBackingStore):
140         (WebKit::UniqueIDBDatabase::clearObjectStoreInBackingStore):
141         (WebKit::UniqueIDBDatabase::createIndexInBackingStore):
142         (WebKit::UniqueIDBDatabase::deleteIndexInBackingStore):
143         (WebKit::UniqueIDBDatabase::putRecordInBackingStore):
144         (WebKit::UniqueIDBDatabase::getRecordFromBackingStore):
145         (WebKit::UniqueIDBDatabase::openCursorInBackingStore):
146         (WebKit::UniqueIDBDatabase::absoluteDatabaseDirectory):
147         (WebKit::UniqueIDBDatabase::postMainThreadTask):
148         (WebKit::UniqueIDBDatabase::performNextMainThreadTask):
149         (WebKit::UniqueIDBDatabase::postDatabaseTask):
150         (WebKit::UniqueIDBDatabase::performNextDatabaseTask):
151         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
152         (WebKit::generateDatabaseId):
153         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::UniqueIDBDatabaseBackingStoreSQLite):
154         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::~UniqueIDBDatabaseBackingStoreSQLite):
155         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createAndPopulateInitialMetadata):
156         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::extractExistingMetadata):
157         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::openSQLiteDatabaseAtPath):
158         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getOrEstablishMetadata):
159         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::establishTransaction):
160         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::beginTransaction):
161         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::commitTransaction):
162         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::resetTransaction):
163         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::rollbackTransaction):
164         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::changeDatabaseVersion):
165         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createObjectStore):
166         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteObjectStore):
167         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::clearObjectStore):
168         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createIndex):
169         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteIndex):
170         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::generateKeyNumber):
171         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::updateKeyGeneratorNumber):
172         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::keyExistsInObjectStore):
173         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::putRecord):
174         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::putIndexRecord):
175         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getIndexRecord):
176         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteRecord):
177         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteRange):
178         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRecordFromObjectStore):
179         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRangeRecordFromObjectStore):
180         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::count):
181         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::openCursor):
182         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::advanceCursor):
183         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::iterateCursor):
184         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::notifyCursorsOfChanges):
185         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
186         (WebKit::NetworkBlobRegistry::shared):
187         * NetworkProcess/HostRecord.cpp:
188         (WebKit::HostRecord::scheduleResourceLoader):
189         (WebKit::HostRecord::addLoaderInProgress):
190         (WebKit::HostRecord::removeLoader):
191         * NetworkProcess/NetworkResourceLoadScheduler.cpp:
192         (WebKit::NetworkResourceLoadScheduler::removeLoader):
193         (WebKit::NetworkResourceLoadScheduler::receivedRedirect):
194         (WebKit::NetworkResourceLoadScheduler::removeScheduledLoaders):
195         * NetworkProcess/NetworkResourceLoader.cpp:
196         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
197         (WebKit::NetworkResourceLoader::~NetworkResourceLoader):
198         (WebKit::NetworkResourceLoader::start):
199         (WebKit::NetworkResourceLoader::cleanup):
200         (WebKit::NetworkResourceLoader::abort):
201         (WebKit::NetworkResourceLoader::willSendRequestAsync):
202         (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
203         * NetworkProcess/NetworkResourceLoader.h:
204         (WebKit::NetworkResourceLoader::setHostRecord):
205         (WebKit::NetworkResourceLoader::hostRecord):
206         * NetworkProcess/mac/DiskCacheMonitor.mm:
207         (WebKit::DiskCacheMonitor::DiskCacheMonitor):
208         * Shared/AsyncRequest.cpp:
209         (WebKit::generateRequestID):
210         * Shared/Authentication/AuthenticationManager.cpp:
211         (WebKit::generateAuthenticationChallengeID):
212         (WebKit::AuthenticationManager::establishIdentifierForChallenge):
213         (WebKit::AuthenticationManager::useCredentialForChallenge):
214         (WebKit::AuthenticationManager::continueWithoutCredentialForChallenge):
215         (WebKit::AuthenticationManager::cancelChallenge):
216         * Shared/Downloads/mac/DownloadMac.mm:
217         (dispatchOnMainThread):
218         * Shared/Plugins/NPObjectProxy.cpp:
219         (WebKit::NPObjectProxy::~NPObjectProxy):
220         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
221         (WebKit::getPluginInfoFromCarbonResources):
222         * Shared/SessionTracker.cpp:
223         (WebKit::staticSessionMap):
224         (WebKit::storageSessionToID):
225         (WebKit::identifierBase):
226         (WebKit::SessionTracker::destroySession):
227         (WebKit::SessionTracker::setIdentifierBase):
228         * UIProcess/APISession.cpp:
229         (API::generateID):
230         (API::Session::defaultSession):
231         (API::Session::legacyPrivateSession):
232         * WebProcess/Cookies/WebCookieManager.cpp:
233         (WebKit::WebCookieManager::dispatchCookiesDidChange):
234         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
235         (WebKit::WebIDBFactoryBackend::open):
236         (WebKit::WebIDBFactoryBackend::deleteDatabase):
237         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
238         (WebKit::generateServerConnectionIdentifier):
239         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
240         (WebKit::WebFrameNetworkingContext::storageSession):
241         * WebProcess/WebPage/EventDispatcher.cpp:
242         (WebKit::EventDispatcher::dispatchWheelEvent):
243
244 2014-02-17  Anders Carlsson  <andersca@apple.com>
245
246         Remove view source code
247         https://bugs.webkit.org/show_bug.cgi?id=127233
248
249         Reviewed by Antti Koivisto.
250
251         * UIProcess/WebPageProxy.cpp:
252         (WebKit::WebPageProxy::WebPageProxy):
253         * UIProcess/WebPageProxy.h:
254         * WebProcess/WebPage/WebPage.cpp:
255         * WebProcess/WebPage/WebPage.h:
256         * WebProcess/WebPage/WebPage.messages.in:
257
258 2014-02-17  Sergio Correia  <sergio.correia@openbossa.org>
259
260         Replace uses of PassOwnPtr/OwnPtr with std::unique_ptr in WebCore/inspector
261         https://bugs.webkit.org/show_bug.cgi?id=128681
262
263         Reviewed by Timothy Hatcher.
264
265         Another step towards getting rid of PassOwnPtr/OwnPtr, now targeting
266         WebCore/inspector/*. Besides files in there, a few other files in
267         JavaScriptCore/inspector, WebKit/, WebKit2/WebProcess/WebCoreSupport/
268         and WebCore/testing were touched.
269
270         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
271
272 2014-02-17  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
273
274         Unreviewed EFL build fix attempt
275
276         * CMakeLists.txt: Remove WebHistoryClient.cpp after r164230.
277
278 2014-02-17  Anders Carlsson  <andersca@apple.com>
279
280         WebKitGTK+ should stop calling functions to set the view source mode
281         https://bugs.webkit.org/show_bug.cgi?id=128919
282
283         Reviewed by Carlos Garcia Campos.
284
285         This is a first step towards getting rid of the view source mode from WebCore. 
286         View source shouldn't be a mode on the web page and can be implemented in other ways by
287         embedding apps. Furthermore, the inspector has an excellent view source mode.
288
289         * UIProcess/API/gtk/WebKitWebView.cpp:
290         (webkit_web_view_set_view_mode):
291         (webkit_web_view_get_view_mode):
292         Turn these into no-ops.
293
294 2014-02-17  Anders Carlsson  <andersca@apple.com>
295
296         Turn the history client into a fancy API::HistoryClient abstract base class
297         https://bugs.webkit.org/show_bug.cgi?id=128917
298
299         Reviewed by Andreas Kling.
300
301         * UIProcess/API/APIHistoryClient.h: Renamed from Source/WebKit2/UIProcess/WebHistoryClient.h.
302         (API::HistoryClient::~HistoryClient):
303         (API::HistoryClient::didNavigateWithNavigationData):
304         (API::HistoryClient::didPerformClientRedirect):
305         (API::HistoryClient::didPerformServerRedirect):
306         (API::HistoryClient::didUpdateHistoryTitle):
307         (API::HistoryClient::populateVisitedLinks):
308         (API::HistoryClient::shouldTrackVisitedLinks):
309         * UIProcess/API/C/WKContext.cpp:
310         (WKContextSetHistoryClient):
311         * UIProcess/WebContext.cpp:
312         (WebKit::WebContext::WebContext):
313         (WebKit::WebContext::setHistoryClient):
314         (WebKit::WebContext::createNewWebProcess):
315         (WebKit::WebContext::populateVisitedLinks):
316         * UIProcess/WebContext.h:
317         (WebKit::WebContext::historyClient):
318         * UIProcess/WebHistoryClient.cpp: Removed.
319         * UIProcess/WebPageProxy.h:
320         * UIProcess/WebProcessProxy.cpp:
321         * WebKit2.xcodeproj/project.pbxproj:
322
323 2014-02-17  Dan Bernstein  <mitz@apple.com>
324
325         Try to fix iOS Debug builds without breaking Release builds.
326
327         * WebProcess/WebPage/PageBanner.cpp:
328         * WebProcess/WebPage/PageBanner.h:
329
330 2014-02-16  Dan Bernstein  <mitz@apple.com>
331
332         Speculative iOS build fix.
333
334         * WebProcess/WebPage/mac/PageBannerMac.mm:
335
336 2014-02-16  Dan Bernstein  <mitz@apple.com>
337
338         Speculative iOS build fix.
339
340         * WebProcess/WebPage/PageBanner.h:
341
342 2014-02-16  Dan Bernstein  <mitz@apple.com>
343
344         Stop using PLATFORM(MAC) in Source except where it means “OS X but not iOS”
345         https://bugs.webkit.org/show_bug.cgi?id=128885
346
347         Reviewed by Anders Carlsson.
348
349         * Configurations/WebKit2.xcconfig: Removed PageBannerMac.mm and WKBundlePageBannerMac.mm
350         from EXCLUDED_SOURCE_FILE_NAMES_iphoneos, now that these files are guarded with
351         !PLATFORM(IOS).
352         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp: Changed PLATFORM(MAC) to
353         PLATFORM(COCOA).
354         (WKBundleFrameCopyWebArchiveFilteringSubframes):
355         * WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm: Guarded with !PLATFORM(IOS).
356         * WebProcess/InjectedBundle/InjectedBundle.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
357         (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
358         * WebProcess/InjectedBundle/InjectedBundle.h: Changed PLATFORM(MAC) to USE(FOUNDATION)
359         around use of NSBundle.
360         * WebProcess/InjectedBundle/InjectedBundleUserMessageCoders.h: Changed PLATFORM(MAC) to
361         PLATFORM(COCOA).
362         (WebKit::InjectedBundleUserMessageEncoder::encode):
363         (WebKit::InjectedBundleUserMessageDecoder::decode):
364         * WebProcess/Network/WebResourceLoader.cpp: Ditto.
365         (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
366         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: Ditto.
367         (WebKit::NPN_GetValue):
368         (WebKit::NPN_SetValue):
369         (WebKit::initializeBrowserFuncs):
370         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: Ditto.
371         (WebKit::NetscapePlugin::NetscapePlugin):
372         (WebKit::NetscapePlugin::supportsSnapshotting):
373         * WebProcess/Plugins/Netscape/NetscapePlugin.h: Ditto.
374         * WebProcess/Plugins/Plugin.cpp: Ditto.
375         (WebKit::Plugin::Parameters::encode):
376         (WebKit::Plugin::Parameters::decode):
377         * WebProcess/Plugins/Plugin.h: Ditto.
378         * WebProcess/Plugins/PluginController.h: Ditto.
379         * WebProcess/Plugins/PluginProcessConnectionManager.cpp: Changed PLATFORM(MAC) to
380         USE(DARWIN) around use of Mach-based IPC.
381         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
382         * WebProcess/Plugins/PluginProxy.cpp: Chanegd PLATFORM(MAC) to PLATFORM(COCOA).
383         * WebProcess/Plugins/PluginProxy.h: Ditto.
384         * WebProcess/Plugins/PluginProxy.messages.in: Ditto.
385         * WebProcess/Plugins/PluginView.cpp: Ditto.
386         (WebKit::PluginView::destroyPluginAndReset):
387         (WebKit::PluginView::viewStateDidChange):
388         (WebKit::PluginView::didInitializePlugin):
389         (WebKit::PluginView::invalidateRect):
390         (WebKit::PluginView::pluginSnapshotTimerFired):
391         * WebProcess/Plugins/PluginView.h: Ditto.
392         * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp: Ditto.
393         * WebProcess/WebCoreSupport/WebChromeClient.cpp: Ditto.
394         (WebKit::WebChromeClient::windowRect):
395         * WebProcess/WebCoreSupport/WebChromeClient.h: Ditto.
396         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp: Ditto.
397         * WebProcess/WebCoreSupport/WebContextMenuClient.h: Ditto.
398         * WebProcess/WebCoreSupport/WebDragClient.cpp: Ditto.
399         * WebProcess/WebCoreSupport/WebDragClient.h: Ditto.
400         * WebProcess/WebCoreSupport/WebEditorClient.cpp: Ditto.
401         (WebKit::WebEditorClient::shouldEraseMarkersAfterChangeSelection):
402         * WebProcess/WebCoreSupport/WebEditorClient.h: Ditto.
403         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: Ditto.
404         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
405         (WebKit::WebFrameLoaderClient::createPlugin):
406         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: Ditto.
407         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Ditto.
408         * WebProcess/WebCoreSupport/WebPlatformStrategies.h: Ditto.
409         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: Removed PLATFORM(MAC).
410         (InitWebCoreSystemInterface):
411         * WebProcess/WebPage/DrawingArea.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
412         (WebKit::DrawingArea::create):
413         * WebProcess/WebPage/DrawingArea.h: Ditto.
414         * WebProcess/WebPage/DrawingArea.messages.in: Ditto.
415         * WebProcess/WebPage/EventDispatcher.cpp: Ditto.
416         (WebKit::EventDispatcher::wheelEvent):
417         * WebProcess/WebPage/LayerTreeHost.h: Ditto.
418         * WebProcess/WebPage/PageBanner.cpp: Added !PLATFORM(IOS)
419         * WebProcess/WebPage/PageBanner.h: Ditto.
420         * WebProcess/WebPage/WebFrame.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
421         * WebProcess/WebPage/WebFrame.h: Ditto.
422         * WebProcess/WebPage/WebInspector.cpp: Ditto.
423         (WebKit::WebInspector::WebInspector):
424         * WebProcess/WebPage/WebInspector.h: Ditto.
425         * WebProcess/WebPage/WebPage.cpp: Ditto.
426         (WebKit::WebPage::WebPage):
427         (WebKit::isContextClick):
428         (WebKit::WebPage::getSelectionAsWebArchiveData):
429         (WebKit::WebPage::getWebArchiveOfFrame):
430         (WebKit::WebPage::updatePreferences):
431         (WebKit::WebPage::sendSetWindowFrame):
432         (WebKit::WebPage::beginPrinting):
433         (WebKit::WebPage::computePagesForPrinting):
434         * WebProcess/WebPage/WebPage.h: Ditto.
435         * WebProcess/WebPage/WebPage.messages.in: Ditto.
436         * WebProcess/WebPage/mac/PageBannerMac.mm: Guarded with !PLATFORM(IOS).
437         * WebProcess/WebProcess.cpp:
438         (WebKit::WebProcess::WebProcess): Changed PLATFORM(MAC) to PLATFORM(COCOA).
439         (WebKit::WebProcess::initializeWebProcess): Ditto.
440         (WebKit::WebProcess::ensureNetworkProcessConnection): Changed PLATFORM(MAC) to OS(DARWIN).
441         (WebKit::WebProcess::ensurePrivateBrowsingSession): Changed PLATFORM(MAC) to
442         PLATFORM(COCOA).
443         (WebKit::WebProcess::destroyPrivateBrowsingSession): Ditto.
444         (WebKit::WebProcess::ensureWebToDatabaseProcessConnection): Changed PLATFORM(MAC) to
445         OS(DARWIN).
446         (WebKit::WebProcess::nonVisibleProcessCleanupTimerFired): Changed PLATFORM(MAC) to
447         PLATFORM(COCOA)
448         * WebProcess/WebProcess.h: Ditto.
449         * WebProcess/WebProcess.messages.in: Removed PLATFORM(MAC) guard around
450         SetProcessSuppressionEnabled. Changed it to PLATFORM(COCOA) around SetQOS.
451
452 2014-02-15  Alexey Proskuryakov  <ap@apple.com>
453
454         [Mac] All WebKit clients should encrypt WebCrypto keys automatically
455         https://bugs.webkit.org/show_bug.cgi?id=128852
456
457         Reviewed by Oliver Hunt.
458
459         * UIProcess/WebPageProxy.cpp:
460         (WebKit::WebPageProxy::wrapCryptoKey):
461         (WebKit::WebPageProxy::unwrapCryptoKey):
462         Call the default implementation if key is not provided by a client.
463
464 2014-02-15  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
465
466         [EFL][WK2] Stop calling mktemp(3).
467         https://bugs.webkit.org/show_bug.cgi?id=128826
468
469         Reviewed by Gyuyoung Kim.
470
471         mktemp(3) is an insecure function and should be avoided at all costs.
472         Replace its usage with mkdtemp(3): instead of just getting a file name
473         that is supposed to be random and unused, we now create a directory
474         with a random name and then put whatever files we need there with fixed
475         names.
476
477         * UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp:
478         (TEST_F):
479         * UIProcess/API/efl/tests/test_ewk2_download_job.cpp:
480         (TEST_F):
481
482 2014-02-15  Dan Bernstein  <mitz@apple.com>
483
484         Stop using PLATFORM(MAC) in WebKit2/UIProcess except where it means “OS X but not iOS”
485         https://bugs.webkit.org/show_bug.cgi?id=128868
486
487         Reviewed by Anders Carlsoon.
488
489         * UIProcess/API/C/WKPage.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
490         * UIProcess/Databases/DatabaseProcessProxy.cpp:
491         (WebKit::DatabaseProcessProxy::didCreateDatabaseToWebProcessConnection): Changed
492         PLATFORM(MAC) to OS(DARWIN) around use of Mach-based IPC.
493         * UIProcess/DrawingAreaProxy.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA)
494         (WebKit::DrawingAreaProxy::DrawingAreaProxy):
495         * UIProcess/DrawingAreaProxy.h: Ditto.
496         * UIProcess/DrawingAreaProxy.messages.in: Ditto.
497         * UIProcess/Launcher/ProcessLauncher.cpp:
498         (WebKit::ProcessLauncher::didFinishLaunchingProcess): Changed PLATFORM(MAC) to OS(DARWIN)
499         around use of Mach API.
500         * UIProcess/Launcher/ProcessLauncher.h: Ditto.
501         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h: Changed PLATFORM(MAC) to
502         PLATFORM(COCOA)
503         * UIProcess/Network/NetworkProcessProxy.cpp:
504         (WebKit::NetworkProcessProxy::networkProcessCrashedOrFailedToLaunch): Changed PLATFORM(MAC)
505         to OS(DARWIN).
506         (WebKit::NetworkProcessProxy::didCreateNetworkConnectionToWebProcess): Ditto.
507         (WebKit::NetworkProcessProxy::didFinishLaunching): Changed PLATFORM(MAC) to PLATFORM(COCOA)
508         around process suppression call.
509         * UIProcess/Network/NetworkProcessProxy.h: Ditto.
510         * UIProcess/PageClient.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
511         * UIProcess/Plugins/PluginInfoStore.cpp: Ditto.
512         * UIProcess/Plugins/PluginProcessManager.h: Ditto.
513         * UIProcess/Plugins/PluginProcessProxy.cpp:
514         (WebKit::PluginProcessProxy::PluginProcessProxy): Ditto.
515         (WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch): Changed PLATFORM(MAC)
516         to OS(DARWIN).
517         (WebKit::PluginProcessProxy::didClose): Changed PLATFORM(MAC) to PLATFORM(COCOA).
518         (WebKit::PluginProcessProxy::didFinishLaunching): Changed PLATFORM(MAC) to OS(DARWIN) around
519         use of Mach-based IPC, and to PLATFORM(COCOA) around SetQOS.
520         (WebKit::PluginProcessProxy::didCreateWebProcessConnection): Changed PLATFORM(MAC) to
521         OS(DARWIN).
522         * UIProcess/Plugins/PluginProcessProxy.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
523         * UIProcess/Plugins/PluginProcessProxy.messages.in: Ditto.
524         * UIProcess/TextChecker.h: Ditto.
525         * UIProcess/WebContext.cpp: Ditto.
526         (WebKit::WebContext::ensureNetworkProcess):
527         (WebKit::WebContext::createNewWebProcess):
528         (WebKit::WebContext::setHTTPPipeliningEnabled):
529         (WebKit::WebContext::httpPipeliningEnabled):
530         (WebKit::WebContext::pluginInfoStoreDidLoadPlugins):
531         * UIProcess/WebContext.h: Ditto.
532         * UIProcess/WebContext.messages.in: Ditto.
533         * UIProcess/WebContextUserMessageCoders.h: Ditto.
534         (WebKit::WebContextUserMessageEncoder::encode):
535         (WebKit::WebContextUserMessageDecoder::decode):
536         * UIProcess/WebCookieManagerProxy.cpp: Ditto.
537         (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy):
538         * UIProcess/WebCookieManagerProxy.h: Ditto.
539         * UIProcess/WebFormSubmissionListenerProxy.h: Ditto.
540         * UIProcess/WebFramePolicyListenerProxy.h: Ditto.
541         * UIProcess/WebInspectorProxy.h: Added !PLATFORM(IOS) around members reltated to managing
542         the inspector window and its view.
543         * UIProcess/WebPageProxy.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
544         (WebKit::WebPageProxy::WebPageProxy):
545         (WebKit::WebPageProxy::initializeWebPage):
546         (WebKit::WebPageProxy::recordNavigationSnapshot):
547         (WebKit::WebPageProxy::canShowMIMEType):
548         (WebKit::canCoalesce):
549         (WebKit::coalesce):
550         (WebKit::WebPageProxy::findPlugin):
551         (WebKit::WebPageProxy::editorStateChanged):
552         (WebKit::WebPageProxy::contextMenuItemSelected):
553         (WebKit::WebPageProxy::didReceiveEvent):
554         (WebKit::WebPageProxy::didBlockInsecurePluginVersion):
555         * UIProcess/WebPageProxy.h: Ditto.
556         * UIProcess/WebPageProxy.messages.in: Ditto.
557         * UIProcess/WebProcessProxy.cpp: Ditto.
558         (WebKit::WebProcessProxy::WebProcessProxy):
559         (WebKit::WebProcessProxy::createWebPage):
560         (WebKit::WebProcessProxy::addExistingWebPage):
561         (WebKit::WebProcessProxy::removeWebPage):
562         (WebKit::WebProcessProxy::didFinishLaunching):
563         (WebKit::WebProcessProxy::pageSuppressibilityChanged):
564         (WebKit::WebProcessProxy::pagePreferencesChanged):
565         * UIProcess/WebProcessProxy.h: Ditto.
566         * UIProcess/cf/WebPreferencesCF.cpp: Removed this file which was not used in any
567         configuration.
568         * UIProcess/ios/WebInspectorProxyIOS.mm: Removed functions that no longer need to be
569         implemented for iOS.
570         * WebKit2.xcodeproj/project.pbxproj: Removed reference to WebPreferencesCF.cpp.
571
572 2014-02-15  Jeremy Jones  <jeremyj@apple.com>
573
574         messages.py doesn't handle parameters with more than one level of scope.
575         https://bugs.webkit.org/show_bug.cgi?id=128573
576
577         Reviewed by Simon Fraser.
578
579         Support .messages.in header include generation for parameter types with more than 1 level of scope.
580
581         Add a test case and update expected results.
582
583         * Scripts/webkit2/LegacyMessageReceiver-expected.cpp:
584         (WebKit::WebPage::didReceiveWebPageMessage):
585         * Scripts/webkit2/LegacyMessages-expected.h:
586         (Messages::WebPage::SetVideoLayerID::receiverName):
587         (Messages::WebPage::SetVideoLayerID::name):
588         (Messages::WebPage::SetVideoLayerID::SetVideoLayerID):
589         (Messages::WebPage::SetVideoLayerID::arguments):
590         * Scripts/webkit2/MessageReceiver-expected.cpp:
591         (WebKit::WebPage::didReceiveMessage):
592         * Scripts/webkit2/Messages-expected.h:
593         (Messages::WebPage::SetVideoLayerID::receiverName):
594         (Messages::WebPage::SetVideoLayerID::name):
595         (Messages::WebPage::SetVideoLayerID::SetVideoLayerID):
596         (Messages::WebPage::SetVideoLayerID::arguments):
597         * Scripts/webkit2/messages.py:
598         (headers_for_type):
599         * Scripts/webkit2/messages_unittest.py:
600         * Scripts/webkit2/test-legacy-messages.in:
601         * Scripts/webkit2/test-messages.in:
602
603 2014-02-14  Carlos Garcia Campos  <cgarcia@igalia.com>
604
605         [GTK] Fix marshaller used in WebKitWebPage::document-loaded signal
606         https://bugs.webkit.org/show_bug.cgi?id=128808
607
608         Reviewed by Sergio Villar Senin.
609
610         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
611         (webkit_web_page_class_init): Use g_cclosure_marshal_VOID__VOID
612         instead of g_cclosure_marshal_VOID__OBJECT.
613
614 2014-02-14  Anders Carlsson  <andersca@apple.com>
615
616         Add SPI for monitoring web process crashes
617         https://bugs.webkit.org/show_bug.cgi?id=128851
618
619         Reviewed by Beth Dakin.
620
621         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
622         * UIProcess/Cocoa/NavigationState.h:
623         * UIProcess/Cocoa/NavigationState.mm:
624         (WebKit::NavigationState::setNavigationDelegate):
625         (WebKit::NavigationState::LoaderClient::processDidCrash):
626
627 2014-02-14  Anders Carlsson  <andersca@apple.com>
628
629         Add SPI for authentication 
630         https://bugs.webkit.org/show_bug.cgi?id=128847
631
632         Reviewed by Dan Bernstein.
633
634         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
635         * UIProcess/Cocoa/NavigationState.h:
636         * UIProcess/Cocoa/NavigationState.mm:
637         (WebKit::NavigationState::setNavigationDelegate):
638         (WebKit::NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame):
639         (WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame):
640
641 2014-02-14  Anders Carlsson  <andersca@apple.com>
642
643         Add WKBackForwardListDidChangeNotification 
644         https://bugs.webkit.org/show_bug.cgi?id=128839
645
646         Reviewed by Dan Bernstein.
647
648         Also, make LoaderClient::didChangeBackForwardList take a Vector of WebBackForwardListItems
649         instead of a pointer to a Vector of API::Objects.
650
651         * Shared/API/Cocoa/WKFoundation.h:
652         * UIProcess/API/APILoaderClient.h:
653         (API::LoaderClient::didChangeBackForwardList):
654         * UIProcess/API/C/WKPage.cpp:
655         (WKPageSetPageLoaderClient):
656         * UIProcess/API/Cocoa/WKBackForwardList.h:
657         * UIProcess/API/Cocoa/WKBackForwardList.mm:
658         * UIProcess/Cocoa/NavigationState.h:
659         * UIProcess/Cocoa/NavigationState.mm:
660         (WebKit::NavigationState::LoaderClient::didChangeBackForwardList):
661         * UIProcess/WebBackForwardList.cpp:
662         (WebKit::WebBackForwardList::addItem):
663         (WebKit::WebBackForwardList::goToItem):
664         (WebKit::WebBackForwardList::clear):
665         * UIProcess/WebPageProxy.cpp:
666         (WebKit::WebPageProxy::didChangeBackForwardList):
667         * UIProcess/WebPageProxy.h:
668
669 2014-02-12  Jer Noble  <jer.noble@apple.com>
670
671         [iOS][WK2] Always enable AVKit in WK2
672         https://bugs.webkit.org/show_bug.cgi?id=128686
673
674         Reviewed by Simon Fraser.
675
676         Enable AVKit in iOS WK2 by default. This enables <video> element full screen in WK2.
677
678         * WebProcess/WebPage/WebPage.cpp:
679         (WebKit::WebPage::updatePreferences):
680
681 2014-02-14  Benjamin Poulain  <bpoulain@apple.com>
682
683         [WK2][iOS] Add WKContentObservation support when dispatching synthetic mouse events
684         https://bugs.webkit.org/show_bug.cgi?id=128715
685
686         Reviewed by Darin Adler.
687
688         * WebProcess/WebPage/ios/WebPageIOS.mm:
689         (WebKit::WebPage::handleTap):
690
691 2014-02-14  Benjamin Poulain  <bpoulain@apple.com>
692
693         <rdar://problem/15994340> WK2: Cannot scroll to the bottom of the page when the keyboard is on the screen
694         https://bugs.webkit.org/show_bug.cgi?id=128710
695
696         Reviewed by Enrica Casucci.
697
698         WKView/WKWebView needs to adapt the UIScrollView insets to leave some space for the keyboard.
699
700         * UIProcess/API/Cocoa/WKWebView.mm:
701         (-[WKWebView initWithFrame:configuration:]):
702         (-[WKWebView dealloc]):
703         (-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
704         (-[WKWebView _keyboardWillChangeFrame:]):
705         (-[WKWebView _keyboardDidChangeFrame:]):
706         (-[WKWebView _keyboardWillShow:]):
707         (-[WKWebView _keyboardWillHide:]):
708         * UIProcess/API/ios/WKContentView.h:
709         * UIProcess/API/ios/WKContentView.mm:
710         (-[WKContentView isAssistingNode]):
711         * UIProcess/API/ios/WKInteractionView.h:
712         * UIProcess/API/ios/WKViewIOS.mm:
713         (-[WKView dealloc]):
714         (-[WKView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
715         (-[WKView _keyboardChangedWithInfo:adjustScrollView:]):
716         (-[WKView _keyboardWillChangeFrame:]):
717         (-[WKView _keyboardDidChangeFrame:]):
718         (-[WKView _keyboardWillShow:]):
719         (-[WKView _keyboardWillHide:]):
720
721 2014-02-14  Dan Bernstein  <mitz@apple.com>
722
723         Stop using PLATFORM(MAC) in WebKit2/PluginProcess except where it means “OS X but not iOS”
724         https://bugs.webkit.org/show_bug.cgi?id=128802
725
726         Reviewed by Darin Adler.
727
728         * PluginProcess/PluginControllerProxy.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
729         (WebKit::PluginControllerProxy::PluginControllerProxy):
730         (WebKit::PluginControllerProxy::paint):
731         * PluginProcess/PluginControllerProxy.h: Ditto.
732         * PluginProcess/PluginControllerProxy.messages.in: Ditto.
733         * PluginProcess/PluginProcess.cpp:
734         (WebKit::PluginProcess::PluginProcess): Ditto.
735         (WebKit::PluginProcess::netscapePluginModule): Added && !PLATFORM(IOS) around Mac-specific
736         quirk.
737         (WebKit::PluginProcess::createWebProcessConnection): Changed PLATFORM(MAC) to OS(DARWIN)
738         around use of Mach-based IPC.
739         * PluginProcess/PluginProcess.h: Changed PLATFORM(MAC) to PLATFORM(COCOA), and to
740         USE(APPKIT) around override of stopRunLoop, which is implemented using AppKit.
741         * PluginProcess/PluginProcess.messages.in: Removed PLATFORM(MAC) guard around
742         SetProcessSuppressionEnabled. Changed it to PLATFORM(COCOA) around SetQOS.
743         * PluginProcess/WebProcessConnection.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
744         (WebKit::WebProcessConnection::createPluginInternal):
745         (WebKit::WebProcessConnection::createPlugin):
746
747 2014-02-14  Anders Carlsson  <andersca@apple.com>
748
749         Add -[WKWebView estimatedProgress]
750         https://bugs.webkit.org/show_bug.cgi?id=128830
751
752         Reviewed by Dan Bernstein.
753
754         * UIProcess/API/Cocoa/WKWebView.h:
755         * UIProcess/API/Cocoa/WKWebView.mm:
756         (-[WKWebView estimatedProgress]):
757         * UIProcess/Cocoa/NavigationState.mm:
758         (WebKit::NavigationState::willChangeEstimatedProgress):
759         (WebKit::NavigationState::didChangeEstimatedProgress):
760
761 2014-02-13  Simon Fraser  <simon.fraser@apple.com>
762
763         Give ScrollingTree(State)Nodes a reference to another layer, which is used for moving overflow:scroll contents around
764         https://bugs.webkit.org/show_bug.cgi?id=128790
765
766         Reviewed by Beth Dakin.
767
768         Have scrolling tree nodes and state nodes track another layer, the
769         "scrolled contents layer", for accelerated overflow:scroll.
770         
771         When making ScrollingTreeScrollingNodes for overflow:scroll, the node's
772         layer will point to the composited element's primary layer, and its
773         scrolledContentsLayer to the layer that gets moved around by scrolling.
774         
775         Do some other cleanup on AsyncScrollingCoordinator, removing
776         functions that just called through to nodes.
777
778         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
779         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
780
781 2014-02-14  Anders Carlsson  <andersca@apple.com>
782
783         Add -[WKWebView _handle]
784         https://bugs.webkit.org/show_bug.cgi?id=128828
785
786         Reviewed by Dan Bernstein.
787
788         * UIProcess/API/Cocoa/WKWebView.mm:
789         (-[WKWebView _handle]):
790         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
791
792 2014-02-13  Dan Bernstein  <mitz@apple.com>
793
794         [Cocoa] Expose the bundle form client
795         https://bugs.webkit.org/show_bug.cgi?id=128792
796
797         Reviewed by Anders Carlsson.
798
799         * WebKit2.xcodeproj/project.pbxproj: Added new file.
800         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Added.
801         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
802         (didFocusTextField): Implemented this WKBundlePageFormClient callback by calling the form
803         delegate.
804         (setUpFormClient): Added. Initializes the form client with the above function.
805         (-[WKWebProcessPlugInBrowserContextController _formDelegate]): Added this getter.
806         (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Added. Initializes or
807         clears the form client.
808         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
809         Declared _formDelegate property.
810
811 2014-02-13  Dan Bernstein  <mitz@apple.com>
812
813         [Cocoa] Add a way to get the page from a frame in the injected bundle
814         https://bugs.webkit.org/show_bug.cgi?id=128791
815
816         Reviewed by Anders Carlsson.
817
818         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
819         (-[WKWebProcessPlugInFrame _browserContextController]): Added.
820         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h: Declared
821         _browserContextController property.
822
823 2014-02-13  Anders Carlsson  <andersca@apple.com>
824
825         Add -[WKWebView stopLoading:]
826         https://bugs.webkit.org/show_bug.cgi?id=128784
827
828         Reviewed by Dan Bernstein.
829
830         * UIProcess/API/Cocoa/WKWebView.h:
831         * UIProcess/API/Cocoa/WKWebView.mm:
832         (-[WKWebView stopLoading:]):
833
834 2014-02-13  Anders Carlsson  <andersca@apple.com>
835
836         Add -[WKWebView activeURL]
837         https://bugs.webkit.org/show_bug.cgi?id=128777
838
839         Reviewed by Dan Bernstein.
840
841         * UIProcess/API/Cocoa/WKWebView.h:
842         * UIProcess/API/Cocoa/WKWebView.mm:
843         (-[WKWebView activeURL]):
844         * UIProcess/Cocoa/NavigationState.mm:
845         (WebKit::NavigationState::willChangeActiveURL):
846         (WebKit::NavigationState::didChangeActiveURL):
847
848 2014-02-13  Anders Carlsson  <andersca@apple.com>
849
850         Add -[WKWebView goToBackForwardListItem:]
851         https://bugs.webkit.org/show_bug.cgi?id=128773
852
853         Reviewed by Andreas Kling.
854
855         * UIProcess/API/Cocoa/WKWebView.h:
856         * UIProcess/API/Cocoa/WKWebView.mm:
857         (-[WKWebView goToBackForwardListItem:]):
858
859 2014-02-13  Anders Carlsson  <andersca@apple.com>
860
861         Make WKWebViewConfigurationPrivate.h private
862         https://bugs.webkit.org/show_bug.cgi?id=128761
863
864         Reviewed by Tim Horton.
865
866         * WebKit2.xcodeproj/project.pbxproj:
867
868 2014-02-13  Myles C. Maxfield  <mmaxfield@apple.com>
869
870         During a copy, position:fixed gets converted to position:absolute even if only part of the document is selected
871         https://bugs.webkit.org/show_bug.cgi?id=128688
872
873         Reviewed by Ryosuke Niwa.
874
875         Renames the ConvertPositionStyleOnCopy setting to ShouldConvertPositionStyleOnCopy
876
877         * Shared/WebPreferencesStore.h:
878         * UIProcess/API/C/WKPreferences.cpp:
879         (WKPreferencesSetShouldConvertPositionStyleOnCopy):
880         (WKPreferencesGetShouldConvertPositionStyleOnCopy):
881         * UIProcess/API/C/WKPreferencesPrivate.h:
882         * WebProcess/WebPage/WebPage.cpp:
883         (WebKit::WebPage::updatePreferences):
884
885 2014-02-12  Timothy Hatcher  <timothy@apple.com>
886
887         Enable inspection of recently used IndexedDB databases.
888
889         https://bugs.webkit.org/show_bug.cgi?id=128687
890
891         Reviewed by Brady Eidson & Joseph Pecoraro.
892
893         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
894         (WebKit::sharedRecentDatabaseNameMap):
895         (WebKit::combinedSecurityOriginIdentifier):
896         (WebKit::WebIDBFactoryBackend::WebIDBFactoryBackend):
897         (WebKit::WebIDBFactoryBackend::getDatabaseNames):
898         (WebKit::WebIDBFactoryBackend::open):
899         (WebKit::WebIDBFactoryBackend::deleteDatabase):
900         Keep track of recently used database names per security-origin pair.
901         Implement getDatabaseNames to return the recently used names.
902
903         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
904         Fix up the arguments passed to getDatabaseNames.
905
906 2014-02-13  Anders Carlsson  <andersca@apple.com>
907
908         Fix build.
909
910         * UIProcess/API/Cocoa/WKWebView.mm:
911         (layoutMilestones):
912
913 2014-02-13  Anders Carlsson  <andersca@apple.com>
914
915         Add rendering progress events SPI
916         https://bugs.webkit.org/show_bug.cgi?id=128752
917
918         Reviewed by Dan Bernstein.
919
920         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h.
921         * UIProcess/API/Cocoa/WKWebView.mm:
922         (-[WKWebView _observedRenderingProgressEvents]):
923         (layoutMilestones):
924         (-[WKWebView _setObservedRenderingProgressEvents:]):
925         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
926         (NS_OPTIONS):
927         * UIProcess/Cocoa/NavigationState.h:
928         * UIProcess/Cocoa/NavigationState.mm:
929         (WebKit::NavigationState::setNavigationDelegate):
930         (WebKit::renderingProgressEvents):
931         (WebKit::NavigationState::LoaderClient::didLayout):
932         * WebKit2.xcodeproj/project.pbxproj:
933
934 2014-02-13  Anders Carlsson  <andersca@apple.com>
935
936         Disable XPC for plug-ins that need executable heap
937         https://bugs.webkit.org/show_bug.cgi?id=128744
938         <rdar://problem/15962958>
939
940         Reviewed by Dan Bernstein.
941
942         When switching to XPC for plug-ins, we accidentally broke the "feature"
943         where plug-ins can ask for the heap to be executable. 
944         
945         This breaks Silverlight, so just disable XPC for any plug-ins that need this.
946         <rdar://problem/16059483> tracks fixing this in the XPC service.
947
948         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
949         (WebKit::PluginProcessProxy::pluginNeedsExecutableHeap):
950         Only return true for 32-bit plug-ins, since we don't know any 64-bit plug-ins
951         that require this feature.
952
953         (WebKit::PluginProcessProxy::platformGetLaunchOptions):
954         Set launchOptions.useXPC to false if launchOptions.executableHeap is true.
955
956 2014-02-12  Antti Koivisto  <antti@apple.com>
957
958         Return immediately from DestroyPlugin IPC call
959         https://bugs.webkit.org/show_bug.cgi?id=128712
960
961         Reviewed by Anders Carlsson.
962         
963         In some cases we spend a lot of time waiting for synchronous IPC for plugin termination to complete. Reduce
964         the delay by returning from IPC immediately when the plugin process receives it. Just using asynchrounous
965         IPC might introduce undesirable arbitrary delay between the IPC call returning and the destruction actually
966         starting.
967
968         * PluginProcess/WebProcessConnection.cpp:
969         (WebKit::WebProcessConnection::destroyPlugin):
970         * PluginProcess/WebProcessConnection.h:
971         * PluginProcess/WebProcessConnection.messages.in:
972
973 2014-02-12  Anders Carlsson  <andersca@apple.com>
974
975         Pass the related page in the WebPageConfiguration struct
976         https://bugs.webkit.org/show_bug.cgi?id=128714
977
978         Reviewed by Darin Adler.
979
980         * UIProcess/API/Cocoa/WKWebView.mm:
981         (-[WKWebView initWithFrame:configuration:]):
982         * UIProcess/API/ios/WKContentView.h:
983         * UIProcess/API/ios/WKContentView.mm:
984         (-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::]):
985
986 2014-02-12  Anders Carlsson  <andersca@apple.com>
987
988         Add relatedWebView property to WKWebViewConfiguration
989         https://bugs.webkit.org/show_bug.cgi?id=128707
990
991         Reviewed by Dan Bernstein.
992
993         * UIProcess/API/Cocoa/WKWebView.mm:
994         (-[WKWebView initWithFrame:configuration:]):
995         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
996         (-[WKWebViewConfiguration copyWithZone:]):
997         (-[WKWebViewConfiguration relatedWebView]):
998         (-[WKWebViewConfiguration setRelatedWebView:]):
999         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm.
1000         * WebKit2.xcodeproj/project.pbxproj:
1001
1002 2014-02-12  Alexey Proskuryakov  <ap@apple.com>
1003
1004         [WK2] Add a C API to get WebCrypto master key from a client
1005         https://bugs.webkit.org/show_bug.cgi?id=128702
1006
1007         Reviewed by Anders Carlsson.
1008
1009         Added a new version of WKContextClient, with a function that returns the key.
1010
1011         * UIProcess/API/C/WKContext.h:
1012         * UIProcess/WebContextClient.cpp:
1013         (WebKit::WebContextClient::copyWebCryptoMasterKey):
1014         * UIProcess/WebContextClient.h:
1015         * UIProcess/WebPageProxy.cpp:
1016         (WebKit::WebPageProxy::wrapCryptoKey):
1017         (WebKit::WebPageProxy::unwrapCryptoKey):
1018         * UIProcess/mac/WebPageProxyMac.mm:
1019
1020 2014-02-12  Anders Carlsson  <andersca@apple.com>
1021
1022         Add destinationFrame property to WKNavigationAction
1023         https://bugs.webkit.org/show_bug.cgi?id=128700
1024
1025         Reviewed by Tim Horton.
1026
1027         * UIProcess/API/Cocoa/WKNavigationAction.h:
1028         * UIProcess/API/Cocoa/WKNavigationAction.mm:
1029         (-[WKNavigationAction destinationFrame]):
1030         (-[WKNavigationAction setDestinationFrame:]):
1031         * UIProcess/API/Cocoa/WKNavigationActionInternal.h:
1032         * UIProcess/Cocoa/NavigationState.mm:
1033         (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
1034
1035 2014-02-12  Anders Carlsson  <andersca@apple.com>
1036
1037         Forward declare WKNavigation in WKNavigationDelegate.h
1038         https://bugs.webkit.org/show_bug.cgi?id=128699
1039
1040         Reviewed by Tim Horton.
1041
1042         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
1043
1044 2014-02-12  Anders Carlsson  <andersca@apple.com>
1045
1046         Expose scrollView on the WKWebView
1047         https://bugs.webkit.org/show_bug.cgi?id=128697
1048
1049         Reviewed by Dan Bernstein.
1050
1051         * UIProcess/API/Cocoa/WKWebView.h:
1052
1053 2014-02-12  Anders Carlsson  <andersca@apple.com>
1054
1055         Better iOS build fix.
1056
1057         * UIProcess/WebPageProxy.cpp:
1058         (WebKit::WebPageProxy::wrapCryptoKey):
1059         (WebKit::WebPageProxy::unwrapCryptoKey):
1060         Make these functions cross platform.
1061
1062         * UIProcess/mac/WebPageProxyMac.mm:
1063
1064 2014-02-12  Andy Estes  <aestes@apple.com>
1065
1066         Fix the iOS build after r163976
1067
1068         Moved WebPageProxy::{wrap,unwrap}CryptoKey() to a new file built by
1069         both Mac and iOS.
1070
1071         * UIProcess/Cocoa/WebPageProxyCocoa.mm: Added.
1072         (WebKit::WebPageProxy::wrapCryptoKey):
1073         (WebKit::WebPageProxy::unwrapCryptoKey):
1074         * UIProcess/mac/WebPageProxyMac.mm:
1075         * WebKit2.xcodeproj/project.pbxproj:
1076
1077 2014-02-12  Anders Carlsson  <andersca@apple.com>
1078
1079         Fix build.
1080
1081         * UIProcess/API/Cocoa/WKProcessClass.h:
1082
1083 2014-02-12  Benjamin Poulain  <bpoulain@apple.com>
1084
1085         [WK2][iOS] Add back the special viewport for the old xhtml mobile doctype
1086         https://bugs.webkit.org/show_bug.cgi?id=128639
1087
1088         Reviewed by Andreas Kling.
1089
1090         * WebProcess/WebCoreSupport/WebChromeClient.h:
1091         * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
1092         (WebKit::WebChromeClient::didReceiveMobileDocType):
1093         * WebProcess/WebPage/WebPage.h:
1094         * WebProcess/WebPage/ios/WebPageIOS.mm:
1095         (WebKit::WebPage::didReceiveMobileDocType):
1096
1097 2014-02-12  Anders Carlsson  <andersca@apple.com>
1098
1099         WKProcessClass.h and WKNavigationResponse.h should be public headers
1100         https://bugs.webkit.org/show_bug.cgi?id=128683
1101
1102         Reviewed by Dan Bernstein.
1103
1104         * WebKit2.xcodeproj/project.pbxproj:
1105
1106 2014-02-12  Alexey Proskuryakov  <ap@apple.com>
1107
1108         Wrap WebCrypto keys in SerializedScriptValue
1109         https://bugs.webkit.org/show_bug.cgi?id=128680
1110
1111         Reviewed by Anders Carlsson.
1112
1113         Retrieve a master key (placeholder code for now), and use it to wrap key data.
1114
1115         * UIProcess/WebPageProxy.cpp:
1116         (WebKit::WebPageProxy::wrapCryptoKey):
1117         (WebKit::WebPageProxy::unwrapCryptoKey):
1118         * UIProcess/mac/WebPageProxyMac.mm:
1119         (WebKit::WebPageProxy::wrapCryptoKey):
1120         (WebKit::WebPageProxy::unwrapCryptoKey):
1121
1122 2014-02-12  Zan Dobersek  <zdobersek@igalia.com>
1123
1124         [CoordinatedGraphics] Move CoordinatedGraphicsScene, CoordinatedLayerTreeHostProxy to std::function
1125         https://bugs.webkit.org/show_bug.cgi?id=128473
1126
1127         Reviewed by Anders Carlsson.
1128
1129         Move the CoordinatedLayerTreeHostProxy class to using std::function instead of WTF::Functional. C++11
1130         lambdas are used to construct the update functions, with the CoordinatedGraphicsScene refcount-protected
1131         throughout the lifetime of the function wrapper.
1132
1133         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
1134         (WebKit::CoordinatedLayerTreeHostProxy::dispatchUpdate):
1135         (WebKit::CoordinatedLayerTreeHostProxy::commitCoordinatedGraphicsState):
1136         (WebKit::CoordinatedLayerTreeHostProxy::setVisibleContentsRect):
1137         (WebKit::CoordinatedLayerTreeHostProxy::setBackgroundColor):
1138         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
1139
1140 2014-02-12  Dan Bernstein  <mitz@apple.com>
1141
1142         Stop using PLATFORM(MAC) in WebKit2/{Database,Network}Process except where it means “OS X but not iOS”
1143         https://bugs.webkit.org/show_bug.cgi?id=128659
1144
1145         Reviewed by Anders Carlsson.
1146
1147         * DatabaseProcess/DatabaseProcess.cpp:
1148         (WebKit::DatabaseProcess::createDatabaseToWebProcessConnection): Changed PLATFORM(MAC) to
1149         OS(DARWIN) around use of Mach-based IPC.
1150         Changed PLATFORM(MAC) to PLATFORM(COCOA) elsewhere in this file.
1151         * NetworkProcess/NetworkProcess.cpp: Ditto.
1152         (WebKit::NetworkProcess::NetworkProcess):
1153         (WebKit::NetworkProcess::createNetworkConnectionToWebProcess):
1154         * NetworkProcess/NetworkProcess.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
1155         * NetworkProcess/NetworkProcess.messages.in: Removed PLATFORM(MAC) guard around
1156         SetProcessSuppressionEnabled. Changed it to PLATFORM(COCOA) around SetQOS.
1157         * NetworkProcess/NetworkResourceLoader.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA)
1158         (WebKit::NetworkResourceLoader::continueWillSendRequest):
1159         * NetworkProcess/NetworkResourceLoader.h: Ditto.
1160         * NetworkProcess/RemoteNetworkingContext.h: Ditto, matching WebCore::NetworkingContext.
1161
1162 2014-02-11  Brent Fulgham  <bfulgham@apple.com>
1163
1164         Remove some unintended copies in ranged for loops
1165         https://bugs.webkit.org/show_bug.cgi?id=128644
1166
1167         Reviewed by Anders Carlsson.
1168
1169         * Shared/WebCrossThreadCopier.cpp:
1170         (WebCore::Vector<Vector<IDBKeyData>>>::copy): Each iteration copies a vector of
1171         vectors, 
1172         * Shared/mac/RemoteLayerBackingStore.mm:
1173         (RemoteLayerBackingStore::enumerateRectsBeingDrawn): Avoid copying a FloatRect
1174         on each iteration.
1175         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
1176         (WebKit::RemoteLayerTreePropertyApplier::applyPropertiesToLayer): Avoid copying
1177         a LayerProperty object each iteration.
1178         * UIProcess/GeolocationPermissionRequestManagerProxy.cpp:
1179         (WebKit::GeolocationPermissionRequestManagerProxy::invalidateRequests): Avoid
1180         copying a pair<int64_t, pointer> each iteration.
1181         * UIProcess/Notifications/NotificationPermissionRequestManagerProxy.cpp:
1182         (WebKit::NotificationPermissionRequestManagerProxy::invalidateRequests): Ditto
1183         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
1184         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers): Ditto
1185         * UIProcess/WebContext.cpp:
1186         (WebKit::WebContext::postMessageToInjectedBundle): Avoid creating/destroying a
1187         RefPtr each loop iteration.
1188         * UIProcess/WebPageProxy.cpp:
1189         (WebKit::WebPageProxy::shouldStartTrackingTouchEvents): Avoid copying a WebPlatformTouchPoint
1190         object each cycle.
1191         * UIProcess/mac/RemoteLayerTreeHost.mm:
1192         (WebKit::RemoteLayerTreeHost::updateLayerTree): Avoid copying a pair each iteration.
1193         * UIProcess/mac/WindowServerConnection.mm:
1194         (WebKit::WindowServerConnection::WindowServerConnection): Avoid copying the struct
1195         of occlusionNotificationHandlers each iteration.
1196         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
1197         (WebKit::WebIDBServerConnection::put): Avoid copying a vector-of-vectors each
1198         iteration.
1199         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1200         (PlatformCALayerRemote::recursiveBuildTransaction): Avoid creating/destroying a
1201         RefPtr each loop iteration.
1202
1203 2014-02-12  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
1204
1205         Update the HTML Media Capture implementation.
1206         https://bugs.webkit.org/show_bug.cgi?id=118465
1207
1208         Reviewed by Darin Adler.
1209
1210         Make the implementation in WebKit compatible with the 2013-05-09
1211         version of the spec, which makes the "capture" attribute a boolean
1212         instead of an enum.
1213
1214         * Shared/WebOpenPanelParameters.cpp:
1215         (WebKit::WebOpenPanelParameters::capture): Return a bool.
1216         * Shared/WebOpenPanelParameters.h: Ditto.
1217         * UIProcess/API/C/WKOpenPanelParameters.cpp:
1218         (WKOpenPanelParametersCopyCapture): Deprecate, the implementation is
1219         incompatible with the current version of the spec.
1220         (WKOpenPanelParametersGetCaptureEnabled): Add and return a bool.
1221         * UIProcess/API/C/WKOpenPanelParameters.h:
1222
1223 2014-02-12  Alberto Garcia  <berto@igalia.com>
1224
1225         [GTK] Fails to build if configure is run with its absolute path
1226         https://bugs.webkit.org/show_bug.cgi?id=126693
1227
1228         Reviewed by Gustavo Noronha Silva.
1229
1230         When creating links to the WebKit2 headers in the source tree
1231         don't expect $(WebKit2) to be a relative path.
1232
1233         * GNUmakefile.am:
1234
1235 2014-02-11  Filip Pizlo  <fpizlo@apple.com>
1236
1237         JIT should be enabled (regression from addition of JIT enabled setting)
1238         https://bugs.webkit.org/show_bug.cgi?id=128653
1239
1240         Reviewed by Tim Horton.
1241
1242         * UIProcess/mac/WebContextMac.mm:
1243         (WebKit::registerUserDefaultsIfNeeded):
1244
1245 2014-02-11  Ryosuke Niwa  <rniwa@webkit.org>
1246
1247         Remove one of includes added in r163943 and r163939.
1248
1249         * WebProcess/WebPage/WebPage.h:
1250
1251 2014-02-11  Dan Bernstein  <mitz@apple.com>
1252
1253         <rdar://problem/16044438>: WebKit2.framework (with *Process.app) exists at the top level of the simulator
1254         https://bugs.webkit.org/show_bug.cgi?id=128650
1255
1256         Reviewed by Mark Rowe.
1257
1258         * Configurations/All-iOS.xcconfig: Removed this unused file.
1259         * Configurations/All.xcconfig: Set SKIP_INSTALL to YES for this aggregate target, so that
1260         its Copy Files build phase, intended only for engineering builds, doesn’t copy into the
1261         (wrong) install location.
1262
1263 2014-02-11  Ryosuke Niwa  <rniwa@webkit.org>
1264
1265         EFL build fix after r163919.
1266
1267         * WebProcess/WebPage/WebPage.h:
1268
1269 2014-02-11  Jaehun Lim  <ljaehun.lim@samsung.com>
1270
1271         Unreviewed build fix after r163919
1272
1273         WKGestureTypes.h needs PLATFORM(IOS) guard.
1274
1275         * WebProcess/WebPage/WebPage.h:
1276
1277 2014-02-11  Zalan Bujtas  <zalan@apple.com>
1278
1279         Subpixel rendering: Make GraphicsLayerClient::paintContents's clip rect subpixel based.
1280         https://bugs.webkit.org/show_bug.cgi?id=128460
1281
1282         Reviewed by Simon Fraser.
1283
1284         GraphicsClient::paintContents takes clipRect as FloatRect now so that we can paint on
1285         subpixel position.
1286
1287         No change in functionality.
1288
1289         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
1290         (WebKit::LayerTreeHostGtk::paintContents):
1291         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
1292         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1293         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1294         (WebKit::RemoteLayerTreeDrawingArea::paintContents):
1295         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1296         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1297         (WebKit::TiledCoreAnimationDrawingArea::paintContents):
1298
1299 2014-02-11  Sam Weinig  <sam@webkit.org>
1300
1301         [WebKit2, JSC] Add user default to disable the JIT
1302         https://bugs.webkit.org/show_bug.cgi?id=128643
1303
1304         Reviewed by Filip Pizlo.
1305
1306         * Shared/WebProcessCreationParameters.cpp:
1307         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
1308         (WebKit::WebProcessCreationParameters::encode):
1309         (WebKit::WebProcessCreationParameters::decode):
1310         * Shared/WebProcessCreationParameters.h:
1311         * UIProcess/mac/WebContextMac.mm:
1312         (WebKit::registerUserDefaultsIfNeeded):
1313         (WebKit::WebContext::platformInitializeWebProcess):
1314         * WebProcess/mac/WebProcessMac.mm:
1315         (WebKit::WebProcess::platformInitializeWebProcess):
1316
1317 2014-02-11  Ryosuke Niwa  <rniwa@webkit.org>
1318
1319         Frame::rectForSelection shouldn't instantiate FrameSelection
1320         https://bugs.webkit.org/show_bug.cgi?id=128587
1321
1322         Reviewed by Enrica Casucci.
1323
1324         * WebProcess/WebCoreSupport/WebEditorClient.h:
1325         * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
1326
1327 2014-02-11  Enrica Casucci  <enrica@apple.com>
1328
1329         Support WebSelections in WK2 on iOS.
1330         https://bugs.webkit.org/show_bug.cgi?id=127015
1331         <rdar://problem/15211964>
1332
1333         Reviewed by Benjamin Poulain.
1334
1335         First step towards implementing block selections on iOS.
1336         The main logic is in rangeForWebSelectionAtPosition that
1337         decides whether we create a text or a block selection.
1338
1339         * Shared/ios/WKGestureTypes.h:
1340         * UIProcess/API/ios/WKInteractionView.mm:
1341         (toUIWKSelectionFlags):
1342         (selectionChangedWithGesture):
1343         * WebProcess/WebPage/WebPage.h:
1344         * WebProcess/WebPage/ios/WebPageIOS.mm:
1345         (WebKit::WebPage::rangeForWebSelectionAtPosition):
1346         (WebKit::WebPage::selectWithGesture):
1347         (WebKit::WebPage::getPositionInformation):
1348
1349 2014-02-10  Myles C. Maxfield  <mmaxfield@apple.com>
1350
1351         Convert position:sticky and position:fixed properties to position:static and position:absolute upon copy
1352         https://bugs.webkit.org/show_bug.cgi?id=128194
1353
1354         Reviewed by Simon Fraser.
1355
1356         * Shared/WebPreferencesStore.h:
1357         * UIProcess/API/C/WKPreferences.cpp:
1358         (WKPreferencesSetConvertPositionStyleOnCopy):
1359         (WKPreferencesGetConvertPositionStyleOnCopy):
1360         * UIProcess/API/C/WKPreferencesPrivate.h: Opt-in to new behavior
1361         * WebProcess/WebPage/WebPage.cpp:
1362         (WebKit::WebPage::updatePreferences):
1363
1364 2014-02-11  Benjamin Poulain  <bpoulain@apple.com>
1365
1366         [WK2] Rename screenToWindow to screenToRootView and windowToScreen to rootViewToScreen
1367         https://bugs.webkit.org/show_bug.cgi?id=128575
1368
1369         Reviewed by Darin Adler.
1370
1371         In WebKit2, screenToRootView and rootViewToScreen were named screenToWindow and windowToScreen.
1372         Those names were fine on ports were FrameView correspond to the scrollview, but they do not apply on iOS.
1373
1374         This patch renames screenToWindow and windowToScreen to their more generic WebCore counterpart.
1375
1376         * UIProcess/API/gtk/PageClientImpl.cpp:
1377         (WebKit::PageClientImpl::screenToRootView):
1378         (WebKit::PageClientImpl::rootViewToScreen):
1379         * UIProcess/API/gtk/PageClientImpl.h:
1380         * UIProcess/API/ios/PageClientImplIOS.h:
1381         * UIProcess/API/ios/PageClientImplIOS.mm:
1382         (WebKit::PageClientImpl::screenToRootView):
1383         (WebKit::PageClientImpl::rootViewToScreen):
1384         * UIProcess/API/mac/PageClientImpl.h:
1385         * UIProcess/API/mac/PageClientImpl.mm:
1386         (WebKit::PageClientImpl::screenToRootView):
1387         (WebKit::PageClientImpl::rootViewToScreen):
1388         * UIProcess/CoordinatedGraphics/WebView.cpp:
1389         (WebKit::WebView::screenToRootView):
1390         (WebKit::WebView::rootViewToScreen):
1391         * UIProcess/CoordinatedGraphics/WebView.h:
1392         * UIProcess/PageClient.h:
1393         * UIProcess/WebPageProxy.cpp:
1394         (WebKit::WebPageProxy::screenToRootView):
1395         (WebKit::WebPageProxy::rootViewToScreen):
1396         * UIProcess/WebPageProxy.h:
1397         * UIProcess/WebPageProxy.messages.in:
1398         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1399         (WebKit::WebChromeClient::screenToRootView):
1400         (WebKit::WebChromeClient::rootViewToScreen):
1401         * WebProcess/WebPage/WebPage.cpp:
1402         (WebKit::WebPage::screenToRootView):
1403         (WebKit::WebPage::rootViewToScreen):
1404         * WebProcess/WebPage/WebPage.h:
1405         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
1406         (-[WKAccessibilityWebPageObject _convertScreenPointToRootView:]):
1407         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
1408
1409 2014-02-11  Andy Estes  <aestes@apple.com>
1410
1411         [Mac] connection:willStopBufferingData: no longer exists in NSURLConnectionDelegate
1412         https://bugs.webkit.org/show_bug.cgi?id=128583
1413
1414         Reviewed by Anders Carlsson.
1415
1416         The delegate method was removed in Snow Leopard.
1417
1418         * NetworkProcess/NetworkResourceLoader.cpp:
1419         * NetworkProcess/NetworkResourceLoader.h:
1420
1421 2014-02-11  Brady Eidson  <beidson@apple.com>
1422
1423         IndexedDB tests on some bots are flakey (timeouts)
1424         <rdar://problem/16038745> and https://bugs.webkit.org/show_bug.cgi?id=128612
1425
1426         Reviewed by Sam Weinig.
1427
1428         When messing with JSC VM’s and such, always use APIEntryShim instead of JSLockHolder.
1429         *ESPECIALLY* when dealing with multiple threads.
1430
1431         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
1432         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::~UniqueIDBDatabaseBackingStoreSQLite): 
1433         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createIndex):
1434
1435 2014-02-11  Dan Bernstein  <mitz@apple.com>
1436
1437         Stop using PLATFORM(MAC) in WebKit2/Shared except where it means “OS X but not iOS”
1438         https://bugs.webkit.org/show_bug.cgi?id=128582
1439
1440         Reviewed by Darin Adler.
1441
1442         * Shared/API/c/WKContextMenuItem.cpp: Removed workaround for Mac Safari 6 compatibility.
1443         (WKContextMenuItemGetTag):
1444         * Shared/API/c/WKDeprecatedFunctions.cpp: Added && !PLATFORM(IOS), because these functions
1445         are not needed on iOS.
1446         * Shared/API/c/WKSharedAPICast.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
1447         (WebKit::toAPI):
1448         (WebKit::toImpl):
1449         * Shared/APIObject.h: Ditto.
1450         * Shared/ChildProcess.cpp: Ditto.
1451         * Shared/ChildProcess.h: Changed PLATFORM(MAC) to PLATFORM(COCOA) around
1452         setApplicationIsDaemon and setQOS. Changed it to USE(APPKIT) around stopNSAppRunLoop.
1453         * Shared/CommandLine.h: Changed PLATFORM(MAC) to OS(UNIX) around parse().
1454         * Shared/DictionaryPopupInfo.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
1455         (WebKit::DictionaryPopupInfo::encode):
1456         (WebKit::DictionaryPopupInfo::decode):
1457         * Shared/DictionaryPopupInfo.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
1458         * Shared/Downloads/Download.h: Ditto.
1459         * Shared/DrawingAreaInfo.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
1460         * Shared/FontInfo.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
1461         (WebKit::FontInfo::encode):
1462         (WebKit::FontInfo::decode):
1463         * Shared/FontInfo.h: Ditto.
1464         * Shared/LayerTreeContext.h: Ditto.
1465         * Shared/NativeWebKeyboardEvent.h: Changed PLATFORM(MAC) to USE(APPKIT) around
1466         forward-declaration of NSView.
1467         * Shared/NativeWebMouseEvent.h: Ditto.
1468         * Shared/NativeWebWheelEvent.h: Ditto.
1469         * Shared/Network/CustomProtocols/Cocoa: Renamed from mac.
1470         * Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm: Renamed from CustomProtocolManagerMac.mm.
1471         * Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerMac.mm: Removed.
1472         * Shared/Network/CustomProtocols/CustomProtocolManager.h: Changed PLATFORM(MAC) to
1473         PLATFORM(COCOA).
1474         * Shared/Network/CustomProtocols/mac: Removed.
1475         * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm: Removed.
1476         * Shared/PlatformPopupMenuData.cpp:  Changed PLATFORM(MAC) to PLATFORM(COCOA).
1477         (WebKit::PlatformPopupMenuData::encode):
1478         (WebKit::PlatformPopupMenuData::decode):
1479         * Shared/PlatformPopupMenuData.h: Ditto.
1480         * Shared/Plugins/Netscape/PluginInformation.cpp: Ditto.
1481         * Shared/Plugins/PluginModuleInfo.h: Ditto.
1482         * Shared/Plugins/PluginProcessCreationParameters.cpp: Ditto.
1483         (WebKit::PluginProcessCreationParameters::encode):
1484         (WebKit::PluginProcessCreationParameters::decode):
1485         * Shared/Plugins/PluginProcessCreationParameters.h: Ditto.
1486         * Shared/PrintInfo.h: Changed PLATFORM(MAC) to USE(APPKIT) around forward declaration of
1487         NSPrintInfo.
1488         * Shared/SandboxInitializationParameters.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
1489         * Shared/TextCheckerState.h: Changed PLATFORM(MAC) to USE(APPKIT).
1490         * Shared/WebArchive.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
1491         * Shared/WebArchive.h: Ditto.
1492         * Shared/WebArchiveResource.cpp: Ditto.
1493         * Shared/WebArchiveResource.h: Ditto.
1494         * Shared/WebCoreArgumentCoders.cpp: Ditto.
1495         (IPC::ArgumentCoder<ResourceResponse>::encode):
1496         (IPC::ArgumentCoder<ResourceResponse>::decode):
1497         * Shared/WebCoreArgumentCoders.h: Ditto.
1498         * Shared/WebEvent.h: Ditto.
1499         * Shared/WebEventConversion.cpp: Ditto.
1500         (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
1501         * Shared/WebKit2Initialize.cpp: Ditto.
1502         (WebKit::InitializeWebKit2):
1503         * Shared/WebPageCreationParameters.cpp: Ditto.
1504         (WebKit::WebPageCreationParameters::encode):
1505         (WebKit::WebPageCreationParameters::decode):
1506         * Shared/WebPageCreationParameters.h: Ditto.
1507         * Shared/WebPreferencesStore.h: Ditto.
1508         * Shared/WebProcessCreationParameters.cpp: Ditto.
1509         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
1510         (WebKit::WebProcessCreationParameters::encode):
1511         (WebKit::WebProcessCreationParameters::decode):
1512         * Shared/WebProcessCreationParameters.h: Ditto.
1513         * Shared/WebWheelEvent.cpp: Ditto.
1514         (WebKit::WebWheelEvent::WebWheelEvent):
1515         (WebKit::WebWheelEvent::encode):
1516         (WebKit::WebWheelEvent::decode):
1517         * Shared/cf/ArgumentCodersCF.cpp: Changed PLATFORM(MAC) to USE(FOUNDATION).
1518         (IPC::decode):
1519         * Shared/mac/CommandLineMac.cpp: Removed.
1520         * Shared/mac/PDFKitImports.h: Removed PLATFORM(MAC)
1521         * Shared/posix: Added.
1522         * Shared/posix/CommandLinePOSIX.cpp: Renamed from mac/CommandLineMac.cpp and removed
1523         comment.
1524         * WebKit2.xcodeproj/project.pbxproj: Updated for moves and renames.
1525
1526 2014-02-11  Brady Eidson  <beidson@apple.com>
1527
1528         IDB: storage/indexeddb/mozilla/cursor-update-updates-indexes.html ASSERTs
1529         <rdar://problem/16034112> and https://bugs.webkit.org/show_bug.cgi?id=128581
1530
1531         Reviewed by Alexey Proskuryakov.
1532
1533         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
1534         (WebKit::UniqueIDBDatabase::getRecordFromBackingStore): Always store keyPath for Index get results.
1535
1536 2014-02-11  Alberto Garcia  <berto@igalia.com>
1537
1538         O_CLOEXEC in shm_open does not work on FreeBSD
1539         https://bugs.webkit.org/show_bug.cgi?id=128572
1540
1541         Reviewed by Darin Adler.
1542
1543         The O_CLOEXEC is not supported by shm_open() and is also not
1544         necessary since FD_CLOEXEC is already set by default when the new
1545         file descriptor is created.
1546
1547         * Platform/unix/SharedMemoryUnix.cpp:
1548         (WebKit::SharedMemory::create):
1549
1550 2014-02-10  Commit Queue  <commit-queue@webkit.org>
1551
1552         Unreviewed, rolling out r163856.
1553         http://trac.webkit.org/changeset/163856
1554         https://bugs.webkit.org/show_bug.cgi?id=128585
1555
1556         The build fix depends on r163848, which has been reverted
1557         (Requested by notbenjamin on #webkit).
1558
1559         * UIProcess/ios/TextCheckerIOS.mm:
1560         (WebKit::TextChecker::checkTextOfParagraph):
1561         (WebKit::TextChecker::checkSpellingOfString):
1562         (WebKit::TextChecker::checkGrammarOfString):
1563
1564 2014-02-10  Alexey Proskuryakov  <ap@apple.com>
1565
1566         Add hooks for wrapping CryptoKeys in SerializedScriptValue
1567         https://bugs.webkit.org/show_bug.cgi?id=128567
1568
1569         Reviewed by Anders Carlsson.
1570
1571         * UIProcess/WebPageProxy.cpp:
1572         (WebKit::WebPageProxy::wrapCryptoKey):
1573         (WebKit::WebPageProxy::unwrapCryptoKey):
1574         * UIProcess/WebPageProxy.h:
1575         * UIProcess/WebPageProxy.messages.in:
1576         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1577         (WebKit::WebChromeClient::wrapCryptoKey):
1578         (WebKit::WebChromeClient::unwrapCryptoKey):
1579         * WebProcess/WebCoreSupport/WebChromeClient.h:
1580         Dummy implementation, to be filled in later.
1581
1582 2014-02-10  Dan Bernstein  <mitz@apple.com>
1583
1584         Stop using PLATFORM(MAC) in WebKit2/platform except where it means “OS X but not iOS”
1585         https://bugs.webkit.org/show_bug.cgi?id=128513
1586
1587         Reviewed by Dean Jackson.
1588
1589         * Platform/IPC/Connection.cpp:
1590         (IPC::Connection::waitForSyncReply): Changed PLATFORM(MAC) to PLATFORM(COCOA) around use of
1591         RunLoop::runForDuration, matching the guard around that function.
1592         * Platform/Logging.cpp: Deleted unused definition of logLevelString.
1593         * Platform/Module.cpp:
1594         (WebKit::Module::Module): Changed PLATFORM(MAC) to USE(CF).
1595         * Platform/Module.h: Changed PLATFORM(MAC) to USE(CF), since the “Mac” implementation is
1596         just a CFBundle-based implementation.
1597         * Platform/PlatformProcessIdentifier.h: Changed PLATFORM(MAC) to PLATFORM(COCOA). Arguably
1598         this should be OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK).
1599         * Platform/cf: Added.
1600         * Platform/cf/ModuleCF.cpp: Renamed from Platform/mac/ModuleMac.mm. This file did not
1601         contain any Objective-C code.
1602         * Platform/foundation: Added.
1603         * Platform/foundation/LoggingFoundation.mm: Renamed from Platform/mac/Logging.mac.mm.
1604         * Platform/mac/Logging.mac.mm: Removed.
1605         * Platform/mac/ModuleMac.mm: Removed.
1606         * WebKit2.xcodeproj/project.pbxproj: Updated for renames.
1607
1608 2014-02-10  Commit Queue  <commit-queue@webkit.org>
1609
1610         Unreviewed, rolling out r163848.
1611         http://trac.webkit.org/changeset/163848
1612         https://bugs.webkit.org/show_bug.cgi?id=128580
1613
1614         Caused a lot of crashes on tests (Requested by ap on #webkit).
1615
1616         * Shared/APIString.h:
1617         * UIProcess/TextChecker.h:
1618         * UIProcess/WebPageProxy.cpp:
1619         (WebKit::WebPageProxy::checkTextOfParagraph):
1620         (WebKit::WebPageProxy::checkSpellingOfString):
1621         (WebKit::WebPageProxy::checkGrammarOfString):
1622         * UIProcess/mac/TextCheckerMac.mm:
1623         (WebKit::TextChecker::checkTextOfParagraph):
1624         (WebKit::TextChecker::checkSpellingOfString):
1625         (WebKit::TextChecker::checkGrammarOfString):
1626
1627 2014-02-10  Brady Eidson  <beidson@apple.com>
1628
1629         IDB: storage/indexeddb/mozilla/object-store-inline-autoincrement-key-added-on-put.html fails
1630         <rdar://problem/16033286> and https://bugs.webkit.org/show_bug.cgi?id=128574
1631
1632         Reviewed by Maciej Stachowiak.
1633
1634         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
1635         (WebKit::UniqueIDBDatabase::getRecordFromBackingStore): If there is no value in an object-store get,
1636           don’t return *any* results.
1637
1638 2014-02-10  Benjamin Poulain  <bpoulain@apple.com>
1639
1640         Fix the iOS build after r163848
1641
1642         * UIProcess/ios/TextCheckerIOS.mm:
1643         (WebKit::TextChecker::checkTextOfParagraph):
1644         (WebKit::TextChecker::checkSpellingOfString):
1645         (WebKit::TextChecker::checkGrammarOfString):
1646
1647 2014-02-10  Brady Eidson  <beidson@apple.com>
1648
1649         IDB: storage/indexeddb/mozilla/indexes.html fails
1650         <rdar://problem/16031590> and https://bugs.webkit.org/show_bug.cgi?id=128563
1651
1652         Reviewed by Tim Horton.
1653
1654         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
1655         (WebKit::UniqueIDBDatabase::getRecordFromBackingStore): Pass the cursor type to the backing store.
1656
1657         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
1658         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
1659         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getIndexRecord): If it’s a key-only cursor,
1660           return only the key result.
1661         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
1662
1663         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
1664         (WebKit::getIndexStatement): Fix index statement selection so ascending, unique cursors sort correctly.
1665
1666 2014-02-10  Anders Carlsson  <andersca@apple.com>
1667
1668         Remove a couple of deprecatedCharacters() from WebKit2
1669         https://bugs.webkit.org/show_bug.cgi?id=128569
1670
1671         Reviewed by Andreas Kling.
1672
1673         * Shared/APIString.h:
1674         * UIProcess/TextChecker.h:
1675         * UIProcess/WebPageProxy.cpp:
1676         (WebKit::WebPageProxy::checkTextOfParagraph):
1677         (WebKit::WebPageProxy::checkSpellingOfString):
1678         (WebKit::WebPageProxy::checkGrammarOfString):
1679         * UIProcess/mac/TextCheckerMac.mm:
1680         (WebKit::TextChecker::checkTextOfParagraph):
1681         (WebKit::TextChecker::checkSpellingOfString):
1682         (WebKit::TextChecker::checkGrammarOfString):
1683
1684 2014-02-10  Filip Pizlo  <fpizlo@apple.com>
1685
1686         Rename Operations.h to JSCInlines.h
1687         https://bugs.webkit.org/show_bug.cgi?id=128543
1688
1689         Rubber stamped by Geoffrey Garen.
1690
1691         * Shared/linux/WebMemorySamplerLinux.cpp:
1692         * UIProcess/WebContext.cpp:
1693         * WebProcess/WebPage/WebPage.cpp:
1694         * WebProcess/efl/WebProcessMainEfl.cpp:
1695
1696 2014-02-10  Benjamin Poulain  <bpoulain@apple.com>
1697
1698         [WK2] Add support for image document viewport configuration
1699         https://bugs.webkit.org/show_bug.cgi?id=128565
1700
1701         Reviewed by Simon Fraser.
1702
1703         * UIProcess/API/ios/PageClientImplIOS.mm:
1704         (WebKit::PageClientImpl::screenToWindow):
1705         (WebKit::PageClientImpl::windowToScreen):
1706         Add the implementation for ImageDocument.
1707
1708         * WebProcess/WebPage/WebPage.cpp:
1709         (WebKit::WebPage::didCommitLoad):
1710         Use the right default settings when dealing with image documents.
1711
1712 2014-02-10  Simon Fraser  <simon.fraser@apple.com>
1713
1714         Show a debug tile map indicator for UI-side compositing
1715         https://bugs.webkit.org/show_bug.cgi?id=128553
1716
1717         Reviewed by Tim Horton.
1718         
1719         Implement a tiled scrolling indicator for UI-side compositing.
1720         
1721         The indicator is created by making another RemoteLayerTreeHost,
1722         and decoding the transaction in it a second time to create a cloned
1723         layer tree. In that clone commit, we modify some layer properties to
1724         make things easier to see.
1725         
1726         The cloned layer tree is hosted in the root layer of the main
1727         RemoteLayerTreeHost.
1728         
1729         RemoteLayerTreeHost was changed to not need a pointer to the WebPageProxy,
1730         which it only used in the "root layer changed" case; instead, it now just
1731         returns a bool from updateLayerTree() in that situation.
1732
1733         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp: Explanatory comment.
1734         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
1735         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1736         (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
1737         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
1738         (WebKit::RemoteLayerTreeDrawingAreaProxy::setExposedRect):
1739         (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
1740         (WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicatorPosition):
1741         (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorScale):
1742         (WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
1743         (WebKit::RemoteLayerTreeDrawingAreaProxy::showDebugIndicator):
1744         * UIProcess/mac/RemoteLayerTreeHost.h:
1745         (WebKit::RemoteLayerTreeHost::rootLayer):
1746         (WebKit::RemoteLayerTreeHost::setIsDebugLayerTreeHost):
1747         (WebKit::RemoteLayerTreeHost::isDebugLayerTreeHost):
1748         * UIProcess/mac/RemoteLayerTreeHost.mm:
1749         (WebKit::RemoteLayerTreeHost::RemoteLayerTreeHost):
1750         (WebKit::RemoteLayerTreeHost::updateLayerTree):
1751         (WebKit::RemoteLayerTreeHost::createLayer):
1752
1753 2014-02-10  Simon Fraser  <simon.fraser@apple.com>
1754
1755         Put a delegatesScrolling flag on WebPageProxy so that the UI process knows when scrolling is delegated
1756         https://bugs.webkit.org/show_bug.cgi?id=128429
1757
1758         Reviewed by Sam Weinig.
1759         
1760         Add delegatesScrolling() which defaults to false, but is set to true for iOS
1761         by WKContentView.
1762
1763         * UIProcess/API/ios/WKContentView.mm:
1764         (-[WKContentView initWithFrame:configuration:]):
1765         (-[WKContentView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
1766         * UIProcess/WebPageProxy.cpp:
1767         (WebKit::WebPageProxy::WebPageProxy):
1768         * UIProcess/WebPageProxy.h:
1769         (WebKit::WebPageProxy::setDelegatesScrolling):
1770         (WebKit::WebPageProxy::delegatesScrolling):
1771
1772 2014-02-10  Gavin Barraclough  <barraclough@apple.com>
1773
1774         Remove WKPageSetVisibilityState
1775         https://bugs.webkit.org/show_bug.cgi?id=128551
1776
1777         Reviewed by Anders Carlsson.
1778
1779         Made prerender state automatic. We should move this further
1780         up into WebCore, but this requires refactoring for the Page
1781         construction order.
1782
1783         * Shared/API/c/WKDeprecatedFunctions.cpp:
1784         (WKPageSetVisibilityState):
1785             - deprecated.
1786         * UIProcess/API/C/WKPage.cpp:
1787             - removed WKPageSetVisibilityState.
1788         * UIProcess/API/C/WKPage.h:
1789             - removed WKPageSetVisibilityState.
1790         * UIProcess/WebPageProxy.cpp:
1791             - removed setVisibilityStatePrerender.
1792         * UIProcess/WebPageProxy.h:
1793             - removed setVisibilityStatePrerender.
1794         * WebProcess/WebPage/WebPage.cpp:
1795         (WebKit::WebPage::WebPage):
1796             - removed setVisibilityStatePrerender.
1797             - When creating a Page, automatically set the prerender state.
1798         * WebProcess/WebPage/WebPage.h:
1799             - removed setVisibilityStatePrerender.
1800         * WebProcess/WebPage/WebPage.messages.in:
1801             - removed SetVisibilityStatePrerender.
1802
1803 2014-02-10  Brady Eidson  <beidson@apple.com>
1804
1805         IDB: storage/indexeddb/mozilla/object-store-remove-values.html fails
1806         <rdar://problem/16029319> and https://bugs.webkit.org/show_bug.cgi?id=128487
1807
1808         Missed one piece of review feedback before landing.
1809
1810         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
1811         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::~UniqueIDBDatabaseBackingStoreSQLite):
1812
1813 2014-02-10  Brady Eidson  <beidson@apple.com>
1814
1815         IDB: storage/indexeddb/mozilla/object-store-remove-values.html fails
1816         <rdar://problem/16029319> and https://bugs.webkit.org/show_bug.cgi?id=128487
1817
1818         Reviewed by Tim Horton.
1819
1820         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
1821         (WebKit::DatabaseProcessIDBConnection::disconnectedFromWebProcess):
1822         (WebKit::DatabaseProcessIDBConnection::getOrEstablishIDBDatabaseMetadata): Update logging.
1823         (WebKit::DatabaseProcessIDBConnection::deleteDatabase): If deleteDatabase succeeds,
1824           also disconnect from the UniqueIDBDatabase so it can be cleaned up properly.
1825         (WebKit::DatabaseProcessIDBConnection::close): New message from the WebProcess to handle
1826           clean closures.
1827         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
1828         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
1829
1830         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
1831         (WebKit::UniqueIDBDatabase::shutdown): Move most of the cleanup to didShutdownBackingStore.
1832         (WebKit::UniqueIDBDatabase::didShutdownBackingStore): Execute all remaining mainThreadTasks
1833           (as they represent real results from the backing store thread). 
1834         (WebKit::UniqueIDBDatabase::deleteDatabase): Add an ASSERT.
1835         (WebKit::UniqueIDBDatabase::performNextMainThreadTask): Call through to performNextMainThreadTaskWithoutAdoptRef.
1836         (WebKit::UniqueIDBDatabase::performNextMainThreadTaskWithoutAdoptRef): Execute a task,
1837           returning true if there are more tasks left to execute.
1838         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
1839
1840         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
1841         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::~UniqueIDBDatabaseBackingStoreSQLite): Properly
1842           handle JSC cleanup.
1843
1844         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
1845         (WebKit::WebIDBServerConnection::close): Implement this.
1846
1847 2014-02-10  Benjamin Poulain  <bpoulain@apple.com>
1848
1849         [iOS][WK2] Add empty definition for an API allowing clients to define obscured edges over the scrollview
1850         https://bugs.webkit.org/show_bug.cgi?id=128396
1851
1852         Reviewed by Simon Fraser.
1853
1854         ObscuredInset defines the area of the scrollview unusable for positioning content.
1855         The API is unused in this patch.
1856
1857         * UIProcess/API/Cocoa/WKViewPrivate.h:
1858         * UIProcess/API/Cocoa/WKWebView.mm:
1859         (-[WKWebView _obscuredInset]):
1860         (-[WKWebView _setObscuredInset:]):
1861         (-[WKWebView _commitObscuredInset]):
1862         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1863         * UIProcess/API/ios/WKViewIOS.mm:
1864         (-[WKView _obscuredInset]):
1865         (-[WKView _setObscuredInset:]):
1866         (-[WKView _commitObscuredInset]):
1867
1868 2014-02-10  Martin Hock  <mhock@apple.com>
1869
1870         Add API for accessing session ephemerality from a page bundle
1871         https://bugs.webkit.org/show_bug.cgi?id=128410
1872
1873         Reviewed by Alexey Proskuryakov.
1874
1875         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1876         (WKBundlePageIsUsingEphemeralSession):
1877         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1878         * WebProcess/WebPage/WebPage.cpp:
1879         (WebKit::WebPage::isUsingEphemeralSession):
1880         * WebProcess/WebPage/WebPage.h:
1881
1882 2014-02-10  Carlos Garcia Campos  <cgarcia@igalia.com>
1883
1884         [GTK] Create the inspector view using the same web process as the inspected page
1885         https://bugs.webkit.org/show_bug.cgi?id=128539
1886
1887         Reviewed by Martin Robinson.
1888
1889         * UIProcess/API/C/gtk/WKView.cpp:
1890         (WKViewCreate): Pass nullptr as the related page.
1891         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1892         (webkitWebViewBaseCreate): Add related page argument and pass it
1893         to webkitWebViewBaseCreateWebPage() instead of nullptr.
1894         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
1895         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
1896         (WebKit::WebInspectorProxy::platformCreateInspectorPage): Pass
1897         m_page as related page to webkitWebViewBaseCreate().
1898
1899 2014-02-10  Carlos Garcia Campos  <cgarcia@igalia.com>
1900
1901         [GLIB] Add GUniqueOutPtr and use it instead of GOwnPtr
1902         https://bugs.webkit.org/show_bug.cgi?id=127554
1903
1904         Reviewed by Gustavo Noronha Silva.
1905
1906         Use GUniqueOutPtr instead of GOwnPtr.
1907
1908         * NetworkProcess/soup/NetworkProcessSoup.cpp:
1909         (WebKit::getCacheDiskFreeSize):
1910         * Shared/Downloads/soup/DownloadSoup.cpp:
1911         (WebKit::DownloadClient::didReceiveResponse):
1912         (WebKit::DownloadClient::didReceiveData):
1913         (WebKit::DownloadClient::didFinishLoading):
1914         * UIProcess/API/gtk/WebKitFaviconDatabase.cpp:
1915         (processPendingIconsForPageURL):
1916         (webkit_favicon_database_get_favicon):
1917         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
1918         (webkitURISchemeRequestReadCallback):
1919         * UIProcess/API/gtk/WebKitWebView.cpp:
1920         (gotFaviconCallback):
1921         * UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
1922         (WebKit::WebInspectorServer::platformResourceForPath):
1923         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
1924         (WebKit::ProcessLauncher::launchProcess):
1925         * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
1926         (WebKit::PluginProcessProxy::scanPlugin):
1927         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
1928         * WebProcess/soup/WebProcessSoup.cpp:
1929         (WebKit::getCacheDiskFreeSize):
1930
1931 2014-02-10  Tim Horton  <timothy_horton@apple.com>
1932
1933         [iOS][wk2] WebKit2 View Gestures (Swipe): Forward swipe gesture 
1934         https://bugs.webkit.org/show_bug.cgi?id=128523
1935         <rdar://problem/16020378>
1936
1937         Reviewed by Darin Adler.
1938
1939         We can't install the gesture recognizer on a view that's going to be
1940         reparented during the swipe, because the gesture will be cancelled.
1941         Install the recognizer on the WKView and move the WKView's scrollview
1942         child around instead.
1943
1944         * UIProcess/API/ios/WKViewIOS.mm:
1945         (-[WKView setAllowsBackForwardNavigationGestures:]):
1946         We'll install the gesture recognizer on the WKView, but swipe the scrollview.
1947
1948         * UIProcess/ios/ViewGestureControllerIOS.mm:
1949         (-[WKSwipeTransitionController initWithViewGestureController:gestureRecognizerView:]):
1950         Clarify that WKSwipeTransitionController gets handed only the view to install the gesture recognizer on.
1951         (-[WKSwipeTransitionController gestureRecognizerForInteractiveTransition:WithTarget:action:]):
1952         Use public enum values so we can get rid of one private header.
1953
1954         (WebKit::ViewGestureController::installSwipeHandler):
1955         Separate out the gesture recognizer view from the one that gets swiped.
1956
1957         (WebKit::ViewGestureController::beginSwipeGesture):
1958         Record a snapshot before beginning the swipe. This is important for the back-then-forward
1959         swipe case, and matches the behavior of the Mac implementation.
1960
1961         (WebKit::ViewGestureController::endSwipeGesture):
1962         * UIProcess/mac/ViewGestureController.h:
1963         Slight geometry adjustments due to the change in targetted view.
1964
1965 2014-02-10  Filip Pizlo  <fpizlo@apple.com>
1966
1967         JSC environment variables should override other mechanisms for setting options
1968         https://bugs.webkit.org/show_bug.cgi?id=128511
1969
1970         Reviewed by Geoffrey Garen.
1971
1972         * WebProcess/mac/WebProcessMac.mm:
1973         (WebKit::WebProcess::platformInitializeWebProcess):
1974
1975 2014-02-10  Carlos Garcia Campos  <cgarcia@igalia.com>
1976
1977         [GTK] Add API to create a webview related to another one
1978         https://bugs.webkit.org/show_bug.cgi?id=128498
1979
1980         Reviewed by Gustavo Noronha Silva.
1981
1982         Add webkit_web_view_new_with_related_view() to create a new
1983         WebView sharing the same web process as the given one.
1984
1985         * UIProcess/API/gtk/WebKitWebContext.cpp:
1986         (webkitWebContextCreatePageForWebView): Use the given related
1987         WebView to pass a related WebPageProxy to webkitWebViewBaseCreateWebPage().
1988         * UIProcess/API/gtk/WebKitWebContextPrivate.h:
1989         * UIProcess/API/gtk/WebKitWebView.cpp:
1990         (webkitWebViewConstructed): Pass the related web view to webkitWebContextCreatePageForWebView().
1991         (webkitWebViewSetProperty):
1992         (webkit_web_view_class_init): Add related-view construct-only property.
1993         (webkit_web_view_new_with_related_view): New public method to
1994         create a web view with a related one.
1995         * UIProcess/API/gtk/WebKitWebView.h:
1996         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1997         (webkitWebViewBaseCreate): Pass nullptr as related page to webkitWebViewBaseCreateWebPage().
1998         (webkitWebViewBaseCreateWebPage): Use the given related
1999         WebPageProxy to initialize the web page configuration.
2000         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
2001         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol.
2002
2003 2014-02-10  Lukasz Bialek  <l.bialek@samsung.com>
2004
2005         [EFL] Spelling unit tests should use ecore_main_loop_iterate()
2006         https://bugs.webkit.org/show_bug.cgi?id=127427
2007
2008         Reviewed by Gyuyoung Kim.
2009
2010         r148670 gets rid of EFL's idlers in a favor of timers to load languages.
2011         ecore_main_loop_iterate() can be used now.
2012
2013         Add function that loads spellchecking languages and waits for loading
2014         to be finished:
2015         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
2016         (EWK2UnitTest::EWK2UnitTestBase::waitForLanguageLoading):
2017         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
2018
2019         Apply added function to tests that should wait for languages to be loaded:
2020         * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:
2021         (EWK2TextCheckerTest::resetCallbacksExecutionStats):
2022         (TEST_F):
2023
2024 2014-02-09  Carlos Garnacho  <carlosg@gnome.org>
2025
2026         [GTK] Implement support touch events
2027         https://bugs.webkit.org/show_bug.cgi?id=98931
2028
2029         Reviewed by Carlos Garcia Campos.
2030
2031         In GTK+ >= 3.4.0, GdkEventTouch is available to inform about multitouch events. Use these to implement
2032         touch events on this platform. If a touch is left unhandled and is the "pointer emulating" one, mouse
2033         events will be generated as a fallback.
2034
2035         * GNUmakefile.list.am:
2036         * PlatformGTK.cmake:
2037         * Shared/gtk/NativeWebTouchEventGtk.cpp:
2038         * Shared/NativeWebTouchEvent.h:
2039         (WebKit::NativeWebTouchEvent::nativeEvent):
2040         (WebKit::NativeWebTouchEvent::touchContext): Add GTK+ implementation of NativeWebTouchEvent.
2041         * Shared/gtk/WebEventFactory.cpp:
2042         (WebKit::touchPhaseFromEvents):
2043         (WebKit::WebEventFactory::createWebTouchEvent): Add methods to generate WebTouchEvents out
2044         of GdkEventTouch events, a GtkTouchContextHelper object is used to hold information about all current
2045         touches, in order to build information about all individual touchpoints.
2046         * Shared/gtk/WebEventFactory.h:
2047         * UIProcess/API/gtk/PageClientImpl.cpp:
2048         (WebKit::PageClientImpl::doneWithTouchEvent): Implement pointer emulation. If a touch event was unhandled
2049         in DOM and pertains to the touch sequence that emulates pointer events. The event gets transformed to its
2050         mouse event counterpart and handled by the widget again.
2051         * UIProcess/API/gtk/PageClientImpl.h:
2052         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2053         (webkitWebViewBaseRealize): Listen for touch events
2054         (webkitWebViewBaseTouchEvent):
2055         (webkit_web_view_base_class_init): Add implementation for the touch_events() handler, this merely
2056         lets the pageProxy handle the NativeWebTouchEvent we create to wrap the GdkEvent received.
2057
2058 2014-02-09  Commit Queue  <commit-queue@webkit.org>
2059
2060         Unreviewed, rolling out r162768.
2061         http://trac.webkit.org/changeset/162768
2062         https://bugs.webkit.org/show_bug.cgi?id=128495
2063
2064         Causes crashes on GTK WK2 in three fast/forms tests.
2065         (Requested by zdobersek on #webkit).
2066
2067         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
2068         (WebKit::WebPopupMenuProxyGtk::showPopupMenu):
2069
2070 2014-02-08  Brady Eidson  <beidson@apple.com>
2071
2072         IDB: storage/indexeddb/mozilla/object-cursors.html fails
2073         <rdar://problem/16020585> and https://bugs.webkit.org/show_bug.cgi?id=128479
2074
2075         Reviewed by Dan Bernstein.
2076
2077         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
2078         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createAndPopulateInitialMetadata): Update the IndexInfo
2079           table schema to allow for indexes with the same id/name as previous indexes.
2080           But with different object stores, of course.
2081
2082 2014-02-08  Brady Eidson  <beidson@apple.com>
2083
2084         IDB: storage/indexeddb/mozilla/index-prev-no-duplicate.html fails
2085         <rdar://problem/16018918> and https://bugs.webkit.org/show_bug.cgi?id=128444
2086
2087         Reviewed by Dan Bernstein.
2088
2089         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
2090         (WebKit::getIndexStatement): Return different statements for unique cursors that will
2091           sort the values in reverse of the cursor direction, matching expected IndexedDB behavior.
2092         (WebKit::SQLiteIDBCursor::establishStatement):
2093
2094         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
2095         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::uncheckedPutIndexRecord): Insert the values as
2096           strings since we need the collation function to be called for proper sorting.
2097
2098 2014-02-08  Ryosuke Niwa  <rniwa@webkit.org>
2099
2100         Cleanup the interface of FrameSelection
2101         https://bugs.webkit.org/show_bug.cgi?id=128481
2102
2103         Reviewed by Andreas Kling.
2104
2105         * WebProcess/WebPage/FindController.cpp:
2106         (WebKit::FindController::getFindIndicatorBitmapAndRect):
2107         (WebKit::FindController::drawRect):
2108         * WebProcess/WebPage/WebPage.cpp:
2109         (WebKit::WebPage::scaledSnapshotWithOptions):
2110
2111 2014-02-08  Brady Eidson  <beidson@apple.com>
2112
2113         IDB: storage/indexeddb/mozilla/cursors.html fails
2114         <rdar://problem/16017998> and https://bugs.webkit.org/show_bug.cgi?id=128423
2115
2116         Reviewed by Dan Bernstein.
2117
2118         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
2119         (WebKit::SQLiteIDBCursor::internalAdvanceOnce): Store the primary key for object store cursors.
2120         (WebKit::SQLiteIDBCursor::iterate): We’re not supposed to check for equality to the target key.
2121           Depending on the direction of the cursor we should check for the next highest or next lowest key.
2122
2123 2014-02-08  Dan Bernstein  <mitz@apple.com>
2124
2125         Remove client-drawn highlights (-webkit-highlight, WebHTMLHighlighter)
2126         https://bugs.webkit.org/show_bug.cgi?id=128456
2127
2128         Reviewed by Anders Carlsson.
2129
2130         * WebProcess/WebCoreSupport/WebChromeClient.cpp: Removed customHighlightRect and
2131         paintCustomHighlight.
2132         * WebProcess/WebCoreSupport/WebChromeClient.h:
2133
2134 2014-02-08  Darin Adler  <darin@apple.com>
2135
2136         Change TextIterator to use StringView, preparing to wean it from deprecatedCharacters
2137         https://bugs.webkit.org/show_bug.cgi?id=128233
2138
2139         Reviewed by Anders Carlsson.
2140
2141         * WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.mm:
2142         (-[WKDOMTextIterator currentTextPointer]): Call TextIterator::deprecatedTextIteratorCharacters.
2143
2144         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2145         (WebKit::WebEditorClient::checkSpellingOfString): Use StringView.
2146         (WebKit::WebEditorClient::checkGrammarOfString): Ditto.
2147         * WebProcess/WebCoreSupport/WebEditorClient.h: Ditto.
2148
2149 2014-02-08  Piotr Grad  <p.grad@samsung.com>
2150
2151         [GTK] Build break in WebKitWebViewBase.cpp::webkitWebViewBaseCreateWebPage
2152         https://bugs.webkit.org/show_bug.cgi?id=128449
2153
2154         Reviewed by Carlos Garcia Campos.
2155
2156         Parameter passed to context->createWebPage was inproper.
2157
2158         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2159         (webkitWebViewBaseCreateWebPage):
2160
2161 2014-02-08  Dan Bernstein  <mitz@apple.com>
2162
2163         Font size-related preference values should be CGFloats backed by doubles
2164         https://bugs.webkit.org/show_bug.cgi?id=128445
2165
2166         Reviewed by Filip Pizlo.
2167
2168         * Shared/WebPreferencesStore.h: Changed minimumFontSize, minimumLogicalFontSize,
2169         defaultFontSize, and defaultFixedFontSize into double-value preferences.
2170         * UIProcess/API/Cocoa/WKPreferences.h: Changed minimumFontSize into CGFloat.
2171         * UIProcess/API/Cocoa/WKPreferences.mm:
2172         (-[WKPreferences minimumFontSize]): Changed return type.
2173         (-[WKPreferences setMinimumFontSize:]): Changed parameter type.
2174         * WebProcess/WebPage/WebPage.cpp:
2175         (WebKit::WebPage::updatePreferences): Changed to use double getters.
2176
2177 2014-02-08  Adrian Perez de Castro  <aperez@igalia.com>
2178
2179         [GTK] Make process model names properly meaningful
2180         https://bugs.webkit.org/show_bug.cgi?id=128389
2181
2182         Reviewed by Carlos Garcia Campos.
2183
2184         The name WEBKIT_PROCESS_MODEL_ONE_SECONDARY_PROCESS_PER_WEB_VIEW
2185         is misleading because there are situations in which web views may
2186         share the same web process even when multi-process mode is enabled;
2187         for example when opening a related view and both interact using JS.
2188
2189         * UIProcess/API/gtk/WebKitWebContext.cpp:
2190         (webkit_web_context_set_process_model):
2191         (webkit_web_context_get_process_model):
2192         Update names of WebKitProcessModel enum values.
2193         * UIProcess/API/gtk/WebKitWebContext.h:
2194         Ditto.
2195
2196 2014-02-08  Piotr Grad  <p.grad@samsung.com>
2197
2198         [GTK] Build break in WebKitSettings
2199         https://bugs.webkit.org/show_bug.cgi?id=128446
2200
2201         Reviewed by Ryosuke Niwa.
2202
2203         Argument for WebPreferences::create was missing
2204
2205         * UIProcess/API/gtk/WebKitSettings.cpp:
2206         (_WebKitSettingsPrivate::_WebKitSettingsPrivate):
2207
2208 2014-02-07  Jinwoo Song  <jinwoo7.song@samsung.com>
2209
2210         Unreviewed EFL WebKit2 build fix after r163671.
2211
2212         * UIProcess/CoordinatedGraphics/WebView.cpp:
2213         (WebKit::WebView::WebView): Use WebPageConfiguration in creating WebPage.
2214
2215 2014-02-07  Gavin Barraclough  <barraclough@apple.com>
2216
2217         Add better comments to code that boosts the NetworkProcess
2218         https://bugs.webkit.org/show_bug.cgi?id=128431
2219
2220         Rubber stamped by Tim Horton
2221
2222         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
2223         (WebKit::XPCServiceEventHandler):
2224         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
2225         (WebKit::XPCServiceEventHandler):
2226         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2227         (WebKit::connectToService):
2228
2229 2014-02-07  Tim Horton  <timothy_horton@apple.com>
2230
2231        Build fix.
2232
2233         * UIProcess/API/ios/WKContentView.mm:
2234         (-[WKContentView initWithFrame:configuration:]):
2235
2236 2014-02-07  Anders Carlsson  <andersca@apple.com>
2237
2238         Pass the preferences through from the WKWebViewConfiguration object
2239         https://bugs.webkit.org/show_bug.cgi?id=128430
2240
2241         Reviewed by Tim Horton.
2242
2243         * UIProcess/API/Cocoa/WKPreferences.h:
2244         * UIProcess/API/Cocoa/WKPreferences.mm:
2245         (-[WKPreferences init]):
2246         Don't return nil if [super init] returns a valid object.
2247
2248         (-[WKPreferences minimumFontSize]):
2249         (-[WKPreferences setMinimumFontSize:]):
2250         Change this property to be unsigned.
2251
2252         * UIProcess/API/Cocoa/WKPreferencesInternal.h:
2253         Use @package.
2254
2255         * UIProcess/API/Cocoa/WKWebView.mm:
2256         (-[WKWebView initWithFrame:configuration:]):
2257         Set up a WebKit::WebPageConfiguration and use the new -[WKView initWithFrame:context:configuration:] method.
2258
2259         * UIProcess/API/ios/WKContentView.mm:
2260         (-[WKContentView initWithFrame:configuration:]):
2261         Set the preferences.
2262
2263         * UIProcess/API/mac/WKView.mm:
2264         (-[WKView initWithFrame:context:configuration:]):
2265         Add a new initializer that takes a WebContext and a WebPageConfiguration.
2266
2267         (-[WKView _registerDraggedTypes]):
2268         This shouldn't be in the private category.
2269         
2270         (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
2271         Call the new initializer.
2272
2273         * UIProcess/API/mac/WKViewInternal.h:
2274
2275 2014-02-07  Tim Horton  <timothy_horton@apple.com>
2276
2277         Fix the WebKit2 build after r163671.
2278
2279         * UIProcess/API/ios/WKContentView.mm:
2280         (-[WKContentView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
2281
2282 2014-02-07  Gavin Barraclough  <barraclough@apple.com>
2283
2284         Remove isInitialState flag from Page::setViewState
2285         https://bugs.webkit.org/show_bug.cgi?id=128428
2286
2287         Reviewed by Sam Weinig.
2288
2289         * WebProcess/WebPage/WebPage.cpp:
2290         (WebKit::WebPage::WebPage):
2291             - don't pass isInitialState to setViewState.
2292         (WebKit::WebPage::reinitializeWebPage):
2293             - if the viewState changes this should fire a visibility event.
2294         (WebKit::WebPage::setViewState):
2295             - merged with setViewStateInternal.
2296         * WebProcess/WebPage/WebPage.h:
2297             - removed setViewStateInternal.
2298
2299 2014-02-07  Simon Fraser  <simon.fraser@apple.com>
2300
2301         Encode requestedScrollPosition on ScrollingStateScrollingNodes to send to the UI process
2302         https://bugs.webkit.org/show_bug.cgi?id=128416
2303
2304         Reviewed by Tim Horton.
2305         
2306         Encode and decode requestedScrollPosition() and requestedScrollPositionRepresentsProgrammaticScroll(),
2307         which can't use the macros because the setter takes both arguments.
2308         
2309         The UI process needs this to notice programmatic scrolls.
2310
2311         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
2312         (ArgumentCoder<ScrollingStateScrollingNode>::encode):
2313         (ArgumentCoder<ScrollingStateScrollingNode>::decode):
2314
2315 2014-02-07  Simon Fraser  <simon.fraser@apple.com>
2316
2317         Add typesafe casts for DrawingAreaProxy classes
2318         https://bugs.webkit.org/show_bug.cgi?id=128419
2319
2320         Reviewed by Andreas Kling.
2321         
2322         Add typesafe casts, and use one in RemoteScrollingCoordinatorProxy::layerTreeHost().
2323
2324         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
2325         (WebKit::RemoteScrollingCoordinatorProxy::layerTreeHost):
2326         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
2327         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
2328         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2329         (WebKit::WebChromeClient::contentsSizeChanged):
2330         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2331
2332 2014-02-06  Filip Pizlo  <fpizlo@apple.com>
2333
2334         More FTL build scaffolding
2335         https://bugs.webkit.org/show_bug.cgi?id=128330
2336
2337         Reviewed by Geoffrey Garen.
2338
2339         * Configurations/FeatureDefines.xcconfig:
2340
2341 2014-02-07  Tim Horton  <timothy_horton@apple.com>
2342
2343         Move allowsBackForwardNavigationGestures back to private because apparently our build systems are broken.
2344
2345         * UIProcess/API/Cocoa/WKView.h:
2346         * UIProcess/API/Cocoa/WKViewPrivate.h:
2347         * UIProcess/API/mac/WKView.mm:
2348         (-[WKView setAllowsBackForwardNavigationGestures:]):
2349         (-[WKView allowsBackForwardNavigationGestures]):
2350
2351 2014-02-07  Anders Carlsson  <andersca@apple.com>
2352
2353         Simplify web page creation
2354         https://bugs.webkit.org/show_bug.cgi?id=128425
2355
2356         Reviewed by Andreas Kling.
2357
2358         Add a WebPageConfiguration class and stick the page group, preferences, session etc there
2359         instead of adding more and more parameters to the WebPageProxy constructor.
2360
2361         Make WebContext::createWebPage fill in the missing pieces in the WebPageConfiguration object.
2362
2363         * UIProcess/API/ios/WKContentView.mm:
2364         (-[WKContentView initWithFrame:configuration:]):
2365         (-[WKContentView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
2366         * UIProcess/API/mac/WKView.mm:
2367         (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
2368         * UIProcess/WebContext.cpp:
2369         (WebKit::WebContext::createWebPage):
2370         * UIProcess/WebContext.h:
2371         * UIProcess/WebPageProxy.cpp:
2372         (WebKit::WebPageProxy::create):
2373         (WebKit::WebPageProxy::WebPageProxy):
2374         * UIProcess/WebPageProxy.h:
2375         * UIProcess/WebProcessProxy.cpp:
2376         (WebKit::WebProcessProxy::createWebPage):
2377         * UIProcess/WebProcessProxy.h:
2378
2379 2014-02-07  Tim Horton  <timothy_horton@apple.com>
2380
2381         Build fix. Wrong section of the file.
2382
2383         * UIProcess/API/mac/WKView.mm:
2384         (-[WKView setAllowsBackForwardNavigationGestures:]):
2385         (-[WKView allowsBackForwardNavigationGestures]):
2386
2387 2014-02-07  Benjamin Poulain  <bpoulain@apple.com>
2388
2389         [WK2] The WebPageProxy's copy of pageScaleFactor is not update when the scale is changed from the viewport configuration
2390         https://bugs.webkit.org/show_bug.cgi?id=128415
2391
2392         Reviewed by Simon Fraser.
2393
2394         * WebProcess/WebPage/ios/WebPageIOS.mm:
2395         (WebKit::WebPage::viewportConfigurationChanged):
2396         The scale needs to be updated through WebPage::scalePage().
2397
2398 2014-02-07  Tim Horton  <timothy_horton@apple.com>
2399
2400         WebKit2 View Gestures (Swipe): Support for iOS
2401         https://bugs.webkit.org/show_bug.cgi?id=128363
2402         <rdar://problem/15194194>
2403
2404         Reviewed by Anders Carlsson.
2405
2406         * Shared/mac/RemoteLayerTreeTransaction.h:
2407         (WebKit::RemoteLayerTreeTransaction::renderTreeSize):
2408         (WebKit::RemoteLayerTreeTransaction::setRenderTreeSize):
2409         * Shared/mac/RemoteLayerTreeTransaction.mm:
2410         (WebKit::RemoteLayerTreeTransaction::encode):
2411         (WebKit::RemoteLayerTreeTransaction::decode):
2412         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2413         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
2414         Send the render tree size along with remote layer tree commits,
2415         so that we can act upon it (to hide snapshots) in the UI process
2416         in sync with layer commits.
2417
2418         * UIProcess/API/Cocoa/WKViewPrivate.h:
2419         We want allowsBackForwardNavigationGestures for both platforms.
2420
2421         * UIProcess/API/ios/PageClientImplIOS.mm:
2422         (WebKit::PageClientImpl::takeViewSnapshot):
2423         * UIProcess/API/ios/WKContentView.h:
2424         * UIProcess/API/ios/WKContentView.mm:
2425         (-[WKContentView _takeViewSnapshot]):
2426         * UIProcess/API/ios/WKContentViewInternal.h:
2427         Plumb snapshotting through to WKViewIOS.
2428
2429         * UIProcess/API/ios/WKViewIOS.mm:
2430         (-[WKView setAllowsBackForwardNavigationGestures:]):
2431         (-[WKView allowsBackForwardNavigationGestures]):
2432         Create/destroy the gesture controller when we turn on/off back-forward swipe.
2433         Tell WebPageProxy to save snapshots if swipe is enabled.
2434
2435         (-[WKView contentView:didCommitLayerTree:]):
2436         Forward the current transaction's render tree size to ViewGestureController.
2437
2438         (-[WKView takeViewSnapshotForContentView:]):
2439         Snapshot the view. This is not the best SPI to use, we should consider
2440         using one of those which returns an IOSurface and plumbing it through
2441         to ViewSnapshotStore, but all of our PageClient abstraction makes that annoying.
2442
2443         * UIProcess/WebPageProxy.cpp:
2444         (WebKit::WebPageProxy::recordNavigationSnapshot):
2445         Record snapshots on iOS as well.
2446
2447         * UIProcess/ios/ViewGestureControllerIOS.mm: Added.
2448         (-[WKSwipeInteractiveTransitionDelegate initWithViewGestureController:WebKit::swipingView:]):
2449         (-[WKSwipeInteractiveTransitionDelegate WebKit::ViewGestureController::directionForTransition:]):
2450         (-[WKSwipeInteractiveTransitionDelegate startInteractiveTransition:]):
2451         (-[WKSwipeInteractiveTransitionDelegate shouldBeginInteractiveTransition:]):
2452         (-[WKSwipeInteractiveTransitionDelegate interactiveTransition:gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
2453         (-[WKSwipeInteractiveTransitionDelegate interactiveTransition:gestureRecognizer:shouldReceiveTouch:]):
2454         (-[WKSwipeInteractiveTransitionDelegate gestureRecognizerForInteractiveTransition:WithTarget:action:]):
2455         (WebKit::ViewGestureController::ViewGestureController):
2456         (WebKit::ViewGestureController::~ViewGestureController):
2457         (WebKit::ViewGestureController::installSwipeHandler):
2458         (WebKit::ViewGestureController::beginSwipeGesture):
2459         (WebKit::ViewGestureController::canSwipeInDirection):
2460         (WebKit::ViewGestureController::endSwipeGesture):
2461         (WebKit::ViewGestureController::setRenderTreeSize):
2462         (WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired):
2463         (WebKit::ViewGestureController::removeSwipeSnapshot):
2464
2465         * UIProcess/mac/ViewGestureController.h:
2466         Add iOS-specific methods, and don't include all of the Mac-specific code.
2467         We can move towards sharing more logic in the future.
2468
2469         * UIProcess/mac/ViewGestureController.messages.in:
2470         * UIProcess/mac/ViewGestureControllerMac.mm:
2471         (WebKit::ViewGestureController::ViewGestureController):
2472         * UIProcess/mac/ViewSnapshotStore.h:
2473         * UIProcess/mac/ViewSnapshotStore.mm:
2474         (WebKit::ViewSnapshotStore::recordSnapshot):
2475         (WebKit::ViewSnapshotStore::snapshotAndRenderTreeSize):
2476         Make ViewSnapshotStore build/work without IOSurface.
2477
2478         * WebKit2.xcodeproj/project.pbxproj:
2479
2480 2014-02-07  Anders Carlsson  <andersca@apple.com>
2481
2482         Implement more of WKPreferences
2483         https://bugs.webkit.org/show_bug.cgi?id=128411
2484
2485         Reviewed by Tim Horton.
2486
2487         Give WKPreferences an underlying WebKit::WebPreferences object, add a minimumFontSize preference
2488         and make sure that WKWebView's initializer creates a WKPreferences object if the configuration doesn't specify one.
2489
2490         * UIProcess/API/Cocoa/WKPreferences.h:
2491         * UIProcess/API/Cocoa/WKPreferences.mm:
2492         (-[WKPreferences init]):
2493         (-[WKPreferences minimumFontSize]):
2494         (-[WKPreferences setMinimumFontSize:]):
2495         * UIProcess/API/Cocoa/WKPreferencesInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKPreferences.mm.
2496         * UIProcess/API/Cocoa/WKWebView.mm:
2497         (-[WKWebView initWithFrame:configuration:]):
2498         * UIProcess/WebPageProxy.h:
2499         * WebKit2.xcodeproj/project.pbxproj:
2500
2501 2014-02-07  Brady Eidson  <beidson@apple.com>
2502
2503         IDB: Some Mozilla cursor mutation tests fail
2504         <rdar://problem/16011680> and https://bugs.webkit.org/show_bug.cgi?id=128374
2505
2506         Reviewed by Sam Weinig.
2507
2508         After a SQLite statement is prepared, stepping it will not pick up any subsequent changes
2509         to the object store.
2510
2511         By keeping track of the current record we’re looking at in the object store and being told
2512         that the object store changed its contents, we can reset the statement to pick up where it
2513         left off but with the new object store contents.
2514
2515         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
2516         (WebKit::UniqueIDBDatabase::putRecordInBackingStore): Tell the backing store to notify
2517           its cursors that the object store changed its records.
2518         (WebKit::UniqueIDBDatabase::deleteRangeInBackingStore): Ditto.
2519
2520         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
2521         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
2522         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::notifyCursorsOfChanges): Tell the transaction
2523           to notify its cursors that the object store changed its records.
2524         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
2525
2526         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.cpp:
2527         (WebKit::SQLiteIDBTransaction::notifyCursorsOfChanges): Tell the relevant cursors that their
2528           object store changed its records.
2529         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.h:
2530
2531         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
2532         (WebKit::SQLiteIDBCursor::SQLiteIDBCursor):
2533         (WebKit::getIndexStatement): All statements now have a lower and upper range. By default we bind
2534           IDBKey::Minimum to the lower range and IDBKey::Maximum to the upper range.
2535         (WebKit::getObjectStoreStatement): Ditto.
2536         (WebKit::SQLiteIDBCursor::establishStatement):
2537         (WebKit::SQLiteIDBCursor::createSQLiteStatement):
2538         (WebKit::SQLiteIDBCursor::objectStoreRecordsChanged): Set the flag indicating the statement
2539           needs to be reset and rebound.
2540         (WebKit::SQLiteIDBCursor::resetAndRebindStatement):
2541         (WebKit::SQLiteIDBCursor::bindArguments): Factored out to be shared between statement prepare()
2542           and statement reset().
2543         (WebKit::SQLiteIDBCursor::advance):
2544         (WebKit::SQLiteIDBCursor::advanceOnce): If the statement needs to be reset, do so before advancing it.
2545         (WebKit::SQLiteIDBCursor::internalAdvanceOnce): In a few cases, tell advanceOnce that it needs to
2546           try again because it is on a missing record or is repeating a record.
2547         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.h:
2548         (WebKit::SQLiteIDBCursor::objectStoreID):
2549
2550         Make sure Maximum and Minimum keys are never sent across IPC, as that doesn’t make sense:
2551         * Shared/WebCoreArgumentCoders.cpp:
2552         (IPC::ArgumentCoder<IDBKeyData>::encode):
2553         (IPC::ArgumentCoder<IDBKeyData>::decode):
2554
2555 2014-02-07  Anders Carlsson  <andersca@apple.com>
2556
2557         Make it possible for each web page to have different preferences
2558         https://bugs.webkit.org/show_bug.cgi?id=128403
2559
2560         Reviewed by Tim Horton.
2561
2562         * UIProcess/API/C/WKPreferences.cpp:
2563         (WKPreferencesCreate):
2564         * UIProcess/WebContext.cpp:
2565         (WebKit::WebContext::ensureNetworkProcess):
2566         (WebKit::WebContext::createNewWebProcess):
2567         * UIProcess/WebIconDatabase.cpp:
2568         (WebKit::WebIconDatabase::setDatabasePath):
2569         * UIProcess/WebPageGroup.cpp:
2570         (WebKit::WebPageGroup::WebPageGroup):
2571         (WebKit::WebPageGroup::~WebPageGroup):
2572         (WebKit::WebPageGroup::setPreferences):
2573         * UIProcess/WebPageProxy.cpp:
2574         (WebKit::WebPageProxy::WebPageProxy):
2575         (WebKit::WebPageProxy::~WebPageProxy):
2576         (WebKit::WebPageProxy::setPreferences):
2577         (WebKit::WebPageProxy::preferencesDidChange):
2578         * UIProcess/WebPageProxy.h:
2579         * UIProcess/WebPreferences.cpp:
2580         (WebKit::WebPreferences::~WebPreferences):
2581         (WebKit::WebPreferences::addPage):
2582         (WebKit::WebPreferences::removePage):
2583         (WebKit::WebPreferences::update):
2584         (WebKit::WebPreferences::updatePrivateBrowsingValue):
2585         (WebKit::WebPreferences::anyPagesAreUsingPrivateBrowsing):
2586         * UIProcess/WebPreferences.h:
2587
2588 2014-02-07  Benjamin Poulain  <bpoulain@apple.com>
2589
2590         [WK2] Add support for text document viewport configuration
2591         https://bugs.webkit.org/show_bug.cgi?id=128359
2592
2593         Reviewed by Simon Fraser.
2594
2595         When a text document is being loaded, use the plainText viewport parameters.
2596
2597         * UIProcess/API/ios/WKContentView.h:
2598         * UIProcess/API/ios/WKContentView.mm:
2599         * WebProcess/WebPage/WebPage.cpp:
2600         (WebKit::WebPage::didCommitLoad):
2601
2602 2014-02-07  Gavin Barraclough  <barraclough@apple.com>
2603
2604         Should report user input to PageThrottler
2605         https://bugs.webkit.org/show_bug.cgi?id=128398
2606
2607         Reviewed by Tim Horton.
2608
2609         Make sure we wake from AppNap if there is user interaction.
2610
2611         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
2612         (WebKit::NPRuntimeObjectMap::evaluate):
2613             - reportInterestingEvent() -> pluginDidEvaluate()
2614         * WebProcess/WebPage/WebPage.cpp:
2615         (WebKit::WebPage::mouseEvent):
2616         (WebKit::WebPage::wheelEvent):
2617         (WebKit::WebPage::keyEvent):
2618             - call didReceiveUserInput()
2619
2620 2014-02-07  Dean Jackson  <dino@apple.com>
2621
2622         WebGL doesn't update with remotely hosted layers
2623         https://bugs.webkit.org/show_bug.cgi?id=128390
2624
2625         Reviewed by Simon Fraser.
2626
2627         PlatformCALayerRemote was intercepting the setNeedsDisplay calls to
2628         WebGL layers, and thus causing them to not draw. Fix this by adding an
2629         override in PlatformCALayerRemoteCustom to check if it is a WebGLLayer
2630         and call setNeedsDisplay directly.
2631
2632         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
2633         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
2634         (PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
2635         (PlatformCALayerRemoteCustom::setNeedsDisplay):
2636
2637 2014-02-07  Benjamin Poulain  <bpoulain@apple.com>
2638
2639         [WK2] Fitler touch events only based on touch start
2640         https://bugs.webkit.org/show_bug.cgi?id=128354
2641
2642         Reviewed by Simon Fraser.
2643
2644         Touch Events track their target, we should not test the touch regions
2645         again after a touch sequence starts.
2646
2647         This patch adds a boolean flag to know if we are sending events to the WebProcess
2648         (m_isTrackingTouchEvents). The flag is updated every time a touch sequence starts.
2649
2650         * UIProcess/WebPageProxy.cpp:
2651         (WebKit::WebPageProxy::WebPageProxy):
2652         (WebKit::WebPageProxy::shouldStartTrackingTouchEvents):
2653         (WebKit::WebPageProxy::handleTouchEvent):
2654         * UIProcess/WebPageProxy.h:
2655
2656 2014-02-07  Anders Carlsson  <andersca@apple.com>
2657
2658         Simplify WebPreferences creation inside WebPageGroup
2659         https://bugs.webkit.org/show_bug.cgi?id=128392
2660
2661         Reviewed by Andreas Kling.
2662
2663         Always create a WebPreferences object when creating the web page group.
2664         This is another step towards letting WebPageProxy manage web preferences.
2665
2666         * UIProcess/WebPageGroup.cpp:
2667         (WebKit::pageGroupData):
2668         (WebKit::WebPageGroup::WebPageGroup):
2669         (WebKit::WebPageGroup::~WebPageGroup):
2670         (WebKit::WebPageGroup::setPreferences):
2671         (WebKit::WebPageGroup::preferences):
2672         * UIProcess/WebPageGroup.h:
2673
2674 2014-02-07  Gavin Barraclough  <barraclough@apple.com>
2675
2676         Reenable AppNap
2677         https://bugs.webkit.org/show_bug.cgi?id=128394
2678
2679         Reviewed by Tim Horton.
2680
2681         * Shared/WebPreferencesStore.h:
2682             - pageVisibilityBasedProcessSuppressionEnabled should default to true.
2683
2684 2014-02-07  Tim Horton  <timothy_horton@apple.com>
2685
2686         Rename ViewGestureController.mm to ViewGestureControllerMac.mm
2687         https://bugs.webkit.org/show_bug.cgi?id=128387
2688
2689         Reviewed by Anders Carlsson.
2690
2691         As a precursor to having a second nearly completely divergent
2692         ViewGestureController implementation for iOS.
2693
2694         * UIProcess/mac/ViewGestureControllerMac.mm: Renamed from Source/WebKit2/UIProcess/mac/ViewGestureController.mm.
2695         * WebKit2.xcodeproj/project.pbxproj:
2696         Rename ViewGestureController.mm to ViewGestureControllerMac.mm.
2697         Unfortunately, since we're not renaming the class, the header
2698         has to keep its name (and will be the recipient of a giant #if in a later
2699         patch), because the message receiver generated code will try to import
2700         ViewGestureController.h (without the Mac suffix).
2701
2702 2014-02-07  Anders Carlsson  <andersca@apple.com>
2703
2704         Copying a WebPreferences object should be done through a member function
2705         https://bugs.webkit.org/show_bug.cgi?id=128385
2706
2707         Reviewed by Andreas Kling.
2708
2709         * UIProcess/API/C/WKPreferences.cpp:
2710         (WKPreferencesCreateCopy):
2711         * UIProcess/WebPreferences.cpp:
2712         (WebKit::WebPreferences::copy):
2713         * UIProcess/WebPreferences.h:
2714
2715 2014-02-07  Anders Carlsson  <andersca@apple.com>
2716
2717         WebPageGroup::setPreferences should set the preferences on all pages in the group
2718         https://bugs.webkit.org/show_bug.cgi?id=128383
2719
2720         Reviewed by Alexey Proskuryakov.
2721
2722         * UIProcess/WebPageGroup.cpp:
2723         (WebKit::WebPageGroup::setPreferences):
2724
2725 2014-02-07  Dan Bernstein  <mitz@apple.com>
2726
2727         [Cocoa] WKRemoteObjectInterface doesn’t support aribtrary argument classes
2728         https://bugs.webkit.org/show_bug.cgi?id=128368
2729
2730         Reviewed by Anders Carlsson.
2731
2732         * Shared/API/Cocoa/WKRemoteObjectInterface.h: Declared new methods.
2733         * Shared/API/Cocoa/WKRemoteObjectInterface.mm:
2734         (propertyListClasses): Removed NSNull, which is not really a property list class.
2735         (classesForSelectorArgument): Added helper function.
2736         (-[WKRemoteObjectInterface classesForSelector:argumentIndex:]): Added.
2737         (-[WKRemoteObjectInterface setClasses:forSelector:argumentIndex:]): Added.
2738
2739 2014-02-07  Dan Bernstein  <mitz@apple.com>
2740
2741         [Cocoa] API::FrameHandle has a generic wrapper
2742         https://bugs.webkit.org/show_bug.cgi?id=128366
2743
2744         Reviewed by Anders Carlsson.
2745
2746         Added WKFrameHandle.
2747
2748         * Shared/API/Cocoa/WKFrameHandle.h: Added.
2749         * Shared/API/Cocoa/WKFrameHandle.mm: Added.
2750         (-[WKFrameHandle dealloc]): Calls the API::FrameHandle destructor.
2751         (-[WKFrameHandle isEqual:]): Checks for frame ID equality.
2752         (-[WKFrameHandle hash]): Returns the frame ID.
2753         (-[WKFrameHandle _frameID]): Ditto.
2754         (-[WKFrameHandle copyWithZone:]): Retains self.
2755         (+[WKFrameHandle supportsSecureCoding]): Returns YES.
2756         (-[WKFrameHandle initWithCoder:]): Decodes the frame ID and constructs an API::FrameHandle
2757         with it.
2758         (-[WKFrameHandle encodeWithCoder:]): Encodes the frame ID.
2759         (-[WKFrameHandle _apiObject]): Returns the wrapped API::FrameHandle.
2760         * Shared/API/Cocoa/WKFrameHandleInternal.h: Added.
2761         (WebKit::wrapper): Added. Returns an API::FrameHandle’s wrapper as a WKFrameHandle.
2762
2763         * Shared/APIFrameHandle.cpp:
2764         (API::FrameHandle::create): Changed to return a PassRefPtr.
2765         * Shared/APIFrameHandle.h: Made the constructor public for -[WKFrameHandle initWithCoder:].
2766
2767         * Shared/Cocoa/APIObject.mm:
2768         (API::Object::newObject): Allocate a WKFrameHandle if the object is an API::FrameHandle.
2769
2770         * WebKit2.xcodeproj/project.pbxproj: Added references to new files.
2771
2772         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h: Declared handle property.
2773         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
2774         (+[WKWebProcessPlugInFrame lookUpFrameFromHandle:]): Added. Calls WebProcess::webFrame to
2775         look up a frame with the given handle’s frame ID.
2776         (-[WKWebProcessPlugInFrame handle]): Added. Returns a new handle with the frame’s ID.
2777         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrameInternal.h: Updated #import.
2778         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h: Added.
2779
2780 2014-02-07  Dan Bernstein  <mitz@apple.com>
2781
2782         [Cocoa] WKWebProcessPlugInNodeHandle methods leak and may crash
2783         https://bugs.webkit.org/show_bug.cgi?id=128365
2784
2785         Reviewed by Anders Carlsson.
2786
2787         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
2788         (+[WKWebProcessPlugInNodeHandle nodeHandleWithJSValue:inContext:]): Null-check the result
2789         of InjectedBundleNodeHandle::getOrCreate, and autorelease the return value.
2790         (-[WKWebProcessPlugInNodeHandle htmlIFrameElementContentFrame]): Null-check the result of
2791         InjectedBundleNodeHandle::htmlIFrameElementContentFrame, and autorelease the return value.
2792
2793 2014-02-06  Brady Eidson  <beidson@apple.com>
2794
2795         IDB: storage/indexeddb/create-index-with-integer-keys.html fails
2796         <rdar://problem/16002857> and https://bugs.webkit.org/show_bug.cgi?id=128316
2797
2798         Reviewed by Geoff Garen.
2799
2800         Update Vector<char> to Vector<uint8_t> throughout:
2801         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
2802         (WebKit::UniqueIDBDatabase::openCursorInBackingStore):
2803         (WebKit::UniqueIDBDatabase::didOpenCursorInBackingStore):
2804         (WebKit::UniqueIDBDatabase::advanceCursorInBackingStore):
2805         (WebKit::UniqueIDBDatabase::didAdvanceCursorInBackingStore):
2806         (WebKit::UniqueIDBDatabase::iterateCursorInBackingStore):
2807         (WebKit::UniqueIDBDatabase::didIterateCursorInBackingStore):
2808         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
2809
2810         Update Vector<char> to Vector<uint8_t> throughout:
2811         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
2812         (WebKit::SQLiteIDBCursor::advanceOnce):
2813         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.h:
2814         (WebKit::SQLiteIDBCursor::currentValueBuffer):
2815
2816         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
2817         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
2818         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createIndex): Create a script value from the value data, use
2819           generateIndexKeysForValue to get the index keys, and then write the resulting index records.
2820         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::putIndexRecord): Call through to uncheckedPutIndexRecord.
2821         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::uncheckedPutIndexRecord): Version of putIndexRecord that doesn’t
2822           validate the transaction or its mode.
2823         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::openCursor): Update Vector<char> to Vector<uint8_t>.
2824         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::advanceCursor): Ditto.
2825         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::iterateCursor): Ditto.
2826         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
2827
2828 2014-02-07  Jinwoo Song  <jinwoo7.song@samsung.com>
2829
2830         [EFL][WK2] WebView should be able to configure to set fixed layout
2831         https://bugs.webkit.org/show_bug.cgi?id=128300
2832
2833         Reviewed by Gyuyoung Kim.
2834
2835         Currently, webview is created by setting fixed layout as true and there is no way to change the setting.
2836         But some applications may do not want to use fixed layout so I'd like to add ewk APIs to configure to it.
2837
2838         * UIProcess/API/efl/ewk_view.cpp:
2839         (EWKViewCreate): Do not set to use fixed layout as default.
2840         (ewk_view_layout_fixed_set):
2841         (ewk_view_layout_fixed_get):
2842         * UIProcess/API/efl/ewk_view.h: Add ewk APIs to set fixed layout.
2843         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2844         (TEST_F):
2845
2846 2014-02-06  Brady Eidson  <beidson@apple.com>
2847
2848         Unreviewed build fix after r163612.
2849
2850         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
2851
2852 2014-02-06  Brady Eidson  <beidson@apple.com>
2853
2854         IDB: Remove the entirely unnecessary "Value Key" concept
2855         https://bugs.webkit.org/show_bug.cgi?id=128360
2856
2857         Reviewed by Dan Bernstein.
2858
2859         All cursor operations were set up to pass a value key parameter around, but it was:
2860         1 - Entirely unused
2861         2 - The same thing that the primary key is supposed to be
2862
2863         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
2864         (WebKit::DatabaseProcessIDBConnection::openCursor):
2865         (WebKit::DatabaseProcessIDBConnection::cursorAdvance):
2866         (WebKit::DatabaseProcessIDBConnection::cursorIterate):
2867
2868         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
2869         (WebKit::UniqueIDBDatabase::openCursor):
2870         (WebKit::UniqueIDBDatabase::cursorAdvance):
2871         (WebKit::UniqueIDBDatabase::cursorIterate):
2872         (WebKit::UniqueIDBDatabase::openCursorInBackingStore):
2873         (WebKit::UniqueIDBDatabase::didOpenCursorInBackingStore):
2874         (WebKit::UniqueIDBDatabase::advanceCursorInBackingStore):
2875         (WebKit::UniqueIDBDatabase::didAdvanceCursorInBackingStore):
2876         (WebKit::UniqueIDBDatabase::iterateCursorInBackingStore):
2877         (WebKit::UniqueIDBDatabase::didIterateCursorInBackingStore):
2878         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
2879
2880         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
2881         (WebKit::SQLiteIDBCursor::advanceOnce): Clean this logic up to not need temporaries,
2882           and also to save the correct primary key (previously the 'value key')
2883         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.h:
2884
2885         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
2886         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
2887         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getIndexRecord):
2888         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::openCursor):
2889         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::advanceCursor):
2890         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::iterateCursor):
2891         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
2892
2893         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
2894         (WebKit::WebIDBServerConnection::didOpenCursor):
2895         (WebKit::WebIDBServerConnection::didAdvanceCursor):
2896         (WebKit::WebIDBServerConnection::didIterateCursor):
2897         (WebKit::WebIDBServerConnection::openCursor):
2898         (WebKit::WebIDBServerConnection::cursorAdvance):
2899         (WebKit::WebIDBServerConnection::cursorIterate):
2900         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
2901         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
2902
2903 2014-02-06  Ryuan Choi  <ryuan.choi@samsung.com>
2904
2905         Unreviewed build fix on GTK build since r163597
2906
2907         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2908         (webkitWebViewBaseUpdatePreferences):
2909
2910 2014-02-06  Yongjun Zhang  <yongjun_zhang@apple.com>
2911
2912         Need a ObjC SPI to get the process identifier for web process.
2913         https://bugs.webkit.org/show_bug.cgi?id=128356
2914
2915         Reviewed by Dan Bernstein.
2916
2917         Add a SPI for WKBrowsingContextController to return the process identifier of web
2918         process in the current page.
2919
2920         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
2921         (-[WKBrowsingContextController processIdentifier]):
2922         * UIProcess/API/Cocoa/WKBrowsingContextControllerPrivate.h:
2923
2924 2014-02-06  Ryuan Choi  <ryuan.choi@samsung.com>
2925
2926         Unreviewed build fix on EFL build since r163597
2927
2928         preferences() changed return type from pointer to reference.
2929
2930         * UIProcess/API/efl/ewk_settings.cpp:
2931         (EwkSettings::preferences):
2932         (ewk_settings_fullscreen_enabled_set):
2933         (ewk_settings_fullscreen_enabled_get):
2934         (ewk_settings_javascript_enabled_set):
2935         (ewk_settings_javascript_enabled_get):
2936         (ewk_settings_loads_images_automatically_set):
2937         (ewk_settings_loads_images_automatically_get):
2938         (ewk_settings_developer_extras_enabled_set):
2939         (ewk_settings_developer_extras_enabled_get):
2940         (ewk_settings_file_access_from_file_urls_allowed_set):
2941         (ewk_settings_file_access_from_file_urls_allowed_get):
2942         (ewk_settings_frame_flattening_enabled_set):
2943         (ewk_settings_frame_flattening_enabled_get):
2944         (ewk_settings_dns_prefetching_enabled_set):
2945         (ewk_settings_dns_prefetching_enabled_get):
2946         (ewk_settings_encoding_detector_enabled_set):
2947         (ewk_settings_encoding_detector_enabled_get):
2948         (ewk_settings_preferred_minimum_contents_width_set):
2949         (ewk_settings_preferred_minimum_contents_width_get):
2950         (ewk_settings_offline_web_application_cache_enabled_set):
2951         (ewk_settings_offline_web_application_cache_enabled_get):
2952         (ewk_settings_scripts_can_open_windows_set):
2953         (ewk_settings_scripts_can_open_windows_get):
2954         (ewk_settings_local_storage_enabled_set):
2955         (ewk_settings_local_storage_enabled_get):
2956         (ewk_settings_plugins_enabled_set):
2957         (ewk_settings_plugins_enabled_get):
2958         (ewk_settings_default_font_size_set):
2959         (ewk_settings_default_font_size_get):
2960         (ewk_settings_private_browsing_enabled_set):
2961         (ewk_settings_private_browsing_enabled_get):
2962         (ewk_settings_text_autosizing_enabled_set):
2963         (ewk_settings_text_autosizing_enabled_get):
2964         (ewk_settings_spatial_navigation_enabled_set):
2965         (ewk_settings_spatial_navigation_enabled_get):
2966         (EwkSettings::setDefaultTextEncodingName):
2967         * UIProcess/API/efl/ewk_settings_private.h:
2968         (EwkSettings::EwkSettings):
2969         * UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp:
2970         (WebKit::CoordinatedDrawingAreaProxy::CoordinatedDrawingAreaProxy):
2971         * UIProcess/CoordinatedGraphics/WebView.cpp:
2972         (WebKit::WebView::WebView):
2973         * UIProcess/WebPageProxy.cpp:
2974         (WebKit::WebPageProxy::initializeWebPage):
2975         (WebKit::WebPageProxy::preferencesDidChange):
2976
2977 2014-02-06  Anders Carlsson  <andersca@apple.com>
2978
2979         Crash in MiniBrowser when using Command-W to close a WK2 window
2980         https://bugs.webkit.org/show_bug.cgi?id=128355
2981         <rdar://problem/16008531>
2982
2983         Reviewed by Simon Fraser.
2984
2985         Don't set the API clients to nullptr when closing the page, just create new empty ones instead.
2986         Too much code depends on the clients never being null.
2987
2988         * UIProcess/WebPageProxy.cpp:
2989         (WebKit::WebPageProxy::close):
2990
2991 2014-02-03  Tim Horton  <timothy_horton@apple.com>
2992
2993         [wk2] iOS should use accelerated drawing by default, except in the simulator
2994         https://bugs.webkit.org/show_bug.cgi?id=128140
2995         <rdar://problem/15974171>
2996
2997         Reviewed by Anders Carlsson.
2998
2999         * Shared/WebPreferencesStore.h:
3000         Turn full-page accelerated drawing on for iOS, except the simulator which doesn't support it.
3001         Turn canvas accelerated drawing on for all platforms except the iOS simulator, for the same reason.
3002         The defaults remain the same for non-iOS platforms.
3003
3004 2014-02-06  Jeremy Jones  <jeremyj@apple.com>
3005
3006         Add support for AVKit fullscreen to WebKit2
3007         https://bugs.webkit.org/show_bug.cgi?id=128143
3008
3009         Reviewed by Simon Fraser.
3010
3011         Add WebVideoFullscreenManager and WebVideoFullscreenManagerProxy that implement 
3012         WebVideoFullscreenModel and WebVideoFullscreenInterface.
3013
3014         * DerivedSources.make:
3015         * UIProcess/WebPageProxy.cpp:
3016         (WebKit::WebPageProxy::WebPageProxy):
3017             initialize member m_videoFullscreenManager
3018     
3019         (WebKit::WebPageProxy::videoFullscreenManager):
3020             add accessor for videoFullscreenManager
3021
3022         * UIProcess/WebPageProxy.h:
3023         * UIProcess/WebVideoFullscreenManagerProxy.cpp: Added.
3024         (WebKit::WebVideoFullscreenManagerProxy::create):
3025         (WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy):
3026         (WebKit::WebVideoFullscreenManagerProxy::~WebVideoFullscreenManagerProxy):
3027             add basic creation for object.
3028
3029         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerID):
3030         (WebKit::WebVideoFullscreenManagerProxy::requestExitFullScreen):
3031         (WebKit::WebVideoFullscreenManagerProxy::play):
3032         (WebKit::WebVideoFullscreenManagerProxy::pause):
3033         (WebKit::WebVideoFullscreenManagerProxy::togglePlayState):
3034         (WebKit::WebVideoFullscreenManagerProxy::seekToTime):
3035         (WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen):
3036             implement WebVideoFullscreenModel to send IPC message.
3037
3038         * UIProcess/WebVideoFullscreenManagerProxy.h: Added.
3039         * UIProcess/WebVideoFullscreenManagerProxy.messages.in: Added.
3040             this interface closely matches WebVideoFullscreenInterface
3041
3042         * WebKit2.xcodeproj/project.pbxproj:
3043         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3044         (WebKit::WebChromeClient::supportsFullscreenForNode):
3045         (WebKit::WebChromeClient::enterFullscreenForNode):
3046         (WebKit::WebChromeClient::exitFullscreenForNode):
3047             Forward these requests onto the videoFullscreenManager
3048
3049         * WebProcess/WebCoreSupport/WebChromeClient.h:
3050         * WebProcess/WebPage/WebPage.cpp:
3051         (WebKit::WebPage::videoFullscreenManager):
3052             accessor for m_videoFullscreenManager
3053
3054         * WebProcess/WebPage/WebPage.h:
3055         * WebProcess/WebVideoFullscreenManager.cpp: Added.
3056         (WebKit::WebVideoFullscreenManager::create):
3057         (WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager):
3058         (WebKit::WebVideoFullscreenManager::~WebVideoFullscreenManager):
3059             add basic creation for object.
3060
3061         (WebKit::WebVideoFullscreenManager::supportsFullscreen):
3062         (WebKit::WebVideoFullscreenManager::enterFullscreenForNode):
3063         (WebKit::WebVideoFullscreenManager::exitFullscreenForNode):
3064             implement interface called by WebChromeClient
3065
3066         (WebKit::WebVideoFullscreenManager::setDuration):
3067         (WebKit::WebVideoFullscreenManager::setCurrentTime):
3068         (WebKit::WebVideoFullscreenManager::setRate):
3069         (WebKit::WebVideoFullscreenManager::setVideoDimensions):
3070         (WebKit::WebVideoFullscreenManager::setVideoLayer):
3071         (WebKit::WebVideoFullscreenManager::setVideoLayerID):
3072         (WebKit::WebVideoFullscreenManager::enterFullscreen):
3073         (WebKit::WebVideoFullscreenManager::exitFullscreen):
3074             implement WebVideoFullscreenInterface to send IPC message.
3075
3076         * WebProcess/WebVideoFullscreenManager.h: Added.
3077         * WebProcess/WebVideoFullscreenManager.messages.in: Added.
3078             this interface closely matches WebVideoFullscreenModel
3079
3080 2014-02-06  Anders Carlsson  <andersca@apple.com>
3081
3082         Begin work on making preferences per page instead of per page group
3083         https://bugs.webkit.org/show_bug.cgi?id=128349
3084
3085         Reviewed by Andreas Kling.
3086
3087         * UIProcess/API/C/WKPageGroup.cpp:
3088         (WKPageGroupGetPreferences):
3089         * UIProcess/API/C/mac/WKPagePrivateMac.cpp:
3090         (WKPageIsURLKnownHSTSHost):
3091         * UIProcess/API/mac/WKView.mm:
3092         (-[WKView _preferencesDidChange]):
3093         (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
3094         * UIProcess/WebContext.cpp:
3095         (WebKit::WebContext::createWebPage):
3096         * UIProcess/WebInspectorProxy.cpp:
3097         (WebKit::WebInspectorPageGroups::createInspectorPageGroup):
3098         (WebKit::WebInspectorProxy::attach):
3099         (WebKit::WebInspectorProxy::detach):
3100         (WebKit::WebInspectorProxy::setAttachedWindowHeight):
3101         (WebKit::WebInspectorProxy::setAttachedWindowWidth):
3102         (WebKit::WebInspectorProxy::createInspectorPage):
3103         (WebKit::WebInspectorProxy::shouldOpenAttached):
3104         * UIProcess/WebPageGroup.cpp:
3105         (WebKit::WebPageGroup::preferences):
3106         * UIProcess/WebPageGroup.h:
3107         * UIProcess/WebPageProxy.cpp:
3108         (WebKit::WebPageProxy::create):
3109         (WebKit::WebPageProxy::WebPageProxy):
3110         (WebKit::WebPageProxy::isProcessSuppressible):
3111         (WebKit::WebPageProxy::canShowMIMEType):
3112         (WebKit::WebPageProxy::preferencesDidChange):
3113         (WebKit::WebPageProxy::creationParameters):
3114         * UIProcess/WebPageProxy.h:
3115         (WebKit::WebPageProxy::preferences):
3116         (WebKit::WebPageProxy::setPreferences):
3117         * UIProcess/WebProcessProxy.cpp:
3118         (WebKit::WebProcessProxy::createWebPage):
3119         * UIProcess/mac/ViewGestureController.mm:
3120         (WebKit::ViewGestureController::beginSwipeGesture):
3121         * UIProcess/mac/WebInspectorProxyMac.mm:
3122         (WebKit::WebInspectorProxy::createInspectorWindow):
3123         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
3124         (WebKit::WebInspectorProxy::windowFrameDidChange):
3125         (WebKit::WebInspectorProxy::platformAttach):
3126
3127 2014-02-06  Gavin Barraclough  <barraclough@apple.com>
3128
3129         Remove ChildProcess::m_activeTasks
3130         https://bugs.webkit.org/show_bug.cgi?id=128342
3131
3132         Reviewed by Anders Carlson.
3133
3134         Currently we funnel a number of different user activities
3135         to a single UserActivity object, which requires a call down
3136         from WebCore to WebKit2. Split these out so we can track
3137         them separately.
3138
3139         * PluginProcess/PluginProcess.cpp:
3140         (WebKit::PluginProcess::PluginProcess):
3141             - added m_connectionActivity.
3142         * PluginProcess/PluginProcess.h:
3143         (WebKit::PluginProcess::connectionActivity):
3144             - added m_connectionActivity.
3145         * PluginProcess/WebProcessConnection.cpp:
3146         (WebKit::WebProcessConnection::didReceiveSyncMessage):
3147         (WebKit::WebProcessConnection::destroyPlugin):
3148         (WebKit::WebProcessConnection::createPlugin):
3149             - use connectionActivity
3150         * PluginProcess/mac/PluginProcessMac.mm:
3151         (WebKit::PluginProcess::platformInitializeProcess):
3152             - use a separate UserActivity for Java.
3153         * Shared/ActivityAssertion.cpp:
3154         (WebKit::ActivityAssertion::ActivityAssertion):
3155         (WebKit::ActivityAssertion::~ActivityAssertion):
3156         * Shared/ActivityAssertion.h:
3157             - ChildProcess -> UserActivity
3158         * Shared/ChildProcess.cpp:
3159         (WebKit::ChildProcess::ChildProcess):
3160         * Shared/ChildProcess.h:
3161             - remove m_activeTasks.
3162         (WebKit::ChildProcess::processSuppressionEnabled):
3163         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3164         * WebProcess/WebCoreSupport/WebChromeClient.h:
3165             - removed [inc|dec]rementActivePageCount
3166
3167 2014-02-06  Pratik Solanki  <psolanki@apple.com>
3168
3169         [iOS] WebKit2 can't access the GPU
3170         https://bugs.webkit.org/show_bug.cgi?id=128345
3171         <rdar://problem/15976084>
3172
3173         Reviewed by Tim Horton.
3174
3175         Add an entitlement to allow web process to access GPU.
3176
3177         * Configurations/WebContent-iOS.entitlements: Added.
3178         * Configurations/WebContentService.Development.xcconfig:
3179         * Configurations/WebContentService.xcconfig:
3180
3181 2014-02-06  Pratik Solanki  <psolanki@apple.com>
3182
3183         [iOS][WebKit2] Remove JoinExistingSession from plist
3184         https://bugs.webkit.org/show_bug.cgi?id=128318
3185         <rdar://problem/15971612>
3186
3187         Reviewed by Tim Horton.
3188
3189         Remove JoinExistingSession key that is not available on iOS.
3190
3191         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info-iOS.plist:
3192         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-iOS.plist:
3193         * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-iOS.plist:
3194         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist:
3195
3196 2014-02-06  Anders Carlsson  <andersca@apple.com>
3197
3198         Fix build.
3199
3200         * UIProcess/API/Cocoa/WKWebView.mm:
3201         (-[WKWebView _remoteObjectRegistry]):
3202
3203 2014-02-06  Benjamin Poulain  <bpoulain@apple.com>
3204
3205         Fix the setter definition from r163514.
3206
3207         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3208
3209 2014-02-06  Joseph Pecoraro  <pecoraro@apple.com>
3210
3211         [iOS] Remove duplicate call to RunLoop::initializeMainRunLoop
3212         https://bugs.webkit.org/show_bug.cgi?id=128328
3213
3214         Reviewed by Dan Bernstein.
3215
3216         * UIProcess/API/ios/WKContentView.mm:
3217         (-[WKContentView initWithFrame:configuration:]):
3218         (-[WKContentView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
3219
3220 2014-02-06  Joseph Pecoraro  <pecoraro@apple.com>
3221
3222         [iOS] Set UIProcess pid in WebProcess initialization for Remote Inspector
3223         https://bugs.webkit.org/show_bug.cgi?id=128338
3224
3225         Reviewed by Sam Weinig.
3226
3227         * WebProcess/ios/WebProcessIOS.mm:
3228         (WebKit::WebProcess::platformInitializeWebProcess):
3229
3230 2014-02-06  Joseph Pecoraro  <pecoraro@apple.com>
3231
3232         Web Inspector: Add Console support to JSContext Inspection
3233         https://bugs.webkit.org/show_bug.cgi?id=127941
3234
3235         Reviewed by Geoffrey Garen.
3236
3237         * WebProcess/WebCoreSupport/WebChromeClient.h:
3238
3239 2014-02-06  Anders Carlsson  <andersca@apple.com>
3240
3241         Add preferences property to WKWebViewConfiguration
3242         https://bugs.webkit.org/show_bug.cgi?id=128337
3243
3244         Reviewed by Sam Weinig.
3245
3246         Also use RetainPtr for processClass and preferences so we won't leak them.
3247
3248         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
3249         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3250         (-[WKWebViewConfiguration copyWithZone:]):
3251         (-[WKWebViewConfiguration processClass]):
3252         (-[WKWebViewConfiguration setProcessClass:]):
3253         (-[WKWebViewConfiguration preferences]):
3254         (-[WKWebViewConfiguration setPreferences:]):
3255
3256 2014-02-06  Anders Carlsson  <andersca@apple.com>
3257
3258         Add a remoteObjectRegistry property to WKWebView
3259         https://bugs.webkit.org/show_bug.cgi?id=128331
3260
3261         Reviewed by Tim Horton.
3262
3263         * UIProcess/API/Cocoa/WKWebView.mm:
3264         (-[WKWebView resizeSubviewsWithOldSize:]):
3265         (-[WKWebView _remoteObjectRegistry]):
3266         * UIProcess/API/Cocoa/WKWebViewInternal.h:
3267         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3268
3269 2014-02-06  Anders Carlsson  <andersca@apple.com>
3270
3271         Add WKNavigationResponse class
3272         https://bugs.webkit.org/show_bug.cgi?id=128326
3273
3274         Reviewed by Dan Bernstein.
3275
3276         * UIProcess/API/Cocoa/WKFrameInfo.mm:
3277         (-[WKFrameInfo initWithWebFrameProxy:WebKit::]):
3278         * UIProcess/API/Cocoa/WKFrameInfoInternal.h:
3279         * UIProcess/API/Cocoa/WKNavigationResponse.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfo.mm.
3280         * UIProcess/API/Cocoa/WKNavigationResponse.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfo.mm.
3281         (-[WKNavigationResponse frame]):
3282         (-[WKNavigationResponse setFrame:]):
3283         (-[WKNavigationResponse response]):
3284         (-[WKNavigationResponse setResponse:]):
3285         * UIProcess/API/Cocoa/WKNavigationResponseInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfoInternal.h.
3286         * UIProcess/Cocoa/NavigationState.mm:
3287         (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
3288         (WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
3289         * WebKit2.xcodeproj/project.pbxproj:
3290
3291 2014-02-06  Anders Carlsson  <andersca@apple.com>
3292
3293         Replace ’ with ' to silence the check-for-webkit-framework-include-consistency script.
3294
3295         * UIProcess/API/Cocoa/WKWebView.h:
3296
3297 2014-02-06  Anders Carlsson  <andersca@apple.com>
3298
3299         Add backForwardList property to WKWebView
3300         https://bugs.webkit.org/show_bug.cgi?id=128320
3301
3302         Reviewed by Tim Horton.
3303
3304         * UIProcess/API/Cocoa/WKWebView.h:
3305         * UIProcess/API/Cocoa/WKWebView.mm:
3306         (-[WKWebView backForwardList]):
3307
3308 2014-02-06  Anders Carlsson  <andersca@apple.com>
3309
3310         The source frame request is not the same thing as the original request
3311         https://bugs.webkit.org/show_bug.cgi?id=128317
3312
3313         Reviewed by Andreas Kling.
3314
3315         Grab the source frame URL From the WebFrameProxy object.
3316
3317         * UIProcess/Cocoa/NavigationState.mm:
3318         (WebKit::frameInfoFromWebFrameProxy):
3319         (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
3320
3321 2014-02-06  Brady Eidson  <beidson@apple.com>
3322
3323         IDB: storage/indexeddb/mozilla/clear.html fails
3324         <rdar://problem/15997155> and https://bugs.webkit.org/show_bug.cgi?id=128282
3325
3326         Reviewed by David Kilzer.
3327
3328         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
3329         (WebKit::DatabaseProcessIDBConnection::openTransaction): Update logging.
3330
3331         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.cpp:
3332         (WebKit::SQLiteIDBTransaction::commit): Update ASSERT.
3333
3334 2014-02-06  Csaba Osztrogonác  <ossy@webkit.org>
3335
3336         Fix the build after r163516 for !ENABLE(ASYNC_SCROLLING) platforms
3337         https://bugs.webkit.org/show_bug.cgi?id=128299
3338
3339         Reviewed by Antti Koivisto.
3340
3341         * UIProcess/WebPageProxy.cpp:
3342         (WebKit::WebPageProxy::handleTouchEvent):
3343
3344 2014-02-05  Gavin Barraclough  <barraclough@apple.com>
3345
3346         Change Page, FocusController to use ViewState
3347         https://bugs.webkit.org/show_bug.cgi?id=126533
3348
3349         Reviewed by Tim Horton.
3350
3351         These classes currently maintain a set of separate fields to represent the view state;
3352         combine these into a single field, and allow WebPage to send the combined update rather
3353         than individual changes.
3354
3355         Maintain existing interface for WebKit1 clients.
3356
3357         * WebProcess/WebPage/WebPage.cpp:
3358         (WebKit::WebPage::WebPage):
3359             - Combined separate calls to Page::setViewState.
3360         (WebKit::WebPage::updateIsInWindow):
3361             - Simplied from setIsInWindow.
3362         (WebKit::WebPage::setViewState):
3363             - Combined separate calls to Page::setViewState.
3364         * WebProcess/WebPage/WebPage.h:
3365             - Declare updateIsInWindow.
3366
3367 2014-02-05  Zan Dobersek  <zdobersek@igalia.com>
3368
3369         Unreviewed GTK build fix after r163480.
3370
3371         * GNUmakefile.list.am: Removing the WebUIClient build targets.
3372
3373 2014-02-05  Simon Fraser  <simon.fraser@apple.com>
3374
3375         Transfer the non-fast-scrollable region to the UI process for iOS
3376         https://bugs.webkit.org/show_bug.cgi?id=128293
3377
3378         Reviewed by Benjamin Poulain.
3379
3380         Two main changes to support sending the non-fast scrollable region
3381         to the UI process for iOS:
3382         
3383         1. Add ScrollingCoordinator::frameViewNonFastScrollableRegionChanged(),
3384         which is called when we've updated the touch event region (this can happen
3385         independenly of layout). When called we just scheduled a scrolling tree
3386         commit with the new region.
3387         
3388         2. Avoid thinking that we have a new root node with every remote scrolling
3389         transaction. This was a side-effect of reconstructing the scrolling state
3390         tree in the UI process, and caused us to try to grab a nonFastScrollableRegion
3391         from a node which never had one set.
3392         
3393         Now that we have the non-fast scrollable region in the UI process, we can
3394         use it to avoid sending sync messages to the web process.
3395         
3396         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
3397         (ArgumentCoder<ScrollingStateScrollingNode>::encode): Encode hasNewRootNode.
3398         (ArgumentCoder<ScrollingStateScrollingNode>::decode): Decode hasNewRootNode and set it on
3399         the state tree.
3400         (WebKit::RemoteScrollingCoordinatorTransaction::encode): Encode the nonFastScrollableRegion
3401         now that we can encode Regions.
3402         (WebKit::RemoteScrollingCoordinatorTransaction::decode): Decode the nonFastScrollableRegion
3403         now that we can decode Regions.
3404         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
3405         (WebKit::RemoteScrollingCoordinatorProxy::isPointInNonFastScrollableRegion):
3406         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
3407         * UIProcess/WebPageProxy.cpp:
3408         (WebKit::WebPageProxy::handleTouchEvent): If we're not in the non-fast scrollable region,
3409         don't both sending touch events to the web process.
3410
3411 2014-02-05  Benjamin Poulain  <benjamin@webkit.org>
3412
3413         [iOS] Synchronize the WKContentView and UIScrollView updates with the tiles being commited
3414         https://bugs.webkit.org/show_bug.cgi?id=127886
3415
3416         Reviewed by Simon Fraser.
3417
3418         * Shared/mac/RemoteLayerTreeTransaction.h:
3419         (WebKit::RemoteLayerTreeTransaction::mainFrameContentsSize):
3420         (WebKit::RemoteLayerTreeTransaction::setMainFrameContentsSize):
3421         (WebKit::RemoteLayerTreeTransaction::pageScaleFactor):
3422         (WebKit::RemoteLayerTreeTransaction::setPageScaleFactor):
3423         (WebKit::RemoteLayerTreeTransaction::minimumScaleFactor):
3424         (WebKit::RemoteLayerTreeTransaction::setMinimumScaleFactor):
3425         (WebKit::RemoteLayerTreeTransaction::maximumScaleFactor):
3426         (WebKit::RemoteLayerTreeTransaction::setMaximumScaleFactor):
3427         (WebKit::RemoteLayerTreeTransaction::allowsUserScaling):
3428         (WebKit::RemoteLayerTreeTransaction::setAllowsUserScaling):
3429         * Shared/mac/RemoteLayerTreeTransaction.mm:
3430         (WebKit::RemoteLayerTreeTransaction::encode):
3431         (WebKit::RemoteLayerTreeTransaction::decode):
3432         * UIProcess/API/ios/PageClientImplIOS.h:
3433         * UIProcess/API/ios/PageClientImplIOS.mm:
3434         (WebKit::PageClientImpl::didCommitLayerTree):
3435         * UIProcess/API/ios/WKContentView.h:
3436         * UIProcess/API/ios/WKContentView.mm:
3437         (-[WKContentView setMinimumLayoutSize:]):
3438         (-[WKContentView willStartUserTriggeredZoom]):
3439         (-[WKContentView _didCommitLayerTree:WebKit::]):
3440         * UIProcess/API/ios/WKContentViewInternal.h:
3441         * UIProcess/API/ios/WKViewIOS.mm:
3442         (-[WKView contentViewDidCommitLoadForMainFrame:]):
3443         (-[WKView contentView:didCommitLayerTree:WebKit::]):
3444         (-[WKView scrollViewWillBeginZooming:withView:]):
3445         (-[WKView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
3446         (-[WKView _frameOrBoundsChanged]):
3447         (-[WKView minimumLayoutSizeOverride]):
3448         (-[WKView setMinimumLayoutSizeOverride:]):
3449         * UIProcess/PageClient.h:
3450         * UIProcess/WebPageProxy.cpp:
3451         * UIProcess/WebPageProxy.h:
3452         * UIProcess/WebPageProxy.messages.in:
3453         * UIProcess/ios/WebPageProxyIOS.mm:
3454         (WebKit::WebPageProxy::setVirtualViewportMinimumLayoutSize):
3455         (WebKit::WebPageProxy::didCommitLayerTree):
3456         (WebKit::WebPageProxy::willStartUserTriggeredZooming):
3457         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
3458         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
3459         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3460         (WebKit::WebChromeClient::contentsSizeChanged):
3461         (WebKit::WebChromeClient::dispatchViewportPropertiesDidChange):
3462         * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
3463         (WebKit::WebChromeClient::didReceiveMobileDocType):
3464         * WebProcess/WebPage/WebPage.cpp:
3465         (WebKit::WebPage::WebPage):
3466         (WebKit::WebPage::mainFrameDidLayout):
3467         (WebKit::WebPage::didCommitLoad):
3468         * WebProcess/WebPage/WebPage.h:
3469         * WebProcess/WebPage/WebPage.messages.in:
3470         * WebProcess/WebPage/ios/WebPageIOS.mm:
3471         (WebKit::WebPage::viewportPropertiesDidChange):
3472         (WebKit::WebPage::minimumPageScaleFactor):
3473         (WebKit::WebPage::maximumPageScaleFactor):
3474         (WebKit::WebPage::allowsUserScaling):
3475         (WebKit::WebPage::setVirtualViewportMinimumLayoutSize):
3476         (WebKit::WebPage::virtualViewportChanged):
3477         (WebKit::WebPage::willStartUserTriggeredZooming):
3478         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3479         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
3480
3481 2014-02-05  Benjamin Poulain  <bpoulain@apple.com>
3482