Purge PassRefPtr from Frame.
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2014-12-17  Andreas Kling  <akling@apple.com>
2
3         Purge PassRefPtr from Frame.
4         <https://webkit.org/b/139731>
5
6         Reviewed by Anders Carlsson.
7
8         * WebProcess/WebPage/WebFrame.cpp:
9         (WebKit::WebFrame::createSubframe):
10
11 2014-12-17  Dan Bernstein  <mitz@apple.com>
12
13         iOS build fix
14
15         * UIProcess/ios/PageClientImplIOS.h:
16         * UIProcess/ios/PageClientImplIOS.mm:
17         (WebKit::PageClientImpl::PageClient::setTextIndicatorAnimationProgress):
18
19 2014-12-17  Carlos Garcia Campos  <cgarcia@igalia.com>
20
21         Unreviewed. Fix GTK+ build after r177427.
22
23         * UIProcess/API/gtk/PageClientImpl.cpp:
24         (WebKit::PageClientImpl::setTextIndicatorAnimationProgress):
25         * UIProcess/API/gtk/PageClientImpl.h:
26
27 2014-12-16  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
28
29         Unreviewed, EFL build fix since r177427.
30
31         * UIProcess/CoordinatedGraphics/WebView.cpp:
32         (WebKit::WebView::setTextIndicatorAnimationProgress): Added.
33         * UIProcess/CoordinatedGraphics/WebView.h:
34
35 2014-12-16  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
36
37         Move WebCore/platform/graphics/surfaces to std::unique_ptr
38         https://bugs.webkit.org/show_bug.cgi?id=139641
39
40         Reviewed by Andreas Kling.
41
42         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
43
44 2014-12-16  Timothy Horton  <timothy_horton@apple.com>
45
46         Implement and adopt two new TextIndicator presentation animations
47         https://bugs.webkit.org/show_bug.cgi?id=139715
48         <rdar://problem/19237945>
49
50         Reviewed by Anders Carlsson.
51
52         * UIProcess/API/mac/WKView.mm:
53         (-[WKView _setTextIndicator:fadeOut:]):
54         (-[WKView _setTextIndicatorAnimationProgress:]):
55         (-[WKView _setTextIndicator:fadeOut:animationCompletionHandler:]): Deleted.
56         * UIProcess/API/mac/WKViewInternal.h:
57         * UIProcess/PageClient.h:
58         * UIProcess/WebPageProxy.cpp:
59         (WebKit::WebPageProxy::WebPageProxy):
60         (WebKit::WebPageProxy::setTextIndicatorAnimationProgress):
61         (WebKit::WebPageProxy::performActionMenuHitTestAtLocation):
62         * UIProcess/WebPageProxy.h:
63         * UIProcess/mac/PageClientImpl.h:
64         * UIProcess/mac/PageClientImpl.mm:
65         (WebKit::PageClientImpl::setTextIndicatorAnimationProgress):
66         (WebKit::PageClientImpl::didPerformDictionaryLookup):
67         Remove the completion handler block argument from TextIndicator
68         installation.
69         Plumb animation progress through PageClient to TextIndicatorWindow.
70
71         * UIProcess/mac/WKActionMenuController.mm:
72         (-[WKActionMenuController prepareForMenu:withEvent:]):
73         (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
74         * UIProcess/mac/WKImmediateActionController.mm:
75         (-[WKImmediateActionController _clearImmediateActionState]):
76         (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
77         (-[WKImmediateActionController immediateActionRecognizerDidUpdateAnimation:]):
78         (-[WKImmediateActionController immediateActionRecognizerDidCancelAnimation:]):
79         (-[WKImmediateActionController immediateActionRecognizerDidCompleteAnimation:]):
80         (-[WKImmediateActionController _menuItemForDataDetectedText]):
81         (-[WKImmediateActionController _animationControllerForText]):
82         Forward immediate action gesture recognizer animation progress
83         to TextIndicator. Force us to keep the selection when immediate
84         action popovers steal first responder status from the WebView.
85
86         * WebProcess/WebPage/WebPage.h:
87         * WebProcess/WebPage/WebPage.messages.in:
88         * WebProcess/WebPage/mac/WebPageMac.mm:
89         (WebKit::textIndicatorTransitionForActionMenu):
90         (WebKit::WebPage::performActionMenuHitTestAtLocation):
91         Factor out the presentation animation decision code.
92         For immediate actions, of the Lookup range is equal to the
93         selection range, use a Crossfade animation; otherwise, use a FadeIn
94         animation.
95         Push whether the actionMenuHitTest is for an immediate action
96         or a menu to the Web process, to make the presentation animation
97         decision code live entirely in the Web process.
98         Avoid extracting encoded image data if we know we're doing
99         an immediate action and will never need it.
100
101 2014-12-16  Anders Carlsson  <andersca@apple.com>
102
103         Fix lambda and std::function formatting
104         https://bugs.webkit.org/show_bug.cgi?id=139719
105
106         Reviewed by Sam Weinig.
107
108         * DatabaseProcess/DatabaseProcess.cpp:
109         (WebKit::DatabaseProcess::getOrigins):
110         (WebKit::DatabaseProcess::deleteEntriesForOrigin):
111         (WebKit::DatabaseProcess::deleteEntriesModifiedBetweenDates):
112         (WebKit::DatabaseProcess::deleteAllEntries):
113         * DatabaseProcess/DatabaseProcess.h:
114         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
115         (WebKit::UniqueIDBDatabase::deleteDatabase):
116         (WebKit::UniqueIDBDatabase::getOrEstablishIDBDatabaseMetadata):
117         (WebKit::UniqueIDBDatabase::openTransaction):
118         (WebKit::UniqueIDBDatabase::beginTransaction):
119         (WebKit::UniqueIDBDatabase::commitTransaction):
120         (WebKit::UniqueIDBDatabase::resetTransaction):
121         (WebKit::UniqueIDBDatabase::rollbackTransaction):
122         (WebKit::UniqueIDBDatabase::postTransactionOperation):
123         (WebKit::UniqueIDBDatabase::changeDatabaseVersion):
124         (WebKit::UniqueIDBDatabase::createObjectStore):
125         (WebKit::UniqueIDBDatabase::deleteObjectStore):
126         (WebKit::UniqueIDBDatabase::clearObjectStore):
127         (WebKit::UniqueIDBDatabase::createIndex):
128         (WebKit::UniqueIDBDatabase::deleteIndex):
129         (WebKit::UniqueIDBDatabase::putRecord):
130         (WebKit::UniqueIDBDatabase::getRecord):
131         (WebKit::UniqueIDBDatabase::openCursor):
132         (WebKit::UniqueIDBDatabase::cursorAdvance):
133         (WebKit::UniqueIDBDatabase::cursorIterate):
134         (WebKit::UniqueIDBDatabase::count):
135         (WebKit::UniqueIDBDatabase::deleteRange):
136         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
137         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
138         (WebKit::NetworkCacheStorage::store):
139         * Shared/AsyncTask.h:
140         (WebKit::AsyncTask::AsyncTask):
141         * Shared/ChildProcess.cpp:
142         (WebKit::didCloseOnConnectionWorkQueue):
143         * Shared/WebContextMenuItemData.cpp:
144         (WebKit::WebContextMenuItemData::WebContextMenuItemData):
145         * Shared/WebContextMenuItemData.h:
146         (WebKit::WebContextMenuItemData::selectionHandler):
147         * Shared/mac/SecItemShim.cpp:
148         (WebKit::responseMap):
149         * UIProcess/Plugins/PluginProcessManager.cpp:
150         (WebKit::PluginProcessManager::PluginProcessManager):
151         * UIProcess/WebContext.cpp:
152         (WebKit::WebContext::WebContext):
153         (WebKit::m_processSuppressionDisabledForPageCounter):
154         * UIProcess/WebOriginDataManagerProxy.cpp:
155         (WebKit::CallbackSynchronizer::create):
156         (WebKit::CallbackSynchronizer::CallbackSynchronizer):
157         * UIProcess/WebPageProxy.cpp:
158         (WebKit::WebPageProxy::WebPageProxy):
159         * UIProcess/mac/WebContextMenuProxyMac.mm:
160         (-[WKSelectionHandlerWrapper initWithSelectionHandler:]):
161         (WebKit::nsMenuItemVector):
162         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
163         (WebKit::WebIDBServerConnection::deleteDatabase):
164         (WebKit::WebIDBServerConnection::getOrEstablishIDBDatabaseMetadata):
165         (WebKit::WebIDBServerConnection::openTransaction):
166         (WebKit::WebIDBServerConnection::beginTransaction):
167         (WebKit::WebIDBServerConnection::commitTransaction):
168         (WebKit::WebIDBServerConnection::resetTransaction):
169         (WebKit::WebIDBServerConnection::rollbackTransaction):
170         (WebKit::WebIDBServerConnection::setIndexKeys):
171         (WebKit::WebIDBServerConnection::createObjectStore):
172         (WebKit::WebIDBServerConnection::createIndex):
173         (WebKit::WebIDBServerConnection::deleteIndex):
174         (WebKit::WebIDBServerConnection::get):
175         (WebKit::WebIDBServerConnection::put):
176         (WebKit::WebIDBServerConnection::count):
177         (WebKit::WebIDBServerConnection::deleteRange):
178         (WebKit::WebIDBServerConnection::clearObjectStore):
179         (WebKit::WebIDBServerConnection::deleteObjectStore):
180         (WebKit::WebIDBServerConnection::changeDatabaseVersion):
181         (WebKit::WebIDBServerConnection::openCursor):
182         (WebKit::WebIDBServerConnection::cursorAdvance):
183         (WebKit::WebIDBServerConnection::cursorIterate):
184         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
185         * WebProcess/OriginData/WebOriginDataManagerSupplement.h:
186         * WebProcess/WebProcess.cpp:
187         (WebKit::WebProcess::getOrigins):
188         (WebKit::WebProcess::deleteEntriesForOrigin):
189         (WebKit::WebProcess::deleteEntriesModifiedBetweenDates):
190         (WebKit::WebProcess::deleteAllEntries):
191         * WebProcess/WebProcess.h:
192
193 2014-12-16  Anders Carlsson  <andersca@apple.com>
194
195         Get rid of a couple of binds in WebKit2
196         https://bugs.webkit.org/show_bug.cgi?id=139717
197
198         Reviewed by Sam Weinig.
199
200         * DatabaseProcess/DatabaseProcess.cpp:
201         (WebKit::DatabaseProcess::postDatabaseTask):
202         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
203         (WebKit::UniqueIDBDatabase::didShutdownBackingStore):
204         (WebKit::UniqueIDBDatabase::postMainThreadTask):
205         (WebKit::UniqueIDBDatabase::performNextMainThreadTask):
206         (WebKit::UniqueIDBDatabase::postDatabaseTask):
207         (WebKit::UniqueIDBDatabase::performNextMainThreadTaskWithoutAdoptRef): Deleted.
208         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
209         * Platform/IPC/mac/ConnectionMac.mm:
210         (IPC::Connection::initializeDeadNameSource):
211         * UIProcess/Launcher/ProcessLauncher.cpp:
212         (WebKit::processLauncherWorkQueue):
213         (WebKit::ProcessLauncher::ProcessLauncher):
214         * WebProcess/Plugins/PluginView.cpp:
215         (WebKit::PluginView::unprotectPluginFromDestruction):
216         (WebKit::derefPluginView): Deleted.
217
218 2014-12-16  Andreas Kling  <akling@apple.com>
219
220         Use Ref for SecurityOrigin.
221         <https://webkit.org/b/139710>
222
223         Reviewed by Anders Carlsson.
224
225         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
226         (WebKit::UniqueIDBDatabase::databaseFilenameIdentifier):
227         * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
228         (WebKit::WebApplicationCacheManager::deleteEntriesForOrigin):
229         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
230         (WebKit::WebIDBServerConnection::WebIDBServerConnection):
231         * WebProcess/InjectedBundle/InjectedBundle.cpp:
232         (WebKit::InjectedBundle::addOriginAccessWhitelistEntry):
233         (WebKit::InjectedBundle::removeOriginAccessWhitelistEntry):
234
235 2014-12-16  Anders Carlsson  <andersca@apple.com>
236
237         Remove deprecated StorageNamespaceImpl overloads
238         https://bugs.webkit.org/show_bug.cgi?id=139713
239
240         Reviewed by Andreas Kling.
241
242         * WebProcess/Storage/StorageNamespaceImpl.cpp:
243         (WebKit::StorageNamespaceImpl::storageArea):
244         (WebKit::StorageNamespaceImpl::copy):
245         (WebKit::StorageNamespaceImpl::createSessionStorageNamespace): Deleted.
246         (WebKit::StorageNamespaceImpl::createLocalStorageNamespace): Deleted.
247         * WebProcess/Storage/StorageNamespaceImpl.h:
248
249 2014-12-16  Beth Dakin  <bdakin@apple.com>
250
251         Speculative build fix.
252
253         * UIProcess/mac/WKImmediateActionController.mm:
254         (-[WKImmediateActionController _animationControllerForCustomPreview]):
255
256 2014-12-16  Beth Dakin  <bdakin@apple.com>
257
258         REGRESSION: Preview popovers obscure the link, look wrong
259         https://bugs.webkit.org/show_bug.cgi?id=139711
260         -and corresponding-
261         rdar://problem/19271854
262
263         Reviewed by Tim Horton.
264
265         Switch to using NSPopoverAnimationController.
266         * UIProcess/mac/WKImmediateActionController.mm:
267         (-[WKImmediateActionController _defaultAnimationController]):
268         (-[WKImmediateActionController _animationControllerForCustomPreview]):
269
270 2014-12-16  Timothy Horton  <timothy_horton@apple.com>
271
272         Immediate action popovers can get stuck open
273         https://bugs.webkit.org/show_bug.cgi?id=139709
274         <rdar://problem/19270279>
275
276         Reviewed by Beth Dakin.
277
278         * UIProcess/mac/WKImmediateActionController.mm:
279         (-[WKImmediateActionController _clearImmediateActionState]):
280         Don't clear the animation controller; it breaks things and was unnecessary.
281
282 2014-12-16  Conrad Shultz  <conrad_shultz@apple.com>
283
284         Add a progress indicator to the preview popover
285         https://bugs.webkit.org/show_bug.cgi?id=139699
286
287         Reviewed by Tim Horton.
288
289         * UIProcess/API/Cocoa/WKViewPrivate.h:
290         * UIProcess/API/mac/WKView.mm:
291         (-[WKView _setPreviewLoading:]):
292         Wrap -[WKImmediateActionController setPreviewLoading:].
293
294         * UIProcess/mac/WKImmediateActionController.h:
295         * UIProcess/mac/WKImmediateActionController.mm:
296         (-[WKImmediateActionController _createPreviewPopoverIfNeededForURL:]):
297         Flag the preview view controller as loading before beginning the load.
298         (-[WKImmediateActionController setPreviewLoading:]):
299         Wrap -[WKPagePreviewViewController setLoading:].
300
301         * UIProcess/mac/WKPagePreviewViewController.h:
302         * UIProcess/mac/WKPagePreviewViewController.mm:
303         (-[WKPagePreviewViewController setLoading:]):
304         Toggle the progress indicator animation state.
305         (-[WKPagePreviewViewController isLoading]):
306         Accessor.
307         (-[WKPagePreviewViewController loadView]):
308         Create and center an indeterminate progress indicator that won't scale with the preview content.
309
310 2014-12-16  Enrica Casucci  <enrica@apple.com>
311
312         Fix iOS builders for 8.0
313         https://bugs.webkit.org/show_bug.cgi?id=139495
314
315         Reviewed by Jer Noble
316
317         * UIProcess/API/Cocoa/WKWebView.mm:
318         (-[WKWebView _mayAutomaticallyShowVideoOptimized]):
319         * UIProcess/WebPageProxy.cpp:
320         (WebKit::WebPageProxy::WebPageProxy):
321         (WebKit::WebPageProxy::reattachToWebProcess):
322         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
323
324 2014-12-16  Gavin Barraclough  <barraclough@apple.com>
325
326         Move Mac process suppression from WebCore to WebKit2
327         https://bugs.webkit.org/show_bug.cgi?id=139705
328
329         Reviewed by Geoff Garen.
330
331         Currently PageThrottler constructs the PageActivityState, holds a copy of the ViewState,
332         and an optional UserActivity.
333
334         Instead, still construct the PageActivityState but just pass this out via the Page to WebPage.
335         Logic From PageThrottler::updateUserActivity merged into WebPage::updateUserActivity.
336
337         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
338         (WebKit::WebChromeClient::setPageActivityState):
339             - added to propagate PageActivityState to WebPage.
340         * WebProcess/WebCoreSupport/WebChromeClient.h:
341             - added setPageActivityState to propagate PageActivityState to WebPage.
342         * WebProcess/WebPage/WebPage.cpp:
343         (WebKit::WebPage::WebPage):
344             - calls to updateUserActivity.
345         (WebKit::WebPage::setPageActivityState):
346             - calls to updateUserActivity.
347         (WebKit::WebPage::updateUserActivity):
348             - incorporate logic from PageThrottler::updateUserActivity.
349         (WebKit::WebPage::setViewState):
350             - calls to updateUserActivity.
351         (WebKit::WebPage::updatePreferences):
352             - calls to updateUserActivity.
353         * WebProcess/WebPage/WebPage.h:
354             - added setPageActivityState, m_activityState.
355
356 2014-12-16  Anders Carlsson  <andersca@apple.com>
357
358         More StorageManager modernization
359         https://bugs.webkit.org/show_bug.cgi?id=139704
360
361         Reviewed by Andreas Kling.
362
363         * UIProcess/Storage/StorageManager.cpp:
364         (WebKit::StorageManager::LocalStorageNamespace::getOrCreateStorageArea):
365         (WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea):
366         (WebKit::StorageManager::createSessionStorageMap):
367         (WebKit::StorageManager::destroyStorageMap):
368         (WebKit::StorageManager::findStorageArea):
369         (WebKit::StorageManager::getOrCreateLocalStorageNamespace):
370
371 2014-12-16  Anders Carlsson  <andersca@apple.com>
372
373         Use Ref in another StorageManager function
374         https://bugs.webkit.org/show_bug.cgi?id=139700
375
376         Reviewed by Andreas Kling.
377
378         * UIProcess/Storage/StorageManager.cpp:
379         (WebKit::StorageManager::LocalStorageNamespace::getOrCreateStorageArea):
380
381 2014-12-16  Anders Carlsson  <andersca@apple.com>
382
383         Use Ref in StorageManager
384         https://bugs.webkit.org/show_bug.cgi?id=139698
385
386         Reviewed by Andreas Kling.
387
388         * UIProcess/Storage/StorageManager.cpp:
389         (WebKit::StorageManager::TransientLocalStorageNamespace::create):
390         (WebKit::StorageManager::TransientLocalStorageNamespace::getOrCreateStorageArea):
391         (WebKit::StorageManager::StorageArea::create):
392         (WebKit::StorageManager::StorageArea::clone):
393         (WebKit::StorageManager::LocalStorageNamespace::create):
394         (WebKit::StorageManager::SessionStorageNamespace::create):
395         (WebKit::StorageManager::create):
396         * UIProcess/Storage/StorageManager.h:
397
398 2014-12-16  Gavin Barraclough  <barraclough@apple.com>
399
400         Split UserActivity from disabled flag in WebPage
401         https://bugs.webkit.org/show_bug.cgi?id=139696
402
403         Reviewed by Geoffrey Garen.
404
405         In preparation for other things driving the UserActivity.
406
407         * WebProcess/WebPage/WebPage.cpp:
408         (WebKit::WebPage::WebPage):
409             - initialize new members.
410         (WebKit::WebPage::updateUserActivity):
411             - start/stop the m_userActivity, based on m_processSupressionEnabled
412         (WebKit::WebPage::updatePreferences):
413             - call updateUserActivity to account for m_processSupressionEnabled changes.
414         * WebProcess/WebPage/WebPage.h:
415             - split m_processSuppressionDisabledByWebPreference -> m_processSupressionEnabled, m_userActivity.
416
417 2014-12-16  Anders Carlsson  <andersca@apple.com>
418
419         Get rid of PassRefPtr inside StorageManager
420         https://bugs.webkit.org/show_bug.cgi?id=139693
421
422         Reviewed by Andreas Kling.
423
424         * UIProcess/Storage/StorageManager.cpp:
425         (WebKit::StorageManager::TransientLocalStorageNamespace::getOrCreateStorageArea):
426         (WebKit::StorageManager::StorageArea::create):
427         (WebKit::StorageManager::StorageArea::StorageArea):
428         (WebKit::StorageManager::StorageArea::clone):
429         (WebKit::StorageManager::LocalStorageNamespace::create):
430         (WebKit::StorageManager::LocalStorageNamespace::getOrCreateStorageArea):
431         (WebKit::StorageManager::SessionStorageNamespace::create):
432         (WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea):
433         (WebKit::StorageManager::create):
434         * UIProcess/Storage/StorageManager.h:
435
436 2014-12-16  Tim Horton  <timothy_horton@apple.com>
437
438         Disable TextIndication for Lookup immediate actions
439         https://bugs.webkit.org/show_bug.cgi?id=139684
440
441         Reviewed by Anders Carlsson.
442
443         * UIProcess/mac/WKImmediateActionController.mm:
444         (-[WKImmediateActionController _animationControllerForText]):
445
446 2014-12-16  Dan Bernstein  <mitz@apple.com>
447
448         [Cocoa] WKWebProcessPlugInLoadDelegate can’t tell what type of same-document navigation has happened
449         https://bugs.webkit.org/show_bug.cgi?id=139669
450
451         Reviewed by Anders Carlsson.
452
453         * Shared/API/Cocoa/_WKSameDocumentNavigationType.h: Added. Moved the
454         _WKSameDocumentNavigationType type definition here from WKNavigationDelegatePrivate.h.
455         * Shared/API/Cocoa/_WKSameDocumentNavigationTypeInternal.h: Added.
456         (WebKit::toWKSameDocumentNavigationType): Moved from NavigationState.mm.
457
458         * Shared/API/c/WKSharedAPICast.h:
459         (WebKit::toSameDocumentNavigationType): Added this conversion helper.
460
461         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Added #import.
462
463         * UIProcess/Cocoa/NavigationState.mm:
464         (WebKit::toWKSameDocumentNavigationType): Deleted.
465
466         * WebKit2.xcodeproj/project.pbxproj: Updated for added headers.
467
468         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h: Declared new
469         delegate method that take a navigation type parameter.
470
471         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
472         (didSameDocumentNavigationForFrame): Changed to call the new delegate method, passing the
473         navigation type.
474
475 2014-12-16  Carlos Garcia Campos  <cgarcia@igalia.com>
476
477         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.7.3 release.
478
479         * gtk/NEWS: Add release notes for 2.7.3.
480
481 2014-12-16  Antti Koivisto  <antti@apple.com>
482
483         WebKit level persistent caching
484         https://bugs.webkit.org/show_bug.cgi?id=30322
485
486         Minor cleanups based on comments by Joseph Pecoraro.
487
488         * NetworkProcess/cache/NetworkCache.cpp:
489         (WebKit::decodeStorageEntry):
490         * NetworkProcess/cache/NetworkCache.h:
491         * NetworkProcess/cache/NetworkCacheStorage.h:
492         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
493         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
494
495 2014-12-15  Bartlomiej Gajda  <b.gajda@samsung.com>
496
497         Build fix after r177301.
498         https://bugs.webkit.org/show_bug.cgi?id=139666
499
500         Reviewed by Gyuyoung Kim.
501
502         * WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp:
503         (WebKit::WebPage::findZoomableAreaForPoint):
504
505 2014-12-15  Simon Fraser  <simon.fraser@apple.com>
506
507         [iOS WK2] Possible crash when setting the WKWebViews's scroll view delegate, if the scroll view outlives the web view
508         https://bugs.webkit.org/show_bug.cgi?id=139662
509         rdar://problem/18083882
510
511         Reviewed by Benjamin Poulain.
512         
513         Null out the internal delegate on the WKScrollView when the WKWebView goes away, since
514         it's possible for a client to set its own scroll view delegate, forcing the creation of
515         a WKScrollViewDelegateForwarder, and then retain the UIScrollView past the lifetime of
516         the WKWebView. In this situation, the WKScrollViewDelegateForwarder's internalDelegate
517         would point to a deleted WKWebView.
518
519         * UIProcess/API/Cocoa/WKWebView.mm:
520         (-[WKWebView dealloc]):
521
522 2014-12-15  Beth Dakin  <bdakin@apple.com>
523
524         Make lookup an immediate action instead of an action menu item
525         https://bugs.webkit.org/show_bug.cgi?id=139661
526         -and corresponding-
527         rdar://problem/19198414
528
529         Reviewed by Tim Horton.
530
531         New type.
532         * Shared/API/c/WKImmediateActionTypes.h:
533
534         ActionMenuHitTestResult now includes a DictionaryPopupInfo.
535         * Shared/mac/ActionMenuHitTestResult.h:
536         * Shared/mac/ActionMenuHitTestResult.mm:
537         (WebKit::ActionMenuHitTestResult::encode):
538         (WebKit::ActionMenuHitTestResult::decode):
539
540         Remove all lookup menu items.
541         * UIProcess/mac/WKActionMenuController.mm:
542         (-[WKActionMenuController _defaultMenuItemsForText]):
543         (-[WKActionMenuController _defaultMenuItemsForEditableText]):
544         (-[WKActionMenuController _defaultMenuItemsForEditableTextWithSuggestions]):
545         (-[WKActionMenuController _createActionMenuItemForTag:]):
546         (-[WKActionMenuController _lookupText:]): Deleted.
547
548         Set the defaultAnimationController to the lookup-provided animation controller 
549         when appropriate.
550         * UIProcess/mac/WKImmediateActionController.mm:
551         (-[WKImmediateActionController _defaultAnimationController]):
552         (-[WKImmediateActionController _animationControllerForText]):
553
554         Re-factor performDictionaryLookupForRange() so that most of the work is done in a 
555         new function called dictionaryPopupInfoForRange(). This was that code can be used 
556         for both performing a dictionary lookup and just getting the DictionaryPopupInfo 
557         for the ActionMenuHitTest.
558         * WebProcess/WebPage/WebPage.h:
559         * WebProcess/WebPage/mac/WebPageMac.mm:
560         (WebKit::WebPage::dictionaryPopupInfoForRange):
561         (WebKit::WebPage::performDictionaryLookupForRange):
562         (WebKit::WebPage::performActionMenuHitTestAtLocation):
563         (WebKit::WebPage::lookupTextAtLocation):
564
565 2014-12-15  Matt Baker  <mattbaker@apple.com>
566
567         Web Inspector: Docked inspector repositioned incorrectly when dragging frame borders
568         https://bugs.webkit.org/show_bug.cgi?id=139415
569
570         Reviewed by Joseph Pecoraro.
571
572         The _ignoreNextInspectedViewFrameDidChange flag wasn't set back to NO after
573         being tested by inspectedViewFrameDidChange.
574
575         * UIProcess/mac/WebInspectorProxyMac.mm:
576         (-[WKWebInspectorProxyObjCAdapter inspectedViewFrameDidChange:]):
577
578 2014-12-15  Gavin Barraclough  <barraclough@apple.com>
579
580         Simplify tracking of process suppression disabled for PluginProcessManager
581         https://bugs.webkit.org/show_bug.cgi?id=139611
582
583         Unreviewed gtk/efl build fix.
584
585         * UIProcess/Plugins/PluginProcessManager.h:
586             - missing #ifdef
587
588 2014-12-15  Timothy Horton  <timothy_horton@apple.com>
589
590         Implement Data Detectors immediate actions for WebKit2
591         https://bugs.webkit.org/show_bug.cgi?id=139617
592         <rdar://problem/19198539>
593
594         Reviewed by Beth Dakin.
595
596         * UIProcess/mac/WKImmediateActionController.mm:
597         (-[WKImmediateActionController _menuItemForDataDetectedText]):
598         Note that this action context is only for immediate actions.
599
600 2014-12-15  Myles C. Maxfield  <mmaxfield@apple.com>
601
602         Addressing post-review comments in r177035
603         https://bugs.webkit.org/show_bug.cgi?id=139557
604
605         Reviewed by Darin Adler.
606
607         * Shared/WebHitTestResult.cpp:
608         (WebKit::WebHitTestResult::Data::elementBoundingBoxInWindowCoordinates): Migrate off rendererBoundingBox().
609         * WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp:
610         (WebKit::WebPage::findZoomableAreaForPoint): Ditto.
611
612 2014-12-15  Timothy Horton  <timothy_horton@apple.com>
613
614         Implement Data Detectors immediate actions for WebKit2
615         https://bugs.webkit.org/show_bug.cgi?id=139617
616         <rdar://problem/19198539>
617
618         Reviewed by Beth Dakin.
619
620         * Shared/API/c/WKImmediateActionTypes.h:
621         Add a new type.
622
623         * UIProcess/API/mac/WKView.mm:
624         (-[WKView mouseDown:]):
625         Send mouseDown along to the WKImmediateActionController too.
626
627         (-[WKView initWithFrame:context:configuration:webView:]):
628         Temporarily disable action menus.
629
630         (-[WKView _dismissContentRelativeChildWindows]):
631         Hide the immediate action preview when detaching child windows.
632
633         * UIProcess/mac/WKImmediateActionController.h:
634         * UIProcess/mac/WKImmediateActionController.mm:
635         (-[WKImmediateActionController willDestroyView:]):
636         Clear the DDActionContext when tearing down the view.
637
638         (-[WKImmediateActionController wkView:willHandleMouseDown:]):
639         (-[WKImmediateActionController _cancelImmediateAction]):
640         (-[WKImmediateActionController _clearImmediateActionState]):
641         (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
642         (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
643         (-[WKImmediateActionController _defaultAnimationController]):
644         (-[WKImmediateActionController _updateImmediateActionItem]):
645         (-[WKImmediateActionController hidePreview]):
646         (-[WKImmediateActionController popoverWillClose:]):
647         (-[WKImmediateActionController _menuItemForDataDetectedText]):
648         Copy most of the DataDetectors implementation into WKImmediateActionController.
649
650 2014-12-15  Myles C. Maxfield  <mmaxfield@apple.com>
651
652         Delete Notation because we don't use it
653         https://bugs.webkit.org/show_bug.cgi?id=139171
654
655         Reviewed by Kent Tamura.
656
657         * WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
658         (WebKit::WKDOMNodeClass):
659         * mac/MigrateHeadersFromWebKitLegacy.make:
660
661 2014-12-15  David Kilzer  <ddkilzer@apple.com>
662
663         Remove last references to OfflineStorage process
664         <http://webkit.org/b/139648>
665
666         Reviewed by Anders Carlsson.
667
668         * WebKit2.xcodeproj/project.pbxproj: Remove last references to
669         the OfflineStorage process.  See r154251 and r154256.
670
671 2014-12-15  Gavin Barraclough  <barraclough@apple.com>
672
673         Change HysteresisActivity to use a lambda
674         https://bugs.webkit.org/show_bug.cgi?id=139636
675
676         Reviewed by Darin Adler.
677
678         The current implementation provides notifications via callbacks to a delegate. Using a delegate
679         with callbacks is limiting a number of ways. The callback names are very ambiguous, the callbacks
680         must either be on a separate object (more boilerplate), or the callback must be public for
681         HysteresisActivity to call them, or friends get involved. Without the boilerplate of extra
682         delegate objects it's hard to scale use of these objects – a single object can't serve as a
683         delegate for multiple HysteresisActivity members.
684
685         Instead, make HysteresisActivity take a lambda to callback on state change. To simplify, changed
686         HysteresisState to only track Started/Stopped states (removed WillStopPendingTimeout).
687
688         * WebProcess/WebCoreSupport/WebSQLiteDatabaseTracker.cpp:
689         (WebKit::WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker):
690             - HysteresisActivity now takes a lambda, not a delegate.
691         (WebKit::WebSQLiteDatabaseTracker::hysteresisUpdated):
692         (WebKit::WebSQLiteDatabaseTracker::started): Deleted.
693         (WebKit::WebSQLiteDatabaseTracker::stopped): Deleted.
694             - started/stopped merged into hysteresisUpdated
695         * WebProcess/WebCoreSupport/WebSQLiteDatabaseTracker.h:
696             - HysteresisActivity is no longer templated on delegate type, changed function declarations.
697
698 2014-12-15  Antti Koivisto  <antti@apple.com>
699
700         WebKit level persistent caching
701         https://bugs.webkit.org/show_bug.cgi?id=30322
702
703         Reviewed by Sam Weinig.
704
705         We can improve performance and open new optimization possibilities by bringing network caching into WebKit.
706
707         This patch implements an experimental HTTP cache living in the network process.
708
709         The main classes are:
710
711         NetworkCache
712             - Implements HTTP cache validation logic including Vary header
713             - Initially non-range GET only
714             - Fast serialization using WebKit types (ResourcesResponse etc) instead of native network layer types
715
716         NetworkCacheKey
717             - Unique identifier for cache entries
718             - Keyed on method/partition/URL
719
720         NetworkCacheStorage
721             - Storage backend
722             - dispatch-IO based implementation (generic posix implementation wouldn't be difficult)
723             - File system only (no SQLite or similar)
724             - One file per resource containing both header and body data
725             - Zero persistent global metadata
726             - Bloom filter for fast fail
727
728         NetworkCacheEncoder/Decoder
729             - Serializisation support with integrity verification.
730
731         The code is behind the NETWORK_CACHE feature flag and requires network process to be enabled to use.
732
733         This patch does not enable the feature yet by default.
734
735         Test: http/tests/cache/disk-cache-validation.html
736
737         * NetworkProcess/cache/NetworkCache.cpp: Added.
738         * NetworkProcess/cache/NetworkCache.h: Added.
739         * NetworkProcess/cache/NetworkCacheKey.cpp: Added.
740         * NetworkProcess/cache/NetworkCacheKey.h: Added.
741         * NetworkProcess/cache/NetworkCacheStorage.h: Added.
742         * NetworkProcess/cache/NetworkCacheStorage.mm: Added.
743         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
744         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
745         (WebKit::NetworkProcess::platformSetCacheModel):
746         * NetworkProcess/ios/NetworkProcessIOS.mm:
747         (WebKit::NetworkProcess::clearCacheForAllOrigins):
748         * NetworkProcess/mac/NetworkProcessMac.mm:
749         (WebKit::NetworkProcess::clearCacheForAllOrigins):
750         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
751         (WebKit::tryGetShareableHandleFromCFData):
752         * Platform/Logging.h:
753         * WebKit2.xcodeproj/project.pbxproj:
754         * config.h:
755
756 2014-12-15  Gavin Barraclough  <barraclough@apple.com>
757
758         Simplify tracking of process suppression disabled for PluginProcessManager
759         https://bugs.webkit.org/show_bug.cgi?id=139611
760
761         Reviewed by Darin Adler.
762
763         Previously if process suppression state changed for any context we would
764         iterate over all contexts to recompute.
765
766         There was also an inconsistency in the code. When plugin processes are
767         created they called processSuppressionIsEnabledForAllContexts(), which
768         checked WebContext::processSuppressionEnabled(), which in turn checks
769         two things - whether any page is currently visible, and whether the
770         suppression is currently disabled for any page. However when updating
771         process supression state we would call
772         processSuppressionPreferenceIsEnabledForAllContexts(), which would just
773         check the value of the key from the context's default PageGroup.
774
775         We shouldn't be taking visibility into account (this is handled from the
776         content, where we know which pages have instances of which plugins), but
777         we should be checking the current pref value of each page.
778
779         We already track in each context whether any page has teh pref set to
780         disable throttling; add a counter to the shared PluginProcessManager to
781         coallesce across all contexts.
782
783         * UIProcess/Plugins/PluginProcessManager.cpp:
784         (WebKit::PluginProcessManager::PluginProcessManager):
785             - added m_processSuppressionDisabledForPageCounter, m_processSuppressionEnabled.
786         * UIProcess/Plugins/PluginProcessManager.h:
787         (WebKit::PluginProcessManager::processSuppressionDisabledForPageCount):
788             - accessor for WebContext to increment count.
789         (WebKit::PluginProcessManager::processSuppressionEnabled):
790             - accessor for PluginProcessProxy.
791         * UIProcess/Plugins/PluginProcessProxy.cpp:
792         (WebKit::PluginProcessProxy::didFinishLaunching):
793             - get initial supression state from the PluginProcessManager, not WebContext.
794         * UIProcess/Plugins/mac/PluginProcessManagerMac.mm:
795         (WebKit::PluginProcessManager::updateProcessSuppressionState):
796         (WebKit::PluginProcessManager::setProcessSuppressionEnabled): Deleted.
797             - setProcessSuppressionEnabled -> updateProcessSuppressionState
798               rather than WebContext setting suppression state, PluginProcessManager detects
799               when this may need to change & determines a new value for itself.
800         * UIProcess/WebContext.h:
801             - removed processSuppressionIsEnabledForAllContexts, processSuppressionPreferenceIsEnabledForAllContexts
802               updateProcessSuppressionState is no longer const (updates m_pluginProcessManagerProcessSuppressionDisabledCount).
803         * UIProcess/mac/WebContextMac.mm:
804         (WebKit::WebContext::updateProcessSuppressionState):
805             - instead of explicitly recomputing plugin throttling state from Within the WebContext, just update
806               m_pluginProcessManagerProcessSuppressionDisabledCount to count a RefCounter on the shared PluginProcessManager.
807         (WebKit::WebContext::processSuppressionIsEnabledForAllContexts): Deleted.
808         (WebKit::WebContext::processSuppressionPreferenceIsEnabledForAllContexts): Deleted.
809             - removed.
810
811 2014-12-15  Carlos Garcia Campos  <cgarcia@igalia.com>
812
813         [GTK] Use API::LoaderClient instead of WKPageLoaderClient
814         https://bugs.webkit.org/show_bug.cgi?id=139583
815
816         Reviewed by Gustavo Noronha Silva.
817
818         It simplifies the code and it will make easier to implement new
819         loader client methods.
820
821         * UIProcess/API/gtk/WebKitBackForwardList.cpp:
822         (webkitBackForwardListChanged):
823         * UIProcess/API/gtk/WebKitBackForwardListPrivate.h:
824         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
825         (LoaderClient::LoaderClient):
826         (attachLoaderClientToView):
827         (didStartProvisionalLoadForFrame): Deleted.
828         (didReceiveServerRedirectForProvisionalLoadForFrame): Deleted.
829         (didFailProvisionalLoadWithErrorForFrame): Deleted.
830         (didCommitLoadForFrame): Deleted.
831         (didFinishLoadForFrame): Deleted.
832         (didFailLoadWithErrorForFrame): Deleted.
833         (didDisplayInsecureContentForFrame): Deleted.
834         (didRunInsecureContentForFrame): Deleted.
835         (didChangeBackForwardList): Deleted.
836         (didReceiveAuthenticationChallengeInFrame): Deleted.
837         (processDidCrash): Deleted.
838
839 2014-12-15  Gwang Yoon Hwang  <yoon@igalia.com>
840
841         Add initial implementation of ThreadSafeCoordinatedSurface, ThreadedCompositor, and SimpleViewportController
842         https://bugs.webkit.org/show_bug.cgi?id=118383
843
844         Reviewed by Martin Robinson.
845
846         Implements an initial version of the Threaded Compositor.
847
848         Threaded Compositor is a variant of Coordinated Graphics implementation.
849         Basic structure of the implementaion is simliar, thus, Threaded
850         Compositor reuses lots of classes from Coordinated Graphics. However,
851         instead of compositing on UI Process, Threaded Compositor performs
852         compositing on a dedicate thread of Web Process.
853
854         No new test, because it is in experimental stage.
855
856         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
857         (WebKit::CoordinatedGraphicsScene::CoordinatedGraphicsScene):
858         Removed a assertion not to force its creation in the main thread. In
859         the Threaded Compositor, it can be created in the dedicated thread.
860
861         * Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.cpp: Added.
862         * Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.h: Added.
863         Implements a surface using ImageBuffer as a backend to use in the Web
864         Process.
865
866         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h: Added.
867         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp: Added.
868         Implements a compositor which runs on the created thread. It owns
869         SimpleViewportController and CoordinatedGraphicsScene to render scene on the
870         actual surface.
871
872         * Shared/CoordinatedGraphics/SimpleViewportController.cpp: Added.
873         * Shared/CoordinatedGraphics/SimpleViewportController.h: Added.
874         This class is responsible to handle scale factor and scrolling position
875         with a simplifed logic in the compositing thread.
876
877 2014-12-14  Andreas Kling  <akling@apple.com>
878
879         Replace PassRef with Ref/Ref&& across the board.
880         <https://webkit.org/b/139587>
881
882         Reviewed by Darin Adler.
883
884         * UIProcess/WebBackForwardList.h:
885         (WebKit::WebBackForwardList::create):
886         * UIProcess/WebBatteryManagerProxy.cpp:
887         (WebKit::WebBatteryManagerProxy::create):
888         * UIProcess/WebBatteryManagerProxy.h:
889         * UIProcess/WebPageGroup.cpp:
890         (WebKit::WebPageGroup::createNonNull):
891         * UIProcess/WebPageGroup.h:
892         * UIProcess/efl/BatteryProvider.cpp:
893         (BatteryProvider::create):
894         * UIProcess/efl/BatteryProvider.h:
895         * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
896         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
897         (WebKit::WebEditorClient::shouldApplyStyle):
898         * WebProcess/WebCoreSupport/WebUserMediaClient.cpp:
899         (WebKit::WebUserMediaClient::requestPermission):
900         * WebProcess/WebCoreSupport/WebUserMediaClient.h:
901         * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
902         (WebKit::ViewUpdateDispatcher::create):
903         * WebProcess/WebPage/ViewUpdateDispatcher.h:
904
905 2014-12-12  Gavin Barraclough  <barraclough@apple.com>
906
907         Split WebPageProxy::m_preventProcessSuppression to track pref/visibility separately
908         https://bugs.webkit.org/show_bug.cgi?id=139600
909
910         Reviewed by Geoff Garen.
911
912         Previously WebPageProxy::m_preventProcessSuppression would be set if either the page was visible
913         or its suppression was disabled by the pref. Instead track these separately. This will make the
914         user observability state applicable on iOS, too.
915
916         Add a new counter to WebContext, and split the counting in WebPageProxy.
917         ::updateProccessSuppressionState continues to track the pref change (which matches its name),
918         tracking of user observability changes moved to updateActivityToken (which we should further
919         merge with; it already tracks observability to control process state for iOS).
920
921         * UIProcess/WebContext.cpp:
922         (WebKit::m_processSuppressionDisabledForPageCounter):
923             - added new RefCounter.
924         * UIProcess/WebContext.h:
925         (WebKit::WebContext::processSuppressionDisabledForPageCount):
926             - added new RefCounter.
927         * UIProcess/WebPageProxy.cpp:
928         (WebKit::WebPageProxy::reattachToWebProcess):
929             - no longer needs to call updateProccessSuppressionState (pref has not changed; handled by the call to updateActivityToken).
930         (WebKit::WebPageProxy::dispatchViewStateChange):
931             - no longer needs to call updateProccessSuppressionState (pref has not changed; handled by the call to updateActivityToken).
932         (WebKit::WebPageProxy::updateActivityToken):
933             - this now also updated the user observability counter.
934         (WebKit::WebPageProxy::updateProccessSuppressionState):
935             - now only tracks whether this is disabled via the preference.
936         (WebKit::WebPageProxy::resetStateAfterProcessExited):
937             - clear the user observability counter; thsi will be reset on reattach.
938         * UIProcess/WebPageProxy.h:
939             - added new RefCounter::Count.
940         * UIProcess/mac/WebContextMac.mm:
941         (WebKit::WebContext::processSuppressionEnabled):
942             - processSuppressionEnabled is disabled if *neither*:
943                 - there are user observable pages
944                 - disabled by pref for any page.
945
946 2014-12-12  Beth Dakin  <bdakin@apple.com>
947
948         Need a fake mouse move after hiding data detectors UI
949         https://bugs.webkit.org/show_bug.cgi?id=139608
950         -and corresponding-
951         rdar://problem/19221935
952
953         Reviewed by Tim Horton.
954
955         * WebProcess/WebPage/mac/WebPageMac.mm:
956         (WebKit::WebPage::dataDetectorsDidHideUI):
957
958 2014-12-12  Anders Carlsson  <andersca@apple.com>
959
960         Handle caches in WebsiteDataStore
961         https://bugs.webkit.org/show_bug.cgi?id=139607
962         <rdar://problem/19107614>
963
964         Reviewed by Sam Weinig.
965
966         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
967         (WebKit::computeNetworkProcessAccessType):
968
969 2014-12-12  Enrica Casucci  <enrica@apple.com>
970
971         [iOS] Predictions are not updated when using navigation buttons.
972         https://bugs.webkit.org/show_bug.cgi?id=139567
973         rdar://problem/19132585
974
975         Reviewed by Dan Bernstein.
976
977         When moving focus programmatically, we need to notify the keyboard so that it
978         can update the prediction bar.
979
980         * UIProcess/WebPageProxy.h:
981         * UIProcess/ios/WKContentViewInteraction.mm:
982         (-[WKFormInputSession setAccessoryViewCustomButtonTitle:]):
983         (-[WKContentView requiresAccessoryView]):
984         (-[WKContentView inputAssistantButtonItems]):
985         (-[WKContentView accessoryTab:]):
986         (-[WKContentView _startAssistingKeyboard]):
987         (-[WKContentView _stopAssistingNode]):
988         * UIProcess/ios/WebPageProxyIOS.mm:
989         (WebKit::WebPageProxy::focusNextAssistedNode):
990         * WebProcess/WebPage/WebPage.h:
991         * WebProcess/WebPage/WebPage.messages.in:
992         * WebProcess/WebPage/ios/WebPageIOS.mm:
993         (WebKit::WebPage::focusNextAssistedNode):
994
995 2014-12-12  Timothy Horton  <timothy_horton@apple.com>
996
997         TextIndicator (and other view-relative subwindows) is not dismissed on zoom gesture
998         https://bugs.webkit.org/show_bug.cgi?id=139580
999         <rdar://problem/19226350>
1000
1001         Reviewed by Anders Carlsson.
1002
1003         * UIProcess/PageClient.h:
1004         * UIProcess/mac/PageClientImpl.h:
1005         * UIProcess/mac/PageClientImpl.mm:
1006         (WebKit::PageClientImpl::dismissContentRelativeChildWindows):
1007         (WebKit::PageClientImpl::dismissDictionaryLookupPanel): Deleted.
1008         (WebKit::PageClientImpl::dismissActionMenuPopovers): Deleted.
1009         Merge dismissDictionaryLookupPanel and dismissActionMenuPopovers into
1010         _dismissContentRelativeChildWindows, which also dismisses TextIndicator and the
1011         text correction panel. Dismissal of any child windows which are anchored to
1012         the page content now bottlenecks through this function.
1013
1014         (WebKit::PageClientImpl::navigationGestureDidBegin):
1015         Dismiss all anchored subwindows when starting a navigation gesture, not
1016         just TextIndicator and action menu popovers.
1017
1018         * UIProcess/API/mac/WKView.mm:
1019         (-[WKView scrollWheel:]):
1020         No need to dismiss TextIndicator here; we've got this covered in the more-inclusive
1021         WebPageProxy::pageDidScroll, and will now dismiss more things.
1022
1023         (-[WKView mouseDown:]):
1024         Dismiss more things.
1025
1026         (-[WKView viewDidMoveToWindow]):
1027         Dismiss more things.
1028
1029         (-[WKView _dismissContentRelativeChildWindows]):
1030         The aforementioned combined dismissal function.
1031
1032         (-[WKView magnifyWithEvent:]):
1033         (-[WKView smartMagnifyWithEvent:]):
1034         (-[WKView setMagnification:centeredAtPoint:]):
1035         (-[WKView setMagnification:]):
1036         Any time the page magnification changes, dismiss all the things.
1037
1038         * UIProcess/API/mac/WKViewPrivate.h:
1039         Expose _dismissContentRelativeChildWindows instead of _dismissActionMenuPopovers;
1040         for all existing clients, it makes more sense to dismiss all view-relative subwindows
1041         than just a subset of them.
1042         
1043         * UIProcess/WebPageProxy.cpp:
1044         (WebKit::WebPageProxy::didCommitLoadForFrame):
1045         (WebKit::WebPageProxy::pageDidScroll):
1046         (WebKit::WebPageProxy::resetStateAfterProcessExited):
1047         Make use of dismissAnchoredSubwindows.
1048
1049         * UIProcess/mac/WKActionMenuController.h:
1050         * UIProcess/mac/WKActionMenuController.mm:
1051         (-[WKActionMenuController prepareForMenu:withEvent:]):
1052         Dismiss more things.
1053
1054         (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
1055         (-[WKActionMenuController dismissActionMenuPopovers]): Deleted.
1056         dismissActionMenuPopovers is folded into WKView's _dismissContentRelativeChildWindows.
1057
1058         (-[WKActionMenuController _showTextIndicator]): Deleted.
1059         (-[WKActionMenuController _hideTextIndicator]): Deleted.
1060         Fold _showTextIndicator and _hideTextIndicator into their only callers.
1061         _isShowingTextIndicator was never necessary, because it's OK to change
1062         the current TextIndicator at any time, and a newer one is always more relevant.
1063
1064 2014-12-12  Gavin Barraclough  <barraclough@apple.com>
1065
1066         Keep single RefCounter to track whether any pages in a context are process suppressible
1067         https://bugs.webkit.org/show_bug.cgi?id=139576
1068
1069         Reviewed by Sam Weinig.
1070
1071         Currently we keep separate counters in each process, and coallesce these in the
1072         context. Instead we should have a counter in the WebContext.
1073
1074         Also, changed the name to better describe the state we're tracking, rather than
1075         describing what it's currently used for. This counter will also be useful for
1076         iOS, to better manage background state of the networking process.
1077
1078         * UIProcess/WebContext.cpp:
1079         (WebKit::WebContext::WebContext):
1080             - initialize m_userObservablePageCounter.
1081         * UIProcess/WebContext.h:
1082         (WebKit::WebContext::updateProcessSuppressionState):
1083             - Added no-op implementation for non-cocoa platforms.
1084         (WebKit::WebContext::userObservablePageCount):
1085             - Count the number of user visible (audible / visible) pages in Context.
1086         * UIProcess/WebPageProxy.cpp:
1087         (WebKit::WebPageProxy::updateProccessSuppressionState):
1088             - WebProcessProxy::processSuppressionCounter -> WebContext::userObservablePageCount
1089         * UIProcess/WebProcessProxy.cpp:
1090         (WebKit::WebProcessProxy::WebProcessProxy):
1091         (WebKit::WebProcessProxy::didFinishLaunching):
1092             - moved all processs supression state tracking to the WebContext.
1093         * UIProcess/WebProcessProxy.h:
1094         (WebKit::WebProcessProxy::processSuppressionCounter): Deleted.
1095             - moved all processs supression state tracking to the WebContext.
1096         * UIProcess/ios/WebProcessProxyIOS.mm:
1097         (WebKit::WebProcessProxy::allPagesAreProcessSuppressible): Deleted.
1098         (WebKit::WebProcessProxy::updateProcessSuppressionState): Deleted.
1099             - moved all processs supression state tracking to the WebContext.
1100         * UIProcess/mac/WebContextMac.mm:
1101         (WebKit::WebContext::processSuppressionEnabled):
1102             - no need to interate all processes; just have a single counter.
1103         * UIProcess/mac/WebProcessProxyMac.mm:
1104         (WebKit::WebProcessProxy::allPagesAreProcessSuppressible): Deleted.
1105         (WebKit::WebProcessProxy::updateProcessSuppressionState): Deleted.
1106             - moved all processs supression state tracking to the WebContext.
1107
1108 2014-12-12  Alexey Proskuryakov  <ap@apple.com>
1109
1110         Layout Test http/tests/loading/307-after-303-after-post.html is flaky
1111         https://bugs.webkit.org/show_bug.cgi?id=73030
1112
1113         Reviewed by Anders Carlsson.
1114
1115         * UIProcess/WebContext.cpp:
1116         (WebKit::WebContext::createNewWebProcess): Added a FIXME comment.
1117         (WebKit::WebContext::setIconDatabasePath): Don't enable m_iconDatabase if the path
1118         is empty, meaning that the database is disabled (which is not a great way to say
1119         that, but WebKit2 icon database doesn't support enabling/disabling cleanly).
1120         (WebKit::WebContext::iconDatabasePath): Keep it empty if it was empty.
1121
1122 2014-12-12  Mark Rowe  <mrowe@apple.com>
1123
1124         Fix the 32-bit build.
1125
1126         * UIProcess/API/mac/WKView.mm:
1127         (-[WKView _setPreviewTitle:]):
1128
1129 2014-12-12  Timothy Horton  <timothy_horton@apple.com>
1130
1131         Fix the 32-bit build.
1132
1133         * UIProcess/mac/WKImmediateActionController.h:
1134
1135 2014-12-12  Rohit Kumar  <kumar.rohit@samsung.com>
1136
1137         Fix Build Warning in WebKit2/UIProcess module for GTK build and WebKit2/NetworkProcess module in GTK and EFL build
1138         https://bugs.webkit.org/show_bug.cgi?id=139535
1139
1140         Reviewed by Martin Robinson.
1141
1142         * UIProcess/API/gtk/WebKitWebView.cpp: Use UNUSED_PARAM for conditional #if case
1143         (webkitWebViewShowNotification):
1144         (webkitWebViewCloseNotification):
1145
1146 2014-12-12  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1147
1148         [EFL] Disable all EWK2Accessibility unit tests
1149         https://bugs.webkit.org/show_bug.cgi?id=139577
1150
1151         Reviewed by Csaba Osztrogonác.
1152
1153         WebAccessibility functionality isn't supported by EFL WebKit2 though,
1154         EWK2Accessibility unit tests have been tested. That's why those tests have been failed
1155         so far.
1156
1157         * UIProcess/API/efl/tests/test_ewk2_accessibility.cpp:
1158         (TEST_F):
1159
1160 2014-12-12  Simon Fraser  <simon.fraser@apple.com>
1161
1162         Layer borders on contentsLayers don't correctly toggle with the rest of the borders
1163         https://bugs.webkit.org/show_bug.cgi?id=139570
1164         rdar://problem/18007746
1165
1166         Reviewed by Tim Horton.
1167         
1168         Return nil if the color is invalid, to remove the color from the layer's
1169         border or background.
1170
1171         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
1172         (WebKit::cgColorFromColor):
1173
1174 2014-12-11  Gavin Barraclough  <barraclough@apple.com>
1175
1176         Track pages preventing suppression in WebProcessProxy using RefCounter
1177         https://bugs.webkit.org/show_bug.cgi?id=139108
1178
1179         Reviewed by Benjamin Poulain.
1180
1181         The networking process is allowed to app nap if all web pages are also currently in app nap.
1182         In order to detect whether any page in any process currently requires the networking process
1183         to be active we:
1184          - maintain hash sets in every WebProcessProxy of pages that are okay with suppression.
1185          - if anything changes, the WebContext iterates every WebProcessProxy to recompute state.
1186
1187         This is all crazy - all we actually need is a simple count of the number of pages that need
1188         to prevent the networking process from entering app nap. This patch gets us half way there -
1189         replace the HashSet with a RefCounter. Next step will be to hoist the RefCounters from the
1190         process proxies up to the context to do away with the iteration.
1191
1192         * UIProcess/WebPageProxy.cpp:
1193         (WebKit::WebPageProxy::WebPageProxy):
1194         (WebKit::WebPageProxy::reattachToWebProcess):
1195             - make sure we prevent process suppression, per current viewstate & preferences.
1196         (WebKit::WebPageProxy::dispatchViewStateChange):
1197             - make sure we prevent process suppression, per viewstate change.
1198         (WebKit::WebPageProxy::updateProccessSuppressionState):
1199             - recompute whether we need to prevent process suppression.
1200         (WebKit::WebPageProxy::preferencesDidChange):
1201             - when preferences change process supression may be disabled.
1202         (WebKit::WebPageProxy::resetStateAfterProcessExited):
1203             - we need to drop the old ref, to allow a new one to be taken when we reattach.
1204         (WebKit::WebPageProxy::isProcessSuppressible): Deleted.
1205             - moreged into updateProccessSuppressionState.
1206         * UIProcess/WebPageProxy.h:
1207             - added m_preventProcessSuppression.
1208         * UIProcess/WebProcessProxy.cpp:
1209         (WebKit::WebProcessProxy::WebProcessProxy):
1210             - initialize m_pagesPreventingSuppression
1211         (WebKit::WebProcessProxy::createWebPage):
1212             - moved to WebPageProxy::WebPageProxy
1213         (WebKit::WebProcessProxy::addExistingWebPage):
1214             - moved to WebPageProxy::reattachToWebProcess
1215         (WebKit::WebProcessProxy::removeWebPage):
1216             - now implicit; when the page is destroyed the RefPtr will release.
1217         (WebKit::WebProcessProxy::pageSuppressibilityChanged): Deleted.
1218             - moved to WebPageProxy::dispatchViewStateChange.
1219         (WebKit::WebProcessProxy::pagePreferencesChanged): Deleted.
1220             - moved to WebPageProxy::preferencesDidChange.
1221         * UIProcess/WebProcessProxy.h:
1222         (WebKit::WebProcessProxy::preventProcessSuppressionForPage):
1223             - reference count m_pagesPreventingSuppression
1224         * UIProcess/mac/WebProcessProxyMac.mm:
1225         (WebKit::WebProcessProxy::allPagesAreProcessSuppressible):
1226             - converted to use m_pagesPreventingSuppression.
1227             - removed guard that meant processes with no pages would keep the networking
1228               process from entering app nap, which made no sense.
1229
1230 2014-12-11  Anders Carlsson  <andersca@apple.com>
1231
1232         Temporarily use WebCore session storage for transient local storage
1233         https://bugs.webkit.org/show_bug.cgi?id=139574
1234
1235         Reviewed by Dan Bernstein.
1236
1237         * WebProcess/Storage/StorageNamespaceImpl.h:
1238         Change the header guard so it won't conflict with StorageNamespaceImpl.h in WebCore.
1239
1240         * WebProcess/Storage/WebStorageNamespaceProvider.cpp:
1241         (WebKit::WebStorageNamespaceProvider::createTransientLocalStorageNamespace):
1242         Use the WebCore session storage for now, to avoid crashes.
1243
1244 2014-12-11  Commit Queue  <commit-queue@webkit.org>
1245
1246         Unreviewed, rolling out r177081.
1247         https://bugs.webkit.org/show_bug.cgi?id=139569
1248
1249         broke iOS video playback (Requested by eric_carlson on
1250         #webkit).
1251
1252         Reverted changeset:
1253
1254         "Fix iOS builders for 8.0"
1255         https://bugs.webkit.org/show_bug.cgi?id=139495
1256         http://trac.webkit.org/changeset/177081
1257
1258 2014-12-11  Beth Dakin  <bdakin@apple.com>
1259
1260         WK2: Need new SPI for Webkit clients to override default immediate action
1261         https://bugs.webkit.org/show_bug.cgi?id=139564
1262         -and corresponding-
1263         rdar://problem/19225448
1264
1265         Reviewed by Tim Horton.
1266
1267         New SPI _immediateActionAnimationControllerForHitTestResult:withType:userData:
1268         * UIProcess/API/Cocoa/WKViewPrivate.h:
1269         * UIProcess/API/mac/WKView.mm:
1270         (-[WKView _immediateActionAnimationControllerForHitTestResult:withType:userData:]):
1271
1272         Keep at ivar for the userData so that it can be passed to the new SPI.
1273         * UIProcess/mac/WKImmediateActionController.h:
1274         * UIProcess/mac/WKImmediateActionController.mm:
1275         (-[WKImmediateActionController _clearImmediateActionState]):
1276         (-[WKImmediateActionController didPerformActionMenuHitTest:userData:]):
1277
1278         Always give the SPI a chance to override the animationController.
1279         (-[WKImmediateActionController _updateImmediateActionItem]):
1280
1281         Need to mark WKImmediateActionTypes.h as Private.
1282         * WebKit2.xcodeproj/project.pbxproj:
1283
1284 2014-12-11  Timothy Horton  <timothy_horton@apple.com>
1285
1286         Move the preview popover to WebImmediateActionController
1287         https://bugs.webkit.org/show_bug.cgi?id=139563
1288         <rdar://problem/19208291>
1289
1290         Reviewed by Beth Dakin.
1291
1292         * UIProcess/mac/WKImmediateActionController.h:
1293         Remove an unnecessary forward declaration.
1294
1295         * UIProcess/mac/WKImmediateActionController.mm:
1296         (-[WKImmediateActionController willDestroyView:]):
1297         Clear the immediate action recognizer when the view goes away.
1298
1299 2014-12-11  Timothy Horton  <timothy_horton@apple.com>
1300
1301         Fix the build.
1302
1303         * UIProcess/mac/WKImmediateActionController.h:
1304         * UIProcess/mac/WKImmediateActionController.mm:
1305
1306 2014-12-11  Timothy Horton  <timothy_horton@apple.com>
1307
1308         Move the preview popover to WKImmediateActionController
1309         https://bugs.webkit.org/show_bug.cgi?id=139560
1310         <rdar://problem/19208291>
1311
1312         Reviewed by Beth Dakin.
1313
1314         * Shared/API/c/WKImmediateActionTypes.h:
1315         Add a link preview type.
1316
1317         * UIProcess/API/mac/WKView.mm:
1318         (-[WKView initWithFrame:context:configuration:webView:]):
1319         Pass the gesture recognizer to the WKImmediateActionController.
1320
1321         (-[WKView _setPreviewTitle:]):
1322         Forward preview title changes to the WKImmediateActionController,
1323         because that's where the preview popover lives now.
1324
1325         * UIProcess/mac/WKActionMenuController.h:
1326         * UIProcess/mac/WKActionMenuController.mm:
1327         Move WKPagePreviewViewController into its own file.
1328         Move page preview popover related code to WKImmediateActionController.
1329
1330         * UIProcess/mac/WKImmediateActionController.h:
1331         * UIProcess/mac/WKImmediateActionController.mm:
1332         Compare the gesture recognizers directly instead of their views, for accuracy.
1333         Move page preview popover related code in from WKActionMenuController.
1334         Some of this should eventually move to WKPagePreviewViewController, but
1335         for now for ease of transition we will move it here.
1336
1337         * UIProcess/mac/WKPagePreviewViewController.h: Added.
1338         * UIProcess/mac/WKPagePreviewViewController.mm: Added.
1339         * WebKit2.xcodeproj/project.pbxproj:
1340         Move WKPagePreviewViewController into its own file.
1341
1342 2014-12-11  Tomas Popela  <tpopela@redhat.com>
1343
1344         [GTK] Minor fixes for documentation and translations
1345         https://bugs.webkit.org/show_bug.cgi?id=139450
1346
1347         Reviewed by Sergio Villar Senin.
1348
1349         * UIProcess/API/gtk/WebKitNavigationAction.cpp:
1350         Fix typo in documentation.
1351         * UIProcess/API/gtk/WebKitWebView.cpp:
1352         (webkit_web_view_class_init):
1353         Mark zoom-level and is-loading properties names for translation and
1354         when touching them also fix the indentation style.
1355
1356 2014-12-11  Joseph Pecoraro  <pecoraro@apple.com>
1357
1358         Web Inspector: Inspector Process crash when navigating to non-inspectable page
1359         https://bugs.webkit.org/show_bug.cgi?id=139508
1360
1361         Reviewed by Zalan Bujtas.
1362
1363         The Inspector Process can still receive InspectorFrontendHost messages
1364         even though the backend connection has been invalidated and cleared.
1365         Only send messages if the connection exists.
1366
1367         * WebProcess/WebPage/WebInspectorUI.cpp:
1368         (WebKit::WebInspectorUI::openInNewTab):
1369         (WebKit::WebInspectorUI::sendMessageToBackend):
1370
1371 2014-12-11  Yongjun Zhang  <yongjun_zhang@apple.com>
1372
1373         WebKit2 should expose FirstVisuallyNonEmptyLayout rendering milestone.
1374         https://bugs.webkit.org/show_bug.cgi?id=139514
1375
1376         Expose DidFirstVisuallyNonEmptyLayout so that WebKit2 client can listen to visually non-empty layout rendering event.
1377
1378         Reviewed by Dan Bernstein.
1379
1380         * Shared/API/Cocoa/WKRenderingProgressEvents.h: Add WKRenderingProgressEventFirstVisuallyNonEmptyLayout to WKRenderingProgressEvents.
1381         * Shared/API/Cocoa/WKRenderingProgressEventsInternal.h: Also map kWKDidFirstVisuallyNonEmptyLayout to WKRenderingProgressEventFirstVisuallyNonEmptyLayout.
1382         (renderingProgressEvents):
1383         * UIProcess/API/Cocoa/WKWebView.mm:
1384         (layoutMilestones): Map _WKRenderingProgressEventFirstVisuallyNonEmptyLayout to WebCore::DidFirstVisuallyNonEmptyLayout.
1385         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1386         * UIProcess/Cocoa/NavigationState.mm: Add _WKRenderingProgressEventFirstVisuallyNonEmptyLayout to _WKRenderingProgressEventFirstLayout.
1387         (WebKit::renderingProgressEvents): Map WebCore::DidFirstVisuallyNonEmptyLayout to _WKRenderingProgressEventFirstVisuallyNonEmptyLayout.
1388
1389 2014-12-11  Michael Catanzaro  <mcatanzaro@igalia.com>
1390
1391         [GTK] Disable backspace key navigation
1392         https://bugs.webkit.org/show_bug.cgi?id=136231
1393
1394         Reviewed by Carlos Garcia Campos.
1395
1396         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
1397         (WebKit::WebPage::performDefaultBehaviorForKeyEvent): remove handling
1398         for backspace and <shift>backspace key combinations.
1399
1400 2014-12-11  Michael Catanzaro  <mcatanzaro@igalia.com>
1401
1402         [GTK] String changes for the HTTP authentication dialog
1403         https://bugs.webkit.org/show_bug.cgi?id=136782
1404
1405         Reviewed by Carlos Garcia Campos.
1406
1407         * UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:
1408         (webkitAuthenticationDialogInitialize): Add a title to the dialog, add
1409         some missing mnemonics, and tweak a few strings.
1410
1411 2014-12-09  Jeremy Jones  <jeremyj@apple.com>
1412
1413         Restore interface state when stopping optimized fullscreen.
1414         https://bugs.webkit.org/show_bug.cgi?id=139465
1415
1416         Reviewed by Simon Fraser.
1417
1418         Implement fullscreenMayReturnToInline() to request the client application show the corresponding tab.
1419
1420         * UIProcess/API/APIUIClient.h:
1421         (API::UIClient::fullscreenMayReturnToInline): added
1422         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: add declaration
1423         * UIProcess/Cocoa/UIDelegate.h: add declaration
1424         * UIProcess/Cocoa/UIDelegate.mm:
1425         (WebKit::UIDelegate::setDelegate): check for responds to selector
1426         (WebKit::UIDelegate::UIClient::fullscreenMayReturnToInline): added
1427         * UIProcess/WebPageProxy.cpp:
1428         (WebKit::WebPageProxy::fullscreenMayReturnToInline): added.
1429         * UIProcess/WebPageProxy.h: add declaration
1430         * UIProcess/ios/WebVideoFullscreenManagerProxy.h: add declaration
1431         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
1432         (WebKit::WebVideoFullscreenManagerProxy::fullscreenMayReturnToInline): show the tab.
1433
1434 2014-12-11  Alexey Proskuryakov  <ap@apple.com>
1435
1436         REGRESSION (Async Text Input): Text input method state is not reset when reloading a page
1437         https://bugs.webkit.org/show_bug.cgi?id=139504
1438         rdar://problem/19034674
1439
1440         Reviewed by Enrica Casucci.
1441
1442         WebKit2 used to look at EditorState changes and guess when to cancel a composition.
1443         This was quite unreliable, and needlessly complicated - WebCore knows when it decides
1444         to destroy a composition, so it now explicitly notifies the clients.
1445
1446         * UIProcess/API/mac/WKView.mm: (-[WKView _processDidExit]): Address crashing case too.
1447         * UIProcess/WebPageProxy.cpp:
1448         (WebKit::WebPageProxy::resetStateAfterProcessExited):
1449         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1450         (WebKit::WebEditorClient::discardedComposition):
1451         * WebProcess/WebCoreSupport/WebEditorClient.h:
1452         * WebProcess/WebPage/WebPage.cpp:
1453         (WebKit::WebPage::didChangeSelection):
1454         (WebKit::WebPage::discardedComposition):
1455         * WebProcess/WebPage/WebPage.h:
1456
1457 2014-12-10  Anders Carlsson  <andersca@apple.com>
1458
1459         Get rid of the storage strategy
1460         https://bugs.webkit.org/show_bug.cgi?id=139519
1461
1462         Reviewed by Antti Koivisto.
1463
1464         * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
1465         (WebKit::NetworkProcessPlatformStrategies::createStorageStrategy): Deleted.
1466         * NetworkProcess/NetworkProcessPlatformStrategies.h:
1467         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1468         (WebKit::WebPlatformStrategies::createStorageStrategy): Deleted.
1469         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1470
1471 2014-12-11  Carlos Garcia Campos  <cgarcia@igalia.com>
1472
1473         [GTK] WebKitNotification is defined twice
1474         https://bugs.webkit.org/show_bug.cgi?id=139538
1475
1476         Reviewed by Martin Robinson.
1477
1478         Remove the typedef from WebKitForwardDeclarations.h since it's
1479         already in WebKitNotification.h and include WebKitNotification.h
1480         in WebKitWebView.h.
1481
1482         * UIProcess/API/gtk/WebKitForwardDeclarations.h:
1483         * UIProcess/API/gtk/WebKitWebView.h:
1484
1485 2014-12-11  Carlos Garcia Campos  <cgarcia@igalia.com>
1486
1487         [GTK] Move click counter logic back to WebKitWebViewBase
1488         https://bugs.webkit.org/show_bug.cgi?id=137685
1489
1490         Reviewed by Martin Robinson.
1491
1492         It was moved to a shared class in platform to be used by both
1493         WebKit1 and WebKit2, but it's currently only used by WebKitWebViewBase.
1494
1495         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1496         (ClickCounter::reset):
1497         (ClickCounter::currentClickCountForGdkButtonEvent):
1498         (webkitWebViewBaseButtonPressEvent):
1499
1500 2014-12-11  Carlos Alberto Lopez Perez  <clopez@igalia.com>
1501
1502         [SOUP] [GTK] warning: unused parameter at NetworkProcessSoup.cpp after r177056.
1503         https://bugs.webkit.org/show_bug.cgi?id=139534
1504
1505         Reviewed by Martin Robinson.
1506
1507         * NetworkProcess/soup/NetworkProcessSoup.cpp:
1508         (WebKit::NetworkProcess::clearDiskCache): Comment the parameter names.
1509
1510 2014-12-11  Carlos Garcia Campos  <cgarcia@igalia.com>
1511
1512         [GTK] Timers might never be fired during animations
1513         https://bugs.webkit.org/show_bug.cgi?id=139062
1514
1515         Reviewed by Martin Robinson.
1516
1517         This can happen in old/slow machines where the time to render
1518         layers might take more than 0.016. Since the layer flush timer is
1519         using a higher priority than WebCore timers, when scheduling all
1520         (or several) layer flushes immediately, no other sources with
1521         lower priority are dispatched in the main loop. We could detect if
1522         we are scheduling layer flushes immediately for too long (100ms)
1523         and schedule the next flush after a delay to ensure other sources
1524         with lower priority have a chance to be dispatched. Also use a
1525         lower priority, GDK_PRIORITY_EVENTS is too high, so we use
1526         GDK_PRIORITY_REDRAW - 1 to ensure it's higher than WebCore timers.
1527
1528         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
1529         (WebKit::LayerTreeHostGtk::LayerTreeHostGtk): Rename
1530         m_lastFlushTime as m_lastImmediateFlushTime.
1531         (WebKit::LayerTreeHostGtk::layerFlushTimerFired): Save the
1532         fireTime before calling flushAndRenderLayers() and compute the
1533         next flush delay based on the elapsed time using monotonically
1534         increasing time instead of current time. Use the target delay
1535         as next flush delay if we have scheduled flushes immediately for
1536         more than 100ms.
1537         (WebKit::LayerTreeHostGtk::flushAndRenderLayers): Do not save the
1538         layer flush time here, it's done in layerFlushTimerFired() so that
1539         we don't need to keep it as a member.
1540         (WebKit::LayerTreeHostGtk::scheduleLayerFlush): Use global
1541         layerFlushTimerPriority.
1542         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
1543
1544 2014-12-10  Jaehun Lim  <ljaehun.lim@samsung.com>
1545
1546         [CMake] Fix build after WebStorageNamespaceProvider
1547
1548         Unreviewed, fix build.
1549
1550         * CMakeLists.txt: Add WebStorageNamespaceProvider.cpp to the source list.
1551
1552 2014-12-10  Sanghyup Lee  <sh53.lee@samsung.com>
1553
1554         Build fix for EFL and GTK ports since r177104
1555         https://bugs.webkit.org/show_bug.cgi?id=139513
1556
1557         Reviewed by Tim Horton.
1558
1559         Moved WebPageProxy::installViewStateChangeCompletionHandler in PLATFORM(MAC) macro.
1560
1561         * UIProcess/WebPageProxy.cpp:
1562         * UIProcess/WebPageProxy.h:
1563
1564 2014-12-10  Anders Carlsson  <andersca@apple.com>
1565
1566         Switch WebKit2 over to using the storage namespace provider
1567         https://bugs.webkit.org/show_bug.cgi?id=139509
1568
1569         Reviewed by Tim Horton.
1570
1571         * WebProcess/Storage/StorageNamespaceImpl.cpp:
1572         (WebKit::StorageNamespaceImpl::createLocalStorageNamespace):
1573         (WebKit::StorageNamespaceImpl::~StorageNamespaceImpl):
1574         (WebKit::localStorageNamespaceMap): Deleted.
1575         Get rid of the storage namespace map - we have a map inside WebStorageNamespaceProvider now.
1576
1577         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1578         (WebKit::WebPlatformStrategies::createStorageStrategy):
1579         (WebKit::WebPlatformStrategies::populatePluginCache): Deleted.
1580         (WebKit::WebPlatformStrategies::localStorageNamespace): Deleted.
1581         (WebKit::WebPlatformStrategies::transientLocalStorageNamespace): Deleted.
1582         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1583         Get rid of the storage strategy.
1584
1585         * WebProcess/WebPage/WebPage.cpp:
1586         (WebKit::WebPage::WebPage):
1587         Set a storage namespace provider.
1588
1589 2014-12-10  Beth Dakin  <bdakin@apple.com>
1590
1591          Follow-up build fix.
1592
1593         * UIProcess/API/mac/WKView.mm:
1594         (-[WKView initWithFrame:context:configuration:webView:]):
1595
1596 2014-12-09  Jon Honeycutt  <jhoneycutt@apple.com>
1597
1598         Null dereference performing a "TapAndAHalf" gesture in Google search field
1599
1600         <https://bugs.webkit.org/show_bug.cgi?id=139506>
1601         <rdar://problem/19028828>
1602
1603         Reviewed by Darin Adler.
1604
1605         * WebProcess/WebPage/ios/WebPageIOS.mm:
1606         (WebKit::WebPage::selectWithGesture):
1607         Add a null check in the case that there is no word range for the
1608         current position.
1609
1610 2014-12-10  Beth Dakin  <bdakin@apple.com>
1611
1612         Speculative build fix.
1613
1614         * UIProcess/API/mac/WKView.mm:
1615         (-[WKView initWithFrame:context:configuration:webView:]):
1616
1617 2014-12-10  Beth Dakin  <bdakin@apple.com>
1618
1619         WK2: Add initial support for immediate actions
1620         https://bugs.webkit.org/show_bug.cgi?id=139511
1621
1622         Reviewed by Tim Horton.
1623
1624         New enum to track immediate action types as we add them.
1625         * Shared/API/c/WKImmediateActionTypes.h: Added.
1626
1627         Create an NSImmediateActionGestureRecognizer if possible and a controller.
1628         * UIProcess/API/mac/WKView.mm:
1629         (-[WKView dealloc]):
1630         (-[WKView initWithFrame:context:configuration:webView:]):
1631         (-[WKView _didPerformActionMenuHitTest:userData:]):
1632
1633         This basic implementation of the controller will use the delegate methods to 
1634         perform an ActionMenuHitTest when relevant. Future patches will patch 
1635         _updateImmediateActionItem to use the hit test result to determine if there is any 
1636         immediate action that should be taken.
1637         * UIProcess/mac/WKImmediateActionController.h: Added.
1638         * UIProcess/mac/WKImmediateActionController.mm: Added.
1639         (-[WKImmediateActionController willDestroyView:]):
1640         (-[WKImmediateActionController _clearImmediateActionState]):
1641         (-[WKImmediateActionController didPerformActionMenuHitTest:userData:]):
1642
1643         Does much of the work done in Action Menu’s prepareForMenu.
1644         (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
1645
1646         Does much of the work done in Action Menu’s menuNeedsUpdate.
1647         (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
1648
1649         Does much of the work done in Action Menu’s didCloseMenu.
1650         (-[WKImmediateActionController immediateActionRecognizerDidCancelAnimation:]):
1651
1652         Does much of the work done in Action Menu’s willOpenMenu.
1653         (-[WKImmediateActionController immediateActionRecognizerDidCompleteAnimation:]):
1654
1655         To be filled in.
1656         (-[WKImmediateActionController _updateImmediateActionItem]):
1657         * WebKit2.xcodeproj/project.pbxproj:
1658
1659 2014-12-10  Timothy Horton  <timothy_horton@apple.com>
1660
1661         Should have copy and paste items in all text menus
1662         https://bugs.webkit.org/show_bug.cgi?id=139510
1663         <rdar://problem/19198388>
1664
1665         Reviewed by Beth Dakin.
1666
1667         * UIProcess/mac/WKActionMenuController.mm:
1668         (-[WKActionMenuController _defaultMenuItemsForText]):
1669         Add a disabled paste menu item into the read-only text menu.
1670
1671         (-[WKActionMenuController _defaultMenuItemsForWhitespaceInEditableArea]):
1672         Add a disabled copy menu item into the editable whitespace text menu.
1673
1674 2014-12-10  Martin Hock  <mhock@apple.com>
1675
1676         [iOS] Add setting to ignore viewport scaling constraints
1677         https://bugs.webkit.org/show_bug.cgi?id=139466
1678         <rdar://problem/19200328>
1679
1680         Reviewed by Benjamin Poulain.
1681
1682         * Shared/WebPreferencesDefinitions.h: Add ignoreViewportScalingConstraints preference.
1683         * UIProcess/API/C/WKPreferences.cpp:
1684         (WKPreferencesSetIgnoreViewportScalingConstraints):
1685         (WKPreferencesGetIgnoreViewportScalingConstraints):
1686         * UIProcess/API/C/WKPreferencesRef.h:
1687         * WebProcess/WebPage/WebPage.cpp:
1688         (WebKit::WebPage::updatePreferences):
1689
1690 2014-12-10  Timothy Horton  <timothy_horton@apple.com>
1691
1692         Fix the build.
1693
1694         * UIProcess/API/mac/WKView.mm:
1695         (-[WKView _targetWindowForMovePreparation]):
1696
1697 2014-12-10  Timothy Horton  <timothy_horton@apple.com>
1698
1699         Provide SPI to asynchronously move a WKView into a window and know when it has painted
1700         https://bugs.webkit.org/show_bug.cgi?id=139460
1701         <rdar://problem/19135389>
1702
1703         Reviewed by Anders Carlsson.
1704
1705         * UIProcess/API/Cocoa/WKViewPrivate.h:
1706         Add _prepareForMoveToWindow:withCompletionHandler:, which internally
1707         goes through the motions of being parented in that window and calls
1708         the completion handler once painting is done and the view is ready
1709         to be displayed (upon which we expect the view to actually move into the window).
1710
1711         * UIProcess/API/mac/WKView.mm:
1712         (-[WKView viewWillMoveToWindow:]):
1713         If we currently have a _targetWindowForMovePreparation (and are
1714         pretending to be in that window), avoid performing viewWillMoveToWindow:
1715         for a different window.
1716
1717         (-[WKView viewDidMoveToWindow]):
1718         (-[WKView doWindowDidChangeScreen]):
1719         (-[WKView _intrinsicDeviceScaleFactor]):
1720         (-[WKView _colorSpace]):
1721         (-[WKView _targetWindowForMovePreparation]):
1722         If we have a _targetWindowForMovePreparation, use its properties instead
1723         of self.window's.
1724
1725         (-[WKView _prepareForMoveToWindow:withCompletionHandler:]):
1726         Simulate a move into the target window, but defer sending the view state update.
1727         Then, send the view state update after registering the completion handler.
1728
1729         * UIProcess/API/mac/WKViewInternal.h:
1730         * UIProcess/WebPageProxy.cpp:
1731         (WebKit::WebPageProxy::WebPageProxy):
1732         Rename m_viewStateChangeWantsReply to m_viewStateChangeWantsSynchronousReply.
1733
1734         (WebKit::WebPageProxy::installViewStateChangeCompletionHandler):
1735         Added. Allow installing a block that will be called the next time
1736         we get a didUpdateViewState back from the WebProcess after pushing the
1737         current view state changes.
1738
1739         (WebKit::WebPageProxy::viewStateDidChange):
1740         Adapt to the aforementioned rename.
1741
1742         (WebKit::WebPageProxy::dispatchViewStateChange):
1743         Adapt to the aforementioned rename.
1744         Send the view state change callback IDs along with SetViewState.
1745
1746         (WebKit::WebPageProxy::updateViewState):
1747         Adapt to the aforementioned rename.
1748
1749         * UIProcess/WebPageProxy.h:
1750         * UIProcess/mac/PageClientImpl.h:
1751         * UIProcess/mac/PageClientImpl.mm:
1752         (WebKit::PageClientImpl::activeWindow):
1753         (WebKit::PageClientImpl::isViewWindowActive):
1754         (WebKit::PageClientImpl::isViewVisible):
1755         (WebKit::PageClientImpl::isViewVisibleOrOccluded):
1756         (WebKit::PageClientImpl::isViewInWindow):
1757         (WebKit::PageClientImpl::viewLayerHostingMode):
1758         If we have a _targetWindowForMovePreparation, use its properties instead
1759         of the WKView's window's.
1760
1761         * WebProcess/WebPage/DrawingArea.h:
1762         (WebKit::DrawingArea::viewStateDidChange):
1763         * WebProcess/WebPage/WebPage.cpp:
1764         (WebKit::WebPage::reinitializeWebPage):
1765         (WebKit::WebPage::setViewState):
1766         * WebProcess/WebPage/WebPage.h:
1767         * WebProcess/WebPage/WebPage.messages.in:
1768         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1769         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1770         (WebKit::RemoteLayerTreeDrawingArea::viewStateDidChange):
1771         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1772         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1773         (WebKit::TiledCoreAnimationDrawingArea::viewStateDidChange):
1774         Push the callback IDs to the WebProcess, and accumulate them in TiledCoreAnimationDrawingArea.
1775
1776         (WebKit::TiledCoreAnimationDrawingArea::didUpdateViewStateTimerFired):
1777         Call all of the callbacks after one runloop cycle, just like DidUpdateViewState.
1778
1779 2014-12-10  Anders Carlsson  <andersca@apple.com>
1780
1781         Add session storage handling to StorageNamespaceProvider
1782         https://bugs.webkit.org/show_bug.cgi?id=139507
1783
1784         Reviewed by Tim Horton.
1785
1786         * WebProcess/Storage/StorageNamespaceImpl.cpp:
1787         (WebKit::StorageNamespaceImpl::createSessionStorageNamespace):
1788         * WebProcess/Storage/StorageNamespaceImpl.h:
1789         * WebProcess/Storage/WebStorageNamespaceProvider.cpp:
1790         (WebKit::WebStorageNamespaceProvider::createSessionStorageNamespace):
1791         * WebProcess/Storage/WebStorageNamespaceProvider.h:
1792
1793 2014-12-10  Anders Carlsson  <andersca@apple.com>
1794
1795         Implement the rest of the transient local storage namespace code
1796         https://bugs.webkit.org/show_bug.cgi?id=139505
1797
1798         Reviewed by Tim Horton.
1799
1800         * UIProcess/Storage/StorageManager.cpp:
1801         (WebKit::StorageManager::TransientLocalStorageNamespace::create):
1802         (WebKit::StorageManager::TransientLocalStorageNamespace::~TransientLocalStorageNamespace):
1803         (WebKit::StorageManager::TransientLocalStorageNamespace::getOrCreateStorageArea):
1804         (WebKit::StorageManager::TransientLocalStorageNamespace::clearStorageAreasMatchingOrigin):
1805         (WebKit::StorageManager::TransientLocalStorageNamespace::clearAllStorageAreas):
1806         (WebKit::StorageManager::TransientLocalStorageNamespace::TransientLocalStorageNamespace):
1807         Introduce a new TransientLocalStorageNamespace that's just a glorified SecurityOrigin -> StorageArea HashMap.
1808
1809         (WebKit::StorageManager::StorageArea::create):
1810         Change the return type to RefPtr.
1811
1812         (WebKit::StorageManager::deleteEntriesForOrigin):
1813         (WebKit::StorageManager::deleteAllEntries):
1814         (WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
1815         Use lambdas instead of bind. Delete the transient local storage as well.
1816
1817         (WebKit::StorageManager::createTransientLocalStorageMap):
1818         Get a transient local storage namespace and ask it for a storage area.
1819
1820         (WebKit::StorageManager::getOrCreateTransientLocalStorageNamespace):
1821         Look up the namespace from the map and create one if it doesn't exist.
1822
1823         (WebKit::StorageManager::deleteEntriesForOriginInternal): Deleted.
1824         (WebKit::StorageManager::deleteAllEntriesInternal): Deleted.
1825
1826         * UIProcess/Storage/StorageManager.h:
1827
1828 2014-12-10  Anders Carlsson  <andersca@apple.com>
1829
1830         Begin fixing transient local storage handling
1831         https://bugs.webkit.org/show_bug.cgi?id=139503
1832
1833         Reviewed by Sam Weinig.
1834
1835         * UIProcess/Storage/StorageManager.cpp:
1836         (WebKit::StorageManager::createTransientLocalStorageMap):
1837         * UIProcess/Storage/StorageManager.h:
1838         Add empty stub implementation of createTransientLocalStorageMap.
1839
1840         * UIProcess/Storage/StorageManager.messages.in:
1841         Add CreateTransientLocalStorageMap message.
1842
1843         * WebProcess/Storage/StorageAreaMap.cpp:
1844         (WebKit::StorageAreaMap::StorageAreaMap):
1845         If we have a local storage namespace with a non-null top-level origin, create a 
1846         transient local storage map.
1847
1848         * WebProcess/Storage/StorageNamespaceImpl.cpp:
1849         (WebKit::StorageNamespaceImpl::createLocalStorageNamespace):
1850         Pass a null top-level origin to the StorageNamespaceImpl constructor.
1851
1852         (WebKit::StorageNamespaceImpl::createTransientLocalStorageNamespace):
1853         Create a new StorageNamespaceImpl, passing the top-level origin to the constructor.
1854
1855         (WebKit::StorageNamespaceImpl::createSessionStorageNamespace):
1856         Pass a null top-level origin to the StorageNamespaceImpl constructor.
1857
1858         (WebKit::StorageNamespaceImpl::StorageNamespaceImpl):
1859         Add a top-level origin parameter.
1860
1861         * WebProcess/Storage/StorageNamespaceImpl.h:
1862         (WebKit::StorageNamespaceImpl::topLevelOrigin):
1863         Add top-level origin member and getter.
1864
1865         * WebProcess/Storage/WebStorageNamespaceProvider.cpp:
1866         (WebKit::WebStorageNamespaceProvider::createTransientLocalStorageNamespace):
1867         Call StorageNamespaceImpl::createTransientLocalStorageNamespace.
1868
1869 2014-12-10  Anders Carlsson  <andersca@apple.com>
1870
1871         Implement WebStorageNamespaceProvider::createLocalStorageNamespace
1872         https://bugs.webkit.org/show_bug.cgi?id=139498
1873
1874         Reviewed by Beth Dakin.
1875
1876         * WebProcess/Storage/StorageNamespaceImpl.cpp:
1877         (WebKit::StorageNamespaceImpl::createLocalStorageNamespace):
1878         Add a new overload that takes an identifier + quota. Have the old overload call the new one.
1879
1880         * WebProcess/Storage/StorageNamespaceImpl.h:
1881         Add new member.
1882
1883         * WebProcess/Storage/WebStorageNamespaceProvider.cpp:
1884         (WebKit::WebStorageNamespaceProvider::createLocalStorageNamespace):
1885         Call StorageNamespaceImpl::createLocalStorageNamespace.
1886
1887 2014-12-10  Anders Carlsson  <andersca@apple.com>
1888
1889         Add a stubbed out WebStorageNamespaceProvider class to WebKit2
1890         https://bugs.webkit.org/show_bug.cgi?id=139497
1891
1892         Reviewed by Beth Dakin.
1893
1894         * WebKit2.xcodeproj/project.pbxproj:
1895         * WebProcess/Storage/WebStorageNamespaceProvider.cpp: Added.
1896         (WebKit::storageNamespaceProviders):
1897         (WebKit::WebStorageNamespaceProvider::getOrCreate):
1898         (WebKit::WebStorageNamespaceProvider::WebStorageNamespaceProvider):
1899         (WebKit::WebStorageNamespaceProvider::~WebStorageNamespaceProvider):
1900         (WebKit::WebStorageNamespaceProvider::createLocalStorageNamespace):
1901         (WebKit::WebStorageNamespaceProvider::createTransientLocalStorageNamespace):
1902         * WebProcess/Storage/WebStorageNamespaceProvider.h: Added.
1903
1904 2014-12-10  Enrica Casucci  <enrica@apple.com>
1905
1906         Fix iOS builders for 8.0
1907         https://bugs.webkit.org/show_bug.cgi?id=139495
1908
1909         Reviewed by Eric Carlson.
1910
1911         * UIProcess/API/Cocoa/WKWebView.mm:
1912         (-[WKWebView _mayAutomaticallyShowVideoOptimized]):
1913         * UIProcess/WebPageProxy.cpp:
1914         (WebKit::WebPageProxy::WebPageProxy):
1915         (WebKit::WebPageProxy::reattachToWebProcess):
1916         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
1917
1918 2014-12-10  Julien Isorce  <j.isorce@samsung.com>
1919
1920         [GTK] Enable depth 32 for the RedirectedXCompositeWindow
1921         https://bugs.webkit.org/show_bug.cgi?id=139028
1922
1923         On gtk/X11, the layout compositing is done in the web process.
1924         If one needs to handle alpha with the rest of the application
1925         then it is not enough to make to browser's window as RGBA.
1926         The shared redirected window needs to be RGBA as well.
1927         (The shared X composite window between UIProcess and WebProcess).
1928
1929         This allows an end-to-end RGBA solution when the application
1930         wants to interact with the alpha channel at compositing time.
1931         For example for transparent Web UI.
1932
1933         Reviewed by Martin Robinson.
1934
1935         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1936         (webkitWebViewBaseRealize):
1937         (webkitWebViewBaseConstructed):
1938         (webkitWebViewRenderAcceleratedCompositingResults):
1939         (webkitWebViewBaseUpdatePreferences):
1940         (webkitWebViewBaseCreateWebPage):
1941         * UIProcess/gtk/RedirectedXCompositeWindow.cpp:
1942         (WebKit::RedirectedXCompositeWindow::create):
1943         (WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
1944         * UIProcess/gtk/RedirectedXCompositeWindow.h:
1945
1946 2014-12-09  Claudio Saavedra  <csaavedra@igalia.com> and Gustavo Noronha Silva  <gustavo.noronha@collabora.com>
1947
1948         [GTK][WK2] Add HTML5 Notifications support
1949         https://bugs.webkit.org/show_bug.cgi?id=61140
1950
1951         Reviewed by Carlos Garcia Campos.
1952
1953         * PlatformGTK.cmake: add new files to the build.
1954         * UIProcess/API/gtk/WebKitForwardDeclarations.h:
1955         * UIProcess/API/gtk/WebKitNotification.cpp: Added. New GObject used to expose information about
1956         the notification to the API.
1957         (webkitNotificationGetProperty):
1958         (webkit_notification_class_init):
1959         (webkitNotificationCreate):
1960         (webkit_notification_get_id):
1961         (webkit_notification_get_title):
1962         (webkit_notification_get_body):
1963         * UIProcess/API/gtk/WebKitNotification.h: Added.
1964         * UIProcess/API/gtk/WebKitNotificationPermissionRequest.cpp: Added. Permission request object
1965         for notifications.
1966         (webkitNotificationPermissionRequestAllow):
1967         (webkitNotificationPermissionRequestDeny):
1968         (webkit_permission_request_interface_init):
1969         (webkitNotificationPermissionRequestDispose):
1970         (webkit_notification_permission_request_class_init):
1971         (webkitNotificationPermissionRequestCreate):
1972         * UIProcess/API/gtk/WebKitNotificationPermissionRequest.h: Added.
1973         * UIProcess/API/gtk/WebKitNotificationPermissionRequestPrivate.h: Added.
1974         * UIProcess/API/gtk/WebKitNotificationPrivate.h: Added.
1975         * UIProcess/API/gtk/WebKitNotificationProvider.cpp: Added. Notification provider that emits signals.
1976         The C API allows overriding the notification providers and managers for customizing the handling of
1977         notifications. We decided to go for a single manager and a single provider which provide more idiomatic
1978         GObject API - signals.
1979         (toNotificationProvider):
1980         (showCallback):
1981         (cancelCallback):
1982         (WebKitNotificationProvider::~WebKitNotificationProvider):
1983         (WebKitNotificationProvider::create):
1984         (WebKitNotificationProvider::WebKitNotificationProvider):
1985         (WebKitNotificationProvider::show):
1986         (WebKitNotificationProvider::cancel):
1987         * UIProcess/API/gtk/WebKitNotificationProvider.h: Added.
1988         * UIProcess/API/gtk/WebKitUIClient.cpp: implemented decidePolicyForNotificationPermissionRequest.
1989         * UIProcess/API/gtk/WebKitWebContext.cpp:
1990         (webkitWebContextConstructed): initialize the notification provider.
1991         * UIProcess/API/gtk/WebKitWebView.cpp:
1992         (webkitWebViewShowNotification): default implementation for showing the notification, currently
1993         using GNotification, about to be ported to libnotify.
1994         (webkit_web_view_class_init): set the default implementation for the show-notification signal.
1995         (webkitWebViewEmitCloseNotification): emit the close-notification signal.
1996         (webkitWebViewEmitShowNotification): emit the show-notification signal.
1997         * UIProcess/API/gtk/WebKitWebView.h:
1998         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
1999         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: list new objects and methods.
2000         * UIProcess/API/gtk/webkit2.h: include new headers.
2001
2002 2014-12-10  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
2003
2004         [EFL][[WK2] test_ewk2_text_checker is failed
2005         https://bugs.webkit.org/show_bug.cgi?id=132982
2006
2007         Reviewed by Gyuyoung Kim.
2008
2009         Insert misspelled word to the input field using execCommand instead of
2010         input.value attribute change which stops spell check, tracked by
2011         https://bugs.webkit.org/show_bug.cgi?id=139473.
2012
2013         Since text checker API tests do not verify spellchecker itself (it's being
2014         tested by LayoutTests/editing/spelling) but rather opportunity for overriding
2015         its functionality this patch unskips those tests in order to API coverage.
2016
2017         * PlatformEfl.cmake:
2018         Unskip test_ewk2_text_checker
2019
2020         * UIProcess/API/efl/tests/resources/spelling_test.html:
2021         Use document.execCommand("InsertText", false, "aa ") instead of
2022         input.value = "aa " to trigger spellchecker.
2023
2024 2014-12-10  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2025
2026         REGRESSION(r177038): [SOUP] [GTK] Debug build broken
2027         https://bugs.webkit.org/show_bug.cgi?id=139475
2028
2029         Reviewed by Martin Robinson.
2030
2031         * NetworkProcess/soup/NetworkProcessSoup.cpp:
2032         (WebKit::NetworkProcess::clearCacheForAllOrigins): Call clearDiskCache().
2033         (WebKit::NetworkProcess::clearDiskCache): Implement this for SOUP.
2034         SoupCache don't seems to have API for clearing a part of the cache,
2035         so add a FIXME note regarding that.
2036
2037 2014-12-09  Csaba Osztrogonác  <ossy@webkit.org>
2038
2039         URTBF after r177032.
2040
2041         * CMakeLists.txt:
2042
2043 2014-12-09  Alexey Proskuryakov  <ap@apple.com>
2044
2045         Kotoeri sometimes doesn't correctly process the first chanaracter in a text field in Safari 7.1 or 6.2
2046         https://bugs.webkit.org/show_bug.cgi?id=139459
2047         rdar://problem/19017432
2048         rdar://problem/19036869
2049
2050         Reviewed by Enrica Casucci.
2051
2052         When inputContext changes, notify the application. We already did this when the context
2053         changed due to plug-ins, and this used to sort of make it work on on yahoo.co.jp,
2054         which has plug-ins. But that was quite unreliable, as evidenced by the reproducible
2055         cases where we didn't use an input method for the first keypress.
2056
2057         * UIProcess/PageClient.h:
2058         * UIProcess/WebPageProxy.cpp:
2059         (WebKit::WebPageProxy::editorStateChanged):
2060         * UIProcess/mac/PageClientImpl.h:
2061         * UIProcess/mac/PageClientImpl.mm:
2062         (WebKit::PageClientImpl::notifyApplicationAboutInputContextChange):
2063
2064 2014-12-09  Jeremy Jones  <jeremyj@apple.com>
2065
2066         Enable automatic optimized fullscreen mode.
2067         https://bugs.webkit.org/show_bug.cgi?id=139437
2068
2069         Reviewed by Simon Fraser.
2070
2071         Anticipate the automatic transition to optimized video fullscreen mode when deciding if the page is visible.
2072
2073         * UIProcess/API/Cocoa/WKWebView.mm:
2074         (-[WKWebView _isShowingVideoOptimized]): Renamed. Test precondition.
2075         (-[WKWebView _mayAutomaticallyShowVideoOptimized]): Added.
2076         (-[WKWebView _isPlayingFullscreenOptimizedVideo]): Deleted.
2077         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2078         * UIProcess/ios/PageClientImplIOS.mm:
2079         (WebKit::PageClientImpl::isViewVisible): Test for optimized modes even when not in a window.
2080
2081 2014-12-09  Anders Carlsson  <andersca@apple.com>
2082
2083         Add support for clearing the disk cache
2084         https://bugs.webkit.org/show_bug.cgi?id=139458
2085
2086         Reviewed by Antti Koivisto.
2087
2088         * NetworkProcess/NetworkProcess.cpp:
2089         (WebKit::NetworkProcess::deleteWebsiteData):
2090         If we're asked to clear the disk cache, do so. Clearing the cache is asynchronous,
2091         so we make sure not to call the completion handler right away in that case.
2092
2093         * NetworkProcess/NetworkProcess.h:
2094         Add clearDiskCache member function.
2095
2096         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2097         (WebKit::NetworkProcess::clearDiskCache):
2098         Clear the disk cache, then call the completion handler.
2099
2100         * NetworkProcess/mac/NetworkProcessMac.mm:
2101         (WebKit::NetworkProcess::clearCacheForAllOrigins):
2102         Call the new clearDiskCache function.
2103
2104         * Shared/WebsiteData/WebsiteDataTypes.h:
2105         Add WebsiteDataTypeDiskCache.
2106
2107         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
2108         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
2109         (toWebsiteDataTypes):
2110         Handle WKWebsiteDataTypeDiskCache.
2111
2112 2014-12-09  Myles C. Maxfield  <mmaxfield@apple.com>
2113
2114         Delete Node::boundingBox()
2115         https://bugs.webkit.org/show_bug.cgi?id=139333
2116
2117         Reviewed by Zalan Bujtas.
2118
2119         * Shared/WebHitTestResult.cpp:
2120         (WebKit::WebHitTestResult::Data::elementBoundingBoxInWindowCoordinates):
2121         Use RenderObject::absoluteBoundingBoxRect().
2122         * WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp:
2123         (WebKit::WebPage::findZoomableAreaForPoint): Use
2124         RenderObject::absoluteBoundingBoxRect().
2125
2126 2014-12-09  Chris Dumez  <cdumez@apple.com>
2127
2128         [WK2] Crash when answering notification permission request after navigating
2129         https://bugs.webkit.org/show_bug.cgi?id=139429
2130         <rdar://problem/18921122>
2131
2132         Reviewed by Andreas Kling.
2133
2134         When requesting a notification permission, navigating away and then
2135         answering the permission, WebKit2 would crash. This is because upon
2136         navigating, the request is cancelled and removed from the HashMaps
2137         in NotificationPermissionRequestManager. When
2138         didReceiveNotificationPermissionDecision() is later called, it would
2139         look for the request identifier in m_idToOriginMap HashMap. As the
2140         request was cancelled, HashMap::take() call would return null for
2141         the SecurityOrigin*. This security origin pointer is then removed
2142         from m_originToIDMap, but the code was failing to do a null check
2143         first. Calling HashMap::remove(nullptr) would then crash.
2144
2145         This patch adds the missing null check and a layout test to cover
2146         this case.
2147
2148         Test: http/tests/notifications/legacy/notification-request-permission-then-navigate.html
2149         
2150
2151         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
2152         (WebKit::NotificationPermissionRequestManager::didReceiveNotificationPermissionDecision):
2153
2154 2014-12-09  Anders Carlsson  <andersca@apple.com>
2155
2156         Implement clearing of cookies
2157         https://bugs.webkit.org/show_bug.cgi?id=139455
2158
2159         Reviewed by Andreas Kling.
2160
2161         * NetworkProcess/NetworkProcess.cpp:
2162         (WebKit::NetworkProcess::deleteWebsiteData):
2163         Handle deleting cookies by finding the right network storage session and deleting the cookies from it.
2164         Then, send a DidDeleteWebsiteData message back.
2165
2166         * NetworkProcess/NetworkProcess.h:
2167         Add new members.
2168
2169         * NetworkProcess/NetworkProcess.messages.in:
2170         Add new DeleteWebsiteData message.
2171
2172         * Shared/WebsiteData/WebsiteDataTypes.h:
2173         Move the website data types enum to its own file so it can be shared.
2174
2175         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
2176         (toWebsiteDataTypes):
2177         Update now that WebsiteDataTypes is its own enum.
2178
2179         (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
2180         removeDataModifiedSince was renamed to removeData.
2181
2182         * UIProcess/Network/NetworkProcessProxy.cpp:
2183         (WebKit::generateCallbackID):
2184         Helper function to create a callback ID.
2185
2186         (WebKit::NetworkProcessProxy::~NetworkProcessProxy):
2187         Assert that we have no pending callbacks.
2188
2189         (WebKit::NetworkProcessProxy::deleteWebsiteData):
2190         Put the completion handler in our map and message the network process.
2191
2192         (WebKit::NetworkProcessProxy::networkProcessCrashedOrFailedToLaunch):
2193         Call all completion handlers.
2194
2195         (WebKit::NetworkProcessProxy::didDeleteWebsiteData):
2196         Grab the completion handler and call it.
2197
2198         * UIProcess/Network/NetworkProcessProxy.h:
2199         Add new members.
2200
2201         * UIProcess/Network/NetworkProcessProxy.messages.in:
2202         Add DidDeleteWebsiteData callback.
2203
2204         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2205         (WebKit::computeNetworkProcessAccessType):
2206         Helper function that computes the type of process access we'd need for the given mask of
2207         website data types.
2208
2209         (WebKit::WebsiteDataStore::removeData):
2210         Gather all the network processes and message them. Use a callback aggregator object to track callbacks
2211         so we'll call the completion handler once all callbacks have been invoked.
2212
2213         * UIProcess/WebsiteData/WebsiteDataStore.h:
2214         Move WebsiteDataTypes to its own file.
2215
2216         * WebKit2.xcodeproj/project.pbxproj:
2217         Add new files.
2218
2219 2014-12-09  Anders Carlsson  <andersca@apple.com>
2220
2221         Give WebsiteDataStore a unique ID
2222         https://bugs.webkit.org/show_bug.cgi?id=139448
2223
2224         Reviewed by Andreas Kling.
2225
2226         * Shared/WebPageCreationParameters.cpp:
2227         (WebKit::WebPageCreationParameters::encode):
2228         (WebKit::WebPageCreationParameters::decode):
2229         * Shared/WebPageCreationParameters.h:
2230         * UIProcess/WebPageProxy.cpp:
2231         (WebKit::WebPageProxy::creationParameters):
2232         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2233         (WebKit::generateIdentifier):
2234         (WebKit::WebsiteDataStore::WebsiteDataStore):
2235         * UIProcess/WebsiteData/WebsiteDataStore.h:
2236         (WebKit::WebsiteDataStore::identifier):
2237
2238 2014-12-09  Anders Carlsson  <andersca@apple.com>
2239
2240         Build fix.
2241
2242         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
2243
2244 2014-12-09  Ting-Wei Lan  <lantw44@gmail.com>
2245
2246         [GTK] LDFLAGS is ignored when running g-ir-scanner
2247         https://bugs.webkit.org/show_bug.cgi?id=138832
2248
2249         Reviewed by Carlos Garcia Campos.
2250
2251         GTK+ requires libintl on FreeBSD because there is no gettext
2252         implementation in FreeBSD libc. In order to link to libintl, which is
2253         not located in the default search path of the linker, we need to add
2254         the required path via the linker command line. However, LDFLAGS is
2255         ignored when running g-ir-scanner starting from r167873, so we have
2256         to manually pick required flags from CMAKE_SHARED_LINKER_FLAGS and
2257         put them in correct order to prevent g-ir-scanner from linking to
2258         the installed version of libraries.
2259
2260         * PlatformGTK.cmake:
2261
2262 2014-12-09  Jeremy Jones  <jeremyj@apple.com>
2263
2264         Enable activating optimized fullscreen mode from standard fulscreen mode.
2265         https://bugs.webkit.org/show_bug.cgi?id=139137
2266
2267         Reviewed by Simon Fraser.
2268
2269         Going from standard fullscreen mode to optimized fullscreen mode requires the ability to
2270         update the fullscreen mode and a new standard-and-optimized-fullscreen mode.
2271
2272         * UIProcess/API/Cocoa/WKWebView.mm:
2273         (-[WKWebView _isPlayingFullscreenOptimizedVideo]): 
2274         Treat new standard-and-optimized as a kind of optimized.
2275         * UIProcess/ios/WebVideoFullscreenManagerProxy.h: IPC fullscreen mode changes
2276         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm: ditto
2277         (WebKit::WebVideoFullscreenManagerProxy::fullscreenModeChanged): dito
2278         * WebProcess/ios/WebVideoFullscreenManager.h: ditto
2279         * WebProcess/ios/WebVideoFullscreenManager.messages.in: ditto
2280         * WebProcess/ios/WebVideoFullscreenManager.mm: dito
2281         (WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager): ditto
2282         (WebKit::WebVideoFullscreenManager::setFullscreenModeChanged): ditto
2283
2284 2014-12-08  Jaehun Lim  <ljaehun.lim@samsung.com>
2285
2286         [EFL] Use DependenciesEFL instead of Dependencies
2287
2288         Unreviewed, fix simple typo.
2289
2290         * PlatformEfl.cmake:
2291
2292 2014-12-08  Beth Dakin  <bdakin@apple.com>
2293
2294         Copy and Lookup menu items should be disabled when something is not copyable
2295         https://bugs.webkit.org/show_bug.cgi?id=139423
2296
2297         Reviewed by Tim Horton.
2298
2299         Add allowsCopy to the WebHitTestResult.
2300         * Shared/WebHitTestResult.cpp:
2301         (WebKit::WebHitTestResult::Data::Data):
2302         (WebKit::WebHitTestResult::Data::encode):
2303         (WebKit::WebHitTestResult::Data::decode):
2304         * Shared/WebHitTestResult.h:
2305         (WebKit::WebHitTestResult::allowsCopy):
2306
2307         Set autoenablesItems to NO. It’s messing with our ability to control the enable/
2308         disable state otherwise.
2309         * UIProcess/API/mac/WKView.mm:
2310         (-[WKView initWithFrame:context:configuration:webView:]):
2311
2312         Disable both lookup and copy when a WebHitTestResult does not allow copy.
2313         * UIProcess/mac/WKActionMenuController.mm:
2314
2315 2014-12-08  Dan Bernstein  <mitz@apple.com>
2316
2317         <rdar://problem/18905383> [iOS] Crash due to null m_webPageProxyForBackForwardListForCurrentSwipe in ViewGestureController::endSwipeGesture
2318         https://bugs.webkit.org/show_bug.cgi?id=138750
2319
2320         Reviewed by Tim Horton.
2321
2322         The snapshot for the current gesture was being removed mid-gesture by the callback from
2323         dispatchAfterEnsuringDrawing scheduled by the previous gesture. The fix is to ignore the
2324         callback for a gesture if it is made after the snapshot for that gesture has already been
2325         removed (which can happen as a result of the watchdog timer firing).
2326
2327         * UIProcess/ios/ViewGestureControllerIOS.mm:
2328         (WebKit::ViewGestureController::ViewGestureController): Initialize new member variable.
2329         (WebKit::addLogEntry): Fixed the log message format.
2330         (WebKit::ViewGestureController::endSwipeGesture): When dispatchAfterEnsuringDrawing() calls
2331         us back, bail out if the gesture snapshot has already been removed.
2332         (WebKit::ViewGestureController::removeSwipeSnapshot): Increment
2333         m_gesturePendingSnapshotRemoval.
2334         * UIProcess/mac/ViewGestureController.h: Added m_gesturePendingSnapshotRemoval member
2335         variable.
2336
2337 2014-12-08  Anders Carlsson  <andersca@apple.com>
2338
2339         The website data store should know all its associated pages
2340         https://bugs.webkit.org/show_bug.cgi?id=139411
2341
2342         Reviewed by Tim Horton.
2343
2344         * UIProcess/WebPageProxy.cpp:
2345         (WebKit::WebPageProxy::WebPageProxy):
2346         (WebKit::WebPageProxy::close):
2347         * UIProcess/WebPageProxy.h:
2348         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2349         (WebKit::WebsiteDataStore::~WebsiteDataStore):
2350         (WebKit::WebsiteDataStore::addWebPage):
2351         (WebKit::WebsiteDataStore::removeWebPage):
2352         * UIProcess/WebsiteData/WebsiteDataStore.h:
2353
2354 2014-12-08  Dan Bernstein  <mitz@apple.com>
2355
2356         <rdar://problem/18046692> [iOS] Safari crashes at -[_NSUndoStack popAndInvoke] when trying to undo typing on closed tab
2357         https://bugs.webkit.org/show_bug.cgi?id=139408
2358
2359         Reviewed by Anders Carlsson.
2360
2361         * UIProcess/ios/WKContentView.mm:
2362         (-[WKContentView undoManager]): Override to initialize if necessary and return a unique undo
2363         manager for this instance. This ensures that undoable operations for this webview don’t get
2364         put in other undo managers, and matches UIWebView behavior.
2365
2366 2014-12-08  Chris Dumez  <cdumez@apple.com>
2367
2368         Revert r176293 & r176275
2369
2370         Unreviewed, revert r176293 & r176275 changing the Vector API to use unsigned type
2371         instead of size_t. There is some disagreement regarding the long-term direction
2372         of the API and we shouldn’t leave the API partly transitioned to unsigned type
2373         while making a decision.
2374
2375         * Platform/IPC/ArgumentCoders.h:
2376         * Platform/IPC/DataReference.h:
2377
2378 2014-12-08  Anders Carlsson  <andersca@apple.com>
2379
2380         Make deleting all cookies after a given date a little more sane
2381         https://bugs.webkit.org/show_bug.cgi?id=139409
2382
2383         Reviewed by Antti Koivisto.
2384
2385         Change all the doubles to std::chrono::system_clock::time_points instead.
2386
2387         * Platform/IPC/ArgumentCoders.cpp:
2388         (IPC::ArgumentCoder<std::chrono::system_clock::time_point>::encode):
2389         (IPC::ArgumentCoder<std::chrono::system_clock::time_point>::decode):
2390         * Platform/IPC/ArgumentCoders.h:
2391         * Scripts/webkit/messages.py:
2392         (headers_for_type):
2393         * UIProcess/API/C/WKCookieManager.cpp:
2394         (WKCookieManagerDeleteAllCookiesModifiedAfterDate):
2395         * UIProcess/API/C/WKCookieManager.h:
2396         * UIProcess/WebCookieManagerProxy.cpp:
2397         (WebKit::WebCookieManagerProxy::deleteAllCookiesModifiedSince):
2398         (WebKit::WebCookieManagerProxy::deleteAllCookiesModifiedAfterDate): Deleted.
2399         * UIProcess/WebCookieManagerProxy.h:
2400         * WebProcess/Cookies/WebCookieManager.cpp:
2401         (WebKit::WebCookieManager::deleteAllCookiesModifiedSince):
2402         (WebKit::WebCookieManager::deleteAllCookiesModifiedAfterDate): Deleted.
2403         * WebProcess/Cookies/WebCookieManager.h:
2404         * WebProcess/Cookies/WebCookieManager.messages.in:
2405
2406 2014-12-08  Anders Carlsson  <andersca@apple.com>
2407
2408         Move the callback invocation outside of the loop.
2409
2410         Rubber-stamped by Tim Horton.
2411
2412         * UIProcess/WebKeyValueStorageManager.cpp:
2413         (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
2414
2415 2014-12-08  Anders Carlsson  <andersca@apple.com>
2416
2417         Add a stub implementation of WebsiteDataStore::removeDataModifiedSince
2418         https://bugs.webkit.org/show_bug.cgi?id=139406
2419
2420         Reviewed by Antti Koivisto.
2421
2422         Change _WKWebsiteDataStore to call the newly added function.
2423
2424         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
2425         (toWebsiteDataTypes):
2426         (toSystemClockTime):
2427         (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
2428         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2429         (WebKit::WebsiteDataStore::removeDataModifiedSince):
2430         * UIProcess/WebsiteData/WebsiteDataStore.h:
2431
2432 2014-12-08  Gwang Yoon Hwang  <yoon@igalia.com>
2433
2434         [GTK] Let DrawingArea manages setAcceleratedCompositingWindowId
2435         https://bugs.webkit.org/show_bug.cgi?id=117230
2436
2437         Reviewed by Anders Carlsson.
2438
2439         This is a preparation patch for Threaded Coordinated Graphics.
2440
2441         LayerTreeHostGtk uses a native window handle to make glContext for
2442         accelerated compositing. Therefore it is natural for DrawingArea to take
2443         responsibility for the native window handle. And, in Coordinated
2444         Graphics case, WebPage creates LayerTreeHost before receiving a native
2445         window handle from UIProcess. It means we need a method to pass the
2446         native window handle to already created LayerTreeHost.
2447
2448         This patch uses DrawingAreaProxy::setNativeSurfaceHandleForCompositing
2449         instead of WebCoreProxy::setAcceleratedCompositingWindowId to set window
2450         ID for accelerated compositing.
2451
2452         Also, this patch renames the setAcceleratedCompositingWindowId with a
2453         more generic name, setNativeSurfaceHandleForCompositing.
2454
2455         No new tests. No change in functionality.
2456
2457         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2458         (webkitWebViewBaseCreateWebPage):
2459         * UIProcess/DrawingAreaProxyImpl.cpp:
2460         (WebKit::DrawingAreaProxyImpl::setNativeSurfaceHandleForCompositing):
2461         * UIProcess/DrawingAreaProxyImpl.h:
2462         * UIProcess/WebPageProxy.h:
2463         * UIProcess/gtk/WebPageProxyGtk.cpp:
2464         (WebKit::WebPageProxy::setAcceleratedCompositingWindowId): Deleted.
2465         * WebProcess/WebPage/DrawingArea.h:
2466         (WebKit::DrawingArea::nativeSurfaceHandleForCompositing):
2467         * WebProcess/WebPage/DrawingArea.messages.in:
2468         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2469         (WebKit::DrawingAreaImpl::setNativeSurfaceHandleForCompositing):
2470         * WebProcess/WebPage/DrawingAreaImpl.h:
2471         * WebProcess/WebPage/WebPage.h:
2472         * WebProcess/WebPage/WebPage.messages.in:
2473         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
2474         (WebKit::LayerTreeHostGtk::glContext):
2475         (WebKit::LayerTreeHostGtk::initialize):
2476         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
2477         (WebKit::WebPage::platformInitialize):
2478         (WebKit::WebPage::setAcceleratedCompositingWindowId): Deleted.
2479
2480 2014-12-08  Philippe Normand  <pnormand@igalia.com>
2481
2482         [GTK] UserMedia Permission Request API
2483         https://bugs.webkit.org/show_bug.cgi?id=136449
2484
2485         Reviewed by Carlos Garcia Campos.
2486
2487         * PlatformGTK.cmake: GTK-specific new files.
2488         * UIProcess/API/gtk/WebKitUIClient.cpp:  DecidePolicy handler
2489         implementation for UserMediaPermissionRequest.
2490         * UIProcess/API/gtk/WebKitUserMediaPermissionRequest.cpp: Added,
2491         WebKitGTK API for UserMediaPermissionRequest, very similar to the
2492         one used for Geolocation.
2493         (webkitUserMediaPermissionRequestAllow):
2494         (webkitUserMediaPermissionRequestDeny):
2495         (webkit_permission_request_interface_init):
2496         (webkitUserMediaPermissionRequestDispose):
2497         (webkit_user_media_permission_get_media_types):
2498         (webkitUserMediaPermissionRequestGetProperty):
2499         (webkit_user_media_permission_request_class_init):
2500         (webkitUserMediaPermissionRequestCreate):
2501         * UIProcess/API/gtk/WebKitUserMediaPermissionRequest.h: Added.
2502         * UIProcess/API/gtk/WebKitUserMediaPermissionRequestPrivate.h: Added.
2503         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Expose new API
2504         in documentation.
2505         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Ditto.
2506         * UIProcess/API/gtk/webkit2.h: Expose UserMediaPermissionRequest API.
2507
2508 2014-12-08  Anders Carlsson  <andersca@apple.com>
2509
2510         Add a stubbed out method for clearing out the website data store
2511         https://bugs.webkit.org/show_bug.cgi?id=139404
2512
2513         Reviewed by Antti Koivisto.
2514
2515         Add stubbed out method that just calls the completion handler.
2516
2517         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
2518         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
2519         (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
2520
2521 2014-12-06  Antti Koivisto  <antti@apple.com>
2522
2523         REGRESSION (173394): Support for webcam is broken
2524         https://bugs.webkit.org/show_bug.cgi?id=139313
2525
2526         Reviewed by Alexey Proskuryakov.
2527
2528         * NetworkProcess/NetworkResourceLoader.cpp:
2529         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
2530
2531             Don't buffer when handling multipart/x-mixed-replace. Multiple calls to didReceiveResponseAsync break assumptions.
2532
2533 2014-12-08  Gwang Yoon Hwang  <yoon@igalia.com>
2534
2535         [CoordinatedGraphics] Move CoordinatedBackingStore and CoordinatedGraphicsScene to Shared
2536         https://bugs.webkit.org/show_bug.cgi?id=139385
2537
2538         Reviewed by Martin Robinson.
2539
2540         For the Threaded Compositor, CoordinatedBackingStore and
2541         CoordinatedGraphicsScene should be placed at the Shared instead of
2542         UIProcess because it can be used in the WebProcess also.
2543
2544         No new tests because there is no behavior change.
2545
2546         * PlatformEfl.cmake:
2547         * Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp.
2548         * Shared/CoordinatedGraphics/CoordinatedBackingStore.h: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h.
2549         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.cpp.
2550         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.h.
2551
2552 2014-12-08  Shivakumar JM  <shiva.jm@samsung.com>
2553
2554         Fix build warning in WebKit2/UIProcess module.
2555         https://bugs.webkit.org/show_bug.cgi?id=139386
2556
2557         Reviewed by Alexey Proskuryakov.
2558
2559         Fix build warning by removing unused parameter name from function
2560
2561         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2562         (WebKit::WebsiteDataStore::WebsiteDataStore):
2563
2564 2014-12-07  Gwang Yoon Hwang  <yoon@igalia.com>
2565
2566         [CoordinatedGraphics] Change the namespace of CoordinatedBackingStore and CoordinatedGraphicsScene
2567         https://bugs.webkit.org/show_bug.cgi?id=139372
2568
2569         Reviewed by Gyuyoung Kim.
2570
2571         CoordinatedBackingStore and CoordinatedGraphicsScene should be declared in the WebKit namespace
2572         instead of WebCore namespace.
2573
2574         * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.cpp:
2575         * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp:
2576         * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h:
2577         (WebKit::CoordinatedBackingStoreTile::CoordinatedBackingStoreTile):
2578         (WebKit::CoordinatedBackingStore::rect):
2579         (WebCore::CoordinatedBackingStoreTile::CoordinatedBackingStoreTile): Deleted.
2580         (WebCore::CoordinatedBackingStore::rect): Deleted.
2581         * UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
2582         * UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.h:
2583         (WebKit::CoordinatedGraphicsScene::setViewBackgroundColor):
2584         (WebKit::CoordinatedGraphicsScene::viewBackgroundColor):
2585         (WebKit::CoordinatedGraphicsScene::layerByID):
2586         (WebKit::CoordinatedGraphicsScene::rootLayer):
2587         (WebCore::CoordinatedGraphicsScene::setViewBackgroundColor): Deleted.
2588         (WebCore::CoordinatedGraphicsScene::viewBackgroundColor): Deleted.
2589         (WebCore::CoordinatedGraphicsScene::layerByID): Deleted.
2590         (WebCore::CoordinatedGraphicsScene::rootLayer): Deleted.
2591         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
2592         (WebKit::CoordinatedLayerTreeHostProxy::coordinatedGraphicsScene):
2593         * UIProcess/CoordinatedGraphics/WKCoordinatedSceneAPICast.h:
2594         (WebKit::toImpl):
2595         (WebKit::toAPI):
2596         (toImpl): Deleted.
2597         (toAPI): Deleted.
2598         * UIProcess/CoordinatedGraphics/WebView.h:
2599
2600 2014-12-07  Dan Bernstein  <mitz@apple.com>
2601
2602         Introduce and deploy a function that allocates and returns an instance of a soft-linked class
2603         https://bugs.webkit.org/show_bug.cgi?id=139348
2604
2605         Reviewed by Anders Carlsson.
2606
2607         In [[getFooClass() alloc] init*], the type of the result of +alloc is id, so the compiler
2608         picks an arbitrary declaration of init*, not necessarily the Foo one. This can then lead
2609         to warnings or errors if the types or attributes don’t match, or to runtime errors if Foo
2610         doesn’t even have the expected initializer. The new allocFooInstance() returns a Foo *, thus
2611         avoiding the ambiguity.
2612
2613         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
2614         (-[WKAirPlayRoutePicker showAirPlayPickerIPad:fromRect:]):
2615         (-[WKAirPlayRoutePicker showAirPlayPickerIPhone:]):
2616         (-[WKAirPlayRoutePicker show:fromRect:]):
2617         * UIProcess/ios/forms/WKFileUploadPanel.mm:
2618         (-[_WKVideoFileUploadItem displayImage]):
2619         * UIProcess/mac/WKActionMenuController.mm:
2620         (-[WKActionMenuController _defaultMenuItemsForDataDetectableLink]):
2621         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
2622         (WebKit::PlatformCALayerRemoteCustom::clone):
2623
2624 2014-12-06  Anders Carlsson  <andersca@apple.com>
2625
2626         Fix build with newer versions of clang.
2627         rdar://problem/18978733
2628
2629         Add missing overrides and casts.
2630
2631         * NetworkProcess/NetworkProcess.h:
2632         * Shared/Downloads/DownloadAuthenticationClient.h:
2633         (WebKit::DownloadAuthenticationClient::refAuthenticationClient): Deleted.
2634         (WebKit::DownloadAuthenticationClient::derefAuthenticationClient): Deleted.
2635         * UIProcess/API/C/WKPage.cpp:
2636         (WKPageSetPageUIClient):
2637         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2638         (-[WKWebViewConfiguration copyWithZone:]):
2639         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
2640         (-[_WKProcessPoolConfiguration copyWithZone:]):
2641         * UIProcess/Cocoa/NavigationState.h:
2642         * UIProcess/Network/NetworkProcessProxy.h:
2643         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
2644         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateLayersAfterViewportChange): Deleted.
2645         * UIProcess/WebPageProxy.h:
2646         * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm:
2647         (WebKit::WebContentProcessMainDelegate::doPreInitializationWork): Deleted.
2648         (WebKit::WebContentProcessMainDelegate::getConnectionIdentifier): Deleted.
2649         (WebKit::WebContentProcessMainDelegate::getClientIdentifier): Deleted.
2650         (WebKit::WebContentProcessMainDelegate::getClientProcessName): Deleted.
2651         * WebProcess/IconDatabase/WebIconDatabaseProxy.h:
2652         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
2653         (WebKit::InjectedBundle::initialize):
2654         * WebProcess/WebCoreSupport/WebChromeClient.h:
2655         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2656         * WebProcess/WebPage/WebBackForwardListProxy.h:
2657         * WebProcess/WebPage/WebInspector.h:
2658         (WebKit::WebInspector::didClose): Deleted.
2659         (WebKit::WebInspector::didReceiveInvalidMessage): Deleted.
2660         * WebProcess/WebPage/WebInspectorUI.h:
2661         (WebKit::WebInspectorUI::didClose): Deleted.
2662         (WebKit::WebInspectorUI::didReceiveInvalidMessage): Deleted.
2663         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
2664         * WebProcess/WebProcess.h:
2665         * WebProcess/ios/WebVideoFullscreenManager.h:
2666
2667 2014-12-06  Anders Carlsson  <andersca@apple.com>
2668
2669         Only include TUCallSPI on Mac.
2670
2671         * Platform/mac/MenuUtilities.mm:
2672
2673 2014-12-06  Commit Queue  <commit-queue@webkit.org>
2674
2675         Unreviewed, rolling out r176905.
2676         https://bugs.webkit.org/show_bug.cgi?id=139337
2677
2678         the test case is failing in bots (Requested by anttik on
2679         #webkit).
2680
2681         Reverted changeset:
2682
2683         "REGRESSION (173394): Support for webcam is broken"
2684         https://bugs.webkit.org/show_bug.cgi?id=139313
2685         http://trac.webkit.org/changeset/176905
2686
2687 2014-12-05  Antti Koivisto  <antti@apple.com>
2688
2689         REGRESSION (173394): Support for webcam is broken
2690         https://bugs.webkit.org/show_bug.cgi?id=139313
2691
2692         Reviewed by Alexey Proskuryakov.
2693
2694         * NetworkProcess/NetworkResourceLoader.cpp:
2695         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
2696
2697             Don't buffer when handling multipart/x-mixed-replace. Multiple calls to didReceiveResponseAsync break assumptions.
2698
2699 2014-12-05  Yongjun Zhang  <yongjun_zhang@apple.com>
2700
2701         Add a delegate method for didReceiveServerRedirectForProvisionalLoadForFrame.
2702         https://bugs.webkit.org/show_bug.cgi?id=139325
2703
2704         Add delegate method webProcessPlugInBrowserContextController:didReceiveServerRedirectForProvisionalLoadForFrame: into
2705         WKWebProcessPlugInLoadDelegate to listen to server side redirect in injected bundle.
2706
2707         Reviewed by Dan Bernstein.
2708
2709         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
2710         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
2711         (didReceiveServerRedirectForProvisionalLoadForFrame):
2712         (setUpPageLoaderClient):
2713
2714 2014-12-05  Csaba Osztrogonác  <ossy@webkit.org>
2715
2716         URTBF, EFL is happy now.
2717
2718         * UIProcess/API/APIWebsiteDataStore.cpp:
2719         (API::WebsiteDataStore::defaultDataStoreConfiguration):
2720         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2721         (WebKit::WebsiteDataStore::createNonPersistent):
2722
2723 2014-12-05  Mark Lam  <mark.lam@apple.com>
2724
2725         Gardening: one more build fix for GTK builds.
2726
2727         * CMakeLists.txt:
2728
2729 2014-12-05  Csaba Osztrogonác  <ossy@webkit.org>
2730
2731         URTBF, remove duplicated entry due to parallel buildfixing.
2732
2733         * CMakeLists.txt:
2734
2735 2014-12-05  Csaba Osztrogonác  <ossy@webkit.org>
2736
2737         URTBF after r176849.
2738
2739         * CMakeLists.txt: Added WebProcess/InjectedBundle/DOM/InjectedBundleCSSStyleDeclarationHandle.cpp.
2740
2741 2014-12-05  Mark Lam  <mark.lam@apple.com>
2742
2743         Gardening: another build fix for GTK builds.
2744
2745         * CMakeLists.txt:
2746
2747 2014-12-05  Mark Lam  <mark.lam@apple.com>
2748
2749         Gardening: more speculative build fix for GTK builds.
2750
2751         * CMakeLists.txt:
2752
2753 2014-12-05  Tim Horton  <timothy_horton@apple.com>
2754
2755         Use the system string for telephone number menu
2756         https://bugs.webkit.org/show_bug.cgi?id=139324
2757         <rdar://problem/18726471>
2758
2759         Reviewed by Anders Carlsson.
2760
2761         * Platform/mac/MenuUtilities.mm:
2762         (WebKit::menuItemTitleForTelephoneNumberGroup):
2763         Make use of the SPI to retrieve the string if it exists.
2764
2765 2014-12-05  Tim Horton  <timothy_horton@apple.com>
2766
2767         If the action menu hit test times out, a menu with a single separator appears
2768         https://bugs.webkit.org/show_bug.cgi?id=139320
2769         <rdar://problem/19158331>
2770
2771         Reviewed by Beth Dakin.
2772
2773         * UIProcess/mac/WKActionMenuController.h:
2774         * UIProcess/mac/WKActionMenuController.mm:
2775         (-[WKActionMenuController menuNeedsUpdate:]):
2776         (-[WKActionMenuController _defaultMenuItems]):
2777         Add a new "TimedOut" state, which we get into if the sync wait for
2778         didPerformActionMenuHitTest times out. In this case, we'll drop the
2779         separator item and give up on the menu. This way, the menu will never
2780         have just a single separator item at the end of menuNeedsUpdate:.
2781
2782 2014-12-05  Mark Lam  <mark.lam@apple.com>
2783
2784         Gardening: speculative build fix for GTK builds.
2785
2786         * CMakeLists.txt:
2787
2788 2014-12-05  Anders Carlsson  <andersca@apple.com>
2789
2790         Fix build.
2791
2792         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
2793         (API::WebsiteDataStore::defaultDataStoreConfiguration):
2794
2795 2014-12-05  Anders Carlsson  <andersca@apple.com>
2796
2797         Give all web pages a website data store
2798         https://bugs.webkit.org/show_bug.cgi?id=139317
2799
2800         Reviewed by Tim Horton.
2801
2802         * UIProcess/API/Cocoa/WKWebView.mm:
2803         (-[WKWebView initWithFrame:configuration:]):
2804         Set the website data store on the window.
2805
2806         * UIProcess/WebContext.cpp:
2807         (WebKit::websiteDataStoreConfiguration):
2808         Helper function that will create the default website data store configuration for a context.
2809
2810         (WebKit::WebContext::WebContext):
2811         Create a new, per-context data store.
2812
2813         (WebKit::WebContext::createWebPage):
2814         If we don't have a data store filled in, use the default per-context one.
2815
2816         * UIProcess/WebContext.h:
2817         * UIProcess/WebPageProxy.h:
2818
2819 2014-12-05  Anders Carlsson  <andersca@apple.com>
2820
2821         Move the website data store code to a new file
2822         https://bugs.webkit.org/show_bug.cgi?id=139312
2823
2824         Reviewed by Tim Horton.
2825
2826         It's weird to have all the website data code in the API class, so move it to a new file.
2827
2828         * UIProcess/API/APIWebsiteDataStore.cpp:
2829         (API::WebsiteDataStore::WebsiteDataStore):
2830         (API::WebsiteDataStore::isNonPersistent):
2831         (API::generateNonPersistentSessionID): Deleted.
2832         * UIProcess/API/APIWebsiteDataStore.h:
2833         * UIProcess/API/Cocoa/WKWebView.mm:
2834         (-[WKWebView initWithFrame:configuration:]):
2835         * UIProcess/WebsiteData/WebsiteDataStore.cpp: Copied from Source/WebKit2/UIProcess/API/APIWebsiteDataStore.cpp.
2836         (WebKit::generateNonPersistentSessionID):
2837         (WebKit::WebsiteDataStore::createNonPersistent):
2838         (WebKit::WebsiteDataStore::create):
2839         (WebKit::WebsiteDataStore::WebsiteDataStore):
2840         (WebKit::WebsiteDataStore::~WebsiteDataStore):
2841         * UIProcess/WebsiteData/WebsiteDataStore.h: Copied from Source/WebKit2/UIProcess/API/APIWebsiteDataStore.h.
2842         (WebKit::WebsiteDataStore::isNonPersistent):
2843         (WebKit::WebsiteDataStore::sessionID):
2844         * WebKit2.xcodeproj/project.pbxproj:
2845
2846 2014-12-05  Tim Horton  <timothy_horton@apple.com>
2847
2848         Keyboard input should be disabled in the preview popover
2849         https://bugs.webkit.org/show_bug.cgi?id=139219
2850         <rdar://problem/19052381>
2851
2852         Reviewed by Anders Carlsson.
2853
2854         * UIProcess/API/mac/WKView.mm:
2855         (-[WKView performKeyEquivalent:]):
2856         (-[WKView keyUp:]):
2857         (-[WKView keyDown:]):
2858         (-[WKView flagsChanged:]):
2859         There are two implementations of each of these methods in this file.
2860         Adjust the ones that the original patch missed.
2861
2862 2014-12-05  Antti Koivisto  <antti@apple.com>
2863
2864         In NetworkResourceLoader always bail out after abort()
2865         https://bugs.webkit.org/show_bug.cgi?id=139299
2866
2867         Reviewed by Alexey Proskuryakov.
2868
2869         Invoking abort() may kill the current object. Take care to bail out after it.
2870
2871         * NetworkProcess/NetworkResourceLoader.cpp:
2872         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
2873         (WebKit::NetworkResourceLoader::didReceiveBuffer):
2874         (WebKit::NetworkResourceLoader::didFinishLoading):
2875
2876             Either make sure sendAbortingOnFailure() is called last in callbacks or the results is explicitly tested.
2877
2878         (WebKit::NetworkResourceLoader::bufferingTimerFired):
2879         (WebKit::NetworkResourceLoader::sendBufferMaybeAborting):
2880
2881             Rename and return a boolean to indicate if load should continue.
2882
2883         (WebKit::NetworkResourceLoader::sendBuffer): Deleted.
2884         * NetworkProcess/NetworkResourceLoader.h:
2885
2886 2014-12-05  Anders Carlsson  <andersca@apple.com>
2887
2888         Don't use PLATFORM(IOS) in non-project headers.
2889
2890         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2891         (-[WKWebViewConfiguration _allowsAlternateFullscreen]):
2892         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2893
2894 2014-12-05  Sam Weinig  <sam@webkit.org>
2895
2896         WKBundleCSSStyleDeclarationRef needs to be a real API::Object
2897         https://bugs.webkit.org/show_bug.cgi?id=139291
2898
2899         Reviewed by Dan Bernstein.
2900
2901         Change WKBundleCSSStyleDeclarationRef from being a WebCore::CSSStyleDeclaration, to
2902         being a real API::Object.  WKRetain and WKRelease require this.
2903
2904         * Shared/APIObject.h:
2905         * WebKit2.xcodeproj/project.pbxproj:
2906         * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
2907         * WebProcess/InjectedBundle/DOM/InjectedBundleCSSStyleDeclarationHandle.cpp: Added.
2908         (WebKit::domHandleCache):
2909         (WebKit::InjectedBundleCSSStyleDeclarationHandle::getOrCreate):
2910         (WebKit::InjectedBundleCSSStyleDeclarationHandle::InjectedBundleCSSStyleDeclarationHandle):
2911         (WebKit::InjectedBundleCSSStyleDeclarationHandle::~InjectedBundleCSSStyleDeclarationHandle):
2912         * WebProcess/InjectedBundle/DOM/InjectedBundleCSSStyleDeclarationHandle.h: Added.
2913         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
2914         (WebKit::InjectedBundlePageEditorClient::shouldApplyStyle):
2915
2916 2014-12-05  Anders Carlsson  <andersca@apple.com>
2917
2918         Oops, didn't mean to commit this.
2919
2920         * Shared/API/Cocoa/WKFoundation.h:
2921
2922 2014-12-05  Anders Carlsson  <andersca@apple.com>
2923
2924         Add an API::WebsiteDataStore object and use it for _WKWebsiteDataStore
2925         https://bugs.webkit.org/show_bug.cgi?id=139304
2926
2927         Reviewed by Tim Horton.
2928
2929         * Shared/APIObject.h:
2930         * Shared/Cocoa/APIObject.mm:
2931         (API::Object::newObject):
2932         Make _WKWebsiteDataStore a wrapper for API::WebsiteDataStore instead of API::Session.
2933
2934         * UIProcess/API/APIWebsiteDataStore.cpp: Added.
2935         (API::generateNonPersistentSessionID):
2936         (API::WebsiteDataStore::defaultDataStore):
2937         (API::WebsiteDataStore::createNonPersistentDataStore):
2938         (API::WebsiteDataStore::WebsiteDataStore):
2939         (API::WebsiteDataStore::~WebsiteDataStore):
2940         (API::WebsiteDataStore::isNonPersistent):
2941         Add new WebsiteDataStore implementation. Currently it only contains the WebCore Session ID, but more will be
2942         added to it in upcoming commits.
2943
2944         * UIProcess/API/APIWebsiteDataStore.h:
2945         Add header.
2946
2947         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm: Added.
2948         (API::WebsiteDataStore::defaultDataStoreConfiguration):
2949         Platform specific file that returns the default data store configuration.
2950
2951         * UIProcess/API/Cocoa/WKWebView.mm:
2952         (-[WKWebView initWithFrame:configuration:]):
2953         Set the session ID from the website data store.
2954
2955         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
2956         (+[_WKWebsiteDataStore defaultDataStore]):
2957         (+[_WKWebsiteDataStore nonPersistentDataStore]):
2958         (-[_WKWebsiteDataStore dealloc]):
2959         (-[_WKWebsiteDataStore isNonPersistent]):
2960         (-[_WKWebsiteDataStore _apiObject]):
2961         Update now that we wrap an API::WebsiteDataStore instead.
2962
2963         * UIProcess/API/Cocoa/_WKWebsiteDataStoreInternal.h:
2964         (WebKit::wrapper):
2965         Update for API::Session -> API::WebsiteDataStore change.
2966
2967         * WebKit2.xcodeproj/project.pbxproj:
2968         Add new files.
2969
2970 2014-12-05  David Kilzer  <ddkilzer@apple.com>
2971
2972         FeatureDefines.xcconfig: Workaround bug in Xcode 5.1.1 when defining ENABLE_WEB_REPLAY
2973         <http://webkit.org/b/139286>
2974
2975         Reviewed by Daniel Bates.
2976
2977         * Configurations/FeatureDefines.xcconfig: Switch back to using
2978         PLATFORM_NAME to workaround a bug in Xcode 5.1.1 on 10.8.
2979
2980 2014-12-05  Anders Carlsson  <andersca@apple.com>
2981
2982         Make WebPageProxy hold on to a SessionID instead of an API:Session
2983         https://bugs.webkit.org/show_bug.cgi?id=139302
2984
2985         Reviewed by Sam Weinig.
2986
2987         This is in preparation for adding API::WebsiteDataStore. Currently we have to keep the
2988         Session ID and the WebsiteDataStore separate because we still need to support toggling private browsing.
2989
2990         * UIProcess/API/C/WKPage.cpp:
2991         (WKPageSetSession):
2992         * UIProcess/API/C/WKSessionRef.cpp:
2993         (WKSessionCreate):
2994         * UIProcess/API/Cocoa/WKWebView.mm:
2995         (-[WKWebView initWithFrame:configuration:]):
2996         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
2997         (+[_WKWebsiteDataStore nonPersistentDataStore]):
2998         * UIProcess/APISession.cpp:
2999         (API::generateID):
3000         (API::Session::Session):
3001         (API::Session::createEphemeral):
3002         (API::Session::legacyPrivateSession): Deleted.
3003         (API::Session::create): Deleted.
3004         * UIProcess/APISession.h:
3005         * UIProcess/WebContext.cpp:
3006         (WebKit::WebContext::createWebPage):
3007         * UIProcess/WebPageProxy.cpp:
3008         (WebKit::WebPageProxy::WebPageProxy):
3009         (WebKit::WebPageProxy::setSessionID):
3010         (WebKit::WebPageProxy::creationParameters):
3011         (WebKit::WebPageProxy::setSession): Deleted.
3012         * UIProcess/WebPageProxy.h:
3013         (WebKit::WebPageProxy::sessionID):
3014
3015 2014-12-05  Eric Carlson  <eric.carlson@apple.com>
3016
3017         [iOS] allow host application to opt-out of alternate fullscreen pt. 2
3018         https://bugs.webkit.org/show_bug.cgi?id=139227
3019
3020         Reviewed by Jer Noble and Anders Carlsson.
3021
3022         * UIProcess/ios/WebVideoFullscreenManagerProxy.h: Add bool param to setupFullscreenWithID.
3023         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in: Ditto.
3024         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
3025         (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): Ditto.
3026
3027         * WebProcess/ios/WebVideoFullscreenManager.mm:
3028         (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement): Pass new parameter
3029             to SetupFullscreenWithID.
3030
3031 2014-12-04  Anders Carlsson  <andersca@apple.com>
3032
3033         Add missing includes in preparation for making toAPI require that it's passed an API::Object
3034         https://bugs.webkit.org/show_bug.cgi?id=139278
3035
3036         Reviewed by Tim Horton.
3037
3038         * UIProcess/API/C/WKAuthenticationChallenge.cpp:
3039         * UIProcess/API/C/WKAuthenticationDecisionListener.cpp:
3040         * UIProcess/API/C/WKContext.cpp:
3041         * UIProcess/API/C/WKDownload.cpp:
3042         * UIProcess/API/C/WKFrame.cpp:
3043         * UIProcess/API/C/WKGeolocationManager.cpp:
3044         * UIProcess/API/C/WKInspector.cpp:
3045         * UIProcess/API/C/WKPage.cpp:
3046         * UIProcess/GenericCallback.h:
3047         * UIProcess/Notifications/WebNotificationProvider.cpp:
3048         * UIProcess/WebContextConnectionClient.cpp:
3049         * UIProcess/WebContextInjectedBundleClient.cpp:
3050         * UIProcess/WebCookieManagerProxyClient.cpp:
3051         * UIProcess/WebDatabaseManagerProxyClient.cpp:
3052         * UIProcess/WebFindClient.cpp:
3053         * UIProcess/WebFormClient.cpp:
3054         * UIProcess/WebIconDatabaseClient.cpp:
3055         * UIProcess/WebPageContextMenuClient.cpp:
3056         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
3057         * WebProcess/InjectedBundle/API/c/WKBundleDOMWindowExtension.cpp:
3058         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
3059         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
3060         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3061         * WebProcess/InjectedBundle/InjectedBundleClient.cpp:
3062         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
3063         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
3064         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
3065         * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp:
3066         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
3067
3068 2014-12-04  Anders Carlsson  <andersca@apple.com>
3069
3070         Make API::String copy the underlying strings if needed, for thread safety
3071         https://bugs.webkit.org/show_bug.cgi?id=139261
3072
3073         Reviewed by Sam Weinig.
3074
3075         * Shared/API/c/WKString.cpp:
3076         (WKStringCreateWithUTF8CString):
3077         (WKStringCreateWithJSString):
3078         (WKStringCopyJSString):
3079         Move the implementations from API::String and directly into the API functions.
3080
3081         * Shared/APIString.h:
3082         Add a create overload that takes an rvalue reference. Call it from the create overload
3083         that takes an lvalue reference, but explicitly copy the string.
3084         We call isolatedCopy() again on the string in the rvalue reference overload, but that is a no-op
3085         if the string can be sent to another thread. Add assertions in the String constructor that we can
3086         send the string to another thread.
3087
3088 2014-12-04  Beth Dakin  <bdakin@apple.com>
3089
3090         Clients disabling action menus sometimes still invoke action menu behaviors
3091         https://bugs.webkit.org/show_bug.cgi?id=139270
3092         -and corresponding-
3093         rdar://problem/19147218
3094
3095         Reviewed by Tim Horton.
3096
3097         By default, we will keep a single item in the action menu up until the point where 
3098         _state == ActionMenuState::Ready. So by checking _state here, we are preventing 
3099         clients from opting out of our choice to wait. Ideally we would always still wait 
3100         for the Ready state, but this will get the best behavior in the mean time.
3101         * UIProcess/mac/WKActionMenuController.mm:
3102         (-[WKActionMenuController _updateActionMenuItems]):
3103
3104 2014-12-04  Antti Koivisto  <antti@apple.com>
3105
3106         REGRESSION (r173468): Cannot step in WebInspector
3107         https://bugs.webkit.org/show_bug.cgi?id=139260
3108
3109         Reviewed by Alexey Proskuryakov.
3110
3111         Inspector defers all loads and starts a nested runloop when it hits a breakpoint. When continuing it undefers the loads.
3112         If the script execution was triggered from the didFinishLoading callback of the main resource then the main resource would
3113         already be in the finished state in the network process side and setDefersLoading(false) message would end up restarting its load.
3114         Since loads are not meant to restart the generated callbacks would assert or crash the web process when handled in the next
3115         nested inspector runloop.
3116
3117         Fix by taking care that cleaned up NetworkResourceLoaders are always removed from the loader map of
3118         the NetworkConnectionToWebProcess and so can't end up handling late messages.
3119
3120         No test, this requires JS debugger to trigger.
3121
3122         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3123         (WebKit::NetworkConnectionToWebProcess::didCleanupResourceLoader):
3124
3125             This is now the only way to remove resource loaders.
3126             It is called from NetworkResourceLoader::cleanup only.
3127
3128         (WebKit::NetworkConnectionToWebProcess::didClose):
3129         (WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier):
3130
3131             Calling abort  removes the resource loader (since it calls cleanup) so no need to do it explicitly anymore.
3132
3133         * NetworkProcess/NetworkConnectionToWebProcess.h:
3134         * NetworkProcess/NetworkResourceLoader.cpp:
3135         (WebKit::NetworkResourceLoader::start):
3136
3137             We are guaranteed to be reffed by NetworkConnectionToWebProcess until cleanup so the explicit ref/deref can be removed.
3138
3139         (WebKit::NetworkResourceLoader::cleanup):
3140
3141             Call to NetworkConnectionToWebProcess::didCleanupResourceLoader to make the loader unreachable.
3142
3143         * NetworkProcess/NetworkResourceLoader.h:
3144         (WebKit::NetworkResourceLoader::identifier):
3145
3146 2014-12-04  Timothy Horton  <timothy_horton@apple.com>
3147
3148         Fix the 32-bit build.
3149
3150         * UIProcess/API/mac/WKView.mm:
3151         (-[WKView _setTextIndicator:fadeOut:animationCompletionHandler:]):
3152
3153 2014-12-04  Tim Horton  <timothy_horton@apple.com>
3154
3155         TextIndicator::createWithSelectionInFrame does synchronous IPC in WebKit2
3156         https://bugs.webkit.org/show_bug.cgi?id=139252
3157         <rdar://problem/19140827>
3158
3159         Reviewed by Anders Carlsson.
3160
3161         It turns out contentsToScreen requires sync IPC in Mac WebKit2, which we
3162         really don't want to be doing here (especially since the UI process will often
3163         be sitting in waitForAndDispatchImmediately waiting for didPerformActionMenuHitTest).
3164
3165         Go back to keeping TextIndicator rects in "window" coordinates and do the conversion
3166         in each of the WebKits instead of trying to share that code.
3167
3168         * Shared/WebCoreArgumentCoders.cpp:
3169         (IPC::ArgumentCoder<TextIndicatorData>::encode):
3170         (IPC::ArgumentCoder<TextIndicatorData>::decode):
3171         * UIProcess/API/mac/WKView.mm:
3172         (-[WKView _setTextIndicator:fadeOut:animationCompletionHandler:]):
3173         * WebProcess/WebPage/FindController.cpp:
3174         (WebKit::FindController::updateFindIndicator):
3175         (WebKit::FindController::drawRect):
3176         Adjust to the WebCore changes.
3177
3178 2014-12-04  Anders Carlsson  <andersca@apple.com>
3179
3180         Simplify StorageManager callback functions
3181         https://bugs.webkit.org/show_bug.cgi?id=139257
3182
3183         Reviewed by Antti Koivisto.
3184
3185         * UIProcess/Storage/StorageManager.cpp:
3186         (WebKit::StorageManager::getOrigins):
3187         (WebKit::StorageManager::getStorageDetailsByOrigin):
3188         (WebKit::callCallbackFunction): Deleted.
3189         (WebKit::StorageManager::getOriginsInternal): Deleted.
3190         (WebKit::StorageManager::getStorageDetailsByOriginInternal): Deleted.
3191         * UIProcess/Storage/StorageManager.h:
3192         * UIProcess/WebKeyValueStorageManager.cpp:
3193         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
3194         (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
3195         (WebKit::didGetKeyValueStorageOrigins): Deleted.
3196         (WebKit::didGetStorageDetailsByOrigin): Deleted.
3197
3198 2014-12-04  Csaba Osztrogonác  <ossy@webkit.org>
3199
3200         URTBF after r176794.
3201
3202         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
3203         (WebKit::fileCreationTime):
3204         (WebKit::fileModificationTime):
3205
3206 2014-12-03  Anders Carlsson  <andersca@apple.com>
3207
3208         Add a way to delete local storage origins modified after a given date
3209         https://bugs.webkit.org/show_bug.cgi?id=139249
3210
3211         Reviewed by Tim Horton.
3212
3213         Also change LocalStorageDatabaseTracker to hold on to WTF::Optional time_t values
3214         instead of treating missing values as zero.
3215
3216         * UIProcess/LocalStorageDetails.h:
3217         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
3218         (WebKit::fileCreationTime):
3219         (WebKit::fileModificationTime):
3220         (WebKit::LocalStorageDatabaseTracker::deleteDatabasesModifiedSince):
3221         (WebKit::LocalStorageDatabaseTracker::details):
3222         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
3223         * UIProcess/Storage/StorageManager.cpp:
3224         (WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
3225         * UIProcess/Storage/StorageManager.h:
3226         * UIProcess/WebKeyValueStorageManager.cpp:
3227         (WebKit::didGetStorageDetailsByOrigin):
3228
3229 2014-12-04  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
3230
3231         [EFL][WK2] Add ewk API to allow accepting a specific TLS certificate for a specific host
3232         https://bugs.webkit.org/show_bug.cgi?id=131160
3233
3234         Reviewed by Gyuyoung Kim.
3235
3236         * UIProcess/API/efl/ewk_context.cpp:
3237         (EwkContext::allowSpecificHTTPSCertificateForHost):
3238         (ewk_context_tls_certificate_for_host_allow):
3239         * UIProcess/API/efl/ewk_context.h:
3240         * UIProcess/API/efl/ewk_context_private.h:
3241         * UIProcess/API/efl/tests/test_ewk2_ssl.cpp:
3242
3243 2014-12-03  Commit Queue  <commit-queue@webkit.org>
3244
3245         Unreviewed, rolling out r176457.
3246         https://bugs.webkit.org/show_bug.cgi?id=139247
3247
3248         More iOS breakage (Requested by andersca on #webkit).
3249
3250         Reverted changeset:
3251
3252         "Fix iOS build."
3253         http://trac.webkit.org/changeset/176457
3254
3255 2014-12-03  Beth Dakin  <bdakin@apple.com>
3256
3257         <input> elements get whitespace action menu instead of editable text menu
3258         https://bugs.webkit.org/show_bug.cgi?id=139241
3259         -and corresponding-
3260         rdar://problem/19072083
3261
3262         Reviewed by Sam Weinig.
3263
3264         Add isOverTextInsideFormControlElement to WebHitTestResult.
3265         * Shared/WebHitTestResult.cpp:
3266         (WebKit::WebHitTestResult::Data::Data):
3267         (WebKit::WebHitTestResult::Data::encode):
3268         (WebKit::WebHitTestResult::Data::decode):
3269         * Shared/WebHitTestResult.h:
3270         (WebKit::WebHitTestResult::isOverTextInsideFormControlElement):
3271
3272         Offer the text menus for text inside form controls.
3273         * UIProcess/mac/WKActionMenuController.mm:
3274         (-[WKActionMenuController _defaultMenuItems]):
3275
3276         We should disallow shadow content in the hit test. This is the default and it is 
3277         how context menus behave. We originally wanted to text inside shadow content so 
3278         that we could find the text, but the new function I added to HitTestResult will 
3279         allow that.
3280         * WebProcess/WebPage/mac/WebPageMac.mm:
3281
3282         Adjust to the fact that we don’t hit test shadow content any more.
3283         (WebKit::WebPage::performActionMenuHitTestAtLocation):
3284         (WebKit::WebPage::lookupTextAtLocation):
3285         (WebKit::WebPage::focusAndSelectLastActionMenuHitTestResult):
3286
3287 2014-12-03  Commit Queue  <commit-queue@webkit.org>
3288
3289         Unreviewed, rolling out r176489.
3290         https://bugs.webkit.org/show_bug.cgi?id=139242
3291
3292         More iOS breakage (Requested by andersca on #webkit).
3293
3294         Reverted changeset:
3295
3296         "Unreviewed, iOS build fix after r176452."
3297         http://trac.webkit.org/changeset/176489
3298
3299 2014-12-03  Tim Horton  <timothy_horton@apple.com>
3300
3301         Implement action menus for tel: URLs
3302         https://bugs.webkit.org/show_bug.cgi?id=139240
3303         <rdar://problem/19115662>
3304
3305         Reviewed by Anders Carlsson.
3306
3307         * Shared/API/c/WKActionMenuTypes.h:
3308         Add a new type.
3309
3310         * UIProcess/mac/WKActionMenuController.mm:
3311         (-[WKActionMenuController _defaultMenuItemsForDataDetectableLink]):
3312         Rename this function as it will work for both mailto and tel URLs.
3313         Adjust it to use contextForView:.
3314
3315         (-[WKActionMenuController _clearActionMenuState]):
3316         (-[WKActionMenuController menuNeedsUpdate:]):
3317         (-[WKActionMenuController _defaultMenuItems]):
3318         Don't check the menu type when going to interact with _currentActionContext.
3319         We'll only have a _currentActionContext if we have a data detected item,
3320         and there are multiple menu types that end up using DDActionContext.
3321
3322 2014-12-03  Commit Queue  <commit-queue@webkit.org>
3323
3324         Unreviewed, rolling out r176452 and r176559.
3325         https://bugs.webkit.org/show_bug.cgi?id=139239
3326
3327         Broke iOS (Requested by andersca on #webkit).
3328
3329         Reverted changesets:
3330
3331         "Remove alignment code from IPC coders"
3332         https://bugs.webkit.org/show_bug.cgi?id=138963
3333         http://trac.webkit.org/changeset/176452
3334
3335         "[WK2] SecComp buildfix after r176452"
3336         https://bugs.webkit.org/show_bug.cgi?id=139081
3337         http://trac.webkit.org/changeset/176559
3338
3339 2014-12-03  Tim Horton  <timothy_horton@apple.com>
3340
3341         Keyboard input should be disabled in the preview popover
3342         https://bugs.webkit.org/show_bug.cgi?id=139219
3343         <rdar://problem/19052381>
3344
3345         Reviewed by Anders Carlsson.
3346
3347         Make sure that keyboard input, Quick Look, etc. are blocked in preview popovers
3348         and WKThumbnailViews. Also block the fake mouseMove events that originate in
3349         the Web process upon scrolling, because we were missing those despite blocking
3350         ordinary mouseMove events.
3351
3352         * UIProcess/API/Cocoa/WKViewPrivate.h:
3353         * UIProcess/API/mac/WKView.mm:
3354         Rename _ignoresNonWheelMouseEvents to _ignoresNonWheelEvents, because it will
3355         apply not only to mouse events but also key events, Quick Look events, menu
3356         preparation events, swipe events, etc.
3357
3358         Add _ignoresAllEvents, which means the same thing as _ignoresNonWheelEvents
3359         with the addition of ignoring scrollWheel events.
3360
3361         (-[WKView scrollWheel:]):
3362         (-[WKView swipeWithEvent:]):
3363         (-[WKView mouseMoved:]):
3364         (-[WKView mouseDown:]):
3365         (-[WKView mouseUp:]):
3366         (-[WKView mouseDragged:]):
3367         Adjust to the new name.
3368
3369         (-[WKView performKeyEquivalent:]):
3370         (-[WKView keyUp:]):
3371         (-[WKView keyDown:]):
3372         (-[WKView flagsChanged:]):
3373         (-[WKView quickLookWithEvent:]):
3374         (-[WKView prepareForMenu:withEvent:]):
3375         (-[WKView willOpenMenu:withEvent:]):
3376         (-[WKView didCloseMenu:withEvent:]):
3377         Block all of these events as well as those we were previously blocking.
3378
3379         (-[WKView _setIgnoresAllEvents:]):
3380         (-[WKView _setIgnoresNonWheelMouseEvents:]):
3381         (-[WKView _setIgnoresNonWheelEvents:]):
3382         (-[WKView _ignoresNonWheelEvents]):
3383         (-[WKView _ignoresAllEvents]):
3384         * UIProcess/API/mac/WKViewInternal.h:
3385         Adjust to the new names and the addition of ignoresAllEvents.
3386
3387         * UIProcess/mac/WKActionMenuController.mm:
3388         (-[WKPagePreviewViewController loadView]):
3389         Adjust to the new name.
3390
3391         (-[WKActionMenuController prepareForMenu:withEvent:]):
3392         Move bailing from prepareForMenu: up to WKView.
3393
3394         * UIProcess/API/Cocoa/WKWebView.mm:
3395         (-[WKWebView _ignoresNonWheelEvents]):
3396         (-[WKWebView _setIgnoresNonWheelEvents:]):
3397         (-[WKWebView _ignoresNonWheelMouseEvents]): Deleted.
3398         (-[WKWebView _setIgnoresNonWheelMouseEvents:]): Deleted.
3399         * UIProcess/API/Cocoa/WKWebViewInternal.h:
3400         Adjust to the new name (without "mouse" in it).
3401
3402         * UIProcess/API/Cocoa/_WKThumbnailView.mm:
3403         (-[_WKThumbnailView _viewWasUnparented]):
3404         (-[_WKThumbnailView _viewWasParented]):
3405         Explicitly tell WKView to disable event handling while thumbnailed,
3406         instead of having WKView special-case thumbnail views internally.
3407
3408         * UIProcess/WebPageProxy.cpp:
3409         (WebKit::WebPageProxy::setShouldDispatchFakeMouseMoveEvents):
3410         * UIProcess/WebPageProxy.h:
3411         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3412         (WebKit::WebChromeClient::shouldDispatchFakeMouseMoveEvents):
3413         * WebProcess/WebCoreSupport/WebChromeClient.h:
3414         * WebProcess/WebPage/WebPage.cpp:
3415         (WebKit::WebPage::WebPage):
3416         * WebProcess/WebPage/WebPage.h:
3417         (WebKit::WebPage::shouldDispatchFakeMouseMoveEvents):
3418         (WebKit::WebPage::setShouldDispatchFakeMouseMoveEvents):
3419         * WebProcess/WebPage/WebPage.messages.in:
3420         Plumb shouldDispatchFakeMouseMoveEvents from the UI process to the Web process
3421         and through to WebKit2's ChromeClient implementation.
3422
3423 2014-12-03  Anders Carlsson  <andersca@apple.com>
3424
3425         Remove ENABLE_UI_PROCESS_STORAGE define, it's always 1.
3426
3427         Rubber-stamped by Beth Dakin.
3428
3429         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3430         (WebKit::WebPlatformStrategies::localStorageNamespace):
3431         (WebKit::WebPlatformStrategies::transientLocalStorageNamespace):
3432         (WebKit::WebPlatformStrategies::sessionStorageNamespace):
3433
3434 2014-12-03  Anders Carlsson  <andersca@apple.com>
3435
3436         Use an @autoreleasepool instead of NSAutoreleasePool.
3437
3438         Rubber-stamped by Tim Horton.
3439
3440         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3441         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
3442
3443 2014-12-03  Dan Bernstein  <mitz@apple.com>
3444
3445         REGRESSION(r176687): Caused webkit2 test assertion failure crashes in WebKit::WebPage::willStartDrag()
3446         https://bugs.webkit.org/show_bug.cgi?id=139224
3447
3448         Reviewed by Alexey Proskuryakov.
3449
3450         * WebProcess/WebPage/WebPage.cpp:
3451         (WebKit::WebPage::mouseEventSyncForTesting): Wait for the UI process to start dragging if
3452         needed before handling the event.
3453
3454 2014-12-03  Michael Catanzaro  <mcatanzaro@igalia.com>
3455
3456         [GTK] outdated comment
3457         https://bugs.webkit.org/show_bug.cgi?id=137801
3458
3459         Reviewed by Carlos Garcia Campos.
3460
3461         Remove a comment that is no longer correct.
3462
3463         * NetworkProcess/gtk/NetworkProcessMainGtk.cpp:
3464
3465 2014-12-02  Conrad Shultz  <conrad_shultz@apple.com>
3466
3467         Don't block menu highlighting when presenting a page preview
3468         https://bugs.webkit.org/show_bug.cgi?id=139217
3469
3470         Reviewed by Tim Horton.
3471
3472         * UIProcess/mac/WKActionMenuController.mm:
3473         (-[WKActionMenuController _previewURLFromActionMenu:]):
3474         Defer popover presentation to the next turn of the runloop.
3475
3476 2014-12-02  Timothy Horton  <timothy_horton@apple.com>
3477
3478         Fix the build.
3479
3480         * UIProcess/mac/WebContextMac.mm:
3481
3482 2014-12-02  Dan Bernstein  <mitz@apple.com>
3483
3484         <rdar://problem/18441138> [iOS] Text selection in WKWebView with WKSelectionGranularityCharacter only works in the most recent