1 2015-03-18 Chris Dumez <cdumez@apple.com>
3 [WK2] We should not even try the network cache for non-HTTP protocol requests
4 https://bugs.webkit.org/show_bug.cgi?id=142802
5 <rdar://problem/19632130>
7 Reviewed by Antti Koivisto.
9 We should not even try the network cache for non-HTTP protocol requests
10 and the network cache cannot handle those.
12 * NetworkProcess/NetworkResourceLoader.cpp:
13 (WebKit::NetworkResourceLoader::start):
14 * NetworkProcess/cache/NetworkCache.cpp:
15 (WebKit::NetworkCache::canRetrieve):
16 (WebKit::NetworkCache::Cache::retrieve):
17 * NetworkProcess/cache/NetworkCache.h:
18 * NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
19 (WebKit::NetworkCache::retrieveDecisionToDiagnosticKey):
21 2015-03-17 Conrad Shultz <conrad_shultz@apple.com>
23 Ignore some deprecation warnings
24 https://bugs.webkit.org/show_bug.cgi?id=142813
26 Reviewed by Mark Rowe.
28 Fixing the deprecations is tracked by: <rdar://problem/20201450>
30 * UIProcess/mac/WebPopupMenuProxyMac.mm:
31 (WebKit::WebPopupMenuProxyMac::populate):
33 2015-03-17 Ryuan Choi <ryuan.choi@navercorp.com>
35 [EFL] Expose JavaScript binding interface through ewk_extension
36 https://bugs.webkit.org/show_bug.cgi?id=142033
38 Reviewed by Gyuyoung Kim.
41 * UIProcess/API/efl/tests/extensions/extension_sample.cpp: Registered test object for new test case.
42 * UIProcess/API/efl/tests/test_ewk2_javascript_binding.cpp: Added simple binding API test case.
43 (EWK2ContextTestWithExtension::messageReceivedCallback):
44 (EWK2ContextTestWithExtension::EWK2ContextTestWithExtension):
46 * WebProcess/InjectedBundle/API/efl/EWebKit_Extension.h:
47 * WebProcess/InjectedBundle/API/efl/ewk_extension.cpp:
48 (EwkExtension::didCreatePage):
49 (EwkExtension::willDestroyPage):
50 * WebProcess/InjectedBundle/API/efl/ewk_extension.h:
51 * WebProcess/InjectedBundle/API/efl/ewk_extension_private.h:
52 * WebProcess/InjectedBundle/API/efl/ewk_page.cpp: Added.
57 (EwkPage::didFinishDocumentLoadForFrame):
58 (ewk_page_js_global_context_get):
59 (ewk_page_client_register):
60 (ewk_page_client_unregister):
61 * WebProcess/InjectedBundle/API/efl/ewk_page.h: Added.
62 * WebProcess/InjectedBundle/API/efl/ewk_page_private.h: Added.
64 * efl/ewebkit2-extension.pc.in:
66 2015-03-17 Tim Horton <timothy_horton@apple.com>
68 Cannot invoke action menus anymore
69 https://bugs.webkit.org/show_bug.cgi?id=142797
70 <rdar://problem/20032670>
72 * UIProcess/API/mac/WKView.mm:
73 Need a respondsToSelector check.
75 2015-03-17 Tim Horton <timothy_horton@apple.com>
77 Cannot invoke action menus anymore
78 https://bugs.webkit.org/show_bug.cgi?id=142797
79 <rdar://problem/20032670>
81 Reviewed by Beth Dakin.
83 * UIProcess/API/mac/WKView.mm:
84 Don't process mouse events that would make an action menu; call super
85 and let AppKit take care of it. We have to duplicate the macro so that
86 we can avoid calling super for the internal-only methods.
87 Also, otherMouseMoved is simply not a thing, so remove it.
89 2015-03-17 Beth Dakin <bdakin@apple.com>
91 DOM mouse events have weird timing for force clickable elements in Safari 8.0.3 on
93 https://bugs.webkit.org/show_bug.cgi?id=142700
95 rdar://problem/20165168
97 Reviewed by Tim Horton.
99 No need to tell the WKImmediateActionController about mouse down any more since we
100 are expecting it at the beginning of an immediate action interaction.
101 * UIProcess/API/mac/WKView.mm:
102 (-[WKView mouseDown:]):
104 Set the delaysPrimaryMouseButtonEvents to NO for the
105 _immediateActionGestureRecognizer. This will cause AppKit to send up the mouse
106 events at the expected time.
107 (-[WKView initWithFrame:processPool:configuration:webView:]):
109 WebCore::EventHandler now needs to know if an immediate action cancelled or
110 completed. This plumbs that information down.
111 * UIProcess/WebPageProxy.cpp:
112 (WebKit::WebPageProxy::immediateActionDidCancel):
113 (WebKit::WebPageProxy::immediateActionDidComplete):
114 * UIProcess/WebPageProxy.h:
115 * UIProcess/mac/WKImmediateActionController.h:
116 * UIProcess/mac/WKImmediateActionController.mm:
117 (-[WKImmediateActionController immediateActionRecognizerDidCancelAnimation:]):
118 (-[WKImmediateActionController immediateActionRecognizerDidCompleteAnimation:]):
119 (-[WKImmediateActionController wkView:willHandleMouseDown:]): Deleted.
120 * WebProcess/WebPage/WebPage.h:
121 * WebProcess/WebPage/WebPage.messages.in:
123 Call EventHandler::setImmediateActionStage() with the appropriate stage.
124 * WebProcess/WebPage/mac/WebPageMac.mm:
125 (WebKit::WebPage::performActionMenuHitTestAtLocation):
126 (WebKit::WebPage::immediateActionDidCancel):
127 (WebKit::WebPage::immediateActionDidComplete):
129 2015-03-17 Timothy Horton <timothy_horton@apple.com>
131 Reproducible null deref under ScriptedAnimationController::createDisplayRefreshMonitor
132 https://bugs.webkit.org/show_bug.cgi?id=142776
133 <rdar://problem/18921338>
135 Reviewed by Alexey Proskuryakov.
137 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
138 (WebKit::WebChromeClient::createDisplayRefreshMonitor):
139 * WebProcess/WebCoreSupport/WebChromeClient.h:
140 Adjust to the new signature.
142 2015-03-17 Antti Koivisto <antti@apple.com>
144 Disk cache should support Vary: Cookie
145 https://bugs.webkit.org/show_bug.cgi?id=142770
146 rdar://problem/19764945
148 Reviewed by Anders Carlsson.
150 Cookies are not part of the original request but are added by the networking layer when submitting the request.
151 Fetch them explicitly when resolving Vary: Cookie.
153 The implementation is not perfect as it fetches the cookie for the cache entry when saving a Vary:Cookie response,
154 not when making the request. In principle the cookie may have changed in-between. This should be enough to handle
155 reasonable cases though. Fetching cookies for every request might be too expensive for this rarely used feature.
157 * NetworkProcess/cache/NetworkCache.cpp:
158 (WebKit::NetworkCache::headerValueForVary):
159 (WebKit::NetworkCache::encodeStorageEntry):
160 (WebKit::NetworkCache::verifyVaryingRequestHeaders):
162 2015-03-17 Zan Dobersek <zdobersek@igalia.com>
164 [WK2] Use C++ lambdas in IPC::Connection
165 https://bugs.webkit.org/show_bug.cgi?id=138018
167 Reviewed by Anders Carlsson.
169 Replace uses of WTF::bind() in the IPC::Connection class with C++ lambdas.
171 * Platform/IPC/Connection.cpp:
172 (IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
173 (IPC::Connection::invalidate):
174 (IPC::Connection::sendMessage):
175 (IPC::Connection::processIncomingMessage): Simplify the error messages so we
176 don't have to format strings on-the-fly, removing the issues of cross-thread
177 string copying altogether.
178 (IPC::Connection::dispatchDidReceiveInvalidMessage): The parameters are now
179 of the StringReference type.
180 (IPC::Connection::enqueueIncomingMessage):
181 * Platform/IPC/Connection.h:
182 * Platform/IPC/mac/ConnectionMac.mm:
183 (IPC::Connection::receiveSourceEventHandler):
184 * Platform/IPC/unix/ConnectionUnix.cpp:
185 (IPC::Connection::open):
187 2015-03-17 Zan Dobersek <zdobersek@igalia.com>
189 [CMake] Use a forwarding header for ANGLE's ShaderLang.h to avoid picking up ANGLE's EGL headers
190 https://bugs.webkit.org/show_bug.cgi?id=142530
192 Reviewed by Darin Adler.
194 * CMakeLists.txt: Replace the Source/ThirdParty/ANGLE/include/GLSLANG entry
195 in the list of inclusion directories for WebKit2 with Source/ThirdParty/ANGLE,
196 possible due to the new forwarding header for ANGLE's ShaderLang.h.
198 2015-03-17 Gwang Yoon Hwang <yoon@igalia.com>
200 REGRESSION(r180924): Unable to build WebKitGTK+ with threaded compositor
202 Unreviewed build fix.
204 * WebProcess/WebPage/LayerTreeHost.h:
205 Remove duplicated declaration of setNativeSurfaceHandleForCompositing.
207 2015-03-16 Ryosuke Niwa <rniwa@webkit.org>
209 Enable ES6 classes by default
210 https://bugs.webkit.org/show_bug.cgi?id=142774
212 Reviewed by Gavin Barraclough.
214 * Configurations/FeatureDefines.xcconfig:
216 2015-03-16 Conrad Shultz <conrad_shultz@apple.com>
218 Don't pass nil as a fireDate for NSTimer
219 https://bugs.webkit.org/show_bug.cgi?id=142765
221 Reviewed by Dan Bernstein.
223 While we're here, switch to a selector that conforms to documented NSTimer API.
225 * UIProcess/mac/WKFullScreenWindowController.mm:
226 (-[WKFullScreenWindowController cancelOperation:]):
227 Set the timer's fireDate as the future date matching the former interval; update the selector.
228 (-[WKFullScreenWindowController _watchdogTimerFired:]):
229 Timer callback; wrap -exitFullScreen.
231 2015-03-16 Alex Christensen <achristensen@webkit.org>
233 Progress towards CMake on Mac
234 https://bugs.webkit.org/show_bug.cgi?id=142747
236 Reviewed by Chris Dumez.
239 Started adding Mac-specific directories and headers.
241 2015-03-16 Alexey Proskuryakov <ap@apple.com>
243 ASSERT(m_plugin) on plugins/snapshotting/snapshot-plugin-not-quite-blocked-by-image.html
244 https://bugs.webkit.org/show_bug.cgi?id=142637
246 Reviewed by Dean Jackson.
248 * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::pluginSnapshotTimerFired):
249 m_plugin can be legitimately null.
251 2015-03-16 Csaba Osztrogonác <ossy@webkit.org>
253 One more URTBF after r181578.
255 * WebProcess/WebPage/WebPage.cpp:
256 (WebKit::WebPage::updatePreferences):
258 2015-03-16 Csaba Osztrogonác <ossy@webkit.org>
262 * WebProcess/InjectedBundle/InjectedBundle.cpp:
263 (WebKit::InjectedBundle::setCSSAnimationTriggersEnabled): Copy/paste error fixed.
265 2015-03-16 Dean Jackson <dino@apple.com>
267 Expose WK2 preference for Animation Triggers runtime flag
268 https://bugs.webkit.org/show_bug.cgi?id=142744
270 Reviewed by Anders Carlsson.
272 Expose CSSAnimationTriggersEnabled, linking it to the runtime enabled
275 * Shared/WebPreferencesDefinitions.h:
276 * UIProcess/API/C/WKPreferences.cpp:
277 (WKPreferencesSetCSSAnimationTriggersEnabled):
278 (WKPreferencesGetCSSAnimationTriggersEnabled):
279 * UIProcess/API/C/WKPreferencesRefPrivate.h:
280 * WebProcess/InjectedBundle/InjectedBundle.cpp:
281 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
282 (WebKit::InjectedBundle::setCSSAnimationTriggersEnabled):
283 * WebProcess/InjectedBundle/InjectedBundle.h:
284 * WebProcess/WebPage/WebPage.cpp:
285 (WebKit::WebPage::updatePreferences):
287 2015-03-16 Conrad Shultz <conrad_shultz@apple.com>
289 Allow clients to selectively disable plug-ins
290 https://bugs.webkit.org/show_bug.cgi?id=142506
292 Reviewed by Anders Carlsson.
294 Add new functionality allow clients to declaratively disable individual plug-ins (in a manner that conceals them
295 from the page). As part of this:
297 1) Introduce the concept of web-visible plug-ins and related concepts, as distinct from the real underlying
300 2) Where applicable, plumb additional information about plug-ins (specifically, bundle identification) deeper
303 3) Add generic functionality to PluginStrategy to support filtering plug-ins for visibility and introduce
304 a concrete implementation thereof in WebPlatformStrategies in WebKit2.
306 4) Add messaging infrastructure to allow clients to set and clear plug-in policies.
308 While currently only used in a very limited manner, the new declarative plug-in policies are written generically
309 so that they could be easily used in the future to reduce synchronous messaging to the client when loading plug-ins.
311 * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
312 (WebKit::NetscapePluginModule::getPluginInfo):
313 Set new PluginInfo members.
315 * Shared/WebCoreArgumentCoders.cpp:
316 (IPC::ArgumentCoder<PluginInfo>::encode):
317 Handle new PluginInfo members.
318 (IPC::ArgumentCoder<PluginInfo>::decode):
321 * Shared/WebProcessCreationParameters.h:
322 Declare a member to store client plug-in policies.
324 * Shared/WebProcessCreationParameters.cpp:
325 (WebKit::WebProcessCreationParameters::encode):
327 (WebKit::WebProcessCreationParameters::decode):
330 * UIProcess/API/C/WKAPICast.h:
331 (WebKit::toWKPluginLoadClientPolicy):
332 Teach how to cast between WebCore and WebKit2 policy definitions.
333 (WebKit::toPluginLoadClientPolicy):
336 * UIProcess/API/C/WKPluginLoadPolicy.h:
337 Declare WKPluginLoadClientPolicy, matching PluginLoadClientPolicy in WebCore.
339 * UIProcess/API/C/mac/WKContextPrivateMac.h:
340 * UIProcess/API/C/mac/WKContextPrivateMac.mm:
341 (WKContextSetPluginLoadClientPolicy):
342 New function; wrap WebProcessPool::setPluginLoadClientPolicy().
343 (WKContextClearPluginClientPolicies):
344 New function; wrap WebProcessPool::clearPluginClientPolicies().
346 * UIProcess/WebProcessPool.h:
347 * UIProcess/WebProcessPool.cpp:
348 (WebKit::WebProcessPool::createNewWebProcess):
349 Copy any client plug-in policies to the new process' creation parameters.
350 (WebKit::WebProcessPool::setPluginLoadClientPolicy):
351 Send SetPluginLoadClientPolicy to all processes and stash the passed-in policy info.
352 (WebKit::WebProcessPool::clearPluginClientPolicies):
353 Send ClearPluginClientPolicies to all processes and clear any stashed policy info.
355 * WebProcess/Plugins/PDF/PDFPlugin.mm:
356 (WebKit::PDFPlugin::pluginInfo):
357 Set new PluginInfo member.
359 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
360 (WebKit::pluginSupportsExtension):
361 Adopt getWebVisibleMimesAndPluginIndices().
362 (WebKit::WebFrameLoaderClient::objectContentType):
363 Update to reflect reflect function rename.
365 * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
366 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
367 (WebKit::WebPlatformStrategies::getPluginInfo):
368 Pass the Page to populatePluginCache().
369 (WebKit::WebPlatformStrategies::getWebVisiblePluginInfo):
370 New member function; wrap getPluginInfo(); if appropriate, filter out plug-ins the client has asked
371 to block on the current page.
372 (WebKit::WebPlatformStrategies::setPluginLoadClientPolicy):
373 New member function; map empty inputs to a wildcard character and insert the new policy into the nested map.
374 (WebKit::WebPlatformStrategies::clearPluginClientPolicies):
375 New member function; empty m_hostsToPluginIdentifierData.
376 (WebKit::WebPlatformStrategies::pluginLoadClientPolicyForHost):
377 New member function; look up the most specific policy for the given plug-in and host.
378 (WebKit::WebPlatformStrategies::populatePluginCache):
379 If appropriate, set the client load policy on the plug-ins; do this irrespective of whether the cache has
380 been populated since the Page, and therefore host, may change.
382 * WebProcess/WebPage/WebPage.cpp:
383 (WebKit::WebPage::canShowMIMEType):
384 Update to reflect function rename.
386 * WebProcess/WebProcess.h:
387 * WebProcess/WebProcess.cpp:
388 (WebKit::WebProcess::initializeWebProcess):
389 Enumerate and process the client plug-in policies in the creation parameters.
390 (WebKit::WebProcess::setPluginLoadClientPolicy):
391 New member function; wrap PluginStrategy::setPluginLoadClientPolicy.
392 (WebKit::WebProcess::clearPluginClientPolicies):
393 New member function; wrap PluginStrategy::clearPluginClientPolicies().
395 * WebProcess/WebProcess.messages.in:
396 Add messages for setting and clearing policies.
398 2015-03-16 Carlos Garcia Campos <cgarcia@igalia.com>
400 Unreviewed. Add new Notification classes to GTK+ API documentation.
402 Add WebKitNotification and WebKitNotificationPermissionRequest to
403 the documentation and fix some other typos causing warnings when
404 generating HTML documentation.
406 * UIProcess/API/gtk/WebKitUserContent.cpp:
407 * UIProcess/API/gtk/WebKitWebView.cpp:
408 (webkit_web_view_class_init):
409 * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
411 2015-03-16 Przemyslaw Piorkowski <p.piorkowski@samsung.com>
413 [EFL][WK2] REGRESSION(r178526): test_ewk2_storage_manager has been failed for a long time
414 https://bugs.webkit.org/show_bug.cgi?id=141249
416 Reviewed by Gyuyoung Kim.
418 * PlatformEfl.cmake: Enable test_ewk2_storage_manager for EFL port - it is passing now.
420 2015-03-16 David Kilzer <ddkilzer@apple.com>
422 [iOS] REGRESSION (r181511): Most layout tests crash with a NULL deref
425 [iOS] Presenting a modal sheet on top of a WKWebView causes it to lose focused, active state
426 <http://webkit.org/b/142702>
428 * UIProcess/ios/PageClientImplIOS.mm:
429 (WebKit::PageClientImpl::isViewWindowActive): Add NULL check for m_webView.
430 (WebKit::PageClientImpl::isViewFocused): Ditto.
432 2015-03-15 Simon Fraser <simon.fraser@apple.com>
434 Clean up related to wheelEvent names
435 https://bugs.webkit.org/show_bug.cgi?id=142713
437 Reviewed by Anders Carlsson.
439 Add EventNames::isWheelEventType() and use it in places that test for the
440 two wheel event names.
442 * WebProcess/Plugins/PluginView.cpp:
443 (WebKit::PluginView::handleEvent):
445 2015-03-15 Dan Bernstein <mitz@apple.com>
447 [iOS] Presenting a modal sheet on top of a WKWebView causes it to lose focused, active state
448 https://bugs.webkit.org/show_bug.cgi?id=142702
450 Reviewed by Anders Carlsson.
452 * UIProcess/API/Cocoa/WKWebView.mm:
453 (-[WKWebView becomeFirstResponder]): Override to delegate first responder status to the
454 WKContentView if possible.
455 (-[WKWebView _retainActiveFocusedState]): New SPI that prevents view hierarchy changes from
456 affecting the active and focused state of the view. Increments a counter ivar and returns a
457 completion block (which callers must call when they’re done) that decrements it back.
458 * UIProcess/API/Cocoa/WKWebViewInternal.h: Declared new _activeFocusedStateRetainCount ivar
459 with @package access.
460 * UIProcess/API/Cocoa/WKWebViewPrivate.h: Declared new method.
462 * UIProcess/ios/PageClientImplIOS.mm:
463 (WebKit::PageClientImpl::isViewWindowActive): Return true if active/focused state is to be
464 maintained despite not being visible.
465 (WebKit::PageClientImpl::isViewFocused): Return true if active/focused state is to be
466 maintained despite not being active.
468 * UIProcess/ios/WKContentViewInteraction.mm:
469 (-[WKContentView resignFirstResponder]): Don’t blur the assisted node if active/focused
470 state is to be maintained.
472 2015-03-14 Simon Fraser <simon.fraser@apple.com>
474 Clean up use of flags in localToContainer-type functions
475 https://bugs.webkit.org/show_bug.cgi?id=142704
477 Reviewed by Alexey Proskuryakov.
479 Pass UseTransforms explicitly to localToContainerPoint()
481 * WebProcess/WebPage/ios/WebPageIOS.mm:
482 (WebKit::WebPage::getAssistedNodeInformation):
484 2015-03-14 Brent Fulgham <bfulgham@apple.com>
486 [iOS] scroll snap points are animating to the wrong positions.
487 https://bugs.webkit.org/show_bug.cgi?id=142705
488 <rdar://problem/20136946>
490 Reviewed by Simon Fraser.
492 Scroll snapping was landing in the wrong place on iOS because of two problems:
493 (1) It was searching for the closest snap offset point using unscaled 'screen' pixels,
494 which caused it to always choose one of the earliest snap point options.
495 (2) It was then selecting a scaled snap point coordinate and passing it back to UIKit
496 to animate the snap. This caused it to select a target point beyond the 'screen' pixel
499 The solution to both problems are to scale the scroll destination UIKit suggests so that
500 we search among the scaled points with a valid value. Then, we need to scale the returned
501 value back to screen units before handing it back to UIKit to process.
503 * UIProcess/API/Cocoa/WKWebView.mm:
504 (-[WKWebView scrollViewWillBeginDragging:]): Drive-by fix. Get rid of extra ';' at
506 * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
507 (WebKit::RemoteScrollingCoordinatorProxy::closestSnapOffsetForMainFrameScrolling):
509 2015-03-14 Dean Jackson <dino@apple.com>
511 Feature flag for Animations Level 2
512 https://bugs.webkit.org/show_bug.cgi?id=142699
513 <rdar://problem/20165097>
515 Reviewed by Brent Fulgham.
517 Add ENABLE_CSS_ANIMATIONS_LEVEL_2 and a runtime flag animationTriggersEnabled.
519 * Configurations/FeatureDefines.xcconfig:
521 2015-03-14 VÃctor Manuel Jáquez Leal <vjaquez@igalia.com>
523 [GStreamer] share GL context in pipeline
524 https://bugs.webkit.org/show_bug.cgi?id=142693
526 Reviewed by Philippe Normand.
528 * WebProcess/gtk/WebProcessMainGtk.cpp: Enable XInitThreads() if
529 GSTREAMER_GL is used, since GstGL elements use another thread for
530 queuing GL operations.
532 2015-03-13 Alex Christensen <achristensen@webkit.org>
534 Progress towards CMake on Mac.
535 https://bugs.webkit.org/show_bug.cgi?id=142680
537 Reviewed by Gyuyoung Kim.
539 * PlatformMac.cmake: Added.
541 2015-03-13 Commit Queue <commit-queue@webkit.org>
543 Unreviewed, rolling out r181483.
544 https://bugs.webkit.org/show_bug.cgi?id=142688
546 Caused use-after-free on many tests (Requested by ap on
551 "Allow clients to selectively disable plug-ins"
552 https://bugs.webkit.org/show_bug.cgi?id=142506
553 http://trac.webkit.org/changeset/181483
555 2015-03-13 Eric Carlson <eric.carlson@apple.com>
557 [Mac] Enable WIRELESS_PLAYBACK_TARGET
558 https://bugs.webkit.org/show_bug.cgi?id=142635
560 Reviewed by Darin Adler.
562 * Configurations/FeatureDefines.xcconfig:
564 2015-03-13 Timothy Horton <timothy_horton@apple.com>
566 Sites that use a device-width viewport but don't have enough height to fill the view are scaled up
567 https://bugs.webkit.org/show_bug.cgi?id=142664
568 <rdar://problem/18859470>
570 Reviewed by Benjamin Poulain.
572 * UIProcess/ios/WKScrollView.mm:
573 (-[WKScrollView _rubberBandOffsetForOffset:maxOffset:minOffset:range:outside:]):
574 Now that the WKContentView can (without pinching) be smaller than the unobscured
575 region of the WKWebView, we need to take that into account when deciding where
576 to retarget scrolling.
578 2015-03-13 Mark Lam <mark.lam@apple.com>
580 Replace TCSpinLock with a new WTF::SpinLock based on WTF::Atomic.
581 <https://webkit.org/b/142674>
583 Reviewed by Filip Pizlo.
585 * WebProcess/WebPage/EventDispatcher.cpp:
586 (WebKit::EventDispatcher::EventDispatcher):
587 * WebProcess/WebPage/EventDispatcher.h:
588 * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
589 (WebKit::ViewUpdateDispatcher::ViewUpdateDispatcher):
590 * WebProcess/WebPage/ViewUpdateDispatcher.h:
592 2015-03-10 Conrad Shultz <conrad_shultz@apple.com>
594 Allow clients to selectively disable plug-ins
595 https://bugs.webkit.org/show_bug.cgi?id=142506
597 Reviewed by Anders Carlsson.
599 Add new functionality allow clients to declaratively disable individual plug-ins (in a manner that conceals them
600 from the page). As part of this:
602 1) Introduce the concept of web-visible plug-ins and related concepts, as distinct from the real underlying
605 2) Where applicable, plumb additional information about plug-ins (specifically, bundle identification) deeper
608 3) Add generic functionality to PluginStrategy to support filtering plug-ins for visibility and introduce
609 a concrete implementation thereof in WebPlatformStrategies in WebKit2.
611 4) Add messaging infrastructure to allow clients to set and clear plug-in policies.
613 While currently only used in a very limited manner, the new declarative plug-in policies are written generically
614 so that they could be easily used in the future to reduce synchronous messaging to the client when loading plug-ins.
616 * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
617 (WebKit::NetscapePluginModule::getPluginInfo):
618 Set new PluginInfo members.
620 * Shared/WebCoreArgumentCoders.cpp:
621 (IPC::ArgumentCoder<PluginInfo>::encode):
622 Handle new PluginInfo members.
623 (IPC::ArgumentCoder<PluginInfo>::decode):
626 * Shared/WebProcessCreationParameters.h:
627 Declare a member to store client plug-in policies.
629 * Shared/WebProcessCreationParameters.cpp:
630 (WebKit::WebProcessCreationParameters::encode):
632 (WebKit::WebProcessCreationParameters::decode):
635 * UIProcess/API/C/WKAPICast.h:
636 (WebKit::toWKPluginLoadClientPolicy):
637 Teach how to cast between WebCore and WebKit2 policy definitions.
638 (WebKit::toPluginLoadClientPolicy):
641 * UIProcess/API/C/WKPluginLoadPolicy.h:
642 Declare WKPluginLoadClientPolicy, matching PluginLoadClientPolicy in WebCore.
644 * UIProcess/API/C/mac/WKContextPrivateMac.h:
645 * UIProcess/API/C/mac/WKContextPrivateMac.mm:
646 (WKContextSetPluginLoadClientPolicy):
647 New function; wrap WebProcessPool::setPluginLoadClientPolicy().
648 (WKContextClearPluginClientPolicies):
649 New function; wrap WebProcessPool::clearPluginClientPolicies().
651 * UIProcess/WebProcessPool.h:
652 * UIProcess/WebProcessPool.cpp:
653 (WebKit::WebProcessPool::createNewWebProcess):
654 Copy any client plug-in policies to the new process' creation parameters.
655 (WebKit::WebProcessPool::setPluginLoadClientPolicy):
656 Send SetPluginLoadClientPolicy to all processes and stash the passed-in policy info.
657 (WebKit::WebProcessPool::clearPluginClientPolicies):
658 Send ClearPluginClientPolicies to all processes and clear any stashed policy info.
660 * WebProcess/Plugins/PDF/PDFPlugin.mm:
661 (WebKit::PDFPlugin::pluginInfo):
662 Set new PluginInfo member.
664 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
665 (WebKit::pluginSupportsExtension):
666 Adopt getWebVisibleMimesAndPluginIndices().
667 (WebKit::WebFrameLoaderClient::objectContentType):
668 Update to reflect reflect function rename.
670 * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
671 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
672 (WebKit::WebPlatformStrategies::getPluginInfo):
673 Pass the Page to populatePluginCache().
674 (WebKit::WebPlatformStrategies::getWebVisiblePluginInfo):
675 New member function; wrap getPluginInfo(); if appropriate, filter out plug-ins the client has asked
676 to block on the current page.
677 (WebKit::WebPlatformStrategies::setPluginLoadClientPolicy):
678 New member function; map empty inputs to a wildcard character and insert the new policy into the nested map.
679 (WebKit::WebPlatformStrategies::clearPluginClientPolicies):
680 New member function; empty m_hostsToPluginIdentifierData.
681 (WebKit::WebPlatformStrategies::pluginLoadClientPolicyForHost):
682 New member function; look up the most specific policy for the given plug-in and host.
683 (WebKit::WebPlatformStrategies::populatePluginCache):
684 If appropriate, set the client load policy on the plug-ins; do this irrespective of whether the cache has
685 been populated since the Page, and therefore host, may change.
687 * WebProcess/WebPage/WebPage.cpp:
688 (WebKit::WebPage::canShowMIMEType):
689 Update to reflect function rename.
691 * WebProcess/WebProcess.h:
692 * WebProcess/WebProcess.cpp:
693 (WebKit::WebProcess::initializeWebProcess):
694 Enumerate and process the client plug-in policies in the creation parameters.
695 (WebKit::WebProcess::setPluginLoadClientPolicy):
696 New member function; wrap PluginStrategy::setPluginLoadClientPolicy.
697 (WebKit::WebProcess::clearPluginClientPolicies):
698 New member function; wrap PluginStrategy::clearPluginClientPolicies().
700 * WebProcess/WebProcess.messages.in:
701 Add messages for setting and clearing policies.
703 2015-03-12 Jon Honeycutt <jhoneycutt@apple.com>
705 Use UIDocumentMenuViewController to allow selection of files from
706 iCloud Drive in WKFileUploadPanel
708 Part of <https://bugs.webkit.org/show_bug.cgi?id=142596> WebKit on
709 iOS should support file upload from iCloud Drive
710 <rdar://problem/12178991>
712 Reviewed by Andy Estes.
714 * Platform/spi/ios/UIKitSPI.h:
715 Include UIDocumentMenuViewController_Private.h if it exists. If not,
716 declare this new SPI.
718 * UIProcess/ios/forms/WKFileUploadPanel.mm:
719 (fallbackIconForFile):
720 Create a UIDocumentInteractionController for the file, and return a
721 thumbnail image from its smallest icon.
724 If we can get a UIImage from the file, create a thumbnail from it.
725 Otherwise, call fallbackIconForFile().
728 Code moved from -[_WKVideoFileUploadItem displayImage].
731 Get the file's extension, and get the extension's preferred UTI. If the
732 UTI is an image type, call iconForImageFile(). If it's a video type,
733 call iconForVideoFile(). Otherwise, return the fallback icon.
735 (-[_WKFileUploadItem initWithFileURL:]):
736 Added an initializer that takes a file URL.
738 (-[_WKFileUploadItem fileURL]):
739 (-[_WKImageFileUploadItem initWithFileURL:originalImage:]):
740 (-[_WKVideoFileUploadItem displayImage]):
742 Inherit from UIDocumentPickerDelegate and UIDocumentMenuDelegate. Add
743 an ivar for the document menu controller.
745 (-[WKFileUploadPanel dealloc]):
746 (-[WKFileUploadPanel presentWithParameters:resultListener:]):
747 If instances of UIDocumentMenuViewController respond to
748 -_setIgnoreApplicationEntitlementForImport:, meaning we can disable the
749 assertion that the current app has the iCloud Documents entitlement,
750 then show the document picker menu. Otherwise, show the current source
751 selection UI. The runtime check will be removed when a newer UIKit is
755 Return the UTIs for the <input> element's "accept" attribute's MIME
758 (-[WKFileUploadPanel _mediaTypesForPickerSourceType:]):
759 Call UTIsForMIMETypes(). Fall back to available source types for this
762 (-[WKFileUploadPanel _documentPickerMenuMediaTypes]):
763 Call UTIsForMIMETypes(). Fall back to the all-encompassing
766 (-[WKFileUploadPanel _photoLibraryButtonLabel]):
767 (-[WKFileUploadPanel _cameraButtonLabel]):
768 Factored out of -_showMediaSourceSelectionSheet. Return the
769 appropriate label for the camera button, based on whether it can take a
770 photo or video, or return nil if the camera is not available.
772 (-[WKFileUploadPanel _showMediaSourceSelectionSheet]):
773 Changed to use -_cameraButtonLabel and
774 -_presentForCurrentInterfaceIdiom:.
776 (-[WKFileUploadPanel _showDocumentPickerMenu]):
777 Create a UIDocumentMenuViewController, and populate it with options to
778 open the photo library or take a picture or video. If iCloud Drive or
779 other document sources are available, they will be added automatically.
781 (-[WKFileUploadPanel _presentForCurrentInterfaceIdiom:]):
782 (-[WKFileUploadPanel documentMenu:didPickDocumentPicker:]):
783 (-[WKFileUploadPanel documentMenuWasCancelled:]):
784 (-[WKFileUploadPanel documentPicker:didPickDocumentAtURL:]):
785 (-[WKFileUploadPanel documentPickerWasCancelled:]):
786 (-[WKFileUploadPanel _uploadItemFromMediaInfo:successBlock:failureBlock:]):
788 (-[_WKImageFileUploadItem initWithFilePath:originalImage:]): Deleted.
789 (-[_WKImageFileUploadItem fileURL]): Deleted.
790 (-[_WKVideoFileUploadItem initWithFilePath:mediaURL:]): Deleted.
791 (-[_WKVideoFileUploadItem fileURL]): Deleted.
793 2015-03-11 Enrica Casucci <enrica@apple.com>
795 Adopt new API for keyboard event handling.
796 https://bugs.webkit.org/show_bug.cgi?id=142602
797 rdar://problem/19966087
799 Reviewed by Sam Weinig.
803 * UIProcess/ios/WKContentViewInteraction.mm:
804 (-[WKContentView _didHandleKeyEvent:]):
806 2015-03-12 Alexey Proskuryakov <ap@apple.com>
808 testRunner.setAlwaysAcceptCookies does not work with NetworkProcess
809 https://bugs.webkit.org/show_bug.cgi?id=138687
811 Reviewed by Carlos Garcia Campos.
813 * UIProcess/WebCookieManagerProxy.cpp:
814 (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy): Don't change system-wide
815 cookie accept policy when in testing mode. Also, update the policy in WebProcesses too,
816 as we still do some networking there.
818 * UIProcess/WebProcessPool.h:
819 * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
820 (WKBundleSetAlwaysAcceptCookies): Deleted.
821 * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
822 * WebProcess/InjectedBundle/InjectedBundle.cpp:
823 (WebKit::InjectedBundle::setAlwaysAcceptCookies): Deleted.
824 * WebProcess/InjectedBundle/InjectedBundle.h:
825 Remove WKBundleSetAlwaysAcceptCookies SPI, as WKTR now uses an API in UI process.
827 2015-03-12 Anders Carlsson <andersca@apple.com>
829 WKErrorDomain should be declared nonnull
830 https://bugs.webkit.org/show_bug.cgi?id=142628
832 Reviewed by Antti Koivisto.
834 Add WK_ASSUME_NONNULL_BEGIN and WK_ASSUME_NONNULL_END so everything will be implicitly nonnull.
836 * UIProcess/API/Cocoa/WKError.h:
838 2015-03-12 Ian Henderson <ian@ianhenderson.org>
840 PDFs don't snapshot properly in iOS Safari
841 https://bugs.webkit.org/show_bug.cgi?id=142623
843 Reviewed by Tim Horton.
845 * UIProcess/API/Cocoa/WKWebView.mm:
846 (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
847 If we have a _customContentView, use UIView snapshotting instead of
848 trying to snapshot the web page.
850 2015-03-12 Eric Carlson <eric.carlson@apple.com>
852 [Mac] Update AirPlay handling
853 https://bugs.webkit.org/show_bug.cgi?id=142541
855 Unreviewed, respond to post-review comments and add previously reviewed changes
856 missed by a bungled merge.
858 * Shared/mac/WebCoreArgumentCodersMac.mm:
859 * UIProcess/WebMediaPlaybackTargetPickerProxy.cpp:
860 (WebKit::WebMediaPlaybackTargetPickerProxy::~WebMediaPlaybackTargetPickerProxy):
861 * UIProcess/mac/PageClientImpl.h:
862 * UIProcess/mac/PageClientImpl.mm:
863 (WebKit::PageClientImpl::createPlaybackTargetPicker):
864 * UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.h: Added.
865 * UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.mm: Added.
866 * WebKit2.xcodeproj/project.pbxproj:
867 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
868 * WebProcess/WebCoreSupport/WebChromeClient.h:
869 * WebProcess/WebPage/WebPage.h:
870 * WebProcess/WebPage/WebPage.messages.in:
871 * WebProcess/WebPage/mac/WebPageMac.mm:
872 * WebProcess/com.apple.WebProcess.sb.in:
874 2015-03-11 Antti Koivisto <antti@apple.com>
876 Cache traversal missing large entries
877 https://bugs.webkit.org/show_bug.cgi?id=142601
879 Reviewed by Andreas Kling.
881 When traversing cache entries we only read the header data from disk. This didn't work
882 correctly for entries larger than the read size.
884 * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
885 (WebKit::NetworkCache::IOChannel::read):
887 Partial reads only receive one callback with 'done' set to true.
888 Ensure we actually return data in this case.
890 * NetworkProcess/cache/NetworkCacheStorage.cpp:
891 (WebKit::NetworkCache::decodeEntryHeader):
895 2015-03-11 Eric Carlson <eric.carlson@apple.com>
897 [Mac] Update AirPlay handling
898 https://bugs.webkit.org/show_bug.cgi?id=142541
900 Reviewed by Sam Weinig.
902 * Shared/WebCoreArgumentCoders.h:
903 * Shared/mac/WebCoreArgumentCodersMac.mm:
904 (IPC::ArgumentCoder<AVPlaybackTarget>::encode):
905 (IPC::ArgumentCoder<AVPlaybackTarget>::decode):
906 * UIProcess/PageClient.h:
907 * UIProcess/WebAVPlaybackTargetPickerProxy.cpp: Added.
908 (WebKit::WebAVPlaybackTargetPickerProxy::WebAVPlaybackTargetPickerProxy):
909 (WebKit::WebAVPlaybackTargetPickerProxy::~WebAVPlaybackTargetPickerProxy):
910 (WebKit::WebAVPlaybackTargetPickerProxy::showPlaybackTargetPicker):
911 (WebKit::WebAVPlaybackTargetPickerProxy::startingMonitoringPlaybackTargets):
912 (WebKit::WebAVPlaybackTargetPickerProxy::stopMonitoringPlaybackTargets):
913 * UIProcess/WebAVPlaybackTargetPickerProxy.h: Added.
914 (WebKit::WebAVPlaybackTargetPickerProxy::Client::~Client):
915 * UIProcess/WebPageProxy.cpp:
916 (WebKit::WebPageProxy::devicePickerProxy):
917 (WebKit::WebPageProxy::showPlaybackTargetPicker):
918 (WebKit::WebPageProxy::startingMonitoringPlaybackTargets):
919 (WebKit::WebPageProxy::stopMonitoringPlaybackTargets):
920 (WebKit::WebPageProxy::didChoosePlaybackTarget):
921 (WebKit::WebPageProxy::externalOutputDeviceAvailableDidChange):
922 * UIProcess/WebPageProxy.h:
923 * UIProcess/WebPageProxy.messages.in:
924 * UIProcess/mac/PageClientImpl.h:
925 * UIProcess/mac/PageClientImpl.mm:
926 (WebKit::PageClientImpl::createPlaybackTargetPicker):
927 * UIProcess/mac/WebAVPlaybackTargetPickerProxyMac.h: Added.
928 * UIProcess/mac/WebAVPlaybackTargetPickerProxyMac.mm: Added.
929 (WebKit::WebAVPlaybackTargetPickerProxyMac::create):
930 (WebKit::WebAVPlaybackTargetPickerProxyMac::WebAVPlaybackTargetPickerProxyMac):
931 (WebKit::WebAVPlaybackTargetPickerProxyMac::~WebAVPlaybackTargetPickerProxyMac):
932 (WebKit::WebAVPlaybackTargetPickerProxyMac::outputeDeviceAvailabilityChangedTimerFired):
933 (WebKit::WebAVPlaybackTargetPickerProxyMac::availableDevicesDidChange):
934 (WebKit::WebAVPlaybackTargetPickerProxyMac::devicePicker):
935 (WebKit::WebAVPlaybackTargetPickerProxyMac::showPlaybackTargetPicker):
936 (WebKit::WebAVPlaybackTargetPickerProxyMac::currentDeviceDidChange):
937 (WebKit::WebAVPlaybackTargetPickerProxyMac::startingMonitoringPlaybackTargets):
938 (WebKit::WebAVPlaybackTargetPickerProxyMac::stopMonitoringPlaybackTargets):
939 (-[WebAVOutputDevicePickerMenuControllerHelper initWithCallback:]):
940 (-[WebAVOutputDevicePickerMenuControllerHelper clearCallback]):
941 (-[WebAVOutputDevicePickerMenuControllerHelper observeValueForKeyPath:ofObject:change:context:]):
942 * WebKit2.xcodeproj/project.pbxproj:
943 * WebProcess/WebCoreSupport/WebAVPlaybackTargetPicker.cpp: Added.
944 (WebKit::WebAVPlaybackTargetPicker::WebAVPlaybackTargetPicker):
945 (WebKit::WebAVPlaybackTargetPicker::showPlaybackDevicePicker):
946 (WebKit::WebAVPlaybackTargetPicker::configureWireLessTargetMonitoring):
947 (WebKit::WebAVPlaybackTargetPicker::addClient):
948 (WebKit::WebAVPlaybackTargetPicker::removeClient):
949 (WebKit::WebAVPlaybackTargetPicker::didChoosePlaybackTarget):
950 (WebKit::WebAVPlaybackTargetPicker::playbackTargetAvailabilityDidChange):
951 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
952 (WebKit::WebChromeClient::showPlaybackTargetPicker):
953 (WebKit::WebChromeClient::startingMonitoringPlaybackTargets):
954 (WebKit::WebChromeClient::stopMonitoringPlaybackTargets):
955 * WebProcess/WebCoreSupport/WebChromeClient.h:
956 * WebProcess/WebPage/WebPage.h:
957 * WebProcess/WebPage/WebPage.messages.in:
958 * WebProcess/WebPage/mac/WebPageMac.mm:
959 (WebKit::WebPage::playbackTargetSelected):
960 (WebKit::WebPage::playbackTargetAvailabilityDidChange):
961 * WebProcess/com.apple.WebProcess.sb.in:
963 2015-03-11 Myles C. Maxfield <mmaxfield@apple.com>
969 * Shared/Downloads/mac/DownloadMac.mm:
970 (WebKit::Download::start):
971 (WebKit::Download::resume):
973 2015-03-10 Sam Weinig <sam@webkit.org>
975 Allow adding a button in input elements for auto fill related functionality
976 <rdar://problem/19782066>
977 https://bugs.webkit.org/show_bug.cgi?id=142564
979 Reviewed by Anders Carlsson.
981 - Adds new SPI to respond to clicks on the AutoFill button (both bundle and UIProcess).
982 - Adds new SPI to enable/disable the display of the AutoFill button on an element.
983 - Adds new SPI to get the bounds of the AutoFill button.
984 - Updates spelling of AutoFill to be consistent.
986 * UIProcess/API/APIUIClient.h:
987 (API::UIClient::didClickAutoFillButton):
988 * UIProcess/API/C/WKPage.cpp:
989 (WKPageSetPageUIClient):
990 * UIProcess/API/C/WKPageUIClient.h:
991 * UIProcess/WebPageProxy.cpp:
992 (WebKit::WebPageProxy::handleAutoFillButtonClick):
993 * UIProcess/WebPageProxy.h:
994 * UIProcess/WebPageProxy.messages.in:
995 * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
996 (API::InjectedBundle::PageUIClient::didClickAutoFillButton):
997 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
998 (WebKit::InjectedBundlePageUIClient::didClickAutoFillButton):
999 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
1000 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1001 (WebKit::WebChromeClient::handleAutoFillButtonClick):
1002 * WebProcess/WebCoreSupport/WebChromeClient.h:
1003 * WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h:
1004 Pipe the didClickAutoFillButton to the SPI layer.
1006 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
1007 (-[WKWebProcessPlugInNodeHandle HTMLInputElementIsAutoFilled]):
1008 (-[WKWebProcessPlugInNodeHandle setHTMLInputElementIsAutoFilled:]):
1009 Update for new spelling of AutoFill.
1011 * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
1012 * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
1013 (WKBundleNodeHandleGetHTMLInputElementAutoFilled):
1014 (WKBundleNodeHandleSetHTMLInputElementAutoFilled):
1015 Added. Replaces WKBundleNodeHandleGetHTMLInputElementAutofilled/WKBundleNodeHandleSetHTMLInputElementAutofilled
1016 which are now deprecated due to inconsistent spelling of AutoFill.
1018 (WKBundleNodeHandleGetHTMLInputElementAutoFillButtonEnabled):
1019 (WKBundleNodeHandleSetHTMLInputElementAutoFillButtonEnabled):
1020 (WKBundleNodeHandleGetHTMLInputElementAutoFillButtonBounds):
1023 (WKBundleNodeHandleGetHTMLInputElementAutofilled):
1024 (WKBundleNodeHandleSetHTMLInputElementAutofilled):
1027 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
1028 (WebKit::InjectedBundleNodeHandle::getOrCreate):
1029 (WebKit::InjectedBundleNodeHandle::create):
1030 (WebKit::InjectedBundleNodeHandle::InjectedBundleNodeHandle):
1031 (WebKit::InjectedBundleNodeHandle::~InjectedBundleNodeHandle):
1032 (WebKit::InjectedBundleNodeHandle::coreNode):
1033 (WebKit::InjectedBundleNodeHandle::document):
1034 (WebKit::InjectedBundleNodeHandle::elementBounds):
1035 (WebKit::InjectedBundleNodeHandle::renderRect):
1036 (WebKit::InjectedBundleNodeHandle::renderedImage):
1037 (WebKit::InjectedBundleNodeHandle::visibleRange):
1038 (WebKit::InjectedBundleNodeHandle::setHTMLInputElementValueForUser):
1039 (WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutoFilled):
1040 (WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutoFilled):
1041 (WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutoFillButtonEnabled):
1042 (WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutoFillButtonEnabled):
1043 (WebKit::InjectedBundleNodeHandle::htmlInputElementAutoFillButtonBounds):
1044 (WebKit::InjectedBundleNodeHandle::htmlInputElementLastChangeWasUserEdit):
1045 (WebKit::InjectedBundleNodeHandle::htmlTextAreaElementLastChangeWasUserEdit):
1046 (WebKit::InjectedBundleNodeHandle::isTextField):
1047 (WebKit::InjectedBundleNodeHandle::htmlTableCellElementCellAbove):
1048 (WebKit::InjectedBundleNodeHandle::documentFrame):
1049 (WebKit::InjectedBundleNodeHandle::htmlFrameElementContentFrame):
1050 (WebKit::InjectedBundleNodeHandle::htmlIFrameElementContentFrame):
1051 (WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutofilled): Deleted.
1052 (WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutofilled): Deleted.
1053 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
1054 Fix-up InjectedBundleNodeHandle to store its underlying Node in a Ref, rather than a RefPtr.
1055 Add helpers to implement the new SPI for WKBundleNodeHandleRef.
1057 2015-03-11 Timothy Horton <timothy_horton@apple.com>
1059 Make it possible to zoom on pages that claim to lay out to device size and then fail to do so
1060 https://bugs.webkit.org/show_bug.cgi?id=142549
1062 Reviewed by Simon Fraser.
1064 * Shared/WebPreferencesDefinitions.h:
1065 * WebProcess/WebPage/WebPage.cpp:
1066 (WebKit::WebPage::updatePreferences):
1067 Flip the pref on by default.
1069 2015-03-11 Carlos Garcia Campos <cgarcia@igalia.com>
1071 [GTK] Do not look for child processes in the UI process binary path
1072 https://bugs.webkit.org/show_bug.cgi?id=135752
1074 Reviewed by Gustavo Noronha Silva.
1076 It's only useful for internal tools and tests, but never when
1077 installed, since we don't install the processes in the bin dir but
1080 * Shared/gtk/ProcessExecutablePathGtk.cpp:
1081 (WebKit::findWebKitProcess): Only look or the executables in the
1082 UI process binary path or WEBKIT_EXEC_PATH for development builds.
1083 * UIProcess/API/gtk/WebKitWebContext.cpp:
1084 (injectedBundleDirectory): Only check
1085 WEBKIT_INJECTED_BUNDLE_PATH env var for development builds.
1087 2015-03-10 Antti Koivisto <antti@apple.com>
1089 Add interface to delete disk cache entries
1090 https://bugs.webkit.org/show_bug.cgi?id=142546
1092 Reviewed by Anders Carlsson.
1094 * NetworkProcess/cache/NetworkCache.cpp:
1095 (WebKit::NetworkCache::Cache::remove):
1096 * NetworkProcess/cache/NetworkCache.h:
1097 * NetworkProcess/cache/NetworkCacheStorage.cpp:
1098 (WebKit::NetworkCache::Storage::Storage):
1099 (WebKit::NetworkCache::Storage::remove):
1101 Move deletion to a serial queue so we can't create large number of threads.
1103 (WebKit::NetworkCache::Storage::dispatchReadOperation):
1104 (WebKit::NetworkCache::Storage::dispatchHeaderWriteOperation):
1105 (WebKit::NetworkCache::Storage::removeEntry): Deleted.
1106 * NetworkProcess/cache/NetworkCacheStorage.h:
1107 (WebKit::NetworkCache::Storage::deleteQueue):
1109 2015-03-10 Chris Dumez <cdumez@apple.com>
1111 5 tests fail on Apple Mac WK2 performance bots
1112 https://bugs.webkit.org/show_bug.cgi?id=142485
1114 Reviewed by Andreas Kling.
1116 Only log errors in debug builds if SandboxExtension::createHandle() fails
1117 so that performance tests don't fail because of it. Such error is not
1118 fatal and is expected under certain circumstances. In particular,
1119 SandboxExtension::createHandle() is sometimes called for non-existing
1120 files (e.g. from NetworkResourceLoadParameters::encode()).
1122 * Shared/mac/SandboxExtensionMac.mm:
1123 (WebKit::SandboxExtension::createHandle):
1125 2015-03-10 Timothy Horton <timothy_horton@apple.com>
1129 * Shared/Downloads/ios/DownloadIOS.mm:
1130 (WebKit::Download::startWithHandle):
1131 * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
1132 (-[WKCustomProtocolLoader initWithCustomProtocolManagerProxy:customProtocolID:request:connection:]):
1134 2015-03-10 Carlos Garcia Campos <cgarcia@igalia.com>
1136 [GTK] Contents not shown when entering AC mode unless the window is resized
1137 https://bugs.webkit.org/show_bug.cgi?id=142347
1139 Reviewed by Žan Doberšek.
1141 The problem is once again that we are now creating the redirected
1142 X window in realize method. When entering AC mode we resize the
1143 redirected window to the drawing area size. Since the size hasn't
1144 changed from the drawing area point of view, the web process is
1145 not notified. The WebProcess always uses the window size, instead
1146 of the root layer size, to make sure it's in sync, see the comment
1147 in LayerTreeHostGtk::compositeLayersToContext(). So, we need to
1148 enforce a resize when we change the size of the redirected window
1149 when entering AC mode.
1151 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1152 (webkitWebViewBaseEnterAcceleratedCompositingMode):
1153 * UIProcess/DrawingAreaProxyImpl.h:
1154 (WebKit::DrawingAreaProxyImpl::forceResize):
1156 2015-03-10 Csaba Osztrogonác <ossy@webkit.org>
1158 [cmake] Handle unused parameter warnings as build errors except in WebKit2
1159 https://bugs.webkit.org/show_bug.cgi?id=142338
1161 Reviewed by Gyuyoung Kim.
1165 2015-03-10 Dan Bernstein <mitz@apple.com>
1167 WebKit2 part of <rdar://problem/20086546> [Cocoa] Add an option to treat certificate chains with SHA1-signed certificates as insecure
1168 https://bugs.webkit.org/show_bug.cgi?id=142461
1170 Reviewed by Sam Weinig.
1172 * UIProcess/API/Cocoa/WKWebView.mm:
1173 (-[WKWebView initWithFrame:configuration:]): Initialize
1174 webPageConfiguration.treatsSHA1SignedCertificatesAsInsecure from the WKWebViewConfiguration.
1176 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1177 Added _treatsSHA1SignedCertificatesAsInsecure ivar.
1178 (-[WKWebViewConfiguration copyWithZone:]): Copy _treatsSHA1SignedCertificatesAsInsecure.
1179 (-[WKWebViewConfiguration _treatsSHA1SignedCertificatesAsInsecure]): Added this getter.
1180 (-[WKWebViewConfiguration _setTreatsSHA1SignedCertificatesAsInsecure:]): Added this setter.
1182 * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: Declared new
1183 _treatsSHA1SignedCertificatesAsInsecure property.
1185 * UIProcess/PageLoadState.cpp:
1186 (WebKit::PageLoadState::didCommitLoad): Use new hasInsecureContent parameter to initialize
1187 hasInsecureContent parameter in the uncommitted state.
1188 * UIProcess/PageLoadState.h:
1190 * UIProcess/WebPageProxy.cpp:
1191 (WebKit::WebPageProxy::WebPageProxy): Initialize new m_treatsSHA1CertificatesAsInsecure
1192 member variable from the WebPageConfiguration.
1193 (WebKit::WebPageProxy::didCommitLoadForFrame): Pass true for the new hasInsecureContent to
1194 PageLoadState::didCommitLoad if we are treating SHA1-signed certificates as insecure and
1195 the certificate info contains a non-root SHA1-signed certificate.
1196 * UIProcess/WebPageProxy.h: Added m_treatsSHA1CertificatesAsInsecure member variable.
1198 2015-03-09 Geoffrey Garen <ggaren@apple.com>
1200 bmalloc: tryFastMalloc shouldn't crash
1201 https://bugs.webkit.org/show_bug.cgi?id=142443
1203 Reviewed by Anders Carlsson.
1205 Part 1: Stop using tryFastRealloc.
1207 * Shared/ShareableBitmap.cpp:
1208 (WebKit::ShareableBitmap::resize): Deleted.
1209 * Shared/ShareableBitmap.h: Removed the resize function because it has
1212 * WebProcess/Plugins/PluginProxy.cpp:
1213 (WebKit::PluginProxy::updateBackingStore): Changed to allocate a new
1214 backing store instead of resizing the old one. This has three advantages:
1216 (1) Might be more memory-efficient, since you don't have to keep the old
1217 one around while allocating the new one.
1219 (2) Avoids the overhead of realloc() copying the contents of the old
1220 backing store even though we only want uninitialized memory.
1222 (3) Makes resize failure consistent with initial allocation failure.
1223 Previously, while initial allocation failure would set the backing store
1224 to null, resize failure would keep the old wrong backing store and then
1225 tell it not to paint. Now, resize failure also sets the backing store to
1228 2015-03-09 Martin Robinson <mrobinson@igalia.com>
1230 [EFL] Move DispatchQueue to WTF
1231 https://bugs.webkit.org/show_bug.cgi?id=142493
1233 Reviewed by Csaba Osztrogonác.
1235 * PlatformEfl.cmake: Remove DispatchQueue from the source list.
1237 2015-03-08 Dean Jackson <dino@apple.com>
1239 [iOS Media] Video buffer progress missing on iPhones
1240 https://bugs.webkit.org/show_bug.cgi?id=142462
1242 Reviewed by Eric Carlson.
1244 Coordinate the SetBufferedTime message between the Web and UI
1247 * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in: New message SetBufferedTime.
1248 * WebProcess/ios/WebVideoFullscreenManager.h:
1249 * WebProcess/ios/WebVideoFullscreenManager.mm:
1250 (WebKit::WebVideoFullscreenManager::setBufferedTime):
1252 2015-03-08 Sam Weinig <sam@webkit.org>
1254 [Content Extensions] Add scaffolding for the WKUserContentExtensionStore
1255 https://bugs.webkit.org/show_bug.cgi?id=142464
1257 Reviewed by Dan Bernstein.
1259 * Shared/API/APIObject.h:
1260 Add a UserContentExtensionStore type and move the UserContentExtension type into the correct section (UIProcess).
1262 * Shared/API/c/WKBase.h:
1263 Add the WKUserContentExtensionStoreRef C-SPI type.
1265 * Shared/Cocoa/APIObject.mm:
1266 (API::Object::newObject):
1267 Add allocation support for UserContentExtensionStore (and UserContentExtension while we are there, it will be
1270 * UIProcess/API/APIUserContentExtensionStore.cpp: Added.
1271 (API::UserContentExtensionStore::UserContentExtensionStore):
1272 (API::UserContentExtensionStore::~UserContentExtensionStore):
1273 * UIProcess/API/APIUserContentExtensionStore.h: Added.
1274 Stub out the UserContentExtensionStore.
1276 * UIProcess/API/C/WKAPICast.h:
1277 Add casting for the UserContentExtensionStore.
1279 * UIProcess/API/C/WKUserContentExtensionStoreRef.cpp: Added.
1280 (WKUserContentExtensionStoreGetTypeID):
1281 * UIProcess/API/C/WKUserContentExtensionStoreRef.h: Added.
1282 * UIProcess/API/Cocoa/_WKUserContentExtensionStore.h: Added.
1283 * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm: Added.
1284 (-[_WKUserContentExtensionStore init]):
1285 (-[_WKUserContentExtensionStore dealloc]):
1286 (-[_WKUserContentExtensionStore _apiObject]):
1287 * UIProcess/API/Cocoa/_WKUserContentExtensionStoreInternal.h: Added.
1289 Stub out SPI for the UserContentExtensionStore.
1291 * WebKit2.xcodeproj/project.pbxproj:
1295 2015-03-08 Sam Weinig <sam@webkit.org>
1297 AX: Expose a frame's accessible name through WK2 C SPI
1298 <rdar://problem/19653068>
1299 https://bugs.webkit.org/show_bug.cgi?id=142468
1301 Reviewed by Dan Bernstein.
1303 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1304 (WKBundleFrameSetAccessibleName):
1305 * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
1306 * WebProcess/WebPage/WebFrame.cpp:
1307 (WebKit::WebFrame::setAccessibleName):
1308 * WebProcess/WebPage/WebFrame.h:
1309 Add SPI to set a frame's accessible name. This matches the Legacy WebKit SPI -[WebFrame setAccessibleName:].
1311 2015-03-08 Sam Weinig <sam@webkit.org>
1313 [Content Extensions] Pass compiled content extensions as read-only shared memory rather than copying them
1314 https://bugs.webkit.org/show_bug.cgi?id=142458
1316 Reviewed by Dan Bernstein.
1318 * Shared/WebCompiledContentExtensionData.cpp:
1319 (WebKit::WebCompiledContentExtensionData::encode):
1320 (WebKit::WebCompiledContentExtensionData::decode):
1321 * Shared/WebCompiledContentExtensionData.h:
1322 (WebKit::WebCompiledContentExtensionData::WebCompiledContentExtensionData):
1323 Store the compiled data as a SharedMemory block with offset/size pairs for the
1324 bytecode and actions. While the bytecode offset is currently always 0, this won't
1325 be the case when we map these in from files due to metadata that will be placed
1326 at the top of the files.
1328 * Shared/WebCompiledContentExtension.h:
1329 * Shared/WebCompiledContentExtension.cpp:
1330 (WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData):
1331 Temporary creation helper. In subsequent patches, this will be removed and replaced
1332 by always passing in shared/mapped data.
1334 (WebKit::WebCompiledContentExtension::create):
1335 (WebKit::WebCompiledContentExtension::WebCompiledContentExtension):
1336 (WebKit::WebCompiledContentExtension::bytecode):
1337 (WebKit::WebCompiledContentExtension::bytecodeLength):
1338 (WebKit::WebCompiledContentExtension::actions):
1339 (WebKit::WebCompiledContentExtension::actionsLength):
1340 Convert to work with the new WebCompiledContentExtension format.
1342 * UIProcess/API/C/WKUserContentFilterRef.cpp:
1343 (WKUserContentFilterCreate):
1344 * UIProcess/API/Cocoa/_WKUserContentFilter.mm:
1345 (-[_WKUserContentFilter initWithName:serializedRules:]):
1346 Switch to using WebCompiledContentExtension::createFromCompiledContentExtensionData().
1348 * WebProcess/UserContent/WebUserContentController.cpp:
1349 (WebKit::WebUserContentController::addUserContentExtensions):
1350 * WebProcess/WebPage/WebPageGroupProxy.cpp:
1351 (WebKit::WebPageGroupProxy::addUserContentExtension):
1352 Update to pass the WebCompiledContentExtensionData directly to the WebCompiledContentExtension.
1354 2015-03-08 Carlos Garcia Campos <cgarcia@igalia.com>
1356 Remove willDestroyFrame in WKBundlePageLoaderClient
1357 https://bugs.webkit.org/show_bug.cgi?id=142389
1359 Reviewed by Anders Carlsson.
1361 I added willDestroyFrame in r154540 but I realized recently that
1362 it has never actually worked. Adding the callback to
1363 WKBundlePageLoaderClient was the first mistake, since frames are
1364 handled by WebProcess and DidDestroyFrame message is indeed a
1365 WebProcessProxy not a WebPageProxy one. Second mistake was calling
1366 the callback from WebFrameLoaderClient::frameLoaderDestroyed(),
1367 since at that point the frame has already been detached from the
1368 page and so WebFrame::page() always returns nullptr. So, this in
1369 fact dead code and since r180211 nobody is using it.
1371 * WebProcess/InjectedBundle/API/c/WKBundlePageLoaderClient.h:
1372 * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
1373 (webkitWebPageCreate): Use verion 6 instead of version 7 of loader client.
1374 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
1375 (WebKit::InjectedBundlePageLoaderClient::willDestroyFrame): Deleted.
1376 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1377 (WebKit::WebFrameLoaderClient::frameLoaderDestroyed):
1379 2015-03-06 Sam Weinig <sam@webkit.org>
1381 [Content Extensions] Move compiling of content extensions to the UIProcess
1382 https://bugs.webkit.org/show_bug.cgi?id=142402
1384 Reviewed by Benjamin Poulain.
1386 * Shared/API/APIObject.h:
1387 Rename UserContentFilter type to UserContentExtension to match new unified naming.
1389 * Shared/WebCompiledContentExtension.cpp: Added.
1390 (WebKit::WebCompiledContentExtension::create):
1391 (WebKit::WebCompiledContentExtension::WebCompiledContentExtension):
1392 (WebKit::WebCompiledContentExtension::~WebCompiledContentExtension):
1393 (WebKit::WebCompiledContentExtension::bytecode):
1394 (WebKit::WebCompiledContentExtension::bytecodeLength):
1395 (WebKit::WebCompiledContentExtension::actions):
1396 (WebKit::WebCompiledContentExtension::actionsLength):
1397 * Shared/WebCompiledContentExtension.h: Added.
1398 Add new WebKit2 implementation of CompiledContentExtension. Right now it is the same as the old
1399 WebCore based CompiledContentExtension, but in subsequent patches, it will use shared/file backed
1402 * Shared/WebCompiledContentExtensionData.cpp: Added.
1403 (WebKit::WebCompiledContentExtensionData::encode):
1404 (WebKit::WebCompiledContentExtensionData::decode):
1405 * Shared/WebCompiledContentExtensionData.h: Added.
1406 Add encodable/decodable holder for the compiled content extension data for use in IPC. Right
1407 now it is doing the naive thing and always copying the data, but in subsequent patches, it will
1408 use shared/file backed memory.
1410 * Shared/WebPageGroupData.cpp:
1411 (WebKit::WebPageGroupData::encode):
1412 (WebKit::WebPageGroupData::decode):
1413 * Shared/WebPageGroupData.h:
1414 Rename member to match new unification on the name userContentExtension. Change the value from
1415 the serialized JSON (as a String) to WebCompiledContentExtensionData.
1417 * UIProcess/API/APIUserContentExtension.cpp: Copied from Source/WebKit2/UIProcess/API/APIUserContentFilter.cpp.
1418 (API::UserContentExtension::UserContentExtension):
1419 (API::UserContentExtension::~UserContentExtension):
1420 (API::UserContentFilter::UserContentFilter): Deleted.
1421 (API::UserContentFilter::~UserContentFilter): Deleted.
1422 * UIProcess/API/APIUserContentExtension.h: Copied from Source/WebKit2/UIProcess/API/APIUserContentFilter.h.
1423 * UIProcess/API/APIUserContentFilter.cpp: Removed.
1424 * UIProcess/API/APIUserContentFilter.h: Removed.
1425 Renamed UserContentFilter to APIUserContentExtension. Updated to store the compiled extension (as a WebCompiledContentExtension)
1426 rather than the serialized JSON.
1428 * UIProcess/API/C/WKAPICast.h:
1429 * UIProcess/API/C/WKPageGroup.cpp:
1430 (WKPageGroupAddUserContentFilter):
1431 (WKPageGroupRemoveUserContentFilter):
1432 (WKPageGroupRemoveAllUserContentFilters):
1433 * UIProcess/API/C/WKUserContentControllerRef.cpp:
1434 (WKUserContentControllerAddUserContentFilter):
1435 (WKUserContentControllerRemoveAllUserContentFilters):
1436 * UIProcess/API/Cocoa/WKUserContentController.mm:
1437 (-[WKUserContentController _addUserContentFilter:]):
1438 (-[WKUserContentController _removeUserContentFilter:]):
1439 (-[WKUserContentController _removeAllUserContentFilters]):
1440 Update for rename of APIUserContentFilter -> UserContentExtension.
1442 * UIProcess/API/C/WKUserContentFilterRef.cpp:
1443 (WKUserContentFilterGetTypeID):
1444 (WKUserContentFilterCreate):
1445 Update for rename of APIUserContentFilter -> UserContentExtension. Also make WKUserContentFilterCreate eagerly
1446 compile rule list to a WebCompiledContentExtensionData.
1448 * UIProcess/API/Cocoa/_WKUserContentFilter.mm:
1449 (-[_WKUserContentFilter initWithName:serializedRules:]):
1450 (-[_WKUserContentFilter dealloc]):
1451 (-[_WKUserContentFilter _apiObject]):
1452 Update for rename of APIUserContentFilter -> UserContentExtension. Also make initWithName:serializedRules: eagerly
1453 compile rule list to a WebCompiledContentExtensionData.
1455 * UIProcess/API/Cocoa/_WKUserContentFilterInternal.h:
1457 Update for rename of APIUserContentFilter -> UserContentExtension.
1459 * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
1460 (WebKit::WebUserContentControllerProxy::addProcess):
1461 (WebKit::WebUserContentControllerProxy::addUserContentExtension):
1462 (WebKit::WebUserContentControllerProxy::removeUserContentExtension):
1463 (WebKit::WebUserContentControllerProxy::removeAllUserContentExtensions):
1464 (WebKit::WebUserContentControllerProxy::addUserContentFilter): Deleted.
1465 (WebKit::WebUserContentControllerProxy::removeUserContentFilter): Deleted.
1466 (WebKit::WebUserContentControllerProxy::removeAllUserContentFilters): Deleted.
1467 * UIProcess/UserContent/WebUserContentControllerProxy.h:
1468 * UIProcess/WebPageGroup.cpp:
1469 (WebKit::WebPageGroup::addUserContentExtension):
1470 (WebKit::WebPageGroup::removeUserContentExtension):
1471 (WebKit::WebPageGroup::removeAllUserContentExtensions):
1472 (WebKit::WebPageGroup::addUserContentFilter): Deleted.
1473 (WebKit::WebPageGroup::removeUserContentFilter): Deleted.
1474 (WebKit::WebPageGroup::removeAllUserContentFilters): Deleted.
1475 * UIProcess/WebPageGroup.h:
1476 * WebKit2.xcodeproj/project.pbxproj:
1477 * WebProcess/UserContent/WebUserContentController.cpp:
1478 (WebKit::WebUserContentController::addUserContentExtensions):
1479 (WebKit::WebUserContentController::removeUserContentExtension):
1480 (WebKit::WebUserContentController::removeAllUserContentExtensions):
1481 (WebKit::WebUserContentController::addUserContentFilters): Deleted.
1482 (WebKit::WebUserContentController::removeUserContentFilter): Deleted.
1483 (WebKit::WebUserContentController::removeAllUserContentFilters): Deleted.
1484 * WebProcess/UserContent/WebUserContentController.h:
1485 * WebProcess/UserContent/WebUserContentController.messages.in:
1486 * WebProcess/WebPage/WebPageGroupProxy.cpp:
1487 (WebKit::WebPageGroupProxy::WebPageGroupProxy):
1488 (WebKit::WebPageGroupProxy::addUserContentExtension):
1489 (WebKit::WebPageGroupProxy::removeUserContentExtension):
1490 (WebKit::WebPageGroupProxy::removeAllUserContentExtensions):
1491 (WebKit::WebPageGroupProxy::addUserContentFilter): Deleted.
1492 (WebKit::WebPageGroupProxy::removeUserContentFilter): Deleted.
1493 (WebKit::WebPageGroupProxy::removeAllUserContentFilters): Deleted.
1494 * WebProcess/WebPage/WebPageGroupProxy.h:
1495 * WebProcess/WebPage/WebPageGroupProxy.messages.in:
1496 Pipe the compiled extension from the UIProcess to the WebProcess.
1498 2015-03-06 Dean Jackson <dino@apple.com>
1500 Support "plus-lighter" in mix-blend mode
1501 https://bugs.webkit.org/show_bug.cgi?id=142416
1502 <rdar://problem/19993979>
1504 Reviewed by Darin Adler and Sam Weinig.
1506 Output the appropriate blending type when logging.
1508 * Shared/mac/RemoteLayerTreeTransaction.mm:
1509 (WebKit::RemoteLayerTreeTextStream::operator<<):
1511 2015-03-06 Beth Dakin <bdakin@apple.com>
1513 REGRESSION (r180782): Data Detector popovers are not dismissed on scroll or zoom
1514 https://bugs.webkit.org/show_bug.cgi?id=142371
1516 rdar://problem/20059224
1518 Reviewed by Tim Horton.
1520 This patch has the WKImmediateActionController keep track of whether or not it has
1521 an active immediate action. Then we only call into Lookup and DD if the window is
1522 key OR if the WKView’s immediateActionController has an active action.
1523 * UIProcess/API/mac/WKView.mm:
1524 (-[WKView _dismissContentRelativeChildWindows]):
1525 * UIProcess/mac/WKImmediateActionController.h:
1526 * UIProcess/mac/WKImmediateActionController.mm:
1527 (-[WKImmediateActionController initWithPage:view:recognizer:]):
1528 (-[WKImmediateActionController willDestroyView:]):
1529 (-[WKImmediateActionController _clearImmediateActionState]):
1530 (-[WKImmediateActionController hasActiveImmediateAction]):
1531 (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
1533 2015-03-06 Jeremy Jones <jeremyj@apple.com>
1535 Scroll to make the video element visible when exiting fullscreen.
1536 https://bugs.webkit.org/show_bug.cgi?id=141439
1538 Reviewed by Simon Fraser.
1540 This patch will restore interface state when exiting fullscreen.
1541 Adds preparedToReturnToInline to continue exiting once the interface is updated.
1543 * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
1544 * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
1545 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
1546 (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
1547 (WebKit::WebVideoFullscreenManagerProxy::fullscreenMayReturnToInline):
1548 (WebKit::WebVideoFullscreenManagerProxy::preparedToReturnToInline): added.
1549 * WebProcess/ios/WebVideoFullscreenManager.h:
1550 * WebProcess/ios/WebVideoFullscreenManager.messages.in:
1551 * WebProcess/ios/WebVideoFullscreenManager.mm:
1552 (WebKit::WebVideoFullscreenManager::fullscreenMayReturnToInline):
1554 2015-03-06 Antti Koivisto <antti@apple.com>
1556 Rename NetworkCacheStorageCocoa.mm to NetworkCacheStorage.cpp
1557 https://bugs.webkit.org/show_bug.cgi?id=142401
1559 Rubber-stamped by Anders Carlsson.
1561 It is now fully cross-platform.
1563 * NetworkProcess/cache/NetworkCacheStorage.cpp: Copied from Source/WebKit2/NetworkProcess/cache/NetworkCacheStorageCocoa.mm.
1564 (WebKit::NetworkCache::Storage::shrinkIfNeeded):
1565 * NetworkProcess/cache/NetworkCacheStorageCocoa.mm: Removed.
1566 * WebKit2.xcodeproj/project.pbxproj:
1568 2015-03-06 Antti Koivisto <antti@apple.com>
1570 Don't use dispatch_semaphore in NetworkCacheStorage
1571 https://bugs.webkit.org/show_bug.cgi?id=142395
1573 Reviewed by Anders Carlsson.
1575 * NetworkProcess/cache/NetworkCacheIOChannel.h:
1576 * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
1577 (WebKit::NetworkCache::IOChannel::read):
1578 (WebKit::NetworkCache::IOChannel::readSync):
1580 Add readSync to encapsulate the semaphore.
1582 * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
1583 (WebKit::NetworkCache::Storage::traverse):
1585 2015-03-06 Antti Koivisto <antti@apple.com>
1587 Move dispatch_data use behind NetworkCache::Data abstraction
1588 https://bugs.webkit.org/show_bug.cgi?id=142392
1590 Reviewed by Anders Carlsson.
1592 * NetworkProcess/cache/NetworkCacheData.h:
1593 (WebKit::NetworkCache::DispatchPtr::DispatchPtr):
1594 * NetworkProcess/cache/NetworkCacheDataCocoa.mm:
1595 (WebKit::NetworkCache::Data::Data):
1596 (WebKit::NetworkCache::Data::apply):
1597 (WebKit::NetworkCache::Data::subrange):
1598 (WebKit::NetworkCache::concatenate):
1599 (WebKit::NetworkCache::mapFile):
1600 * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
1601 (WebKit::NetworkCache::IOChannel::read):
1602 * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
1603 (WebKit::NetworkCache::hashData):
1604 (WebKit::NetworkCache::decodeEntryMetaData):
1605 (WebKit::NetworkCache::decodeEntryHeader):
1606 (WebKit::NetworkCache::decodeEntry):
1607 (WebKit::NetworkCache::encodeEntryMetaData):
1608 (WebKit::NetworkCache::encodeEntryHeader):
1609 (WebKit::NetworkCache::Storage::dispatchFullWriteOperation):
1610 (WebKit::NetworkCache::mapFile): Deleted.
1612 2015-03-06 Antti Koivisto <antti@apple.com>
1614 Use WTF abstraction for page size in NetworkCacheStorage
1615 https://bugs.webkit.org/show_bug.cgi?id=142396
1617 Reviewed by Darin Adler.
1619 * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
1620 (WebKit::NetworkCache::decodeEntryMetaData):
1621 (WebKit::NetworkCache::Storage::dispatchFullWriteOperation):
1623 2015-03-06 Myles C. Maxfield <mmaxfield@apple.com>
1625 [iOS] SVG fonts are garbled
1626 https://bugs.webkit.org/show_bug.cgi?id=142377
1628 Reviewed by Simon Fraser.
1630 * Configurations/FeatureDefines.xcconfig:
1632 2015-03-06 Zan Dobersek <zdobersek@igalia.com>
1634 Unguarded GTK-specific member and method usage in DrawingAreaImpl
1635 https://bugs.webkit.org/show_bug.cgi?id=142391
1637 Reviewed by Carlos Garcia Campos.
1639 r180924 introduced unguarded use of m_nativeSurfaceHandleForCompositing
1640 and LayerTreeHost::setNativeSurfaceHandleForCompositing() in DrawingAreaImpl.
1641 Definitions for both of these are guarded with USE(TEXTURE_MAPPER_GL) and PLATFORM(GTK),
1642 so their use should be as well.
1644 * WebProcess/WebPage/DrawingAreaImpl.cpp:
1645 (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
1647 2015-03-06 David Kilzer <ddkilzer@apple.com>
1649 REGRESSION (r181140): WebKit2 fails to build on Mavericks buildbot
1651 Work around Xcode dependency tracking issues by making changes
1652 to source files that need to be recompiled.
1654 * NetworkProcess/NetworkProcess.cpp: Update copyright. Include
1655 NetworkCache.h since it didn't appear to be included by
1656 NetworkCacheCoders.h.
1657 * NetworkProcess/cocoa/NetworkProcessCocoa.mm: Update copyright.
1659 2015-03-05 Antti Koivisto <antti@apple.com>
1661 Move disk cache classes to namespace
1662 https://bugs.webkit.org/show_bug.cgi?id=142339
1664 Reviewed by Anders Carlsson.
1666 Move everything to NetworkCache namespace.
1668 2015-03-05 Carlos Garcia Campos <cgarcia@igalia.com>
1670 REGRESSION(r180924): ASSERTION FAILED: !from.isEmpty() in WebCore::TransformationMatrix::rectToRect
1671 https://bugs.webkit.org/show_bug.cgi?id=142345
1673 Reviewed by Martin Robinson.
1675 This was caused by r180924 that postpones the creation of the
1676 TextureMapper, which could cause that a layer has not yet a size
1677 when TextureMapper::paint() is called. This patch moves the
1678 creation of the TextureMapper to
1679 LayerTreeHostGtk::setNativeSurfaceHandleForCompositing(), so that
1680 it's created as soon as it's possible to create. This method is
1681 called by the drawing area right after creating the
1682 LayerTreeHostGtk if it already have a handler, or when the handle
1683 is received from the UI process.
1685 * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
1686 (WebKit::LayerTreeHostGtk::initialize): Remove the
1687 nsureTextureMapper call because at this point the layer context ID
1688 is always 0, so it's impossible to create the TextureMapper.
1689 (WebKit::LayerTreeHostGtk::compositeLayersToContext): Remove the
1690 ensureTextureMapper call from here too, since at this point, if we
1691 have a context, we should also have a TextureMapper. Add an ASSERT
1692 right before using the TextureMapper.
1693 (WebKit::LayerTreeHostGtk::setNativeSurfaceHandleForCompositing):
1694 Create the TextureMapper here.
1695 (WebKit::LayerTreeHostGtk::ensureTextureMapper): Deleted.
1696 * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
1698 2015-03-05 Anders Carlsson <andersca@apple.com>
1700 WKWebView Encoder for remote object communication does not implement encodeInt32:forKey:
1701 https://bugs.webkit.org/show_bug.cgi?id=142356
1702 rdar://problem/20058952
1704 Reviewed by Tim Horton.
1706 * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
1707 (-[WKRemoteObjectEncoder encodeInt32:forKey:]):
1708 (-[WKRemoteObjectDecoder decodeInt32ForKey:]):
1710 2015-03-05 Chris Dumez <cdumez@apple.com>
1712 NetworkCache efficacy logging is using too much CPU
1713 https://bugs.webkit.org/show_bug.cgi?id=142186
1714 <rdar://problem/19632080>
1716 Reviewed by Antti Koivisto.
1718 NetworkCache efficacy logging was using too much CPU mostly due to
1719 database writes. Logging was using ~11.3% of the NetworkProcess'
1720 CPU usage (~9.2% for writes / ~1.3% for reads).
1722 This patch buffers writes requests in memory and only writes them
1723 to disk every 10 seconds. We are thus writing to this less frequently
1724 and writing more at once, in a single SQL transaction. After this
1725 change, efficacy logging only accounts for ~3.5% of the NetworkProcess'
1726 CPU activity (1.5% for writes / 1.2% for reads).
1728 Now that CPU usage is more acceptable, this patch re-enables the
1729 network cache efficicy logging.
1731 * NetworkProcess/cache/NetworkCacheStatistics.h:
1733 * NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
1734 (WebKit::executeSQLCommand):
1735 (WebKit::executeSQLStatement):
1736 Call step() instead of executeCommand() because:
1737 - The input statement is already prepared.
1738 - step() does not finalize() the statement and thus we caller can
1739 reuse it after calling reset().
1741 (WebKit::NetworkCacheStatistics::NetworkCacheStatistics):
1742 (WebKit::NetworkCacheStatistics::initialize):
1743 (WebKit::NetworkCacheStatistics::bootstrapFromNetworkCache):
1744 (WebKit::NetworkCacheStatistics::recordNotCachingResponse):
1745 (WebKit::NetworkCacheStatistics::recordNotUsingCacheForRequest):
1746 (WebKit::NetworkCacheStatistics::recordRetrievalFailure):
1747 (WebKit::NetworkCacheStatistics::markAsRequested):
1748 (WebKit::NetworkCacheStatistics::writeTimerFired):
1749 (WebKit::NetworkCacheStatistics::queryWasEverRequested):
1750 (WebKit::NetworkCacheStatistics::addHashesToDatabase):
1751 (WebKit::NetworkCacheStatistics::addStoreDecisionsToDatabase):
1752 (WebKit::NetworkCacheStatistics::addHashToDatabase): Deleted.
1754 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1755 (WebKit::registerUserDefaultsIfNeeded):
1756 Re-enable the network cache efficacy logging.
1758 2015-03-05 Antti Koivisto <antti@apple.com>
1760 Switch NetworkCacheStorage to WorkQueue abstraction
1761 https://bugs.webkit.org/show_bug.cgi?id=142337
1763 Reviewed by Anders Carlsson.
1765 Don't use dispatch_async directly.
1767 * NetworkProcess/cache/NetworkCacheStorage.h:
1768 (WebKit::NetworkCacheStorage::ioQueue):
1769 (WebKit::NetworkCacheStorage::backgroundIOQueue):
1770 * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
1771 (WebKit::NetworkCacheStorage::NetworkCacheStorage):
1772 (WebKit::NetworkCacheStorage::initialize):
1773 (WebKit::NetworkCacheStorage::removeEntry):
1774 (WebKit::NetworkCacheStorage::dispatchReadOperation):
1775 (WebKit::retrieveFromMemory):
1776 (WebKit::NetworkCacheStorage::traverse):
1777 (WebKit::NetworkCacheStorage::dispatchFullWriteOperation):
1778 (WebKit::NetworkCacheStorage::dispatchHeaderWriteOperation):
1779 (WebKit::NetworkCacheStorage::clear):
1780 (WebKit::NetworkCacheStorage::shrinkIfNeeded):
1781 (WebKit::NetworkCacheStorage::deleteOldVersions):
1783 2015-03-05 Lukasz Bialek <l.bialek@samsung.com>
1785 [EFL][WK2] Crash when "Download Linked File" from MiniBrowser context menu is clicked
1786 https://bugs.webkit.org/show_bug.cgi?id=131162
1788 Reviewed by Gyuyoung Kim.
1790 "Download Linked File" crashes because of null-pointer exception of Download Job.
1791 Due to architectural difficulties, easy fix is not possible (EwkView is needed in
1792 DownloadManager to create DownloadJobs and it is only used to notify the client
1793 about download (finished, error, cancel) via smart callback using EwkView (Evas_Object).
1795 Propose a new callbacks which are view independent and detach EFL's DownloadManager
1796 from EwkView. It makes DownloadManagerEFL consistent with WKContextDownload.
1797 Fix the crash and restore download functionality.
1799 * PlatformEfl.cmake:
1800 Enable newly reimplemented tests
1801 * UIProcess/API/efl/EwkViewCallbacks.h:
1802 Remove old callback mechanism
1803 * UIProcess/API/efl/ewk_context.cpp:
1804 (ewk_context_download_callbacks_set):
1805 * UIProcess/API/efl/ewk_context.h:
1806 Declare new callback functions and registration functions
1807 * UIProcess/API/efl/ewk_download_job.cpp:
1808 (EwkDownloadJob::EwkDownloadJob):
1809 (EwkDownloadJob::view): Deleted.
1810 * UIProcess/API/efl/ewk_download_job.h:
1811 * UIProcess/API/efl/ewk_download_job_private.h:
1812 (EwkDownloadJob::create):
1813 Remove EwkView dependency
1814 * UIProcess/API/efl/ewk_view.h:
1815 * UIProcess/API/efl/tests/test_ewk2_download_job.cpp:
1816 Alter tests to new callback mechanism
1817 * UIProcess/efl/DownloadManagerEfl.cpp:
1818 (WebKit::DownloadManagerEfl::decideDestinationWithSuggestedFilename):
1819 (WebKit::DownloadManagerEfl::didStart):
1820 (WebKit::DownloadManagerEfl::didFail):
1821 (WebKit::DownloadManagerEfl::didCancel):
1822 (WebKit::DownloadManagerEfl::didFinish):
1823 (WebKit::DownloadManagerEfl::DownloadManagerEfl):
1824 (WebKit::DownloadManagerEfl::registerDownloadJob):
1825 (WebKit::DownloadManagerEfl::setCallbacks):
1826 * UIProcess/efl/DownloadManagerEfl.h:
1827 * UIProcess/efl/WebViewEfl.cpp:
1828 (WebKit::WebViewEfl::handleDownloadRequest):
1829 Add support of new callback mechanism
1831 2015-03-05 Michael Catanzaro <mcatanzaro@igalia.com>
1834 https://bugs.webkit.org/show_bug.cgi?id=140014
1836 Reviewed by Carlos Garcia Campos.
1838 Disallow RC4-based ciphersuites when performing TLS negotiation,
1839 because it is no longer considered secure.
1841 * NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp:
1843 * WebProcess/EntryPoint/unix/WebProcessMain.cpp:
1846 2015-03-04 Yusuke Suzuki <utatane.tea@gmail.com>
1848 Hide Promise with runtime flags under Cocoa JSContext API
1849 https://bugs.webkit.org/show_bug.cgi?id=141965
1851 Reviewed by Filip Pizlo.
1853 Add new JSC runtime flag, PromiseDisabled.
1855 * UIProcess/API/C/WKPreferencesRefPrivate.h:
1856 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1858 2015-03-04 Beth Dakin <bdakin@apple.com>
1860 Attempted build fix.
1862 * UIProcess/API/Cocoa/WKViewPrivate.h:
1864 2015-03-04 Beth Dakin <bdakin@apple.com>
1866 Message UI process when contentSize changes
1867 https://bugs.webkit.org/show_bug.cgi?id=142294
1869 rdar://problem/19963165
1871 Reviewed by Andreas Kling.
1873 This patch un-ifdefs the didChangeContentSize message so that we can use it on Mac
1876 New private method that subclasses can override when they need to do something
1877 with contentSize changes.
1878 * UIProcess/API/Cocoa/WKViewPrivate.h:
1879 * UIProcess/API/mac/WKView.mm:
1880 (-[WKView _didChangeContentSize:]):
1881 * UIProcess/PageClient.h:
1884 * UIProcess/WebPageProxy.cpp:
1885 (WebKit::WebPageProxy::didChangeContentSize):
1886 * UIProcess/WebPageProxy.h:
1887 * UIProcess/WebPageProxy.messages.in:
1888 * UIProcess/mac/PageClientImpl.h:
1889 * UIProcess/mac/PageClientImpl.mm:
1890 (WebKit::PageClientImpl::didChangeContentSize):
1891 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1892 (WebKit::WebChromeClient::contentsSizeChanged):
1894 Stubs for other platforms now that the pure-virtual is un-masked.
1895 * UIProcess/ios/PageClientImplIOS.h:
1896 * UIProcess/ios/PageClientImplIOS.mm:
1897 (WebKit::PageClientImpl::didChangeContentSize):
1898 * UIProcess/API/gtk/PageClientImpl.h:
1900 2015-03-04 Antti Koivisto <antti@apple.com>
1902 Factor platform I/O out from NetworkCacheStorage
1903 https://bugs.webkit.org/show_bug.cgi?id=142279
1905 Reviewed by Chris Dumez.
1907 * NetworkProcess/cache/NetworkCacheData.h: Added.
1908 * NetworkProcess/cache/NetworkCacheDataCocoa.mm: Added.
1910 NetworkCacheStorage::Data -> NetworkCacheData
1911 Move to files of its own.
1913 * NetworkProcess/cache/NetworkCacheIOChannel.h: Added.
1914 * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm: Added.
1916 Add abstraction for dispatch IO channels.
1918 2015-03-04 Joseph Pecoraro <pecoraro@apple.com>
1920 Remove WK_AVAILABLE and related macros when we cannot determine iOS/Mac version
1921 https://bugs.webkit.org/show_bug.cgi?id=142252
1922 rdar://problem/19983833
1924 Reviewed by David Kilzer.
1926 When mac / ios version was unable to be determined strip the WK_AVAILABLE
1927 and WK_DEPRECATED macros to avoid outputing a broken macro.
1929 * mac/postprocess-framework-headers.sh:
1931 2015-03-04 Debarshi Ray <debarshir@gnome.org>
1933 [GTK] WebView should hold a reference on WebContext because non-default contexts are a reality
1934 https://bugs.webkit.org/show_bug.cgi?id=142225
1936 Reviewed by Carlos Garcia Campos.
1938 * UIProcess/API/gtk/WebKitWebView.cpp:
1939 (webkitWebViewRequestFavicon):
1940 (webkitWebViewWatchForChangesInFavicon):
1941 (webkitWebViewDisconnectFaviconDatabaseSignalHandlers):
1942 (webkitWebViewConstructed):
1943 (webkitWebViewGetProperty):
1944 (webkitWebViewDispose):
1945 (webkitWebViewLoadChanged):
1946 (webkitWebViewLoadFailedWithTLSErrors):
1947 (webkit_web_view_get_context):
1948 (webkit_web_view_download_uri):
1950 2015-03-03 Shivakumar JM <shiva.jm@samsung.com>
1952 Fix build warning in WebKit2/Shared module.
1953 https://bugs.webkit.org/show_bug.cgi?id=142213
1955 Reviewed by Simon Fraser.
1957 Fix build warning by removing argument name from function.
1959 * Shared/WebCoreArgumentCoders.cpp:
1960 (IPC::pathPointCountApplierFunction):
1962 2015-03-03 Andy Estes <aestes@apple.com>
1964 [Content Filtering] Separate unblock handling into its own class
1965 https://bugs.webkit.org/show_bug.cgi?id=142251
1967 Reviewed by Andreas Kling.
1969 Adopted ContentFilterUnblockHandler.
1971 * Shared/WebCoreArgumentCoders.h:
1972 * Shared/mac/WebCoreArgumentCodersMac.mm:
1973 (IPC::ArgumentCoder<ContentFilterUnblockHandler>::encode):
1974 (IPC::ArgumentCoder<ContentFilterUnblockHandler>::decode):
1975 (IPC::ArgumentCoder<ContentFilter>::encode): Deleted.
1976 (IPC::ArgumentCoder<ContentFilter>::decode): Deleted.
1977 * UIProcess/Cocoa/WebPageProxyCocoa.mm:
1978 (WebKit::WebPageProxy::contentFilterDidBlockLoadForFrame):
1979 * UIProcess/WebFrameProxy.cpp:
1980 (WebKit::WebFrameProxy::didStartProvisionalLoad):
1981 (WebKit::WebFrameProxy::contentFilterDidHandleNavigationAction):
1982 * UIProcess/WebFrameProxy.h:
1983 (WebKit::WebFrameProxy::setContentFilterUnblockHandler):
1984 (WebKit::WebFrameProxy::setContentFilterForBlockedLoad): Deleted.
1985 * UIProcess/WebPageProxy.h:
1986 * UIProcess/WebPageProxy.messages.in:
1987 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1988 (WebKit::WebFrameLoaderClient::contentFilterDidBlockLoad):
1989 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1991 2015-03-03 Chris Dumez <cdumez@apple.com>
1993 [WK2] Fix memory leak in _getCookieHeadersForTask
1994 https://bugs.webkit.org/show_bug.cgi?id=142245
1996 Reviewed by Alexey Proskuryakov.
1998 Fix memory leak in _getCookieHeadersForTask. We are leaking the CFDictionary
1999 returned by webKitCookieStorageCopyRequestHeaderFieldsForURL().
2001 This patch addresses the issue by storing the return CFDictionary in a
2002 RetainPtr<CFDictionaryRef>.
2004 * Shared/mac/CookieStorageShim.mm:
2005 (-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):
2007 2015-03-03 Enrica Casucci <enrica@apple.com>
2009 Incomplete dictation results in text fields in a web page.
2010 https://bugs.webkit.org/show_bug.cgi?id=142240
2011 rdar://problem/19953432
2013 Reviewed by Tim Horton.
2015 The empty stub for insertDictationResult:withCorrectionIdentifier
2016 must be removed. This way UIKit will call insertText and do the right thing.
2018 * UIProcess/ios/WKContentViewInteraction.mm:
2019 (-[WKContentView insertDictationResult:withCorrectionIdentifier:]): Deleted.
2021 2015-03-03 Dean Jackson <dino@apple.com>
2023 Controls panel should have system blurry background
2024 https://bugs.webkit.org/show_bug.cgi?id=142154
2025 <rdar://problem/20000964>
2027 Reviewed by Simon Fraser.
2029 In order to replicate the system style of media controls
2030 on OS X and iOS, we need to expose a special -webkit-appearance.
2031 This patch adds the new property value, and implements
2032 the iOS part of the appearance, which is a blurry shaded
2035 * Shared/mac/RemoteLayerBackingStore.mm:
2036 (WebKit::RemoteLayerBackingStore::drawInContext): Add entries for
2037 the new layer types, even though they are not correct yet.
2039 * Shared/mac/RemoteLayerTreePropertyApplier.mm:
2040 (WebKit::updateCustomAppearance):
2041 (WebKit::RemoteLayerTreePropertyApplier::applyProperties): UIBackdropViews
2042 have a defined hierarchy that we don't create. We need to make sure we add our
2043 children to the right subview.
2044 * Shared/mac/RemoteLayerTreeTransaction.mm:
2045 (WebKit::RemoteLayerTreeTransaction::description): Logging.
2047 * UIProcess/ios/RemoteLayerTreeHostIOS.mm: Rename existing WKBackdropView
2048 to WKSimpleBackdropView, and add a new WKBackdropView that inherits
2049 from UIBackdropView.
2050 (-[WKBackdropView hitTest:withEvent:]):
2051 (-[WKBackdropView description]):
2052 (WebKit::RemoteLayerTreeHost::createLayer): Handle the new LayerTypes.
2053 * UIProcess/mac/RemoteLayerTreeHost.mm:
2054 (WebKit::RemoteLayerTreeHost::createLayer):
2056 2015-03-03 Chris Dumez <cdumez@apple.com>
2058 Access ApplicationCacheStorage global instance via singleton() static member function
2059 https://bugs.webkit.org/show_bug.cgi?id=142239
2061 Reviewed by Anders Carlsson.
2063 Access ApplicationCacheStorage global instance via singleton() static
2064 member function as per WebKit coding style.
2066 2015-03-03 Joseph Pecoraro <pecoraro@apple.com>
2068 Build Fix: Add fall back handling in postprocess script for missing/unknown platform name.
2070 Rubber-stamped by David Kilzer.
2072 * mac/postprocess-framework-headers.sh:
2074 2015-03-03 Enrica Casucci <enrica@apple.com>
2080 * UIProcess/ios/WKContentViewInteraction.mm: Adding forward declaration.
2082 2015-03-03 Antti Koivisto <antti@apple.com>
2084 Include key to NetworkCacheStorage::Entry
2085 https://bugs.webkit.org/show_bug.cgi?id=142215
2087 Reviewed by Chris Dumez.
2089 This simplified code. The key is saved as part of the entry so it makes logical sense too.
2091 * NetworkProcess/cache/NetworkCache.cpp:
2092 (WebKit::makeCacheKey):
2093 (WebKit::encodeStorageEntry):
2094 (WebKit::NetworkCache::retrieve):
2095 (WebKit::NetworkCache::store):
2096 (WebKit::NetworkCache::update):
2097 (WebKit::NetworkCache::traverse):
2098 (WebKit::entryAsJSON):
2099 (WebKit::NetworkCache::dumpContentsToFile):
2100 * NetworkProcess/cache/NetworkCacheKey.cpp:
2101 (WebKit::NetworkCacheKey::operator=):
2102 * NetworkProcess/cache/NetworkCacheKey.h:
2103 (WebKit::NetworkCacheKey::isNull):
2104 * NetworkProcess/cache/NetworkCacheStorage.h:
2105 * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
2106 (WebKit::decodeEntry):
2107 (WebKit::encodeEntryHeader):
2108 (WebKit::retrieveFromMemory):
2109 (WebKit::NetworkCacheStorage::retrieve):
2110 (WebKit::NetworkCacheStorage::store):
2111 (WebKit::NetworkCacheStorage::update):
2112 (WebKit::NetworkCacheStorage::traverse):
2113 (WebKit::NetworkCacheStorage::dispatchPendingWriteOperations):
2114 (WebKit::NetworkCacheStorage::dispatchFullWriteOperation):
2115 (WebKit::NetworkCacheStorage::dispatchHeaderWriteOperation):
2117 2015-03-03 Antti Koivisto <antti@apple.com>
2119 Cache shrink leaves behind empty partition directories
2120 https://bugs.webkit.org/show_bug.cgi?id=142217
2122 Reviewed by Andreas Kling.
2124 * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
2125 (WebKit::traverseCacheFiles):
2127 No need for std::function.
2129 * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
2130 (WebKit::NetworkCacheStorage::shrinkIfNeeded):
2132 After shrink traverse through the partition directories and try to delete them.
2133 System knows if they are actually empty.
2135 2015-03-03 Anders Carlsson <andersca@apple.com>
2137 Use the correct display name for website data for local files
2138 https://bugs.webkit.org/show_bug.cgi?id=142228
2140 Reviewed by Dan Bernstein.
2142 * UIProcess/WebsiteData/WebsiteDataRecord.cpp:
2143 (displayNameForLocalFiles):
2144 Add new helper function.
2146 (WebKit::WebsiteDataRecord::displayNameForCookieHostName):
2147 Check if the hostname is kCFHTTPCookieLocalFileDomain.
2149 (WebKit::WebsiteDataRecord::displayNameForOrigin):
2150 Handle file URLs as well.
2152 2015-03-03 Enrica Casucci <enrica@apple.com>
2154 Fixed typo in platform guard in http://trac.webkit.org/changeset/180939.
2158 * UIProcess/ios/WKContentViewInteraction.mm:
2160 2015-03-03 Enrica Casucci <enrica@apple.com>
2162 Adopt new API for keyboard interaction.
2163 https://bugs.webkit.org/show_bug.cgi?id=142201
2164 rdar://problem/19924949
2166 Reviewed by Joseph Pecoraro.
2168 * UIProcess/ios/WKContentViewInteraction.mm:
2169 (-[WKContentView inputAssistantItem]):
2170 (-[WKContentView _inputAssistantItem]):
2172 2015-03-03 Carlos Garcia Campos <cgarcia@igalia.com>
2174 REGRESSION(r177075): WebProcess crashes when entering accelerating compositing mode before the WebView is realized
2175 https://bugs.webkit.org/show_bug.cgi?id=142079
2177 Reviewed by Žan Doberšek.
2179 The problem is that the texture mapper and native window handler
2180 are initialized when the LayerTreeHost is initialized, assuming
2181 the UI process has already sent the native window handler to the
2182 web process, but that doesn't always happen since we moved the
2183 redirected window creation to realize in r177075.
2185 * WebProcess/WebPage/DrawingArea.h:
2186 (WebKit::DrawingArea::nativeSurfaceHandleForCompositing): Deleted.
2187 * WebProcess/WebPage/DrawingAreaImpl.cpp:
2188 (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode): Call
2189 LayerTreeHost::setNativeSurfaceHandleForCompositing if we
2190 already have a native window handle at this point.
2191 (WebKit::DrawingAreaImpl::setNativeSurfaceHandleForCompositing):
2192 Call LayerTreeHost::setNativeSurfaceHandleForCompositing also when
2193 not using threaded compositing.
2194 * WebProcess/WebPage/LayerTreeHost.h:
2195 * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
2196 (WebKit::LayerTreeHostGtk::makeContextCurrent): Helper function to
2197 ensure a context and making it current.
2198 (WebKit::LayerTreeHostGtk::ensureTextureMapper): Ensure a texture
2199 is created for the current context.
2200 (WebKit::LayerTreeHostGtk::initialize): Use makeContextCurrent()
2201 and ensureTextureMapper(), and remove the LayerTreeContext
2202 initialization since that's is now always initialized in
2203 setNativeSurfaceHandleForCompositing().
2204 (WebKit::LayerTreeHostGtk::compositeLayersToContext): Use
2205 makeContextCurrent() helper function and also call
2206 ensureTextureMapper() just in case the texture could not be
2207 created during initialization because the native window handle was
2209 (WebKit::LayerTreeHostGtk::flushAndRenderLayers): Use makeContextCurrent().
2210 (WebKit::LayerTreeHostGtk::setNativeSurfaceHandleForCompositing):
2211 Initialize the LayerTreeContext.
2212 (WebKit::LayerTreeHostGtk::glContext): Deleted.
2213 * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
2215 2015-03-02 Gyuyoung Kim <gyuyoung.kim@samsung.com>
2217 [WK2] Remove unnecessary create() factory functions.
2218 https://bugs.webkit.org/show_bug.cgi?id=142161
2220 Reviewed by Chris Dumez.
2222 We can replace some create() factory functions with std::make_unique(). Because
2223 it just returns new instance. Even some of those functions have used std::unique_ptr<>
2224 instead of std::make_unique<>. Fixed all.
2226 * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.h:
2227 (WebKit::SQLiteIDBTransaction::create): Deleted.
2228 * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
2229 (WebKit::UniqueIDBDatabaseBackingStoreSQLite::establishTransaction):
2230 * Platform/efl/DispatchQueueWorkItemEfl.h:
2231 (WorkItem::dispatch):
2232 (WorkItem::create): Deleted.
2233 * UIProcess/API/gtk/PageClientImpl.h:
2234 (WebKit::PageClientImpl::create): Deleted.
2235 * UIProcess/API/gtk/WebKitTextChecker.h:
2236 (WebKitTextChecker::create): Deleted.
2237 * UIProcess/API/gtk/WebKitWebContext.cpp:
2238 (webkitWebContextConstructed):
2239 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2240 (webkitWebViewBaseConstructed):
2242 2015-03-02 Brady Eidson <beidson@apple.com>
2244 Lots of: ERROR: Unhandled web process message WebPageGroupProxy:RemoveAllUserContentFilters
2245 https://bugs.webkit.org/show_bug.cgi?id=142155
2247 Reviewed by Simon Fraser.
2249 * WebProcess/WebProcess.cpp:
2250 (WebKit::WebProcess::didReceiveMessage): Return after handling WebPageGroupProxy messages
2251 instead of logging an error.
2253 2015-03-02 Antti Koivisto <antti@apple.com>
2255 Add way to dump cache meta data to file
2256 https://bugs.webkit.org/show_bug.cgi?id=142183
2258 Add a missing return so we don't try to decode a null entry.
2260 * NetworkProcess/cache/NetworkCache.cpp:
2261 (WebKit::NetworkCache::dumpContentsToFile):
2263 2015-03-02 Anders Carlsson <andersca@apple.com>
2265 Return disk cache entries from the new disk cache
2266 https://bugs.webkit.org/show_bug.cgi?id=142190
2268 Reviewed by Antti Koivisto.
2270 * NetworkProcess/NetworkProcess.cpp:
2271 (WebKit::fetchDiskCacheEntries):
2272 Call NetworkCache::traverse() to get all the cache entries, unique their origins and pass them back with the completion handler.
2274 * NetworkProcess/cache/NetworkCache.cpp:
2275 (WebKit::NetworkCache::traverse):
2276 New helper function that traverses network cache entries.
2278 * NetworkProcess/cache/NetworkCache.h:
2280 2015-03-02 Antti Koivisto <antti@apple.com>
2282 Add way to dump cache meta data to file
2283 https://bugs.webkit.org/show_bug.cgi?id=142183
2285 Reviewed by Andreas Kling.
2287 Dump goes to WebKitCache/dump.json. On OSX it can be triggered with
2289 notifyutil -p com.apple.WebKit.Cache.dump
2291 * NetworkProcess/cache/NetworkCache.cpp:
2292 (WebKit::NetworkCache::initialize):
2293 (WebKit::NetworkCache::dumpFilePath):
2294 (WebKit::entryAsJSON):
2295 (WebKit::NetworkCache::dumpContentsToFile):
2296 (WebKit::NetworkCache::clear):
2298 Also clear any dumps.
2300 * NetworkProcess/cache/NetworkCache.h:
2301 * NetworkProcess/cache/NetworkCacheStorage.h:
2302 (WebKit::NetworkCacheStorage::baseDirectoryPath):
2303 * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
2304 (WebKit::fileNameForKey):
2305 (WebKit::filePathForKey):
2307 (WebKit::openFileForKey):
2308 (WebKit::decodeEntryHeader):
2310 Separate header decoding.
2312 (WebKit::decodeEntry):
2313 (WebKit::NetworkCacheStorage::traverse):
2315 Add asynchronous cache traversal inteface.
2317 2015-03-02 Anders Carlsson <andersca@apple.com>
2319 WebsiteDataStore should handle deleting cookies
2320 https://bugs.webkit.org/show_bug.cgi?id=142185
2322 Reviewed by Beth Dakin.
2324 * NetworkProcess/NetworkProcess.cpp:
2325 (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
2326 When asked to delete cookies, do so.
2328 * NetworkProcess/NetworkProcess.h:
2329 Update the deleteWebsiteDataForOrigins signature.
2331 * NetworkProcess/NetworkProcess.messages.in:
2332 Add cookieHostNames to DeleteWebsiteDataForOrigins.
2334 * UIProcess/Network/NetworkProcessProxy.cpp:
2335 (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
2336 * UIProcess/Network/NetworkProcessProxy.h:
2337 Update to take a vector of cookie host names.
2339 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2340 (WebKit::WebsiteDataStore::removeData):
2341 Figure out if we need to ask the network process to delete data.
2343 2015-03-02 Anders Carlsson <andersca@apple.com>
2345 WebsiteDataStore should support getting cookie host names
2346 https://bugs.webkit.org/show_bug.cgi?id=142178
2348 Reviewed by Dan Bernstein.
2350 * NetworkProcess/NetworkProcess.cpp:
2351 (WebKit::NetworkProcess::fetchWebsiteData):
2352 Assert that we're destroyed from the main thread since we end up copying the website data struct.
2354 * Shared/WebsiteData/WebsiteData.cpp:
2355 (WebKit::WebsiteData::encode):
2356 (WebKit::WebsiteData::decode):
2357 * Shared/WebsiteData/WebsiteData.h:
2358 Add a hostnamesWithCookies member.
2360 * UIProcess/WebsiteData/WebsiteDataRecord.cpp:
2361 (WebKit::WebsiteDataRecord::displayNameForCookieHostName):
2362 Add a new function that will return the display name for a cookie host name.
2364 (WebKit::WebsiteDataRecord::addCookieHostName):
2365 * UIProcess/WebsiteData/WebsiteDataRecord.h:
2366 Add a hash set of cookie host names.
2368 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2369 (WebKit::WebsiteDataStore::fetchData):
2370 Create data records for each host name with cookies.
2372 2015-03-02 Jer Noble <jer.noble@apple.com>
2374 [WK2][Mac] WebPageProxy::supressVisibilityUpdates() should suppress visibility updates.
2375 https://bugs.webkit.org/show_bug.cgi?id=141907
2377 Reviewed by Tim Horton.
2379 At some point, the window/view/page visibility update code was refactored such that setting
2380 WebPageProxy::setSuppressVisibilityUpdate() no longer suppressed visibility updates. This causes
2381 full screen animations to become "flashy" when moving the WebView between the regular and full
2382 screen window, as a HTMLMediaElement in the full screen animation will receive a "!visible"
2383 notification and disconnect its rendering pipeline.
2385 In WebPageProxy::viewStateDidChange(), respect m_suppressVisibilityUpdates and bail out early
2386 if set. In WebPageProxy::setSuppressVisibilityUpdates(), trigger an explicit update after
2387 clearing m_suppressVisibilityUpdates.
2389 * UIProcess/WebPageProxy.cpp:
2390 (WebKit::WebPageProxy::setSuppressVisibilityUpdates):
2391 (WebKit::WebPageProxy::viewStateDidChange):
2392 * UIProcess/WebPageProxy.h:
2393 (WebKit::WebPageProxy::setSuppressVisibilityUpdates): Deleted.
2395 2015-03-02 Jer Noble <jer.noble@apple.com>
2397 [WK1][WK2][Mac] Fullscreen animation is incorrect when page is scaled.
2398 https://bugs.webkit.org/show_bug.cgi?id=142121
2400 Reviewed by Simon Fraser.
2402 Change the order of operations when entering or exiting fullscreen. Change the page scale to
2403 1 before entering, so the final screen rect takes that scale into account, and vice-versa on
2406 * UIProcess/mac/WKFullScreenWindowController.mm:
2407 (-[WKFullScreenWindowController enterFullScreen:]):
2408 (-[WKFullScreenWindowController exitFullScreen]):
2410 2015-03-01 Simon Fraser <simon.fraser@apple.com>
2412 Make clip-path work on <video>, <canvas> etc.
2413 https://bugs.webkit.org/show_bug.cgi?id=138684
2415 Reviewed by Darin Adler.
2417 Support encode/decode for WebCore Path objects, which is done by traversing
2420 * Shared/WebCoreArgumentCoders.cpp:
2421 (IPC::pathPointCountApplierFunction):
2422 (IPC::pathEncodeApplierFunction):
2423 (IPC::ArgumentCoder<Path>::encode):
2424 (IPC::ArgumentCoder<Path>::decode):
2425 * Shared/WebCoreArgumentCoders.h:
2426 * Shared/mac/RemoteLayerTreePropertyApplier.mm:
2427 (WebKit::applyPropertiesToLayer): Actually apply the path and wind rule to the shape layer.
2428 * Shared/mac/RemoteLayerTreeTransaction.h: Include path and wind rule in the layer properties.
2429 * Shared/mac/RemoteLayerTreeTransaction.mm:
2430 (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
2431 (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode): Encode shape and wind rule.
2432 (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): Decode shape and wind rule.
2433 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
2434 (WebKit::PlatformCALayerRemote::shapePath):
2435 (WebKit::PlatformCALayerRemote::setShapePath):
2436 (WebKit::PlatformCALayerRemote::shapeWindRule):
2437 (WebKit::PlatformCALayerRemote::setShapeWindRule):
2438 * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
2440 2015-03-01 Chris Dumez <cdumez@apple.com>
2442 Make NotificationCenter / Notification suspendable
2443 https://bugs.webkit.org/show_bug.cgi?id=142117
2444 <rdar://problem/19923085>
2446 Reviewed by Andreas Kling.
2448 Provide implementation for NotificationClient::hasPendingPermissionRequests().
2450 * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
2451 (WebKit::NotificationPermissionRequestManager::hasPendingPermissionRequests):
2452 * WebProcess/Notifications/NotificationPermissionRequestManager.h:
2453 * WebProcess/WebCoreSupport/WebNotificationClient.cpp:
2454 (WebKit::WebNotificationClient::hasPendingPermissionRequests):
2455 * WebProcess/WebCoreSupport/WebNotificationClient.h:
2457 2015-03-01 Antti Koivisto <antti@apple.com>
2459 Enable new disk cache on iOS
2460 https://bugs.webkit.org/show_bug.cgi?id=142148
2462 Reviewed by Sam Weinig.
2464 * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
2468 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2469 (WebKit::registerUserDefaultsIfNeeded):
2471 Disable the efficacy logging by default for now. It has significant performance impact.
2477 2015-02-28 Anders Carlsson <andersca@apple.com>
2479 WebsiteDataStore should handle fetching and deleting local storage data
2480 https://bugs.webkit.org/show_bug.cgi?id=142137
2482 Reviewed by Sam Weinig.
2484 * UIProcess/Storage/StorageManager.cpp:
2485 (WebKit::StorageManager::deleteEntriesForOrigins):
2486 Add a new function that deletes entries from multiple origins.
2488 * UIProcess/Storage/StorageManager.h:
2491 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2492 (WebKit::WebsiteDataStore::fetchData):
2493 Fetch local storage data as well.
2495 (WebKit::WebsiteDataStore::removeData):
2496 Delete local storage data as well.
2498 2015-02-28 Anders Carlsson <andersca@apple.com>
2500 Fetch cache origins from the network process
2501 https://bugs.webkit.org/show_bug.cgi?id=142135
2503 Reviewed by Dan Bernstein.
2505 * NetworkProcess/NetworkProcess.cpp:
2506 (WebKit::cfURLCacheOrigins):
2507 Add a new helper function that returns a vector of CFURL cache origins.
2509 (WebKit::fetchDiskCacheOrigins):
2510 Fetch the disk cache origins and pass them along to the completion handler. Currently we don't handle the new disk cache.
2512 (WebKit::NetworkProcess::fetchWebsiteData):
2513 Create a callback aggregator and fetch disk cache origins if we're asked for it.
2515 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2516 (WebKit::computeNetworkProcessAccessTypeForDataFetch):
2517 New helper function that computes if we need to launch the network process in order to fetch data.
2519 (WebKit::WebsiteDataStore::fetchData):
2520 Fetch website data from the network process as well.
2522 2015-02-28 Anders Carlsson <andersca@apple.com>
2524 Simplify WebResourceCacheManagerCFNet.mm code
2525 https://bugs.webkit.org/show_bug.cgi?id=142134
2527 Reviewed by Dan Bernstein.
2529 - ENABLE(CACHE_PARTITIONING) is always true on Mac and iOS, so remove those #ifdefs.
2530 - Make cfURLCacheHostNamesWithCallback and clearCFURLCacheForHostNames public
2531 so they can be used by the new WebsiteDataStore code in an upcoming patch.
2532 - Change cfURLCacheHostNamesWithCallback to take an std::function instead of a block.
2534 * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
2535 (WebKit::WebResourceCacheManager::getCacheOrigins):
2536 * WebProcess/ResourceCache/WebResourceCacheManager.h:
2537 * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.mm:
2538 (WebKit::partitionName):
2539 (WebKit::WebResourceCacheManager::cfURLCacheHostNamesWithCallback):
2540 (WebKit::WebResourceCacheManager::clearCFURLCacheForHostNames):
2541 (WebKit::WebResourceCacheManager::cfURLCacheHostNames): Deleted.
2543 2015-02-28 Commit Queue <commit-queue@webkit.org>
2545 Unreviewed, rolling out r180804.
2546 https://bugs.webkit.org/show_bug.cgi?id=142131
2548 Broke nightlies (Requested by ap on #webkit).
2552 "[WK2] Drop legacy WKBundlePageDiagnosticLoggingClient API"
2553 https://bugs.webkit.org/show_bug.cgi?id=141176
2554 http://trac.webkit.org/changeset/180804
2556 2015-02-27 Hunseop Jeong <hs85.jeong@samsung.com>
2558 [EFL][GTK] Fix build break after r180790,180798
2559 https://bugs.webkit.org/show_bug.cgi?id=142127
2561 Reviewed by Gyuyoung Kim.
2565 2015-02-27 Chris Dumez <cdumez@apple.com>
2567 [WK2] Drop legacy WKBundlePageDiagnosticLoggingClient API
2568 https://bugs.webkit.org/show_bug.cgi?id=141176
2570 Reviewed by Sam Weinig.
2572 Drop legacy WKBundlePageDiagnosticLoggingClient WK2 API as we are now
2573 exposing this functionality via WKPageDiagnosticLoggingClient.h on
2574 UIProcess side. The client-side has already been ported over.
2577 * Shared/API/c/WKSharedAPICast.h:
2578 (WebKit::toAPI): Deleted.
2579 (WebKit::toDiagnosticLoggingResultType): Deleted.
2580 * UIProcess/API/C/WKAPICast.h:
2582 * UIProcess/API/C/WKDiagnosticLoggingResultType.h: Renamed from Source/WebKit2/Shared/API/c/WKDiagnosticLoggingResultType.h.
2583 * WebKit2.xcodeproj/project.pbxproj:
2584 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2585 (WKBundlePageSetDiagnosticLoggingClient): Deleted.
2586 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2587 * WebProcess/InjectedBundle/API/c/WKBundlePageDiagnosticLoggingClient.h: Removed.
2588 * WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp: Removed.
2589 * WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.h: Removed.
2590 * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
2591 (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
2592 (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
2593 (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):
2594 * WebProcess/WebPage/WebPage.cpp:
2595 (WebKit::WebPage::WebPage):
2596 (WebKit::WebPage::close):
2597 (WebKit::WebPage::initializeInjectedBundleDiagnosticLoggingClient): Deleted.
2598 * WebProcess/WebPage/WebPage.h:
2599 (WebKit::WebPage::injectedBundleDiagnosticLoggingClient): Deleted.
2601 2015-02-27 Anders Carlsson <andersca@apple.com>
2603 Rename WebResourceCacheManagerCFNet.cpp to WebResourceCacheManagerCFNet.mm
2605 Rubber-stamped by Dan Bernstein.
2607 This will let us use lambda to block conversion in a subsequent patch.
2609 * WebKit2.xcodeproj/project.pbxproj:
2610 * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.mm: Renamed from Source/WebKit2/WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp.
2612 2015-02-27 Commit Queue <commit-queue@webkit.org>
2614 Unreviewed, rolling out r180203 and r180210.
2615 https://bugs.webkit.org/show_bug.cgi?id=142116
2617 broke process suspension and tile map (Requested by thorton on
2620 Reverted changesets:
2622 "Adopt CAMachPort-as-layer-contents"
2623 https://bugs.webkit.org/show_bug.cgi?id=141687
2624 http://trac.webkit.org/changeset/180203
2626 "Fix the !USE(IOSURFACE) build"
2627 http://trac.webkit.org/changeset/180210
2629 2015-02-27 Sam Weinig <sam@webkit.org>
2631 Add WebKit2 SPI to create a DOM File object
2632 https://bugs.webkit.org/show_bug.cgi?id=142109
2634 Reviewed by Tim Horton.
2636 Add a new handle type for exposing a DOM File object to script. Follow
2637 the pattern of WKBundleNodeHandleRef and WKBundleRangeHandleRef with the
2638 new class WKBundleFileHandleRef. It can be created for a specific path,
2639 and then the JS wrapper can be obtained via WKBundleFrameGetJavaScriptWrapperForFileForWorld.
2641 * Shared/API/APIObject.h:
2642 * Shared/API/c/WKBase.h:
2643 * WebKit2.xcodeproj/project.pbxproj:
2644 * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
2645 * WebProcess/InjectedBundle/API/c/WKBundleFileHandleRef.cpp: Added.
2646 (WKBundleFileHandleGetTypeID):
2647 (WKBundleFileHandleCreateWithPath):
2648 * WebProcess/InjectedBundle/API/c/WKBundleFileHandleRef.h: Added.
2649 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2650 (WKBundleFrameGetJavaScriptWrapperForFileForWorld):
2651 * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
2652 * WebProcess/InjectedBundle/DOM/InjectedBundleFileHandle.cpp: Added.
2653 (WebKit::domHandleCache):
2654 (WebKit::InjectedBundleFileHandle::create):
2655 (WebKit::InjectedBundleFileHandle::getOrCreate):
2656 (WebKit::InjectedBundleFileHandle::InjectedBundleFileHandle):
2657 (WebKit::InjectedBundleFileHandle::~InjectedBundleFileHandle):
2658 (WebKit::InjectedBundleFileHandle::coreFile):
2659 * WebProcess/InjectedBundle/DOM/InjectedBundleFileHandle.h: Added.
2660 * WebProcess/WebPage/WebFrame.cpp:
2661 (WebKit::WebFrame::jsWrapperForWorld):
2662 * WebProcess/WebPage/WebFrame.h:
2664 2015-02-27 Beth Dakin <bdakin@apple.com>
2666 Lookup panel dismisses when pages are loading in other tabs/windows
2667 https://bugs.webkit.org/show_bug.cgi?id=142104
2669 rdar://problem/19882137
2671 Reviewed by Tim Horton.
2673 Until rdar://problem/13875766 is resolved, we should only call into Lookup and
2674 DataDetectors for key windows.
2675 * UIProcess/API/mac/WKView.mm:
2676 (-[WKView _dismissContentRelativeChildWindows]):
2678 2015-02-27 Anders Carlsson <andersca@apple.com>
2680 Add infrastructure for handling website data in the network process
2681 https://bugs.webkit.org/show_bug.cgi?id=142092
2683 Reviewed by Andreas Kling.
2685 * NetworkProcess/NetworkProcess.cpp:
2686 (WebKit::NetworkProcess::fetchWebsiteData):
2687 (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
2688 Send back "Did" messages without actually doing anything for now.
2690 * NetworkProcess/NetworkProcess.h:
2693 * NetworkProcess/NetworkProcess.messages.in:
2694 Add FetchWebsiteData and DeleteWebsiteDataForOrigins messages.
2696 * UIProcess/Network/NetworkProcessProxy.cpp:
2697 (WebKit::NetworkProcessProxy::~NetworkProcessProxy):
2698 Assert that all maps are empty.
2700 (WebKit::NetworkProcessProxy::fetchWebsiteData):
2701 (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
2702 Add callbacks and send fetch and delete messages respectively.
2704 (WebKit::NetworkProcessProxy::networkProcessCrashedOrFailedToLaunch):
2705 Make sure to invoke all callbacks.
2707 (WebKit::NetworkProcessProxy::didFetchWebsiteData):
2708 Find the callback and invoke it.
2710 (WebKit::NetworkProcessProxy::didDeleteWebsiteDataForOrigins):
2713 * UIProcess/Network/NetworkProcessProxy.h:
2716 * UIProcess/Network/NetworkProcessProxy.messages.in:
2717 Add DidFetchWebsiteData and DidDeleteWebsiteDataForOrigins messages.
2719 * UIProcess/WebProcessProxy.cpp:
2720 (WebKit::WebProcessProxy::connectionDidClose):
2721 Just pass an empty WebsiteData object.
2723 2015-02-26 Enrica Casucci <enrica@apple.com>
2725 [WK2] REGRESSION(r180465): WebKit::WebPage::editorState() triggers a layout.
2726 https://bugs.webkit.org/show_bug.cgi?id=142015
2728 Reviewed by Alexey Proskuryakov.
2730 We no longer compute the font information at selection
2731 when we update the editor state.
2732 Instead, we request the font information only when the selection
2733 changes and the font panel is visible.
2734 I added an observer to be notified of the font panel visibility
2735 changes to update NSFontManager to reflect the font at the
2738 * Shared/EditorState.cpp:
2739 (WebKit::EditorState::encode):
2740 (WebKit::EditorState::decode):
2741 * Shared/EditorState.h:
2742 (WebKit::EditorState::EditorState):
2743 * UIProcess/API/mac/WKView.mm:
2744 (-[WKView updateFontPanelIfNeeded]):
2745 (-[WKView _selectionChanged]):
2746 (-[WKView addWindowObserversForWindow:]):
2747 (-[WKView removeWindowObservers]):
2748 (-[WKView observeValueForKeyPath:ofObject:change:context:]):
2749 * UIProcess/WebPageProxy.h:
2750 * UIProcess/WebPageProxy.messages.in:
2751 * UIProcess/mac/WebPageProxyMac.mm:
2752 (WebKit::WebPageProxy::fontAtSelection):
2753 (WebKit::WebPageProxy::fontAtSelectionCallback):
2754 * WebProcess/WebPage/WebPage.h:
2755 * WebProcess/WebPage/WebPage.messages.in:
2756 * WebProcess/WebPage/mac/WebPageMac.mm:
2757 (WebKit::WebPage::platformEditorState):
2758 (WebKit::WebPage::fontAtSelection):
2760 2015-02-27 Brady Eidson <beidson@apple.com>
2762 Add API to remove a single content filter.
2763 <rdar://problem/19977764> and https://bugs.webkit.org/show_bug.cgi?id=142088
2765 Reviewed by Sam Weinig.
2767 * Shared/WebPageGroupData.h:
2769 * UIProcess/API/C/WKPageGroup.cpp:
2770 (WKPageGroupRemoveUserContentFilter):
2772 * UIProcess/API/C/WKPageGroup.h:
2773 * UIProcess/API/Cocoa/WKUserContentController.mm:
2774 (-[WKUserContentController _removeUserContentFilter:]):
2776 * UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
2777 * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
2778 (WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
2779 (WebKit::WebUserContentControllerProxy::addProcess):
2780 (WebKit::WebUserContentControllerProxy::addUserContentFilter):
2781 (WebKit::WebUserContentControllerProxy::removeUserContentFilter):
2782 (WebKit::WebUserContentControllerProxy::removeAllUserContentFilters):
2783 * UIProcess/UserContent/WebUserContentControllerProxy.h:
2785 * UIProcess/WebPageGroup.cpp:
2786 (WebKit::WebPageGroup::addUserContentFilter):
2787 (WebKit::WebPageGroup::removeUserContentFilter):
2788 * UIProcess/WebPageGroup.h:
2790 * WebProcess/UserContent/WebUserContentController.cpp:
2791 (WebKit::WebUserContentController::removeUserContentFilter):
2792 * WebProcess/UserContent/WebUserContentController.h:
2793 * WebProcess/UserContent/WebUserContentController.messages.in:
2795 * WebProcess/WebPage/WebPageGroupProxy.cpp:
2796 (WebKit::WebPageGroupProxy::WebPageGroupProxy):
2797 (WebKit::WebPageGroupProxy::removeUserContentFilter):
2798 * WebProcess/WebPage/WebPageGroupProxy.h:
2799 * WebProcess/WebPage/WebPageGroupProxy.messages.in:
2801 2015-02-26 Anders Carlsson <andersca@apple.com>
2803 Add API to remove all website data for the given data records
2804 https://bugs.webkit.org/show_bug.cgi?id=142060
2806 Reviewed by Beth Dakin.
2808 * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
2809 Add new method declaration.
2811 * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
2812 (toWebsiteDataRecords):
2813 Add a helper function that converts an NSArray of _WKWebsiteDataRecords to a Vector of WebsiteDataRecords.
2815 (-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
2816 Call through to the underlying WebsiteDataStore.
2818 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2819 (WebKit::WebsiteDataStore::removeData):
2820 Figure out which processes to call deleteWebsiteDataForOrigins for and do so. Add a callback aggregator so we can
2821 call the completion handler at the right time.
2823 * UIProcess/WebsiteData/WebsiteDataStore.h:
2826 * WebProcess/WebProcess.cpp:
2827 (WebKit::WebProcess::deleteWebsiteDataForOrigins):
2828 Use the newly added MemoryCache member function to delete all resources matching the set of origins.
2830 2015-02-26 Chris Dumez <cdumez@apple.com>
2832 Rename DatabaseManager::manager() to DatabaseManager::singleton()
2833 https://bugs.webkit.org/show_bug.cgi?id=142054
2835 Reviewed by Ryosuke Niwa.
2837 Rename DatabaseManager::manager() to DatabaseManager::singleton() as
2838 per coding style and use WTF::NeverDestroyed.
2840 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2841 (WebKit::WebChromeClient::exceededDatabaseQuota):
2842 * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
2843 (WebKit::WebDatabaseManager::initialize):
2844 (WebKit::WebDatabaseManager::getDatabasesByOrigin):
2845 (WebKit::WebDatabaseManager::getDatabaseOrigins):
2846 (WebKit::WebDatabaseManager::deleteDatabaseWithNameForOrigin):
2847 (WebKit::WebDatabaseManager::deleteDatabasesForOrigin):
2848 (WebKit::WebDatabaseManager::deleteAllDatabases):
2849 (WebKit::WebDatabaseManager::setQuotaForOrigin):
2850 * WebProcess/WebPage/WebPage.cpp:
2851 (WebKit::WebPage::updatePreferences):
2853 2015-02-26 Myles C. Maxfield <mmaxfield@apple.com>
2855 [Mac] [iOS] Parsing support for -apple-trailing-word
2856 https://bugs.webkit.org/show_bug.cgi?id=141939
2858 Reviewed by Andreas Kling.
2860 * Configurations/FeatureDefines.xcconfig:
2862 2015-02-26 Brady Eidson <beidson@apple.com>
2864 Make WKPageGroupRemoveAllUserContentFilters actually remove all user content filters
2865 https://bugs.webkit.org/show_bug.cgi?id=142047
2867 Reviewed by Geoff Garen.
2869 * UIProcess/API/C/WKPageGroup.cpp:
2870 (WKPageGroupRemoveAllUserContentFilters): Remove all content filters instead of removing all user scripts.
2872 2015-02-25 Anders Carlsson <andersca@apple.com>
2874 Add (unused for now) code to delete website data for a set of origins
2875 https://bugs.webkit.org/show_bug.cgi?id=142019
2877 Reviewed by Beth Dakin.
2879 * UIProcess/WebProcessProxy.cpp:
2880 (WebKit::WebProcessProxy::~WebProcessProxy):
2881 Assert that there are no pending callbacks.
2883 (WebKit::WebProcessProxy::connectionDidClose):
2884 Invoke all the didDeleteWebsiteDataForOrigins callbacks.
2886 (WebKit::WebProcessProxy::didDeleteWebsiteDataForOrigins):
2887 Grab the didDeleteWebsiteDataForOrigins and invoke it.
2889 (WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
2890 Add the pending callback and send a DeleteWebsiteDataForOrigins to the web process.
2892 * UIProcess/WebProcessProxy.h:
2895 * UIProcess/WebProcessProxy.messages.in:
2896 Add a DidDeleteWebsiteDataForOrigins message.
2898 * WebProcess/WebProcess.cpp:
2899 (WebKit::WebProcess::deleteWebsiteDataForOrigins):
2900 For now, just send back a DidDeleteWebsiteDataForOrigins message.
2902 * WebProcess/WebProcess.h:
2905 * WebProcess/WebProcess.messages.in:
2906 Add a DeleteWebsiteDataForOrigins message.
2908 2015-02-25 Shivakumar JM <shiva.jm@samsung.com>
2910 Fix build warning in WebKit2/UIProcess module.
2911 https://bugs.webkit.org/show_bug.cgi?id=142014
2913 Reviewed by Anders Carlsson.
2915 Fix build warning by using UNUSED_PARAM macro.
2917 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2918 (WebKit::computeWebProcessAccessTypeForDataFetch):
2920 2015-02-24 Simon Fraser <simon.fraser@apple.com>
2922 Clarify some resizing terminology in ScrollView/FrameView
2923 https://bugs.webkit.org/show_bug.cgi?id=141996
2925 Reviewed by Zalan Bujtas.
2927 ScrollableArea/ScrollView/FrameView had some confusing terminology around
2928 contentsResized/visibleContentsResized/fixedLayoutSizeChanged.
2930 Clarify this by distinguishing between:
2931 1. Available size changes because of
2932 i) non-overlay scrollbar presence
2933 ii) ScrollableArea frame change
2934 2. Removing fixedLayoutSizeChanged() and just treating it like an
2935 available size change.
2937 contentsResized() is relegated to simply being a hook that allows Mac to
2938 flash overlay scrollbars.
2940 The confusingly named visibleContentsResized() is now updateContentsSize(),
2941 and is the way that a ScrollableArea tells its subclasss that it should recompute
2942 the size of the contents (i.e. do a layout).
2944 * WebProcess/Plugins/PDF/PDFPlugin.mm:
2945 (WebKit::PDFPlugin::scrollbarStyleChanged): Call the base class method,
2948 2015-02-24 Simon Fraser <simon.fraser@apple.com>
2950 Use an enum for scrollbar style
2951 https://bugs.webkit.org/show_bug.cgi?id=141985
2953 Reviewed by Beth Dakin.
2955 Switch to an enum class for the scrollbar style (normal or overlay).
2957 Sadly it still has to be passed as an int across the process boundary.
2959 * UIProcess/PageClient.h:
2960 * UIProcess/WebPageProxy.cpp:
2961 (WebKit::WebPageProxy::recommendedScrollbarStyleDidChange):
2962 * UIProcess/mac/PageClientImpl.h:
2963 * UIProcess/mac/PageClientImpl.mm:
2964 (WebKit::PageClientImpl::recommendedScrollbarStyleDidChange):
2965 * WebProcess/Plugins/PDF/PDFPlugin.h:
2966 * WebProcess/Plugins/PDF/PDFPlugin.mm:
2967 (WebKit::PDFPlugin::scrollbarStyleChanged):
2968 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2969 (WebKit::WebChromeClient::recommendedScrollbarStyleDidChange):
2970 * WebProcess/WebCoreSupport/WebChromeClient.h:
2972 2015-02-24 Chris Dumez <cdumez@apple.com>
2974 [Mac][WK2] ASSERTION FAILED: m_sendPort in IPC::Connection::open()
2975 https://bugs.webkit.org/show_bug.cgi?id=141934
2977 Reviewed by Darin Adler.
2979 Speculative fix for "ASSERTION FAILED: m_sendPort" in
2980 IPC::Connection::open(). This assertion seems to indicate we ended
2981 up in IPC::Connection::open() with MACH_PORT_NULL as port.
2983 I found that in XPCServiceInitializerDelegate::getConnectionIdentifier()
2984 we return true unconditionally, even though
2985 xpc_dictionary_copy_mach_send() can return MACH_PORT_NULL. This patch
2986 updates this method to add a check for MACH_PORT_NULL and return false
2989 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
2990 (WebKit::XPCServiceInitializerDelegate::getConnectionIdentifier):
2992 2015-02-24 Commit Queue <commit-queue@webkit.org>
2994 Unreviewed, rolling out r180599.
2995 https://bugs.webkit.org/show_bug.cgi?id=141998
2997 Lots of new test failures (Requested by smfr on #webkit).
3001 "Parsing support for -webkit-trailing-word"
3002 https://bugs.webkit.org/show_bug.cgi?id=141939
3003 http://trac.webkit.org/changeset/180599
3005 2015-02-24 Gyuyoung Kim <gyuyoung.kim@samsung.com>
3007 Fix build break on EFL and GTK port since r180585.
3008 https://bugs.webkit.org/show_bug.cgi?id=141994
3010 Reviewed by Joseph Pecoraro.
3012 * UIProcess/WebsiteData/WebsiteDataRecord.cpp:
3013 (WebKit::WebsiteDataRecord::displayNameForOrigin):
3014 * UIProcess/WebsiteData/WebsiteDataRecord.h:
3015 (WebKit::WebsiteDataRecord::WebsiteDataRecord):
3017 2015-02-24 Myles C. Maxfield <mmaxfield@apple.com>
3019 [Mac] [iOS] Parsing support for -apple-trailing-word
3020 https://bugs.webkit.org/show_bug.cgi?id=141939
3022 Reviewed by Andreas Kling.
3024 * Configurations/FeatureDefines.xcconfig:
3026 2015-02-24 Csaba Osztrogonác <ossy@webkit.org>
3028 Buildfix after r180585.
3032 2015-02-24 Anders Carlsson <andersca@apple.com>
3034 Pass _WKWebsiteDataRecord objects to the fetchData completion handler
3035 https://bugs.webkit.org/show_bug.cgi?id=141984
3037 Reviewed by Andreas Kling.
3039 * Shared/Cocoa/APIObject.mm:
3040 (API::Object::newObject):
3041 Create _WKWebsiteDataRecord objects for WebsiteDataRecord API objects.
3043 * UIProcess/API/APIWebsiteDataRecord.h:
3044 Add WebsiteDataRecord getter.
3046 * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
3047 Add displayName and dataTypes properties.
3049 * UIProcess/API/Cocoa/_WKWebsiteDataRecord.mm:
3050 (dataTypesToString):
3051 Helper function to convert dataTypes bit-fields to strings.
3053 (-[_WKWebsiteDataRecord description]):
3054 Include the display name and data types in the description.
3056 (-[_WKWebsiteDataRecord displayName]):
3057 Return the display name.
3059 (-[_WKWebsiteDataRecord dataTypes]):
3060 Return the data types.
3062 * UIProcess/API/Cocoa/_WKWebsiteDataRecordInternal.h:
3063 (WebKit::toWebsiteDataTypes):
3064 Move this here from _WKWebsiteDataStore.mm.
3066 (WebKit::toWKWebsiteDataTypes):
3067 Add new function to convert WebsiteDataTypes to WKWebsiteDataTypes.
3069 * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
3070 (-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
3071 (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
3072 Qualify toWebsiteDataTypes calls.
3074 * UIProcess/WebsiteData/WebsiteDataRecord.cpp: Added.
3075 (WebKit::WebsiteDataRecord::displayNameForOrigin):
3076 New helper that returns a display name given an origin.
3078 (WebKit::WebsiteDataRecord::add):
3079 Add the origin as well as the type.
3081 * UIProcess/WebsiteData/WebsiteDataRecord.h:
3084 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3085 (WebKit::WebsiteDataStore::fetchData):
3086 Loop through the entries and add them to the m_websiteDataRecords hash map, which
3087 is keyed off of the display name. Pass the m_websiteDataRecords values to the completion handler.
3089 * WebKit2.xcodeproj/project.pbxproj:
3091 2015-02-24 Csaba Osztrogonác <ossy@webkit.org>
3093 One more buildfix after r180575.
3095 * UIProcess/WebProcessProxy.cpp:
3096 (WebKit::WebProcessProxy::connectionDidClose):
3098 2015-02-24 Csaba Osztrogonác <ossy@webkit.org>
3104 2015-02-24 Anders Carlsson <andersca@apple.com>
3106 Implement more of the data fetching API
3107 https://bugs.webkit.org/show_bug.cgi?id=141975
3109 Reviewed by Andreas Kling.
3111 * Shared/WebsiteData/WebsiteData.cpp: Added.
3112 (WebKit::WebsiteData::Entry::encode):
3113 (WebKit::WebsiteData::Entry::decode):
3114 (WebKit::WebsiteData::encode):
3115 (WebKit::WebsiteData::decode):
3116 * Shared/WebsiteData/WebsiteData.h: Added.
3117 Add a new WebsiteData class that will store website data. Currently it only stores
3118 origin + website data type, but in the future it is going to store more things, like
3119 host names that have cookies associated.
3121 * UIProcess/WebProcessProxy.cpp:
3122 (WebKit::WebProcessProxy::~WebProcessProxy):
3123 Assert that we don't have any pending fetch data callbacks.
3125 (WebKit::WebProcessProxy::connectionDidClose):
3126 Invoke any pending fetch website data callbacks.
3128 (WebKit::WebProcessProxy::didFetchWebsiteData):
3129 Grab the callback and invoke it.
3131 (WebKit::WebProcessProxy::fetchWebsiteData):
3132 Set up a pending callback and send a FetchWebsiteData message to the web process.
3134 * UIProcess/WebProcessProxy.h:
3137 * UIProcess/WebProcessProxy.messages.in:
3138 Add a DidFetchWebsiteData message.
3140 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3141 (WebKit::computeWebProcessAccessTypeForDataFetch):
3142 Return the web process access type for the given set of data types.
3144 (WebKit::WebsiteDataStore::fetchData):
3145 Set up a callback aggregator that will assemble the needed website data into a vector of website data records.
3147 (WebKit::computeNetworkProcessAccessTypeForDataRemoval):
3148 (WebKit::computeWebProcessAccessTypeForDataRemoval):
3149 Rename these functions to indicate that they are about data removal.
3151 (WebKit::WebsiteDataStore::removeData):
3152 Append "ForDataRemoval" to function calls.
3154 * WebKit2.xcodeproj/project.pbxproj:
3157 * WebProcess/Storage/StorageAreaMap.cpp:
3158 (WebKit::StorageAreaMap::StorageAreaMap):
3161 * WebProcess/WebProcess.cpp:
3162 (WebKit::WebProcess::fetchWebsiteData):
3163 For now, just fetch memory cache data.
3165 * WebProcess/WebProcess.h:
3168 * WebProcess/WebProcess.messages.in:
3169 Add FetchWebsiteData message.
3171 2015-02-24 Yusuke Suzuki <utatane.tea@gmail.com>
3173 REGRESSION(r179429): Can't type comments in Facebook
3174 https://bugs.webkit.org/show_bug.cgi?id=141859
3176 Reviewed by Brent Fulgham.
3178 Enable SymbolEnabled in inspector context.
3180 * Shared/WebPreferencesDefinitions.h:
3181 * UIProcess/API/C/WKPreferences.cpp:
3182 (WKPreferencesSetJavaScriptRuntimeFlags):
3183 (WKPreferencesGetJavaScriptRuntimeFlags):
3184 (WKPreferencesSetJavaScriptExperimentsEnabled): Deleted.
3185 (WKPreferencesGetJavaScriptExperimentsEnabled): Deleted.
3186 * UIProcess/API/C/WKPreferencesRef.h:
3187 * UIProcess/API/C/WKPreferencesRefPrivate.h:
3188 * UIProcess/API/Cocoa/WKPreferences.mm:
3189 (-[WKPreferences _javaScriptRuntimeFlags]):
3190 (-[WKPreferences _setJavaScriptRuntimeFlags:]):
3191 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
3192 * UIProcess/efl/WebInspectorProxyEfl.cpp:
3193 (WebKit::WebInspectorProxy::platformCreateInspectorPage):
3194 * UIProcess/gtk/WebInspectorProxyGtk.cpp:
3195 (WebKit::WebInspectorProxy::platformCreateInspectorPage):
3196 * UIProcess/mac/WebInspectorProxyMac.mm:
3197 (WebKit::WebInspectorProxy::platformCreateInspectorPage):
3198 * WebProcess/WebPage/WebPage.cpp:
3199 (WebKit::WebPage::updatePreferences):
3200 * mac/WebKit2.order:
3202 2015-02-24 Anders Carlsson <andersca@apple.com>
3204 Tighten up some SecurityOrigin related code, use references where possible
3205 https://bugs.webkit.org/show_bug.cgi?id=141971
3207 Reviewed by Antti Koivisto.
3209 * DatabaseProcess/DatabaseProcess.cpp:
3210 (WebKit::DatabaseProcess::getIndexedDatabaseOrigins):
3211 * Shared/SecurityOriginData.cpp:
3212 (WebKit::SecurityOriginData::fromSecurityOrigin):
3213 (WebKit::SecurityOriginData::securityOrigin):
3214 * Shared/SecurityOriginData.h:
3215 * UIProcess/Storage/StorageManager.cpp:
3216 (WebKit::StorageManager::createTransientLocalStorageMap):
3217 * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
3218 (WebKit::WebIDBServerConnection::WebIDBServerConnection):
3219 * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
3220 (WebKit::WebMediaKeyStorageManager::getMediaKeyOrigins):
3221 * WebProcess/Storage/StorageAreaMap.cpp:
3222 (WebKit::StorageAreaMap::create):
3223 (WebKit::StorageAreaMap::StorageAreaMap):
3224 (WebKit::StorageAreaMap::dispatchSessionStorageEvent):
3225 (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
3226 * WebProcess/Storage/StorageAreaMap.h:
3227 * WebProcess/Storage/StorageNamespaceImpl.cpp:
3228 (WebKit::StorageNamespaceImpl::storageArea):
3230 2015-02-24 Michael Catanzaro <mcatanzaro@igalia.com>
3232 Crash loading local file with WebPageProxy::loadAlternateHTMLString
3233 https://bugs.webkit.org/show_bug.cgi?id=141867
3235 Reviewed by Anders Carlsson.
3237 WebPageProxy::loadAlternateHTMLString needs to assume read access to unreachableURL as well
3238 as baseURL, because unreachableURL will get added to the back/forward list, causing us to
3239 crash later on when we notice the unexpected URL received in checkURLReceivedFromWebProcess.
3241 * UIProcess/WebPageProxy.cpp:
3242 (WebKit::WebPageProxy::loadAlternateHTMLString):
3244 2015-02-24 Ryuan Choi <ryuan.choi@navercorp.com>
3246 [EFL] Add message APIs to communicate between ewk_context and extensions
3247 https://bugs.webkit.org/show_bug.cgi?id=137660
3249 Reviewed by Gyuyoung Kim.
3251 * PlatformEfl.cmake: Added dependencies for ewk2UnitTestExtensionSample
3252 * UIProcess/API/efl/ewk_context.cpp:
3253 (EwkContext::EwkContext):
3254 (EwkContext::didReceiveMessageFromInjectedBundle):
3255 (EwkContext::setMessageFromExtensionCallback):
3256 (EwkContext::processReceivedMessageFromInjectedBundle):
3257 (ewk_context_message_post_to_extensions):
3258 (ewk_context_message_from_extensions_callback_set):
3259 (EwkContext::didReceiveSynchronousMessageFromInjectedBundle):
3260 Deleted to split synchronouse message APIs from asynchronuous message APIs.
3261 ewebkit will not support this until there are requirements.
3262 (EwkContext::setMessageFromInjectedBundleCallback): Renamed to setMessageFromExtensionCallback.
3263 (ewk_context_message_post_to_injected_bundle): Renamed to ewk_context_message_post_to_extensions.
3264 (ewk_context_message_from_injected_bundle_callback_set): Renamed to ewk_context_message_from_injected_bundle_callback_set.
3265 * UIProcess/API/efl/ewk_context.h:
3266 * UIProcess/API/efl/ewk_context_private.h:
3267 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
3268 Improved test case for ewk_context_new_with_extensions_path using the message APIs.
3269 (EWK2UnitTest::EWK2UnitTestBase::EWK2UnitTestBase):
3270 (EWK2UnitTest::EWK2UnitTestBase::SetUp):
3271 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
3272 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp:
3273 (EWK2UnitTest::EWK2UnitTestEnvironment::extensionSample): Deleted.
3274 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h:
3275 * UIProcess/API/efl/tests/extensions/extension_sample.cpp:
3276 Improved test case for ewk_context_new_with_extensions_path using the message APIs.
3277 * UIProcess/API/efl/tests/test_ewk2_context.cpp: Ditto.
3278 (EWK2ContextTestWithExtension::messageReceivedCallback):
3279 (EWK2ContextTestWithExtension::EWK2ContextTestWithExtension):
3281 * WebProcess/InjectedBundle/API/efl/ewk_extension.cpp:
3283 (EwkExtension::EwkExtension):
3284 (EwkExtension::didCreatePage):
3285 (EwkExtension::willDestroyPage):
3286 (EwkExtension::didReceiveMessage):
3287 (EwkExtension::didReceiveMessageToPage):
3288 (ewk_extension_message_post): Implemented to post message to ewk_context.
3289 * WebProcess/InjectedBundle/API/efl/ewk_extension.h:
3290 * WebProcess/InjectedBundle/API/efl/ewk_extension_private.h:
3291 (EwkExtension::bundle):
3292 * WebProcess/efl/ExtensionManagerEfl.cpp:
3293 (WebKit::ExtensionManagerEfl::initialize):
3294 Fixed the bug when there are different shared objects in extension path.
3295 This is spotted while improving test case.
3297 2015-02-23 Commit Queue <commit-queue@webkit.org>
3299 Unreviewed, rolling out r180547 and r180550.
3300 https://bugs.webkit.org/show_bug.cgi?id=141957
3302 Broke 10 Windows tests. (Requested by bfulgham_ on #webkit).
3304 Reverted changesets:
3306 "REGRESSION(r179429): Can't type comments in Facebook"
3307 https://bugs.webkit.org/show_bug.cgi?id=141859
3308 http://trac.webkit.org/changeset/180547
3310 "Constructor returning null should construct an object instead
3312 https://bugs.webkit.org/show_bug.cgi?id=141640
3313 http://trac.webkit.org/changeset/180550
3315 2015-02-23 Ryosuke Niwa <rniwa@webkit.org>
3317 Disable font loading events until our implementation gets updated to match the latest spec
3318 https://bugs.webkit.org/show_bug.cgi?id=141938
3320 Reviewed by Andreas Kling.
3322 * Configurations/FeatureDefines.xcconfig:
3324 2015-02-23 Yusuke Suzuki <utatane.tea@gmail.com>
3326 REGRESSION(r179429): Can't type comments in Facebook
3327 https://bugs.webkit.org/show_bug.cgi?id=141859
3329 Reviewed by Geoffrey Garen.
3331 Enable SymbolEnabled in inspector context.
3333 * Shared/WebPreferencesDefinitions.h:
3334 * UIProcess/API/C/WKPreferences.cpp:
3335 (WKPreferencesSetJavaScriptRuntimeFlags):
3336 (WKPreferencesGetJavaScriptRuntimeFlags):
3337 (WKPreferencesSetJavaScriptExperimentsEnabled): Deleted.
3338 (WKPreferencesGetJavaScriptExperimentsEnabled): Deleted.
3339 * UIProcess/API/C/WKPreferencesRef.h:
3340 * UIProcess/API/C/WKPreferencesRefPrivate.h:
3341 * UIProcess/API/Cocoa/WKPreferences.mm:
3342 (-[WKPreferences _javaScriptRuntimeFlags]):
3343 (-[WKPreferences _setJavaScriptRuntimeFlags:]):
3344 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
3345 * UIProcess/efl/WebInspectorProxyEfl.cpp:
3346 (WebKit::WebInspectorProxy::platformCreateInspectorPage):
3347 * UIProcess/gtk/WebInspectorProxyGtk.cpp:
3348 (WebKit::WebInspectorProxy::platformCreateInspectorPage):
3349 * UIProcess/mac/WebInspectorProxyMac.mm:
3350 (WebKit::WebInspectorProxy::platformCreateInspectorPage):
3351 * WebProcess/WebPage/WebPage.cpp:
3352 (WebKit::WebPage::updatePreferences):
3353 * mac/WebKit2.order:
3355 2015-02-23 Benjamin Poulain <bpoulain@apple.com>
3357 [iOS WK2] The WebProcess keep scrolling pages based on the last velocity after scrolling has been interrupted
3358 https://bugs.webkit.org/show_bug.cgi?id=141933
3359 rdar://problem/18746673
3360 rdar://problem/19711490
3362 Reviewed by Simon Fraser.
3364 The bug happened like this:
3365 1) The user scroll the page. WKContentView tracks the velocity and send
3366 the update rect + velocity to the WebProcess.
3367 2) The user interupts the scrolling but does not commit to either scrolling
3368 again or cancelling the scrolling.
3369 Since we were not notified of this state, the WebProcess still believed
3370 the velocity is stable.
3371 3) With any paint update, the WebProcess would account for the last velocity
3372 and try to guess the best repaint area. This would drift endlessly out
3373 of the view since the view is not really moving.
3375 This patch fixes the issue by adding special handling for interrupted scrolling.
3377 Kudos to Kurt Revis for providing us the required APIs.
3379 * Shared/VisibleContentRectUpdateInfo.h:
3380 (WebKit::operator==):
3381 We can no longer filter VisibleContentRectUpdateInfo ignoring the velocity.
3383 Typically, UIScrollView would call -scrollViewDidScroll: before being interrupted.
3384 If we filter based on the VisibleContentRectUpdateInfo, we have two identical
3385 states differing only by the velocity. If we filter the second update, the WebProcess
3386 would never know the velocity should be zero.
3388 * UIProcess/API/Cocoa/WKWebView.mm:
3389 (-[WKWebView _scrollViewDidInterruptDecelerating:]):
3390 We get this callback when scrolling is interrupted. We just need to clear
3391 the velocity and re-send a new update for the current state.
3393 (-[WKWebView _updateVisibleContentRects]):
3394 Do not consider an interrupted scroll as a stable state. We don't know if scrolling
3395 will resume or will stop.
3397 * UIProcess/ios/WKContentView.h:
3398 * UIProcess/ios/WKContentView.mm:
3399 (-[WKContentView didInterruptScrolling]):
3401 2015-02-23 Anders Carlsson <andersca@apple.com>
3403 Add API for fetching website data records to _WKWebsiteDataStore
3404 https://bugs.webkit.org/show_bug.cgi?id=141926
3406 Reviewed by Beth Dakin.
3408 * UIProcess/API/APIWebsiteDataRecord.cpp:
3409 (API::WebsiteDataRecord::create):
3410 (API::WebsiteDataRecord::WebsiteDataRecord):
3411 * UIProcess/API/APIWebsiteDataRecord.h:
3412 Update to take a WebsiteDataRecord parameter.
3414 * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
3415 * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
3416 (-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
3417 Call down to the WebsiteDataStore.
3419 * UIProcess/WebsiteData/WebsiteDataRecord.h: Added.
3420 This will be the data-container part of WebsiteDataRecord, but it's currently empty.
3422 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3423 (WebKit::WebsiteDataStore::fetchData):
3424 Just dispatch the completion handler for now.
3426 * UIProcess/WebsiteData/WebsiteDataStore.h:
3429 * WebKit2.xcodeproj/project.pbxproj:
3432 2015-02-23 Chris Dumez <cdumez@apple.com>
3434 Add support for diagnostic logging messages sampling
3435 https://bugs.webkit.org/show_bug.cgi?id=141823
3436 <rdar://problem/19899030>
3438 Reviewed by Andreas Kling.
3440 Add support for diagnostic logging messages sampling to decrease the
3441 impact of diagnostic logging on CPU usage, while still getting useful
3442 overall results. This patch adds a ShouldSample argument to
3443 logDiagnosticMessage*() functions and logs 5% of the messages when
3444 sampling. Sampling is turned on for keys that are known to be verbose
3445 (e.g. per resource load logging).
3447 On the page load test I am tracking, CPU usage caused by diagnostic
3448 logging went down to 0.3% of UIProcess from 2.8% with this change.
3450 * NetworkProcess/NetworkProcess.cpp:
3451 (WebKit::NetworkProcess::logDiagnosticMessage):
3452 (WebKit::NetworkProcess::logDiagnosticMessageWithResult):
3453 (WebKit::NetworkProcess::logDiagnosticMessageWithValue):
3454 * NetworkProcess/NetworkProcess.h:
3455 * NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
3456 (WebKit::NetworkCacheStatistics::recordNotUsingCacheForRequest):
3457 (WebKit::NetworkCacheStatistics::recordRetrievalFailure):
3458 (WebKit::NetworkCacheStatistics::recordRetrievedCachedEntry):
3459 * UIProcess/Network/NetworkProcessProxy.cpp:
3460 (WebKit::NetworkProcessProxy::logDiagnosticMessage):
3461 (WebKit::NetworkProcessProxy::logDiagnosticMessageWithResult):
3462 (WebKit::NetworkProcessProxy::logDiagnosticMessageWithValue):
3463 * UIProcess/Network/NetworkProcessProxy.h:
3464 * UIProcess/Network/NetworkProcessProxy.messages.in:
3465 * UIProcess/WebPageProxy.cpp:
3466 (WebKit::shouldLogDiagnosticMessage):
3467 (WebKit::WebPageProxy::logDiagnosticMessage):
3468 (WebKit::WebPageProxy::logDiagnosticMessageWithResult):
3469 (WebKit::WebPageProxy::logDiagnosticMessageWithValue):
3470 * UIProcess/WebPageProxy.h:
3471 * UIProcess/WebPageProxy.messages.in:
3472 * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
3473 (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
3474 (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
3475 (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):
3476 * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:
3477 * WebProcess/WebPage/ios/WebPageIOS.mm:
3478 (WebKit::WebPage::willStartUserTriggeredZooming):
3480 2015-02-23 Anders Carlsson <andersca@apple.com>
3482 Add a stubbed out _WKWebsiteDataRecord class
3483 https://bugs.webkit.org/show_bug.cgi?id=141919
3485 Reviewed by Beth Dakin.
3487 Also add the corresponding API::WebsiteDataRecord C++ class. A website data record is going to represent
3488 a set of associated websites and the types of website data that exist for said websites.
3490 * Shared/API/APIObject.h:
3491 * UIProcess/API/APIWebsiteDataRecord.cpp: Added.
3492 * UIProcess/API/APIWebsiteDataRecord.h: Added.
3493 * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h: Added.
3494 * UIProcess/API/Cocoa/_WKWebsiteDataRecord.mm: Added.
3495 * UIProcess/API/Cocoa/_WKWebsiteDataRecordInternal.h: Added.
3496 * UIProcess/API/Cocoa/_WKWebsiteDataStore.h: