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