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