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