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