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