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