1 2012-12-30 Sam Weinig <sam@webkit.org>
3 Add supplementability for WebContext
4 https://bugs.webkit.org/show_bug.cgi?id=105878
6 Reviewed by Dan Bernstein.
8 Add WebContextSupplement and convert WebApplicationCacheManagerProxy to it.
10 * UIProcess/API/C/WKContext.cpp:
11 (WKContextGetApplicationCacheManager):
12 * UIProcess/WebApplicationCacheManagerProxy.cpp:
13 (WebKit::WebApplicationCacheManagerProxy::supplementName):
14 (WebKit::WebApplicationCacheManagerProxy::WebApplicationCacheManagerProxy):
15 (WebKit::WebApplicationCacheManagerProxy::contextDestroyed):
16 (WebKit::WebApplicationCacheManagerProxy::processDidClose):
17 (WebKit::WebApplicationCacheManagerProxy::refWebContextSupplement):
18 (WebKit::WebApplicationCacheManagerProxy::derefWebContextSupplement):
19 (WebKit::WebApplicationCacheManagerProxy::getApplicationCacheOrigins):
20 (WebKit::WebApplicationCacheManagerProxy::deleteEntriesForOrigin):
21 (WebKit::WebApplicationCacheManagerProxy::deleteAllEntries):
22 * UIProcess/WebApplicationCacheManagerProxy.h:
23 (WebApplicationCacheManagerProxy):
24 * UIProcess/WebContext.cpp:
25 (WebKit::WebContext::WebContext):
26 (WebKit::WebContext::~WebContext):
27 (WebKit::WebContext::shouldTerminate):
28 (WebKit::WebContext::disconnectProcess):
29 * UIProcess/WebContext.h:
30 (WebKit::WebContext::supplement):
31 (WebKit::WebContext::addSupplement):
32 * UIProcess/WebContextSupplement.h: Added.
33 (WebKit::WebContextSupplement::WebContextSupplement):
34 (WebKit::WebContextSupplement::~WebContextSupplement):
35 (WebKit::WebContextSupplement::ref):
36 (WebKit::WebContextSupplement::deref):
37 (WebKit::WebContextSupplement::context):
38 (WebKit::WebContextSupplement::clearContext):
39 * WebKit2.xcodeproj/project.pbxproj:
41 2012-12-31 Christophe Dumez <christophe.dumez@intel.com>
43 [EFL[WK2] Regression(r138574): Should not allocate memory in the fork
44 https://bugs.webkit.org/show_bug.cgi?id=105868
46 Reviewed by Kenneth Rohde Christiansen.
48 Store prefixed executable path in a CString before the fork to
49 avoid allocating memory in the fork by calling String::utf8().
50 Allocating memory in the fork may lead to deadlocks due to
51 FastMalloc and the fork not inheriting the threads.
53 * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
54 (WebKit::ProcessLauncher::launchProcess):
56 2012-12-31 Carlos Garcia Campos <cgarcia@igalia.com>
58 [GTK] Add API to set a WebKitWebView in view source mode to WebKit2
59 https://bugs.webkit.org/show_bug.cgi?id=99315
61 Reviewed by Martin Robinson.
63 Add a generic API to set/get a view mode. For now there are only
64 two modes, Web and Source, but the API can be extended if we
65 eventually support other view modes like Printing for example.
67 * UIProcess/API/gtk/WebKitWebView.cpp:
68 (webkitWebViewSetProperty): Implement setter for view-mode
70 (webkitWebViewGetProperty): Implement getter for view-mode
72 (webkit_web_view_class_init): Add view-source property.
73 (webkit_web_view_set_view_mode): Public method to set the view
75 (webkit_web_view_get_view_mode): Public method to get the view
77 * UIProcess/API/gtk/WebKitWebView.h: Add WebKitViewMode enum.
78 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
79 * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
82 * UIProcess/WebFrameProxy.cpp:
83 (WebKit::WebFrameProxy::WebFrameProxy): Initialize
85 (WebKit::WebFrameProxy::setInViewSourceMode): Set
86 m_inViewSourceMode if it has changed and call
87 WebPageProxy::setFrameInViewSourceMode() to notify the WebProcess.
88 * UIProcess/WebFrameProxy.h:
89 (WebKit::WebFrameProxy::inViewSourceMode): Return whether the
90 frame is currently in view source mode.
91 * UIProcess/WebPageProxy.cpp:
92 (WebKit::WebPageProxy::setFrameInViewSourceMode): Send a message
93 to the WebProcess to set the given frame in view source mode or not.
94 * UIProcess/WebPageProxy.h:
95 (WebPageProxy): Add setFrameInViewSourceMode().
96 * WebProcess/WebPage/WebPage.cpp:
97 (WebKit::WebPage::setFrameInViewSourceMode): Call
98 setInViewSourceMode for the main frame.
99 * WebProcess/WebPage/WebPage.h:
100 (WebPage): Add setFrameInViewSourceMode().
101 * WebProcess/WebPage/WebPage.messages.in: Add new message
102 SetFrameInViewSourceMode.
104 2012-12-30 Christophe Dumez <christophe.dumez@intel.com>
106 [EFL][WK2] Invalid use of temporary object in ProcessLauncher::launchProcess()
107 https://bugs.webkit.org/show_bug.cgi?id=105867
109 Reviewed by Kenneth Rohde Christiansen.
111 Fix invalid use of temporary object in ProcessLauncher::launchProcess()
112 for prefixedExecutablePath.
114 * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
115 (WebKit::ProcessLauncher::launchProcess):
117 2012-12-29 Sam Weinig <sam@webkit.org>
121 * win/WebKit2Common.vsprops:
123 2012-12-29 Sam Weinig <sam@webkit.org>
125 Add supplementability to the NetworkProcess
126 https://bugs.webkit.org/show_bug.cgi?id=105838
128 Reviewed by Dan Bernstein.
130 This patch adds a NetworkProcessSupplement, which is almost identical to
131 WebProcessSupplement, but has a different initialization override. It also
132 stops WebProcessSupplement from inheriting from MessageReceiver (and makes
133 everything that is a WebProcessSupplement also a MessageReceiver) as keeping
134 that would cause classes that need to be both WebProcessSupplements and
135 NetworkProcessSupplements inherit from MessageReceiver twice.
137 * GNUmakefile.list.am:
138 * NetworkProcess/NetworkProcess.cpp:
139 (WebKit::NetworkProcess::NetworkProcess):
140 (WebKit::NetworkProcess::downloadsAuthenticationManager):
141 (WebKit::NetworkProcess::initializeNetworkProcess):
142 * NetworkProcess/NetworkProcess.h:
145 (WebKit::NetworkProcess::supplement):
146 (WebKit::NetworkProcess::addSupplement):
147 * Shared/Network/CustomProtocols/CustomProtocolManager.h:
148 (CustomProtocolManager):
149 * Shared/Network/NetworkProcessSupplement.h: Added.
151 (NetworkProcessSupplement):
152 (WebKit::NetworkProcessSupplement::~NetworkProcessSupplement):
153 (WebKit::NetworkProcessSupplement::initialize):
155 * WebKit2.xcodeproj/project.pbxproj:
156 * WebProcess/ApplicationCache/WebApplicationCacheManager.h:
157 * WebProcess/Authentication/AuthenticationManager.h:
158 * WebProcess/Cookies/WebCookieManager.h:
159 * WebProcess/Geolocation/WebGeolocationManager.h:
160 * WebProcess/KeyValueStorage/WebKeyValueStorageManager.h:
161 * WebProcess/MediaCache/WebMediaCacheManager.h:
162 * WebProcess/Notifications/WebNotificationManager.h:
163 * WebProcess/ResourceCache/WebResourceCacheManager.h:
164 * WebProcess/WebCoreSupport/WebDatabaseManager.h:
165 * WebProcess/WebProcessSupplement.h:
166 * win/WebKit2.vcproj:
168 2012-12-28 Ryuan Choi <ryuan.choi@samsung.com>
170 [EFL][WK2] MiniBrowser could not be launched on specific machine
171 https://bugs.webkit.org/show_bug.cgi?id=105844
173 Reviewed by Gyuyoung Kim.
175 * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
176 (WebKit::ProcessLauncher::launchProcess):
177 Modified to avoid bad use of temporary object.
179 2012-12-28 Joone Hur <joone.hur@intel.com>
181 [EFL][WK2] Implement ewk_context_resource_cache_clear
182 https://bugs.webkit.org/show_bug.cgi?id=104782
184 The purpose of this API is to clear HTTP caches in local storage and
185 all resources cached in memory such as images, CSS, JavaScript, XSL,
188 Reviewed by Kenneth Rohde Christiansen.
190 * UIProcess/API/efl/ewk_context.cpp:
191 (EwkContext::clearResourceCache): Call WebResourceCacheManager::ClearCacheForAllOrigins.
192 (ewk_context_resource_cache_clear):
193 * UIProcess/API/efl/ewk_context.h: Add ewk_context_resource_cache_clear.
194 * UIProcess/API/efl/ewk_context_private.h:
197 2012-12-28 Mark Rowe <mrowe@apple.com>
199 Move logic for extracting the OS X marketing version in to WebCore
200 <http://webkit.org/b/105841> / <rdar://problem/10736041>
202 Reviewed by Dan Bernstein.
204 * UIProcess/mac/WebPageProxyMac.mm:
205 (WebKit::systemMarketingVersionForUserAgentString): Call the WebCore function instead
206 of the WKSI function.
207 (WebKit::WebPageProxy::standardUserAgent):
208 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
209 (InitWebCoreSystemInterface): Remove the code related to the WKSI symbol.
211 2012-12-28 Sam Weinig <sam@webkit.org>
213 Fix assert seen when adding a custom protocol handler before an initial
214 web process has been created.
216 * UIProcess/WebContext.h:
217 (WebKit::WebContext::sendToNetworkingProcess):
219 2012-12-28 Martin Robinson <mrobinson@igalia.com>
221 [GTK][WK2] Add support for IME Composition
222 https://bugs.webkit.org/show_bug.cgi?id=65093
224 Reviewed by Carlos Garcia Campos.
226 Add a WebKit2 implementation of the GtkInputMethodFilter and provide
227 the necessary plumbing to pass composition information along with
230 * GNUmakefile.list.am: Add new files to the source list.
231 * Shared/EditorState.cpp: The cursorRect is now passed for GTK+ as well as
232 Qt, so update the encode and decode methods to pass that along.
233 * Shared/EditorState.h: Add the cursorRect member for GTK+ as well.
234 * Shared/NativeWebKeyboardEvent.h:
235 (NativeWebKeyboardEvent): Keyboard events should also have knowledge of
236 the compositionResults and whether or not the event was faked for composition
238 * Shared/gtk/NativeWebKeyboardEventGtk.cpp: Ditto.
239 * Shared/gtk/WebEventFactory.cpp:
240 (WebKit::WebEventFactory::createWebKeyboardEvent): Copy the logic of PlatformKeyEvent,
241 for properly setting the windows key code and the event text from the composition
243 * Shared/gtk/WebEventFactory.h: The createWebKeyboardEvent factory now takes a
244 CompositionResults argument.
245 * UIProcess/API/gtk/PageClientImpl.cpp:
246 (WebKit::PageClientImpl::doneWithKeyEvent): Don't forward keyboard events that
247 were faked for composition reasons. These events originated from WebKit and should
248 never be passed to parent classes.
249 (WebKit::PageClientImpl::updateTextInputState): Plumb through the updateTextInputState
250 method to the WebViewBase.
251 * UIProcess/API/gtk/PageClientImpl.h:
252 (PageClientImpl): Add a updateTextInputState method.
253 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
254 (_WebKitWebViewBasePrivate): Instead of having an input method context as a member
255 keep a WebViewBaseInputMethodFilter.
256 (webkitWebViewBaseRealize): Set the filter widget when the WebViewBase is realized.
257 (webkit_web_view_base_init): No longer create a input method context during init.
258 (webkitWebViewBaseFocusInEvent): Pass along focus in events to the filter.
259 (webkitWebViewBaseFocusOutEvent): Pass along focus out events to the filter.
260 (webkitWebViewBaseKeyPressEvent): Instead of passing key presses directly to the WebProcess,
261 filter them through the input method filter.
262 (webkitWebViewBaseKeyReleaseEvent): Ditto.
263 (webkitWebViewBaseButtonPressEvent): Notify the input method filter about button press events.
264 (webkitWebViewBaseGetIMContext): The input method filter owns the input method now.
265 (webkitWebViewBaseSetInputMethodState): Add a bit of plumbing for the PageClient.
266 (webkitWebViewBaseUpdateTextInputState): Ditto.
267 * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: Add plumbing declarations.
268 * UIProcess/API/gtk/WebViewBaseInputMethodFilter.cpp: Added. An implementation of GtkInputMethodFilter for WebKit2.
269 * UIProcess/API/gtk/WebViewBaseInputMethodFilter.h: Copied from Source/WebKit/gtk/WebCoreSupport/WebViewInputMethodFilter.h.
270 * UIProcess/PageClient.h:
271 (PageClient): updateInputMethod state is now for both Qt and GTK+.
272 * UIProcess/WebPageProxy.cpp:
273 (WebKit::WebPageProxy::editorStateChanged): Pass the editor state for GTK+ as well as Qt.
274 (WebKit::WebPageProxy::setComposition): Moved this method from WebPageProxyQt as it's used for GTK+ now as well.
275 (WebKit::WebPageProxy::confirmComposition): Ditto.
276 (WebKit::WebPageProxy::cancelComposition): Ditto.
277 * UIProcess/WebPageProxy.h:
278 (WebPageProxy): The setInputMethodState message is for GTK+ as well as Qt now.
279 * UIProcess/WebPageProxy.messages.in: Ditto.
280 * UIProcess/gtk/WebPageProxyGtk.cpp:
281 (WebKit::WebPageProxy::setInputMethodState): Ditto.
282 * UIProcess/qt/WebPageProxyQt.cpp: Move some methods to the platform-independent file.
283 * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: More closely match the WebKit1
284 logic for dealing with key events so that composition events will be handled properly.
285 * WebProcess/WebPage/WebPage.cpp:
286 (WebKit::WebPage::editorState): Properly pass the cursorRect for GTK+.
287 (WebKit::targetFrameForEditing): Moved from the Qt file, because its used by GTK+ as well. They
288 now pass along the updated EditorState as well, just like the Mac versions.
289 (WebKit::WebPage::confirmComposition): Ditto.
290 (WebKit::WebPage::setComposition): Ditto.
291 (WebKit::WebPage::cancelComposition): Ditto.
292 * WebProcess/WebPage/WebPage.h: The above messages are now for GTK+ as well as Qt.
293 * WebProcess/WebPage/WebPage.messages.in: Ditto.
294 * WebProcess/WebPage/qt/WebPageQt.cpp: Moved some methods to the platform-independent file.
296 2012-12-28 Sam Weinig <sam@webkit.org>
298 Appease the Windows Gods.
300 * WebProcess/Notifications/WebNotificationManager.cpp:
302 2012-12-27 Sam Weinig <sam@webkit.org>
304 Make CustomProtocolManager a WebProcessSupplement
305 https://bugs.webkit.org/show_bug.cgi?id=105814
307 Reviewed by Dan Bernstein.
309 This converts CustomProtocolManager from a global singleton, to be a
310 supplement of the WebProcess. Since it also needs to act as a supplement
311 of the NetworkProcess, it adds an initialization function for the NetworkProcess
312 as well, while we await the arrival of the forthcoming NetworkProcessSupplement.
314 In addition, this moves the handling of registering and unregistering schemes
315 directly to the CustomProtocolManager, instead of requiring an unnecessary trip
318 * NetworkProcess/NetworkProcess.cpp:
319 (WebKit::NetworkProcess::NetworkProcess):
320 (WebKit::NetworkProcess::initializeNetworkProcess):
321 * NetworkProcess/NetworkProcess.h:
322 * NetworkProcess/NetworkProcess.messages.in:
323 * Shared/Network/CustomProtocols/CustomProtocolManager.h:
324 (CustomProtocolManager):
325 * Shared/Network/CustomProtocols/CustomProtocolManager.messages.in:
326 * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
327 (+[WKCustomProtocol canInitWithRequest:]):
328 (-[WKCustomProtocol initWithRequest:cachedResponse:client:]):
329 (-[WKCustomProtocol startLoading]):
330 (-[WKCustomProtocol stopLoading]):
331 (WebKit::CustomProtocolManager::supplementName):
332 (WebKit::CustomProtocolManager::CustomProtocolManager):
333 (WebKit::CustomProtocolManager::initialize):
334 * UIProcess/WebContext.cpp:
335 (WebKit::WebContext::registerSchemeForCustomProtocol):
336 (WebKit::WebContext::unregisterSchemeForCustomProtocol):
337 * WebProcess/WebProcess.cpp:
338 (WebKit::WebProcess::WebProcess):
339 (WebKit::WebProcess::initializeWebProcess):
340 * WebProcess/WebProcess.h:
341 * WebProcess/WebProcess.messages.in:
343 2012-12-27 Sam Weinig <sam@webkit.org>
345 Convert a few other WebProcess managers to be WebProcessSupplements
346 https://bugs.webkit.org/show_bug.cgi?id=105812
348 Reviewed by Dan Bernstein.
350 * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
351 (WebKit::WebApplicationCacheManager::supplementName):
352 * WebProcess/ApplicationCache/WebApplicationCacheManager.h:
353 (WebApplicationCacheManager):
354 * WebProcess/Authentication/AuthenticationManager.cpp:
355 (WebKit::AuthenticationManager::supplementName):
356 * WebProcess/Authentication/AuthenticationManager.h:
357 (AuthenticationManager):
358 * WebProcess/Cookies/WebCookieManager.cpp:
359 (WebKit::WebCookieManager::supplementName):
360 * WebProcess/Cookies/WebCookieManager.h:
362 * WebProcess/Geolocation/WebGeolocationManager.cpp:
363 (WebKit::WebGeolocationManager::supplementName):
364 * WebProcess/Geolocation/WebGeolocationManager.h:
365 (WebGeolocationManager):
366 * WebProcess/InjectedBundle/InjectedBundle.cpp:
367 (WebKit::InjectedBundle::setAlwaysAcceptCookies):
368 (WebKit::InjectedBundle::clearApplicationCache):
369 (WebKit::InjectedBundle::setAppCacheMaximumSize):
370 (WebKit::InjectedBundle::webNotificationID):
371 * WebProcess/MediaCache/WebMediaCacheManager.cpp:
372 (WebKit::WebMediaCacheManager::supplementName):
373 * WebProcess/MediaCache/WebMediaCacheManager.h:
374 (WebMediaCacheManager):
375 * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
376 (WebKit::NotificationPermissionRequestManager::permissionLevel):
377 (WebKit::NotificationPermissionRequestManager::setPermissionLevelForTesting):
378 (WebKit::NotificationPermissionRequestManager::removeAllPermissionsForTesting):
379 (WebKit::NotificationPermissionRequestManager::didReceiveNotificationPermissionDecision):
380 * WebProcess/Notifications/WebNotificationManager.cpp:
381 (WebKit::WebNotificationManager::supplementName):
382 (WebKit::WebNotificationManager::initialize):
383 * WebProcess/Notifications/WebNotificationManager.h:
384 (WebNotificationManager):
385 * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
386 (WebKit::WebResourceCacheManager::supplementName):
387 * WebProcess/ResourceCache/WebResourceCacheManager.h:
388 (WebResourceCacheManager):
389 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
390 (WebKit::WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
391 * WebProcess/WebCoreSupport/WebGeolocationClient.cpp:
392 (WebKit::WebGeolocationClient::geolocationDestroyed):
393 (WebKit::WebGeolocationClient::startUpdating):
394 (WebKit::WebGeolocationClient::stopUpdating):
395 * WebProcess/WebCoreSupport/WebNotificationClient.cpp:
396 (WebKit::WebNotificationClient::show):
397 (WebKit::WebNotificationClient::cancel):
398 (WebKit::WebNotificationClient::clearNotifications):
399 (WebKit::WebNotificationClient::notificationObjectDestroyed):
400 * WebProcess/WebProcess.cpp:
401 (WebKit::WebProcess::WebProcess):
402 (WebKit::WebProcess::downloadsAuthenticationManager):
403 * WebProcess/WebProcess.h:
404 (WebKit::WebProcess::textCheckerState):
405 (WebKit::WebProcess::networkAccessManager):
406 (WebKit::WebProcess::soupRequestManager):
407 * WebProcess/mac/WebProcessMac.mm:
408 (WebKit::WebProcess::platformInitializeWebProcess):
409 * WebProcess/soup/WebProcessSoup.cpp:
410 (WebKit::WebProcess::platformInitializeWebProcess):
411 * WebProcess/win/WebProcessWin.cpp:
412 (WebKit::WebProcess::platformInitializeWebProcess):
414 2012-12-27 Viatcheslav Ostapenko <sl.ostapenko@samsung.com>
416 [EFL][WK2] Regression(138462) Sometimes garbage in snapshots
417 https://bugs.webkit.org/show_bug.cgi?id=105803
419 Reviewed by Kenneth Rohde Christiansen.
421 Instead of creating temporary buffer and then creating cairo surface
422 from it, create cairo surface 1st and use surface image internal buffer
423 to read pixels from GL buffer.
425 * UIProcess/API/efl/EwkViewImpl.cpp:
426 (EwkViewImpl::takeSnapshot):
427 * UIProcess/API/efl/SnapshotImageGL.cpp:
428 (getImageSurfaceFromFrameBuffer):
429 * UIProcess/API/efl/SnapshotImageGL.h:
431 2012-12-27 Sam Weinig <sam@webkit.org>
433 Actually make use of the WebProcessSupplements by adding a supplement map to WebProcess
434 https://bugs.webkit.org/show_bug.cgi?id=105804
436 Reviewed by Dan Bernstein.
438 This continues the work of adding extensibility to WebProcess by adding a supplement
439 map, and using it as proof of concept for WebDatabaseManager and WebKeyValueStorageManager.
441 - A supplement is added to WebProcess by calling:
442 process->addSupplement<SupplementFoo>();
443 - A supplement can be used accessed by calling:
444 process->supplement<SupplementFoo>();
446 * WebProcess/InjectedBundle/InjectedBundle.cpp:
447 (WebKit::InjectedBundle::clearAllDatabases):
448 (WebKit::InjectedBundle::setDatabaseQuota):
449 * WebProcess/WebPage/WebPage.cpp:
450 (WebKit::WebPage::updatePreferences):
451 Switch to using the new supplement accessor.
453 * WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp:
454 (WebKit::WebKeyValueStorageManager::supplementName):
455 * WebProcess/KeyValueStorage/WebKeyValueStorageManager.h:
456 * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
457 (WebKit::WebDatabaseManager::supplementName):
458 * WebProcess/WebCoreSupport/WebDatabaseManager.h:
459 Add static supplementName functions. We might want to merge this with
460 the message class name, but for now we have both.
462 * WebProcess/WebProcess.cpp:
463 (WebKit::WebProcess::WebProcess):
464 Add supplements the new way. This should eventually move to the caller
465 of WebProcess::initialize, so that we can reduce #ifdefs and ports have
466 a chance to customize.
468 (WebKit::WebProcess::initializeWebProcess):
469 Iterate the supplements to give each a chance to initialize.
471 * WebProcess/WebProcess.h:
472 (WebKit::WebProcess::supplement):
473 (WebKit::WebProcess::addSupplement):
474 Add functions to add and get WebProcessSupplements.
476 2012-12-26 Sam Weinig <sam@webkit.org>
478 Add an initial stab at a generic supplemental interface for WebProcess
479 https://bugs.webkit.org/show_bug.cgi?id=105779
481 Reviewed by Darin Adler.
483 This starts the process of adding a mechanism to WebProcess to extend its
484 functionality without actually changing it (similar to the Supplement
485 mechanism in WebCore). This will make it possible for ports to add functionality
486 that might not be needed or wanted by other ports.
488 * WebKit2.xcodeproj/project.pbxproj:
489 * WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp:
490 (WebKit::WebKeyValueStorageManager::initialize):
492 * WebProcess/KeyValueStorage/WebKeyValueStorageManager.h:
493 (WebKeyValueStorageManager):
494 (WebKit::WebKeyValueStorageManager::localStorageDirectory):
495 * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
496 (WebKit::WebDatabaseManager::WebDatabaseManager):
497 (WebKit::WebDatabaseManager::initialize):
498 * WebProcess/WebCoreSupport/WebDatabaseManager.h:
499 (WebDatabaseManager):
500 * WebProcess/WebPage/WebPage.cpp:
501 (WebKit::WebPage::updatePreferences):
502 * WebProcess/WebProcess.cpp:
503 (WebKit::WebProcess::initializeWebProcess):
504 (WebKit::WebProcess::keyValueStorageManager):
506 * WebProcess/WebProcess.h:
508 * WebProcess/WebProcessSupplement.h: Added.
510 (WebProcessSupplement):
511 (WebKit::WebProcessSupplement::~WebProcessSupplement):
512 (WebKit::WebProcessSupplement::initialize):
514 2012-12-27 Christophe Dumez <christophe.dumez@intel.com>
516 [EFL][WK2] Regression(135935) layout tests snapshots are flaky
517 https://bugs.webkit.org/show_bug.cgi?id=103468
519 Reviewed by Kenneth Rohde Christiansen.
521 Make sure that we wait for pending repaints before taking a
522 snapshot to avoid flakiness in pixel / ref tests. We also
523 suspend all animations before taking the snapshot to make
524 sure we don't wait forever for repaint events to be processed.
526 * UIProcess/API/efl/EwkViewImpl.cpp:
527 (EwkViewImpl::takeSnapshot):
529 2012-12-26 Csaba Osztrogonác <ossy@webkit.org>
531 Unreviewed Xmas buildfix after r138479.
533 * WebProcess/MediaCache/WebMediaCacheManager.h:
535 2012-12-25 Sam Weinig <sam@webkit.org>
537 Convert WebKeyValueStorageManager and WebMediaCacheManager to MessageReceiver
538 https://bugs.webkit.org/show_bug.cgi?id=105751
540 Reviewed by Andreas Kling.
542 * WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp:
543 (WebKit::WebKeyValueStorageManager::WebKeyValueStorageManager):
544 (WebKit::WebKeyValueStorageManager::dispatchDidGetKeyValueStorageOrigins):
545 (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
546 (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
547 (WebKit::WebKeyValueStorageManager::deleteAllEntries):
548 * WebProcess/KeyValueStorage/WebKeyValueStorageManager.h:
549 (WebKeyValueStorageManager): Remove unused m_originsLoaded member variable.
550 * WebProcess/MediaCache/WebMediaCacheManager.cpp:
551 (WebKit::WebMediaCacheManager::WebMediaCacheManager):
552 (WebKit::WebMediaCacheManager::getHostnamesWithMediaCache):
553 (WebKit::WebMediaCacheManager::clearCacheForHostname):
554 (WebKit::WebMediaCacheManager::clearCacheForAllHostnames):
555 * WebProcess/MediaCache/WebMediaCacheManager.h:
556 (WebMediaCacheManager):
557 Convert the managers to MessageReceiver.
559 * WebProcess/WebProcess.cpp:
560 (WebKit::WebProcess::WebProcess):
561 (WebKit::WebProcess::initializeWebProcess):
562 (WebKit::WebProcess::didReceiveMessage):
563 * WebProcess/WebProcess.h:
565 Add the new managers.
567 2012-12-25 Sam Weinig <sam@webkit.org>
569 Fix the Database manager assert, again.
571 * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
573 (WebKit::WebDatabaseManager::WebDatabaseManager):
574 (WebKit::WebDatabaseManager::initialize):
575 * WebProcess/WebCoreSupport/WebDatabaseManager.h:
576 (WebDatabaseManager):
577 * WebProcess/WebProcess.cpp:
578 (WebKit::WebProcess::initializeWebProcess):
580 2012-12-25 Huang Dongsung <luxtella@company100.net>
582 Coordinated Graphics: Manage the lifecycle of CoordinatedGraphicsLayer explicitly.
583 https://bugs.webkit.org/show_bug.cgi?id=104990
585 Reviewed by Noam Rosenthal.
587 Send explicit commands to the UI process to create/delete compositing
588 layers, instead of having the UI process decide lazily when to create
591 Avoid creating a compositing layer at all if it was deleted in the same
594 * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
595 (WebKit::CoordinatedLayerTreeHostProxy::createCompositingLayer):
597 * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
598 (CoordinatedLayerTreeHostProxy):
599 * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in:
600 * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
601 (WebKit::LayerTreeRenderer::createCanvas):
602 (WebKit::LayerTreeRenderer::destroyCanvas):
603 (WebKit::LayerTreeRenderer::setLayerChildren):
604 (WebKit::LayerTreeRenderer::setLayerFilters):
605 (WebKit::LayerTreeRenderer::setLayerState):
606 (WebKit::LayerTreeRenderer::getLayerByIDIfExists):
608 (WebKit::LayerTreeRenderer::createLayer):
609 (WebKit::LayerTreeRenderer::deleteLayer):
610 (WebKit::LayerTreeRenderer::setRootLayerID):
611 (WebKit::LayerTreeRenderer::createTile):
612 (WebKit::LayerTreeRenderer::removeTile):
613 (WebKit::LayerTreeRenderer::updateTile):
614 (WebKit::LayerTreeRenderer::ensureRootLayer):
615 (WebKit::LayerTreeRenderer::setLayerAnimations):
616 * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
618 (WebKit::LayerTreeRenderer::layerByID):
619 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
620 (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges):
621 (WebKit::CoordinatedLayerTreeHost::createCompositingLayers):
623 (WebKit::CoordinatedLayerTreeHost::deleteCompositingLayers):
624 (WebKit::CoordinatedLayerTreeHost::detachLayer):
625 (WebKit::CoordinatedLayerTreeHost::createGraphicsLayer):
626 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
628 2012-12-25 Sam Weinig <sam@webkit.org>
632 * WebProcess/WebPage/qt/WebPageQt.cpp:
634 2012-12-24 Sam Weinig <sam@webkit.org>
636 Reduce the number of includes in WebProcess.h
637 https://bugs.webkit.org/show_bug.cgi?id=105709
639 Reviewed by Dan Bernstein.
641 * NetworkProcess/NetworkProcess.cpp:
642 (WebKit::NetworkProcess::NetworkProcess):
643 (WebKit::NetworkProcess::downloadsAuthenticationManager):
644 * NetworkProcess/NetworkProcess.h:
646 * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
647 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
648 * WebProcess/FullScreen/WebFullScreenManager.cpp:
649 * WebProcess/InjectedBundle/InjectedBundle.cpp:
650 * WebProcess/Network/NetworkProcessConnection.cpp:
651 * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
652 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
653 * WebProcess/WebPage/FindController.cpp:
654 * WebProcess/WebPage/WebContextMenu.cpp:
655 * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
656 * WebProcess/WebProcess.cpp:
657 (WebKit::WebProcess::WebProcess):
658 (WebKit::WebProcess::downloadsAuthenticationManager):
659 (WebKit::WebProcess::initializeWebProcess):
660 (WebKit::WebProcess::geolocationManager):
662 (WebKit::WebProcess::applicationCacheManager):
663 (WebKit::WebProcess::resourceCacheManager):
664 (WebKit::WebProcess::cookieManager):
665 (WebKit::WebProcess::authenticationManager):
666 (WebKit::WebProcess::databaseManager):
667 (WebKit::WebProcess::notificationManager):
668 (WebKit::WebProcess::pluginProcessConnectionManager):
669 (WebKit::WebProcess::networkProcessConnectionClosed):
670 (WebKit::WebProcess::webResourceLoadScheduler):
671 (WebKit::WebProcess::pluginProcessCrashed):
672 * WebProcess/WebProcess.h:
676 * WebProcess/mac/WebProcessMac.mm:
677 (WebKit::WebProcess::platformInitializeWebProcess):
679 2012-12-25 Andreas Kling <akling@apple.com>
681 [WK2][Mac] Call Carbon resource APIs on main thread only.
682 <rdar://problem/11760262>
683 <http://webkit.org/b/105746>
685 Reviewed by Anders Carlsson.
687 The Carbon resource APIs are not thread-safe, so use a little libdispatch sugar to make
688 sure that plugin enumeration never calls them on a secondary thread.
690 * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
691 (WebKit::getPluginInfoFromCarbonResourcesOnMainThread):
692 (WebKit::getPluginInfoFromCarbonResources):
694 2012-12-25 Seokju Kwon <seokju.kwon@gmail.com>
696 [EFL][WK2] Build breaks with --no-input-type-color
697 https://bugs.webkit.org/show_bug.cgi?id=105740
699 Reviewed by Laszlo Gombos.
701 * UIProcess/API/efl/EwkViewImpl.h: Add INPUT_TYPE_COLOR guard.
704 2012-12-25 Christophe Dumez <christophe.dumez@intel.com>
706 [EFL][WK2] Refactor snapshot taking code
707 https://bugs.webkit.org/show_bug.cgi?id=105687
709 Reviewed by Kenneth Rohde Christiansen.
711 Refactor EFL WK2 snapshot taking code to use
712 smart pointers when possible and follow naming
715 * UIProcess/API/C/efl/WKView.cpp:
716 (WKViewCreateSnapshot):
717 * UIProcess/API/C/efl/WKView.h: Rename WKViewGetSnapshot
718 to WKViewCreateSnapshot to follow C API naming conventions,
719 since the returned value needs to be adopted.
720 * UIProcess/API/efl/EwkViewImpl.cpp:
721 (EwkViewImpl::takeSnapshot):
722 * UIProcess/API/efl/EwkViewImpl.h: Have takeSnapshot() return
723 a cairo_surface_t instead of a WKType. The value should be
724 converted to a WKType at C API level.
726 * UIProcess/API/efl/SnapshotImageGL.cpp: Use OwnArrayPtr for the
727 buffer to avoid manual memory handling. Remove useless call to
728 glBindTexture() since glReadPixels() reads pixels from the frame
729 buffer, not from the texture.
730 (getImageDataFromFrameBuffer):
731 * UIProcess/API/efl/SnapshotImageGL.h: Rename getImageFromCurrentTexture
732 to getImageDataFromFrameBuffer for consistency since we technically
733 return the pixel data of the image and since glReadPixels does not
734 actually read from the texture. Have the function return a smart
735 pointer instead of a raw one to avoid manual memory handling.
737 2012-12-25 Tim Horton <timothy_horton@apple.com>
739 PDFPlugin: Find-in-page
740 https://bugs.webkit.org/show_bug.cgi?id=105710
741 <rdar://problem/12555331>
743 Reviewed by Alexey Proskuryakov.
745 Make use of PDFLayerController's find-in-page functionality to mimic WebKit's.
746 Add two Plugin methods, countFindMatches and findString, and make use of them
747 if attempting to find-in-page within a PluginDocument.
749 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
750 (WebKit::NetscapePlugin::countFindMatches): Added. We don't support find-in-page for NetscapePlugin.
751 (WebKit::NetscapePlugin::findString): Added. We don't support find-in-page for NetscapePlugin.
752 * WebProcess/Plugins/Netscape/NetscapePlugin.h: Add countFindMatches and findString.
753 * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: Add requisite PDFLayerController interfaces.
754 * WebProcess/Plugins/PDF/PDFPlugin.h: Add countFindMatches, findString, and nextMatchForString,
755 as well as storage for the most-recently-searched string.
756 * WebProcess/Plugins/PDF/PDFPlugin.mm:
757 (WebKit::PDFPlugin::writeItemsToPasteboard):
758 (WebKit::PDFPlugin::countFindMatches):
759 (WebKit::PDFPlugin::nextMatchForString):
760 (WebKit::PDFPlugin::findString):
761 * WebProcess/Plugins/PDF/SimplePDFPlugin.h: Add countFindMatches and findString.
762 * WebProcess/Plugins/Plugin.h: Add countFindMatches and findString.
763 * WebProcess/Plugins/PluginProxy.h: Add countFindMatches and findString, but since PDFPlugin
764 is in-process, we don't need to forward these calls to the PluginProcess.
765 * WebProcess/Plugins/PluginView.cpp:
766 (WebKit::PluginView::countFindMatches): Forward countFindMatches to the plugin.
767 (WebKit::PluginView::findString): Forward findString to the plugin.
768 * WebProcess/Plugins/PluginView.h: Add countFindMatches and findString.
769 * WebProcess/WebPage/FindController.cpp:
770 (WebKit::pluginViewForFrame): If the given frame hosts a PluginDocument, grab its PluginView.
771 (WebKit::FindController::countStringMatches): Forward countStringMatches to PluginView if necessary.
772 (WebKit::FindController::updateFindUIAfterPageScroll): Only use unmarkAllTextMatches if we're using
773 ordinary find-in-page and don't have a plugin. If we have a plugin, disable our overlay, as it must
774 be handled by the plugin itself, and request the number of matches for the search from the plugin.
775 (WebKit::FindController::findString): If necessary, forward findString to the plugin.
776 (WebKit::FindController::hideFindUI): Hide the search highlight by searching for an empty string.
778 2012-12-24 Laszlo Gombos <l.gombos@samsung.com>
780 Remove wtf/Platform.h includes from {c|cpp} files
781 https://bugs.webkit.org/show_bug.cgi?id=105678
783 Reviewed by Kentaro Hara.
785 Remove wtf/Platform.h from the include list as it is already
786 included in config.h.
788 * Shared/qt/QtNetworkRequestData.cpp:
790 2012-12-24 Sam Weinig <sam@webkit.org>
794 * WebProcess/WebProcess.cpp:
795 (WebKit::WebProcess::WebProcess):
796 (WebKit::WebProcess::initializeWebProcess):
798 2012-12-24 Sam Weinig <sam@webkit.org>
800 Fix WebKit2 asserting on launch.
802 * WebProcess/WebProcess.cpp:
803 (WebKit::WebProcess::WebProcess):
804 * WebProcess/WebProcess.h:
805 (WebKit::WebProcess::databaseManager):
808 2012-12-24 Csaba Osztrogonác <ossy@webkit.org>
810 [Qt][Win] Unreviewed Xmas buildfix after r138433.
812 * WebProcess/Cookies/WebCookieManager.h:
814 2012-12-23 Seokju Kwon <seokju.kwon@gmail.com>
816 Fix the incorrect use of preprocessor statement in API header
817 https://bugs.webkit.org/show_bug.cgi?id=105675
819 Reviewed by Sam Weinig.
821 Remove a preprocessor statement in WKBundlePage.h
823 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
824 (WKBundlePageGetInspector):
825 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
827 2012-12-23 Sam Weinig <sam@webkit.org>
829 Switch WebCookieManager and AuthenticationManager to use the ChildProcess rather than holding on to a Connection
830 https://bugs.webkit.org/show_bug.cgi?id=105703
832 Reviewed by Dan Bernstein.
834 Also switches WebCookieManager over to be a MessageReceiver while we are at it.
836 * NetworkProcess/NetworkProcess.cpp:
837 (WebKit::NetworkProcess::NetworkProcess):
838 (WebKit::NetworkProcess::initialize):
839 (WebKit::NetworkProcess::didReceiveMessage):
840 * NetworkProcess/NetworkProcess.h:
842 * WebProcess/Authentication/AuthenticationManager.cpp:
843 (WebKit::AuthenticationManager::AuthenticationManager):
844 (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
845 * WebProcess/Authentication/AuthenticationManager.h:
846 (AuthenticationManager):
847 * WebProcess/Cookies/WebCookieManager.cpp:
849 (WebKit::WebCookieManager::WebCookieManager):
850 (WebKit::WebCookieManager::didReceiveMessage):
851 (WebKit::WebCookieManager::getHostnamesWithCookies):
852 (WebKit::WebCookieManager::cookiesDidChange):
853 (WebKit::WebCookieManager::dispatchCookiesDidChange):
854 (WebKit::WebCookieManager::getHTTPCookieAcceptPolicy):
855 * WebProcess/Cookies/WebCookieManager.h:
858 * WebProcess/Cookies/soup/WebCookieManagerSoup.cpp:
859 (WebKit::WebCookieManager::setCookiePersistentStorage):
860 * WebProcess/InjectedBundle/InjectedBundle.cpp:
861 (WebKit::InjectedBundle::setAlwaysAcceptCookies):
862 * WebProcess/WebProcess.cpp:
863 (WebKit::WebProcess::WebProcess):
864 (WebKit::WebProcess::initialize):
865 (WebKit::WebProcess::didReceiveMessage):
866 * WebProcess/WebProcess.h:
868 (WebKit::WebProcess::cookieManager):
870 2012-12-23 Sam Weinig <sam@webkit.org>
872 Try to fix the Qt build.
874 * WebProcess/WebCoreSupport/WebDatabaseManager.h:
876 2012-12-23 Sam Weinig <sam@webkit.org>
878 Remove more special cased message receiving code from WebProcess
879 https://bugs.webkit.org/show_bug.cgi?id=105700
881 Reviewed by Dan Bernstein.
883 Makes WebApplicationCacheManager, WebResourceCacheManager and WebDatabaseManager
884 CoreIPC::MessageReceivers, removes them as special cases in WebProcess.
886 * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
887 (WebKit::WebApplicationCacheManager::WebApplicationCacheManager):
888 (WebKit::WebApplicationCacheManager::getApplicationCacheOrigins):
889 (WebKit::WebApplicationCacheManager::deleteEntriesForOrigin):
890 (WebKit::WebApplicationCacheManager::deleteAllEntries):
891 (WebKit::WebApplicationCacheManager::setAppCacheMaximumSize):
892 * WebProcess/ApplicationCache/WebApplicationCacheManager.h:
894 (WebApplicationCacheManager):
895 * WebProcess/InjectedBundle/InjectedBundle.cpp:
896 (WebKit::InjectedBundle::clearAllDatabases):
897 (WebKit::InjectedBundle::setDatabaseQuota):
898 (WebKit::InjectedBundle::clearApplicationCache):
899 (WebKit::InjectedBundle::setAppCacheMaximumSize):
900 * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
901 (WebKit::WebResourceCacheManager::WebResourceCacheManager):
902 (WebKit::WebResourceCacheManager::getCacheOrigins):
903 (WebKit::WebResourceCacheManager::clearCacheForOrigin):
904 (WebKit::WebResourceCacheManager::clearCacheForAllOrigins):
905 * WebProcess/ResourceCache/WebResourceCacheManager.h:
907 (WebResourceCacheManager):
908 * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
910 (WebKit::WebDatabaseManager::WebDatabaseManager):
911 (WebKit::WebDatabaseManager::getDatabasesByOrigin):
912 (WebKit::WebDatabaseManager::getDatabaseOrigins):
913 (WebKit::WebDatabaseManager::deleteDatabaseWithNameForOrigin):
914 (WebKit::WebDatabaseManager::deleteDatabasesForOrigin):
915 (WebKit::WebDatabaseManager::deleteAllDatabases):
916 (WebKit::WebDatabaseManager::setQuotaForOrigin):
917 (WebKit::WebDatabaseManager::dispatchDidModifyOrigin):
918 (WebKit::WebDatabaseManager::dispatchDidModifyDatabase):
919 * WebProcess/WebCoreSupport/WebDatabaseManager.h:
921 (WebDatabaseManager):
922 * WebProcess/WebProcess.cpp:
923 (WebKit::WebProcess::WebProcess):
924 (WebKit::WebProcess::didReceiveMessage):
925 * WebProcess/WebProcess.h:
927 (WebKit::WebProcess::applicationCacheManager):
928 (WebKit::WebProcess::resourceCacheManager):
929 (WebKit::WebProcess::databaseManager):
931 2012-12-23 Alexey Proskuryakov <ap@apple.com>
933 <rdar://problem/12808377> Network process should respect cookie accept policy
934 https://bugs.webkit.org/show_bug.cgi?id=105684
936 Reviewed by Sam Weinig.
938 * NetworkProcess/NetworkProcess.cpp:
939 (WebKit::NetworkProcess::initialize): Tell cookie manager which connection to
940 make calls on. Now that the code can run in either WebProcess or NetworkProcess,
941 it cannot use WebProcess singleton.
942 (WebKit::NetworkProcess::didReceiveMessage): Dispatch WebCookieManager messages.
944 * WebProcess/WebProcess.cpp:
945 (WebKit::WebProcess::initialize): Tell cookie manager which connection to
948 * UIProcess/Downloads/DownloadProxy.cpp:
949 (WebKit::DownloadProxy::didReceiveAuthenticationChallenge): Changed to use
950 WebContext::networkingProcessConnection() instead of deciding upon the connection here.
952 * UIProcess/Network/NetworkProcessProxy.cpp:
953 (WebKit::NetworkProcessProxy::didReceiveMessage): Call m_webContext->dispatchMessage),
954 as WebCookieManagerProxy handlers are registered on the context. This may seem wasteful,
955 but a lot of registered managers will need the ame handling soon.
957 * UIProcess/WebContext.cpp:
958 (WebKit::WebContext::networkingProcessConnection): Added a way to get connection
959 to whichever process performs networking.
960 (WebKit::WebContext::removeNetworkProcessProxy): Invalidate cookie manager proxy,
961 so that expected responses could be cleared.
962 (WebKit::WebContext::disconnectProcess): Updated a FIXME.
964 * UIProcess/WebContext.h: Deleted deprecatedSharedProcess().
965 (WebKit::WebContext::networkingProcessConnection): Added.
966 (WebKit::WebContext::sendToNetworkingProcess): Added.
967 (WebKit::WebContext::sendToNetworkingProcessRelaunchingIfNecessary): Added.
969 * UIProcess/WebCookieManagerProxy.cpp:
970 (WebKit::WebCookieManagerProxy::shouldTerminate): Should not prevent WebProcess
971 termination when NetworkProcess is in use.
972 (WebKit::WebCookieManagerProxy::getHostnamesWithCookies): Removed a useless ASSERT
973 that neiter documents expectations nor helps find bugs. Send a message to correct
974 process, whether WebProcess or NetworkProcess.
975 (WebKit::WebCookieManagerProxy::deleteCookiesForHostname): Ditto.
976 (WebKit::WebCookieManagerProxy::deleteAllCookies): Ditto.
977 (WebKit::WebCookieManagerProxy::startObservingCookieChanges): Ditto.
978 (WebKit::WebCookieManagerProxy::stopObservingCookieChanges): Ditto.
979 (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy): Ditto.
980 (WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy): Ditto.
982 * WebProcess/Cookies/WebCookieManager.h:
983 * WebProcess/Cookies/WebCookieManager.cpp: Made the class usable in either WebProcess
985 (WebKit::WebCookieManager::setConnection): WebCookieManager now remembers which
986 connection to talk back on.
987 (WebKit::WebCookieManager::didReceiveMessage): Added an assertion that stored connection
988 matches the one being used to reciev messages.
989 (WebKit::WebCookieManager::getHostnamesWithCookies): Use the stored connection to
991 (WebKit::WebCookieManager::startObservingCookieChanges): Pass a callback function,
992 so that WebCore doesn't have to use a platform strategy.
993 (WebKit::WebCookieManager::cookiesDidChange): The new callback.
994 (WebKit::WebCookieManager::dispatchCookiesDidChange): Use the stored connection.
995 (WebKit::WebCookieManager::getHTTPCookieAcceptPolicy): Use the stored connection.
997 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
998 * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
999 Removed notifyCookiesChanged() which is no longer part of CookiesStrategy.
1001 2012-12-22 Sam Weinig <sam@webkit.org>
1003 Make CustomProtocolManager a MessageReceiver to remove more special casing
1004 https://bugs.webkit.org/show_bug.cgi?id=105682
1006 Reviewed by Dan Bernstein.
1008 To avoid storing a Connection in CustomProtocolManager, which is not a great idea without
1009 it being the Connection::Client and therefore getting death notifications, I also made
1010 ChildProcess a MessageSender so that extensions to it, like CustomProtocolManager, can
1011 easily send messages to the parent process.
1013 * NetworkProcess/NetworkProcess.cpp:
1014 (WebKit::NetworkProcess::NetworkProcess):
1015 Initialize the shared CustomProtocolManager, which will add it to the MessageReceiverMap in
1018 (WebKit::NetworkProcess::didReceiveMessage):
1019 Remove the special case for CustomProtocolManager.
1021 (WebKit::NetworkProcess::initializeNetworkProcess):
1022 Call connectionEstablished on the CustomProtocolManager to make it start working as a NSURLProtocol handler.
1024 * NetworkProcess/NetworkProcess.h:
1025 Add overrides necessary for MessageSender.
1027 * PluginProcess/PluginProcess.h:
1030 * Shared/ChildProcess.h:
1032 Make ChildProcess a MessageSender.
1034 * Shared/Network/CustomProtocols/CustomProtocolManager.h:
1035 (CustomProtocolManager):
1036 (WebKit::CustomProtocolManager::childProcess):
1037 * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
1038 (-[WKCustomProtocol startLoading]):
1039 (-[WKCustomProtocol stopLoading]):
1040 (WebKit::CustomProtocolManager::CustomProtocolManager):
1041 (WebKit::CustomProtocolManager::initialize):
1042 (WebKit::CustomProtocolManager::connectionEstablished):
1043 Make CustomProtocolManager a MessageReceiver and split initialization and the time when it can
1044 start acting as protocol handler as these happen at different times now. It also now stores a
1045 ChildProcess rather than a Connection.
1047 * SharedWorkerProcess/SharedWorkerProcess.h:
1048 Add overrides necessary for MessageSender.
1050 * WebProcess/WebProcess.cpp:
1051 (WebKit::WebProcess::WebProcess):
1052 Initialize the shared CustomProtocolManager, which will add it to the MessageReceiverMap in
1055 (WebKit::WebProcess::didReceiveMessage):
1056 Remove the special case for CustomProtocolManager.
1058 (WebKit::WebProcess::initializeCustomProtocolManager):
1059 Call connectionEstablished on the CustomProtocolManager to make it start working as a NSURLProtocol handler.
1061 * WebProcess/WebProcess.h:
1062 Add overrides necessary for MessageSender.
1064 2012-12-20 Martin Robinson <mrobinson@igalia.com>
1066 [GTK] Remove plugin process configuration option
1067 https://bugs.webkit.org/show_bug.cgi?id=105564
1069 Reviewed by Carlos Garcia Campos.
1071 Remove the --enable-plugin-process configuration option, opting instead to
1072 always build the plugin process when building WebKit2. It isn't very interesting
1073 for downstream to enable or disable the plugin process. It should always be
1074 enabled for WebKit2 and it's better for us not to have to keep a disabled plugin
1075 process building. Additionally, the in-process plugin isn't functional, since
1076 plugins depend on GTK+ 2 and WebKit2 depends on GTK+ 3.
1078 * GNUmakefile.am: Remove the option.
1079 * GNUmakefile.list.am: Remote the option.
1081 2012-12-22 Sam Weinig <sam@webkit.org>
1083 Give the ChildProcess a MessageReceiverMap
1084 https://bugs.webkit.org/show_bug.cgi?id=105681
1086 Reviewed by Dan Bernstein.
1088 Moving the MessageReceiverMap to the ChildProcess will help shared code
1089 between the WebProcess and NetworkProcess.
1091 * NetworkProcess/NetworkProcess.cpp:
1092 (WebKit::NetworkProcess::NetworkProcess):
1093 Pass 'this' instead of the MessageReceiverMap, now that ChildProcess
1094 can be used to access the MessageReceiverMap.
1096 * NetworkProcess/NetworkProcess.h:
1098 Remove the now extraneous MessageReceiverMap.
1100 * Shared/ChildProcess.cpp:
1101 (WebKit::ChildProcess::ChildProcess):
1103 (WebKit::ChildProcess::~ChildProcess):
1104 (WebKit::ChildProcess::addMessageReceiver):
1105 (WebKit::ChildProcess::removeMessageReceiver):
1106 * Shared/ChildProcess.h:
1108 Add a MessageReceiverMap and helper functions from WebProcess.
1110 * WebProcess/Authentication/AuthenticationManager.cpp:
1111 (WebKit::AuthenticationManager::AuthenticationManager):
1112 * WebProcess/Authentication/AuthenticationManager.h:
1113 (AuthenticationManager):
1114 Fix the FIXME, passing the ChildProcess rather than the MessageReceiverMap.
1116 * WebProcess/WebProcess.cpp:
1117 (WebKit::WebProcess::WebProcess):
1118 * WebProcess/WebProcess.h:
1120 Remove the MessageReceiverMap and helper functions.
1122 2012-12-22 Alexey Proskuryakov <ap@apple.com>
1126 * WebProcess/Cookies/cf/WebCookieManagerCFNet.cpp:
1128 2012-12-22 Alexey Proskuryakov <ap@apple.com>
1130 Add a separate class for networking related storage
1131 https://bugs.webkit.org/show_bug.cgi?id=105676
1133 Reviewed by Sam Weinig.
1135 * NetworkProcess/NetworkConnectionToWebProcess.cpp: We no longer need to create
1136 fake RemoteNetworkingContexts here! Use an actual default or private storage session.
1138 * NetworkProcess/mac/NetworkProcessMainMac.mm: Updated form of WebSystemInterface.h include,
1139 it's not a system one.
1141 * NetworkProcess/mac/RemoteNetworkingContext.h: Expose privateBrowsingSession(),
1142 so that NetworkConnectionToWebProcess could use it. We can generalize the interface
1143 one we support more sessions.
1145 * NetworkProcess/mac/RemoteNetworkingContext.mm: This class now only tracks private
1146 browsing session, with most other code being in NetworkStorageSession.
1148 * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
1149 * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
1150 * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
1151 * WebProcess/WebProcess.cpp:
1152 * WebProcess/efl/WebProcessMainEfl.cpp:
1153 * WebProcess/gtk/WebProcessMainGtk.cpp:
1154 * WebProcess/Downloads/cfnet/DownloadCFNet.cpp:
1155 * WebProcess/Downloads/efl/DownloadSoupErrorsEfl.cpp:
1156 * WebProcess/Downloads/gtk/DownloadSoupErrorsGtk.cpp:
1157 * WebProcess/Downloads/mac/DownloadMac.mm:
1158 * WebProcess/Network/WebResourceLoader.cpp:
1159 Updated includes for ResourceHandle change. For some ports, the includes could be
1160 made more tight, but I have no practical way to do that.
1162 * WebKit2.xcodeproj/project.pbxproj: Removed WebPlatformStrategiesMac.mm.
1164 * WebProcess/Cookies/WebCookieManager.cpp:
1165 (WebKit::WebCookieManager::getHostnamesWithCookies):
1166 (WebKit::WebCookieManager::deleteCookiesForHostname):
1167 (WebKit::WebCookieManager::deleteAllCookies):
1168 Pass a proper session instead of relying on a strategy to call back to WebKit
1169 for default cookie storage (we don't even have strategies initialized in NetworkProcess).
1171 * WebProcess/InjectedBundle/InjectedBundle.cpp:
1172 (WebKit::InjectedBundle::switchNetworkLoaderToNewTestingSession): Initialize WCSI
1173 before calling a function that now uses in in WebCore.
1175 * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1176 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: We no longer need a strategy
1177 for default cookie storage! Updated other functions to use sessions.
1179 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
1180 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
1181 * WebProcess/WebCoreSupport/mac/WebPlatformStrategiesMac.mm: Removed.
1182 * WebProcess/WebCoreSupport/win/WebFrameNetworkingContext.h:
1183 WebFrameNetworkingContext is now simpler, with more tracking being donre through WebCore.
1185 2012-12-21 Elliott Sprehn <esprehn@chromium.org>
1187 Replace documentFragmentIsShadowRoot with isTreeScope
1188 https://bugs.webkit.org/show_bug.cgi?id=105345
1190 Reviewed by Dimitri Glazkov.
1192 Expose isTreeScope symbol.
1194 * win/WebKit2.def.in:
1196 2012-12-21 Sheriff Bot <webkit.review.bot@gmail.com>
1198 Unreviewed, rolling out r138331.
1199 http://trac.webkit.org/changeset/138331
1200 https://bugs.webkit.org/show_bug.cgi?id=105668
1202 Broke Windows clean builds; can't figure out how to fix it
1203 (Requested by rniwa on #webkit).
1205 * win/WebKit2.def.in:
1207 2012-12-21 Brady Eidson <beidson@apple.com>
1209 ASSERT in WebResourceLoadScheduler::scheduleLoad with a crashed NetworkProcess.
1210 <rdar://problem/12924845> and https://bugs.webkit.org/show_bug.cgi?id=105646
1212 Reviewed by Alexey Proskuryakov.
1214 If we fail to schedule a loader with the NetworkProcess it is probably because the NetworkProcess crashed.
1216 Since these loaders will never succeed in loading we should schedule them to fail on a timer.
1218 * WebProcess/Network/WebResourceLoadScheduler.cpp:
1219 (WebKit::WebResourceLoadScheduler::WebResourceLoadScheduler):
1220 (WebKit::WebResourceLoadScheduler::scheduleLoad):
1221 (WebKit::WebResourceLoadScheduler::addUnschedulableLoad):
1222 (WebKit::WebResourceLoadScheduler::unscheduledLoadTimerFired):
1223 (WebKit::WebResourceLoadScheduler::remove):
1224 * WebProcess/Network/WebResourceLoadScheduler.h:
1226 2012-12-21 Kenneth Rohde Christiansen <kenneth@webkit.org>
1228 Unreviewed potential fix EFL/Qt test breakage on WK2
1230 Only disable scrollbars when in fixed layout mode.
1232 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1233 (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
1235 2012-12-21 Brady Eidson <beidson@apple.com>
1237 Remove ResourceLoadScheduler::addMainResourceLoad and all related code
1238 <rdar://problem/12925275> and https://bugs.webkit.org/show_bug.cgi?id=105644
1240 Reviewed by Alexey Proskuryakov.
1242 Now that main resources loads are scheduled (bug 49246) we don't need this stuff anymore.
1244 * WebProcess/Network/WebResourceLoadScheduler.cpp:
1245 (WebKit::WebResourceLoadScheduler::remove):
1246 (WebKit::WebResourceLoadScheduler::networkProcessCrashed):
1247 * WebProcess/Network/WebResourceLoadScheduler.h:
1249 2012-12-20 Sam Weinig <sam@webkit.org>
1251 Add WebKit2 SPI to get the current selection as a WebArchive
1252 https://bugs.webkit.org/show_bug.cgi?id=105613
1254 Reviewed by Anders Carlsson.
1256 * UIProcess/API/C/WKPage.cpp:
1257 (WKPageGetSelectionAsWebArchiveData):
1258 * UIProcess/API/C/WKPage.h:
1261 * UIProcess/WebPageProxy.cpp:
1262 (WebKit::WebPageProxy::getSelectionAsWebArchiveData):
1264 * UIProcess/WebPageProxy.h:
1266 * WebProcess/WebPage/WebPage.cpp:
1268 (WebKit::frameWithSelection):
1269 (WebKit::WebPage::getSelectionAsWebArchiveData):
1270 * WebProcess/WebPage/WebPage.h:
1272 * WebProcess/WebPage/WebPage.messages.in:
1273 Pipe getter to the WebProcess and back.
1275 2012-12-21 Brady Eidson <beidson@apple.com>
1277 Perform cleanup in WebProcess if the NetworkProcess crashes.
1278 <rdar://problem/12903117> and https://bugs.webkit.org/show_bug.cgi?id=105592
1280 Reviewed by Alexey Proskuryakov.
1282 If the NetworkProcess crashes, a whole bunch of WebResourceLoaders (and WebCore::ResourceLoaders)
1283 might be orphaned in the WebProcess.
1285 These loaders need to fail once it is apparent they will never finish loading.
1287 * Shared/API/c/WKError.h: Add a new error representing an "WebKit Internal Error."
1289 * WebProcess/WebCoreSupport/WebErrors.h:
1290 * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
1291 (WebKit::internalError):
1293 * WebProcess/Network/WebResourceLoadScheduler.cpp:
1294 (WebKit::WebResourceLoadScheduler::networkProcessCrashed): Call didFail all outstanding ResourceLoaders
1295 and tell all WebResourceLoaders the NetworkProcess crashed.
1296 * WebProcess/Network/WebResourceLoadScheduler.h:
1298 * WebProcess/Network/WebResourceLoader.cpp:
1299 (WebKit::WebResourceLoader::networkProcessCrashed): Call didFail with the new InternalError
1300 * WebProcess/Network/WebResourceLoader.h:
1302 * WebProcess/WebProcess.cpp:
1303 (WebKit::WebProcess::networkProcessConnectionClosed): Tell the scheduled the NetworkProcess crashed.
1305 2012-12-21 Kenneth Rohde Christiansen <kenneth@webkit.org>
1307 [EFL][WK2] Never create WebCore scrollbars for EFL/WK2
1308 https://bugs.webkit.org/show_bug.cgi?id=105632
1310 Reviewed by Antonio Gomes.
1312 Then creating the frame ask to not create scrollbars and
1313 lock it so they won't be created at any later time.
1315 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1316 (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
1318 2012-12-21 Seokju Kwon <seokju.kwon@gmail.com>
1320 [EFL] Add guard around ContextMenuItemTagInspectElement
1321 https://bugs.webkit.org/show_bug.cgi?id=105267
1323 Reviewed by Ryosuke Niwa.
1325 Need INSPECTOR guard for using ContextMenuItemTagInspectElement.
1327 * UIProcess/API/efl/ewk_context_menu_item.cpp:
1329 2012-12-21 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
1331 [WK2] TiledBackingStore: Scroll position is not reset when new page is loaded
1332 https://bugs.webkit.org/show_bug.cgi?id=105627
1334 Reviewed by Kenneth Rohde Christiansen.
1336 Reset scroll position to (0,0) when new page is loaded.
1338 * WebProcess/WebPage/WebPage.cpp:
1339 (WebKit::WebPage::sendViewportAttributesChanged):
1341 2012-12-21 Tim Horton <timothy_horton@apple.com>
1343 PDFPlugin: Cannot drop files/URLs on PDFPlugin
1344 https://bugs.webkit.org/show_bug.cgi?id=105516
1345 <rdar://problem/12729443>
1347 Reviewed by Alexey Proskuryakov.
1349 Add shouldAllowNavigationFromDrags to Plugin/PluginView/etc., which WebCore will
1350 consult when dragging over a PluginDocument to decide whether or not a drag may result in navigation.
1352 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1353 (WebKit::NetscapePlugin::shouldAllowNavigationFromDrags): Added, always returning false to keep existing behavior.
1354 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1355 (NetscapePlugin): Added.
1356 * WebProcess/Plugins/PDF/SimplePDFPlugin.h:
1357 (WebKit::SimplePDFPlugin::shouldAllowNavigationFromDrags): Added, always returning true. (Simple)PDFPlugin should
1358 navigate when dropped onto, just like an image or HTML document would.
1359 * WebProcess/Plugins/Plugin.h:
1360 (Plugin): Add shouldAllowNavigationFromDrags.
1361 * WebProcess/Plugins/PluginProxy.h: Add shouldAllowNavigationFromDrags.
1362 * WebProcess/Plugins/PluginView.cpp:
1363 (WebKit::PluginView::shouldAllowNavigationFromDrags): Forward shouldAllowNavigationFromDrags to the plugin.
1364 * WebProcess/Plugins/PluginView.h: Add shouldAllowNavigationFromDrags.
1366 2012-12-21 Sheriff Bot <webkit.review.bot@gmail.com>
1368 Unreviewed, rolling out r138357.
1369 http://trac.webkit.org/changeset/138357
1370 https://bugs.webkit.org/show_bug.cgi?id=105622
1372 wrong fix for the problem
\1f (the original author actually
1373 already did this, and it's not helping) (Requested by thorton
1376 * win/WebKit2.def.in:
1378 2012-12-21 Sheriff Bot <webkit.review.bot@gmail.com>
1380 Unreviewed, rolling out r138338.
1381 http://trac.webkit.org/changeset/138338
1382 https://bugs.webkit.org/show_bug.cgi?id=105621
1384 speculative rollout because fast/dom/shadow/content-element-
1385 distributed-nodes.html is crashing on linux debug. (Requested
1386 by loislo on #webkit).
1388 * win/WebKit2.def.in:
1390 2012-12-21 Tim Horton <timothy_horton@apple.com>
1392 Unreviewed Windows build fix after http://trac.webkit.org/changeset/138338
1394 * win/WebKit2.def.in:
1396 2012-12-21 Tim Horton <timothy_horton@apple.com>
1398 Reducing print preview scale significantly causes a crash
1399 https://bugs.webkit.org/show_bug.cgi?id=105519
1400 <rdar://problem/12807090>
1402 Reviewed by Alexey Proskuryakov.
1404 The bitmap image used for print previews was being created respecting the print preview scale.
1405 This doesn't make any sense, as the scale does not affect the size of the image required to
1406 represent the previewed page. Instead, we should not scale the size, creating the buffer at a
1407 size that is constant regardless of scale, and do the scaling when drawing *into* the buffer instead.
1409 In some cases, this could cause an out-of-memory crash.
1411 * UIProcess/API/mac/WKPrintingView.mm:
1412 (-[WKPrintingView _drawPreview:]): Rename rect to scaledPrintingRect for clarity. Compute print
1413 preview bitmap image size from the original non-scaled drawing size and the device scale factor.
1414 Hand the image size to drawRectToImage. Draw the image without scaling, as it's always created
1415 at the correct size. Don't compute the scale factor from the size of the image, we can know it from WebPageProxy.
1416 * UIProcess/WebPageProxy.cpp:
1417 (WebKit::WebPageProxy::drawRectToImage): Add a parameter to drawRectForImage, imageSize.
1418 * UIProcess/WebPageProxy.h:
1419 (WebPageProxy): Add a parameter to drawRectForImage, imageSize.
1420 * WebProcess/WebPage/WebPage.cpp:
1421 (WebKit::WebPage::drawRectToImage): Use imageSize to size our buffer, and scale up to make the printing rect
1422 fit in the bitmap's bounds.
1423 * WebProcess/WebPage/WebPage.h:
1424 (WebPage): Add a parameter to drawRectForImage, imageSize.
1425 * WebProcess/WebPage/WebPage.messages.in: Add a parameter to drawRectForImage, imageSize.
1427 2012-12-20 Helder Correia <helder.correia@nokia.com>
1429 [CoordGfx] Make single-argument AreaAllocator constructors explicit
1430 https://bugs.webkit.org/show_bug.cgi?id=105598
1432 Reviewed by Noam Rosenthal.
1434 Follow the coding style for AreaAllocator and GeneralAreaAllocator.
1436 * WebProcess/WebPage/CoordinatedGraphics/AreaAllocator.h:
1438 (GeneralAreaAllocator):
1440 2012-12-20 Elliott Sprehn <esprehn@chromium.org>
1442 Replace documentFragmentIsShadowRoot with isTreeScope
1443 https://bugs.webkit.org/show_bug.cgi?id=105345
1445 Reviewed by Dimitri Glazkov.
1447 Expose isTreeScope symbol.
1449 * win/WebKit2.def.in:
1451 2012-12-20 Kiran Muppala <cmuppala@apple.com>
1453 Set timer coalescing policy for WebKit2 processes on Mac until process visible assertion handles it automatically
1454 https://bugs.webkit.org/show_bug.cgi?id=105594
1456 Reviewed by Mark Rowe.
1458 * Shared/mac/ChildProcessMac.mm:
1459 (WebKit::initializeTimerCoalescingPolicy): Set task_latency and task_throughput QOS tiers as appropriate
1460 for visible applications.
1461 (WebKit::ChildProcess::platformInitialize): Add call to initializeTimerCoalescingPolicy.
1463 2012-12-20 Anders Carlsson <andersca@apple.com>
1465 Stop building WebKit2 for Windows
1466 https://bugs.webkit.org/show_bug.cgi?id=105585
1468 Reviewed by Brian Weinstein.
1470 Remove an unneeded export.
1472 * win/WebKit2.def.in:
1474 2012-12-20 Ryuan Choi <ryuan.choi@samsung.com>
1476 [EFL] Build break with latest EFL libraries.
1477 https://bugs.webkit.org/show_bug.cgi?id=104827
1479 Reviewed by Laszlo Gombos.
1481 The eo EFL package is introduced and evas and ecore use it since 1.8.
1482 While introducing Eo, EFL changed several structures of Evas and Ecore
1483 from own specific class to Eo.
1485 So, this patch adds FindEo and changes declaration of Evas, Evas_Object,
1486 Ecore_Timer to build with latest EFL libraries.
1488 * PlatformEfl.cmake: Includes eo EFL library.
1489 * UIProcess/API/C/efl/WKAPICastEfl.h: Modified declaration of Evas_Object.
1490 * UIProcess/API/C/efl/WKView.h: Modified declaration of Evas.
1491 * UIProcess/efl/WebPopupMenuProxyEfl.h: Removed unnecessary declaration.
1493 2012-12-20 Helder Correia <helder.correia@nokia.com>
1495 [CoordGfx] Remove CoordinatedLayerUpdateInfo class forwarding
1496 https://bugs.webkit.org/show_bug.cgi?id=105588
1498 Reviewed by Noam Rosenthal.
1500 There is no such class.
1502 * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
1504 * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
1507 2012-12-20 Pratik Solanki <psolanki@apple.com>
1509 Rename HAVE(NETWORK_CFDATA_ARRAY_CALLBACK) to USE(NETWORK_CFDATA_ARRAY_CALLBACK)
1510 https://bugs.webkit.org/show_bug.cgi?id=105578
1512 Reviewed by Alexey Proskuryakov.
1514 * NetworkProcess/NetworkResourceLoader.cpp:
1515 * NetworkProcess/NetworkResourceLoader.h:
1517 2012-12-20 Alexey Proskuryakov <ap@apple.com>
1519 LocalTerminationDisabler is not needed in WebCookieManager.cpp
1520 https://bugs.webkit.org/show_bug.cgi?id=105581
1522 Reviewed by Anders Carlsson.
1524 All WebCookieManager functions are synchronous, and all LocalTerminationDisabler does
1525 is enable/disable a timer that cannot fire inside the function anyway.
1527 * WebProcess/Cookies/WebCookieManager.cpp:
1528 (WebKit::WebCookieManager::getHostnamesWithCookies):
1529 (WebKit::WebCookieManager::deleteCookiesForHostname):
1530 (WebKit::WebCookieManager::deleteAllCookies):
1531 (WebKit::WebCookieManager::startObservingCookieChanges):
1532 (WebKit::WebCookieManager::setHTTPCookieAcceptPolicy):
1533 (WebKit::WebCookieManager::getHTTPCookieAcceptPolicy):
1535 2012-12-20 Brady Eidson <beidson@apple.com>
1537 NetworkProcess has no need for suspend/resumePendingRequests.
1538 <rdar://problem/12866005> and https://bugs.webkit.org/show_bug.cgi?id=105550
1540 Reviewed by Alexey Proskuryakov.
1542 suspend/resumePendingRequests were important in a single-process, WebKit1 API world to help prevent
1543 client callbacks from occurring during layout/painting.
1545 In a WebKit2 + NetworkProcess world, they aren't important.
1547 Remove the Web->Network process messages:
1548 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1549 * NetworkProcess/NetworkConnectionToWebProcess.h:
1550 * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1551 * NetworkProcess/NetworkResourceLoadScheduler.cpp:
1552 * NetworkProcess/NetworkResourceLoadScheduler.h:
1554 For now, still keep the per-WebProcess count to help keep servePendingRequest working as WebCore intends:
1555 * WebProcess/Network/WebResourceLoadScheduler.cpp:
1556 (WebKit::WebResourceLoadScheduler::servePendingRequests):
1557 (WebKit::WebResourceLoadScheduler::suspendPendingRequests):
1558 (WebKit::WebResourceLoadScheduler::resumePendingRequests):
1560 2012-12-20 Carlos Garcia Campos <cgarcia@igalia.com>
1562 [GTK] Add API to set a TLS errors policy to WebKit2 GTK+ API
1563 https://bugs.webkit.org/show_bug.cgi?id=104482
1565 Reviewed by Martin Robinson.
1567 Add an emum for TLS errors policy with values IGNORE and FAIL and
1568 API to WebKitWebContext to set/get the policy.
1570 * Shared/WebProcessCreationParameters.cpp:
1571 (WebKit::WebProcessCreationParameters::encode): Encode ignoreTLSErrors.
1572 (WebKit::WebProcessCreationParameters::decode): Decode ignoreTLSErrors.
1573 * Shared/WebProcessCreationParameters.h:
1574 (WebProcessCreationParameters): Add ignoreTLSErrors when building
1575 with soup network backend.
1576 * Shared/soup/PlatformCertificateInfo.cpp:
1577 (WebKit::PlatformCertificateInfo::PlatformCertificateInfo): Add a
1578 constructor that receives a ResourceError.
1579 * Shared/soup/PlatformCertificateInfo.h:
1580 * Shared/soup/WebCoreArgumentCodersSoup.cpp:
1581 (CoreIPC::::encodePlatformData): Encode the
1582 PlatformCertificateInfo as part for the ResourceError.
1583 (CoreIPC::::decodePlatformData): Decode the
1584 PlatformCertificateInfo and set certificate and TLS errors in the
1586 * UIProcess/API/gtk/WebKitLoaderClient.cpp:
1587 (didFailProvisionalLoadWithErrorForFrame): Call
1588 webkitWebViewLoadFailedWithTLSErrors() if the load failed due to
1590 * UIProcess/API/gtk/WebKitWebContext.cpp:
1591 (_WebKitWebContextPrivate): Add tlsErrorsPolicy member.
1592 (createDefaultWebContext): Initiales tlsErrorsPolicy.
1593 (webkit_web_context_set_tls_errors_policy): Set the TLS errors
1594 policy notify WebContext to ignore TLS errors or not.
1595 (webkit_web_context_get_tls_errors_policy): Return the current TLS
1597 * UIProcess/API/gtk/WebKitWebContext.h:
1598 * UIProcess/API/gtk/WebKitWebView.cpp:
1599 (webkitWebViewLoadFailedWithTLSErrors): Finish the load with an
1600 error if the TLS errors policy is FAIL.
1601 * UIProcess/API/gtk/WebKitWebViewPrivate.h:
1602 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
1603 * UIProcess/API/gtk/tests/TestSSL.cpp:
1604 (testTLSErrorsPolicy):
1606 * UIProcess/WebContext.cpp:
1607 (WebKit::WebContext::WebContext): Initialize m_ignoreTLSErrors.
1608 * UIProcess/WebContext.h:
1609 (WebContext): Add m_ignoreTLSErrors member.
1610 (WebKit::WebContext::ignoreTLSErrors): Return m_ignoreTLSErrors.
1611 * UIProcess/efl/WebContextEfl.cpp:
1612 (WebKit::WebContext::platformInitializeWebProcess): Set
1613 ignoreTLSErrors parameter.
1614 (WebKit::WebContext::setIgnoreTLSErrors): Send SetIgnoreTLSErrors
1615 message to the web process.
1616 * UIProcess/gtk/WebContextGtk.cpp:
1617 (WebKit::WebContext::platformInitializeWebProcess): Set
1618 ignoreTLSErrors parameter.
1619 (WebKit::WebContext::setIgnoreTLSErrors): Send SetIgnoreTLSErrors
1620 message to the web process.
1622 * WebProcess/WebProcess.h:
1623 * WebProcess/WebProcess.messages.in:
1624 * WebProcess/efl/WebProcessMainEfl.cpp:
1625 (WebKit::WebProcessMainEfl): Remove the call to
1626 ResourceHandle::setIgnoreSSLErrors().
1627 * WebProcess/gtk/WebProcessMainGtk.cpp:
1628 (WebKit::WebProcessMainGtk): Remove the call to
1629 ResourceHandle::setIgnoreSSLErrors().
1630 * WebProcess/soup/WebProcessSoup.cpp:
1631 (WebKit::WebProcess::platformInitializeWebProcess):
1632 (WebKit::WebProcess::setIgnoreTLSErrors): Call
1633 ResourceHandle::setIgnoreSSLErrors().
1636 2012-12-20 Dominik Röttsches <dominik.rottsches@intel.com>
1638 [EFL] MiniBrowser does not play Infinite Gangnam Style
1639 https://bugs.webkit.org/show_bug.cgi?id=103531
1641 Reviewed by Kenneth Rohde Christiansen.
1643 WebAudio preference now defaults to switched on.
1645 * UIProcess/API/efl/EwkViewImpl.cpp:
1646 (EwkViewImpl::EwkViewImpl):
1648 2012-12-20 Huang Dongsung <luxtella@company100.net>
1650 Remove GraphicsLayer::setGraphicsLayerFactory().
1651 https://bugs.webkit.org/show_bug.cgi?id=105503
1653 Reviewed by Kenneth Rohde Christiansen.
1655 We don't need GraphicsLayer::setGraphicsLayerFactory() anymore. After r130302,
1656 we have used a graphics layer factory explicitly.
1658 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
1659 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
1660 * WebProcess/efl/WebProcessMainEfl.cpp:
1661 (WebKit::WebProcessMainEfl):
1662 * WebProcess/qt/WebProcessMainQt.cpp:
1663 (WebKit::WebProcessMainQt):
1665 2012-12-20 Dominik Röttsches <dominik.rottsches@intel.com>
1667 [WK2] WebAudio WKTR support
1668 https://bugs.webkit.org/show_bug.cgi?id=95084
1670 Reviewed by Kenneth Rohde Christiansen.
1672 Implementing audio data dump support for WebKitTestRunner,
1673 by adding the API to the IDL, enabling IPC for transferring
1674 the audio data as bytebuffer and dumping it according
1675 to run-webkit-tests script's expectations.
1677 I am adding a testrunner specific bundle method to extract data
1678 from a Uint8Array into a bytebuffer. This API is used by
1679 WebKitTestRunner's TestRunner to extract the data into a local
1680 variable, then sending it over IPC.
1682 * DerivedSources.pri: Fixing Qt build by adding JSUint8Array.h header to list of forwarding headers.
1683 * Target.pri: Adding missing WKData.* files. Qt build fix.
1684 * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1685 (WKBundleCreateWKDataFromUint8Array): Added.
1686 * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: Adding WKBundleCreateWKDataFromUint8Array.
1687 * WebProcess/InjectedBundle/InjectedBundle.cpp: Convert Uint8Array to WebData.
1688 (WebKit::InjectedBundle::createWebDataFromUint8Array):
1690 * WebProcess/InjectedBundle/InjectedBundle.h:
1694 2012-12-19 Kiran Muppala <cmuppala@apple.com>
1696 Adopt new assertion SPI for process suppression on Mac
1697 https://bugs.webkit.org/show_bug.cgi?id=105378
1699 Reviewed by Mark Rowe.
1701 Process suppression for WebKit2 child processes is currently enabled or disabled using AutomaticTermination.
1702 This should be replaced with a new assertion SPI specific to process suppression.
1704 * Shared/ChildProcess.cpp:
1705 (WebKit::ChildProcess::ChildProcess): Remove unused member variable m_applicationIsOccluded.
1706 * Shared/ChildProcess.h:
1707 (WebKit::ChildProcess::applicationIsOccluded): Infer occlusion state from m_processVisibleAssertion.
1708 * Shared/mac/ChildProcessMac.mm:
1709 (WebKit::ChildProcess::setApplicationIsOccluded): Use applicationIsOccluded() accessor to check if the
1710 occlusion state has changed and take or release a process visible assertion accordingly.
1711 (WebKit::ChildProcess::platformInitialize): Remove call to initializeTimerCoalescingPolicy(), since taking
1712 a process visible assertion also sets the timer coalescing policy appropriately. Set the occlusion
1713 state to false on initialization.
1715 2012-12-19 Alexey Proskuryakov <ap@apple.com>
1717 <rdar://problem/12890242> [WK2 NetworkProcess] Client doesn't receive SSL certificates
1718 https://bugs.webkit.org/show_bug.cgi?id=105467
1720 Reviewed by Brady Eidson.
1722 * NetworkProcess/NetworkResourceLoader.cpp:
1723 (WebKit::NetworkResourceLoader::didReceiveResponse):
1724 * Shared/mac/PlatformCertificateInfo.mm:
1725 (WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
1726 * WebProcess/Network/WebResourceLoader.cpp:
1727 (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
1728 * WebProcess/Network/WebResourceLoader.h:
1729 * WebProcess/Network/WebResourceLoader.messages.in:
1730 Pass certificate chain over IPC, so that we could ultimately send it to client
1731 via WebPageProxy::DidCommitLoadForFrame message.
1733 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface):
1734 Initialize a WKSI function we've been missing.
1736 2012-12-19 Jon Lee <jonlee@apple.com>
1738 Add a function to set the origin hash table
1739 https://bugs.webkit.org/show_bug.cgi?id=105447
1740 <rdar://problem/12910985>
1742 Reviewed by Brian Weinstein.
1744 Add a new API called WKContextSetPlugInAutoStartOriginHashes. It assigns the table of hashes,
1745 keyed by main frame origin, to the WebContext. That, in turn, notifies all existing web
1746 processes, so that each web process can update its copy of the auto-start hashes.
1748 * UIProcess/API/C/WKContext.cpp:
1749 (WKContextSetPlugInAutoStartOriginHashes): To clear the table, an empty dictionary must be
1751 * UIProcess/API/C/WKContext.h:
1753 * UIProcess/WebContext.cpp:
1754 (WebKit::WebContext::setPlugInAutoStartOriginHashes): Forward to PlugInAutoStartProvider.
1755 * UIProcess/WebContext.h:
1757 * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
1758 (WebKit::PlugInAutoStartProvider::setAutoStartOriginsTable): Clear the map and set of hashes,
1759 and convert the data from the provided dictionary. Also add it to a temporary vector, which will
1760 be used to pass along to all of the active web processes.
1761 * UIProcess/Plugins/PlugInAutoStartProvider.h:
1763 * WebProcess/WebProcess.messages.in: Add plugInAutoStartOriginsChanged. Takes in a vector of
1764 the new set of hashes.
1765 * WebProcess/WebProcess.cpp:
1766 (WebKit::WebProcess::plugInAutoStartOriginsChanged): Clear the existing set, and copy the new
1768 * WebProcess/WebProcess.h:
1770 2012-12-18 Jon Lee <jonlee@apple.com>
1772 Notify context client of change to table, and allow client to get a copy of it
1773 https://bugs.webkit.org/show_bug.cgi?id=105364
1774 <rdar://problem/12906267>
1776 Reviewed by Brady Eidson.
1778 Add a callback to notify the context client that the origin hashes have changed.
1779 The client may choose to get a copy of that table and save it to disk.
1781 * UIProcess/API/C/WKContext.cpp:
1782 (WKContextCopyPlugInAutoStartOriginHashes): Added to the context client.
1783 * UIProcess/API/C/WKContext.h:
1784 * UIProcess/WebContext.cpp:
1785 (WebKit::WebContext::plugInAutoStartOriginHashes): Return a copy of the origin hash
1787 * UIProcess/WebContext.h:
1789 * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
1790 (WebKit::PlugInAutoStartProvider::addAutoStartOrigin): When the origin is added to
1791 the table, notify the context client.
1792 (WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy): Create a copy of the
1794 * UIProcess/Plugins/PlugInAutoStartProvider.h:
1796 * UIProcess/WebContextClient.cpp:
1797 (WebKit::WebContextClient::plugInAutoStartOriginHashesChanged): Call the client.
1798 * UIProcess/WebContextClient.h:
1800 2012-12-19 Alexis Menard <alexis@webkit.org>
1802 Implement CSS parsing for CSS transitions unprefixed.
1803 https://bugs.webkit.org/show_bug.cgi?id=104804
1805 Reviewed by Dean Jackson.
1807 Add a new flag ENABLE_CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED
1808 to cover the work of unprefixing Transforms, Animations and
1809 Transitions. It will let the possibility of each ports to turn it off
1810 in their release branches until we're confident that these CSS
1811 properties are ready to be unprefixed.
1813 * Configurations/FeatureDefines.xcconfig:
1815 2012-12-19 Kondapally Kalyan <kalyan.kondapally@intel.com>
1817 [EFL][WK2][AC] Avoid creating an empty surface.
1818 https://bugs.webkit.org/show_bug.cgi?id=105410
1820 Reviewed by Kenneth Rohde Christiansen.
1822 Ensure that the view has valid size before creating the surface.
1824 * UIProcess/API/efl/EvasGLSurface.h:
1825 (WebKit::EvasGLSurface::create):
1826 * UIProcess/API/efl/EwkViewImpl.cpp:
1827 (EwkViewImpl::displayTimerFired):
1829 2012-12-19 Kenneth Rohde Christiansen <kenneth@webkit.org>
1831 [EFL][Qt][WK2] Going back to 47-amazing-css3-animation-demos shows nothing or wrong position
1832 https://bugs.webkit.org/show_bug.cgi?id=104414
1834 Reviewed by Simon Hausmann.
1836 When contents size changes, make sure to apply any pending position
1839 * UIProcess/PageViewportController.cpp:
1840 (WebKit::PageViewportController::didChangeContentsSize):
1842 2012-12-19 Alberto Garcia <agarcia@igalia.com>
1844 [GTK] [WK2] Trailing semicolon in an #include line
1845 https://bugs.webkit.org/show_bug.cgi?id=105418
1847 Reviewed by Xan Lopez.
1849 * UIProcess/gtk/WebContextGtk.cpp:
1850 Remove trailing semicolon in #include line.
1852 2012-12-19 Kenneth Rohde Christiansen <kenneth@webkit.org>
1854 [EFL][WK2] Move deviceScaleFactor to our view as it's view related
1855 https://bugs.webkit.org/show_bug.cgi?id=105412
1857 Reviewed by Laszlo Gombos.
1859 * UIProcess/API/efl/EwkViewImpl.cpp:
1860 (EwkViewImpl::setDeviceScaleFactor):
1861 (EwkViewImpl::transformFromScene):
1862 * UIProcess/API/efl/EwkViewImpl.h:
1864 * UIProcess/API/efl/ewk_view.cpp:
1865 (ewk_view_device_pixel_ratio_set):
1867 2012-12-19 Zeno Albisser <zeno@webkit.org>
1869 [Qt] Missing vtable for LoadStartedCatcher.
1870 https://bugs.webkit.org/show_bug.cgi?id=105313
1872 Properly splitting class declarations and function
1873 definitions into headers/cpp-files.
1874 This makes including util.moc redundant
1875 and avoids the well known vtable issues with QObject classes.
1877 Reviewed by Simon Hausmann.
1879 * UIProcess/API/qt/tests/util.cpp:
1881 (LoadSpy::onLoadingChanged):
1882 * UIProcess/API/qt/tests/util.h:
1885 2012-12-19 KyungTae Kim <ktf.kim@samsung.com>
1887 Unused parameters on WebContext.cpp
1888 https://bugs.webkit.org/show_bug.cgi?id=105395
1890 Reviewed by Kentaro Hara.
1892 Because the parameters 'certficate', 'host' are not used if !ENABLE(NETWORK_PROCESS),
1893 use UNUSED_PARAM macro to fix build warning -Wunused-parameter.
1895 * UIProcess/WebContext.cpp:
1896 (WebKit::WebContext::allowSpecificHTTPSCertificateForHost):
1898 2012-12-18 Alexey Proskuryakov <ap@apple.com>
1900 Remove unnecessary functions from CookiesStrategy
1901 https://bugs.webkit.org/show_bug.cgi?id=105369
1903 Reviewed by Brady Eidson.
1905 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1906 * NetworkProcess/NetworkConnectionToWebProcess.h:
1907 * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1908 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1909 * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1911 * WebProcess/Cookies/WebCookieManager.cpp: Call PlatformCookieJar directly.
1912 Cookie messages to NetworkProcess should not be sent through WebProcess. In a future
1913 patch, I'll make WebCookieManagerProxy message NetworkProcess instead.
1915 2012-12-18 Jon Lee <jonlee@apple.com>
1917 [WK2] Create a context client
1918 https://bugs.webkit.org/show_bug.cgi?id=105316
1919 <rdar://problem/12901762>
1921 Reviewed by Brady Eidson.
1923 Web contexts already have clients related to downloads or history.
1924 Miscellaneous callbacks can be grouped into a generic client for the
1927 * UIProcess/API/C/WKContext.cpp:
1928 (WKContextSetClient): Set the client for the context.
1929 * UIProcess/API/C/WKContext.h: Define a new, empty WKContextClient.
1931 * UIProcess/WebContext.cpp:
1932 (WebKit::WebContext::initializeClient):
1933 * UIProcess/WebContext.h: Add a variable for the new client. Move the
1934 download client so that all the clients are grouped together.
1935 (WebKit::WebContext::client): Returns the context client.
1936 * UIProcess/WebContextClient.cpp: Added. Currently empty, but will be
1937 filled out in a pending patch.
1938 * UIProcess/WebContextClient.h: Added.
1940 Add WebContextClient.{h,cpp}.
1942 * GNUmakefile.list.am:
1944 * WebKit2.xcodeproj/project.pbxproj:
1945 * win/WebKit2.vcproj:
1947 2012-12-18 Ivan Krstić <ike@apple.com>
1949 <rdar://problem/12720539> per-pid private temporary directories for sandboxed webkit2 plugins
1951 Reviewed by Sam Weinig, Alexey Proskuryakov, Anders Carlsson.
1953 Previously we assigned each PluginProcess a private temporary and
1954 cache directory based on the bundle name of the plugin that was
1955 running. This sometimes led to overly-long pathnames (sockets on OS X
1956 can only be 103 characters long), and didn't provide isolation between
1957 multiple running instances of the same plugin on behalf of different
1958 processes. We now assign each PluginProcess its own private
1959 temporary and cache directory regardless of which plugin it's running,
1960 and make an attempt to clean these up when the process terminates.
1962 We also pass the temporary directory into the sandbox
1963 profile as a parameter, in case the plugin profile needs to apply
1964 additional rules beyond the default read/write policy.
1966 * PluginProcess/mac/PluginProcessMainMac.mm:
1967 (WebKit::PluginProcessMain):
1968 * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm:
1971 2012-12-18 Beth Dakin <bdakin@apple.com>
1973 https://bugs.webkit.org/show_bug.cgi?id=102579
1974 [mac] Enable scaled cursors
1976 Reviewed by Dean Jackson.
1978 * Configurations/FeatureDefines.xcconfig:
1980 2012-12-18 Joseph Pecoraro <pecoraro@apple.com>
1982 [Mac] Add Build Phase to Check Headers for Inappropriate Macros (Platform.h macros)
1983 https://bugs.webkit.org/show_bug.cgi?id=104279
1985 Reviewed by David Kilzer.
1987 Add a build phase to check the public WebKit2 headers for
1988 inappropriate macros. Also set the executable as an input
1989 path on the other check-* build phases.
1991 * WebKit2.xcodeproj/project.pbxproj:
1993 2012-12-18 Jer Noble <jer.noble@apple.com>
1995 REGRESSION: Using the Exit Full Screen button in the menu bar to exit HTML5 / media full screen breaks Safari windows
1996 https://bugs.webkit.org/show_bug.cgi?id=104610
1998 Reviewed by Anders Carlsson.
2000 When a user clicks on the menu-bar exit fullscreen button, that skips notifying the document that
2001 the window is exiting fullscreen and tearing down the placeholder. Manually call that part of the code
2002 when we detect that it has been skipped.
2004 * UIProcess/mac/WKFullScreenWindowController.mm:
2005 (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
2007 2012-12-18 Brady Eidson <beidson@apple.com>
2009 WebProcesses often crash if they access the network after a NetworkProcess crash.
2010 <rdar://problem/12865789> and https://bugs.webkit.org/show_bug.cgi?id=105338
2012 Reviewed by Alexey Proskuryakov.
2014 After a NetworkProcess crash we should try to re-establish a connection to a new NetworkProcess
2017 If that attempt fails, then the WebProcess should "cleanly" crash.
2019 * WebProcess/WebProcess.cpp:
2020 (WebKit::WebProcess::networkConnection):
2022 2012-12-17 Sam Weinig <sam@webkit.org>
2024 Try to fix the Mac build.
2026 * NetworkProcess/mac/NetworkProcessMac.mm:
2028 2012-12-17 Halton Huo <halton.huo@intel.com>
2030 [EFL] Add ecore_imf_evas to FindEcore.cmake
2031 https://bugs.webkit.org/show_bug.cgi?id=105159
2033 Reviewed by Laszlo Gombos.
2035 * PlatformEfl.cmake: Add ECORE_IMF_EVAS_LIBRARIES to WebProcess_LIBRARIES
2037 2012-12-17 Huang Dongsung <luxtella@company100.net>
2039 Coordinated Graphics: Refactor TiledBackingStore code in CoordinatedGraphicsLayer.
2040 https://bugs.webkit.org/show_bug.cgi?id=103959
2042 Reviewed by Kenneth Rohde Christiansen.
2044 Currently, CoordinatedGraphicsLayer has complex code related to TiledBackingStore.
2046 1. CoordinatedGraphicsLayer hacks TiledBackingStore to prevent
2047 TiledBackingStore from asynchronously sending UpdateTile message to UI
2049 2. CreateTile and RemoveTile message can be sent to UI Process at any time.
2051 This patch makes CoordinatedGraphicsLayer use TiledBackingStore more explicitly.
2052 It means only during flushing layer states, CoordinatedGraphicsLayer
2053 calls methods of TiledBackingStore, which indirectly call createTile(),
2054 updateTile() and removeTile().
2056 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
2057 (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
2058 (WebCore::CoordinatedGraphicsLayer::setVisibleContentRectTrajectoryVector):
2059 (WebCore::CoordinatedGraphicsLayer::setContentsScale):
2060 (WebCore::CoordinatedGraphicsLayer::adjustContentsScale):
2061 (WebCore::CoordinatedGraphicsLayer::tiledBackingStoreHasPendingTileCreation):
2062 (WebCore::CoordinatedGraphicsLayer::beginContentUpdate):
2063 (WebCore::CoordinatedGraphicsLayer::createTile):
2064 (WebCore::CoordinatedGraphicsLayer::updateTile):
2065 (WebCore::CoordinatedGraphicsLayer::removeTile):
2066 (WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
2067 (WebCore::CoordinatedGraphicsLayer::purgeBackingStores):
2068 (WebCore::CoordinatedGraphicsLayer::setNeedsVisibleRectAdjustment):
2069 (WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect):
2070 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
2071 (CoordinatedGraphicsLayerClient):
2072 (CoordinatedGraphicsLayer):
2073 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2074 (WebKit::CoordinatedLayerTreeHost::notifyFlushRequired):
2075 (WebKit::CoordinatedLayerTreeHost::createGraphicsLayer):
2076 (WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect):
2077 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
2079 2012-12-17 Brady Eidson <beidson@apple.com>
2081 Can't visit sites with untrusted certs with the NetworkProcess.
2082 <rdar://problem/12885641> and https://bugs.webkit.org/show_bug.cgi?id=105235
2084 Reviewed by Sam Weinig.
2086 For Mac the missing functionality is being able to tell the network layer in the
2087 NetworkProcess to temporarily accept a certificate chain for the given host.
2089 This patch adds some SPI supporting the way this works on Mac.
2091 Add a message and Mac implementation for "allowSpecificHTTPSCertificateForHost":
2092 * NetworkProcess/NetworkProcess.h:
2093 * NetworkProcess/NetworkProcess.messages.in:
2094 * NetworkProcess/mac/NetworkProcessMac.mm:
2095 (WebKit::NetworkProcess::allowSpecificHTTPSCertificateForHost):
2097 Add SPI for the embedding app"
2098 * UIProcess/API/C/WKContext.cpp:
2099 (WKContextAllowSpecificHTTPSCertificateForHost):
2100 * UIProcess/API/C/WKContextPrivate.h:
2102 * UIProcess/WebContext.cpp:
2103 (WebKit::WebContext::allowSpecificHTTPSCertificateForHost):
2104 * UIProcess/WebContext.h:
2106 2012-12-17 Huang Dongsung <luxtella@company100.net>
2108 [CoordinatedGraphics] Assertion hit in WebKit::LayerTreeRenderer::setLayerState()
2109 https://bugs.webkit.org/show_bug.cgi?id=104518
2111 Reviewed by Noam Rosenthal.
2113 CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly() must perform
2114 only during flushing pending layer changes in CoordinatedLayerTreeHost.
2115 RenderLayerCompositor can call GraphicsLayer::flushCompositingState() regardless
2116 of CoordinatedLayerTreeHost and it breaks our assumption. It means that
2117 CoordinatedGraphicsLayer can send messages although m_waitingForUIProcess in
2118 CoordinatedLayerTreeHost is true.
2120 Assertion hits because of the same reason. If RenderLayerCompositor calls
2121 flushCompositingState() before the first CoordinatedLayerTreeHost::flushPendingLayerChanges(),
2122 SetCompositingLayerState message can be prior to SetRootCompositingLayer message.
2124 We fix this by ensuring that we perform the layer flush only in the code
2125 path originating from CoordinatedLayerTreeHost.
2127 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
2128 (WebCore::CoordinatedGraphicsLayer::flushCompositingState):
2129 (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
2130 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
2131 (CoordinatedGraphicsLayerClient):
2132 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2133 (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
2134 (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges):
2135 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
2137 2012-12-17 Alexey Proskuryakov <ap@apple.com>
2139 <rdar://problem/12895354> NetworkProcess should not exit after downloading
2140 https://bugs.webkit.org/show_bug.cgi?id=105209
2142 Reviewed by Anders Carlsson.
2144 * NetworkProcess/NetworkProcess.cpp:
2145 (WebKit::NetworkProcess::shouldTerminate): This process should never voluntarily
2146 terminate, because it keeps session auth and cookies.
2148 2012-12-17 Thiago Marcos P. Santos <thiago.santos@intel.com>
2150 [EFL] Unit tests process hanging on WK2 Release bots
2151 https://bugs.webkit.org/show_bug.cgi?id=105021
2153 Reviewed by Kenneth Rohde Christiansen.
2155 Follow-up of r137605, which made it more difficult to reproduce
2156 the race condition but doesn't entirely solve the problem. Now
2157 we are handling only points in the middle of the fork()/exec().
2159 * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
2160 (WebKit::ProcessLauncher::launchProcess):
2162 2012-12-17 Kenneth Rohde Christiansen <kenneth@webkit.org>
2164 [EFL][WK2] window_create doesn't receive the url
2165 https://bugs.webkit.org/show_bug.cgi?id=105184
2167 Reviewed by Alexis Menard.
2169 Pass the url to the window_create method.
2171 * UIProcess/API/efl/EwkViewImpl.cpp:
2172 (EwkViewImpl::createNewPage):
2173 * UIProcess/API/efl/EwkViewImpl.h:
2175 * UIProcess/API/efl/ewk_view.h:
2176 * UIProcess/API/efl/tests/test_ewk2_window_features.cpp:
2177 (createDefaultWindow):
2179 * UIProcess/efl/PageUIClientEfl.cpp:
2180 (WebKit::PageUIClientEfl::createNewPage):
2182 2012-12-17 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
2184 [WK2] TiledBackingStore: css3/device-adapt/viewport-width-not-affecting-next-page.html is flaky
2185 https://bugs.webkit.org/show_bug.cgi?id=105131
2187 Reviewed by Kenneth Rohde Christiansen.
2189 The problem was lead by truncation of the scaled result for 'contentFixedSize'.
2190 Fixed now with using FloatSize::scale() instead of IntSize::scale().
2192 * WebProcess/WebPage/WebPage.cpp:
2193 (WebKit::WebPage::sendViewportAttributesChanged):
2195 2012-12-17 Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2197 [Qt] remove some unnecessary CONFIG additions
2199 Reviewed by Simon Hausmann.
2201 qt is already added by spec_pre.prf, warn_on and depend_includepath by
2204 * UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro:
2205 * UIProcess/API/qt/tests/qmltests/WebView.pro:
2207 2012-12-17 Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2209 [Qt] rely on automatic output directory setup
2211 Reviewed by Simon Hausmann.
2213 Now being a proper qt module (by virtue of having load(qt_build_config)
2214 in .qmake.conf), webkit gets the path setup goodies for free.
2216 This also fixes Makefile.api.Debug/Release trying to generate qrc_WebKit.cpp
2217 at the same time, instead of the debug and release version ending up in different
2218 directories as they should.
2220 * UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro:
2221 * UIProcess/API/qt/tests/qmltests/WebView.pro:
2223 2012-12-17 Thiago Marcos P. Santos <thiago.santos@intel.com>
2225 [EFL] Unit tests process hanging on WK2 Release bots
2226 https://bugs.webkit.org/show_bug.cgi?id=105021
2228 Reviewed by Kenneth Rohde Christiansen.
2230 Do not allocate memory in the middle of a fork()/exec().
2231 EFL uses global FastMalloc new operator and when we fork(), the
2232 process is in a very delicate state. We were being lucky most of the
2233 time, but sometimes FastMalloc enters in a busy wait and hangs
2234 because it's data structures cannot be trusted after the fork().
2236 This explains why sometimes we see UIProcess hanging on the bots:
2237 they are in fact UIProcess trying to exec() into a WebProcess but
2238 hanged just after the fork(). CMake test runner kills the original
2239 UIProcess due to timeout and the buggy one stays forever.
2241 * PlatformEfl.cmake:
2242 Set the timeout back to the original value.
2244 * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
2245 (WebKit::ProcessLauncher::launchProcess):
2246 I'm keeping the original behavior, including the call to
2247 system() when wrapping the WebProcess on Debug mode. This
2248 should be changed to exec() in another patch.
2250 2012-12-17 Csaba Osztrogonác <ossy@webkit.org>
2252 Fix the Qt Windows build after r137803
2253 https://bugs.webkit.org/show_bug.cgi?id=105152
2255 Reviewed by Kentaro Hara.
2257 * Shared/CacheModel.h:
2259 2012-12-16 Tim Horton <timothy_horton@apple.com>
2261 PDFPlugin: The "Open in Preview" HUD button should work
2262 https://bugs.webkit.org/show_bug.cgi?id=102448
2263 <rdar://problem/12695729>
2265 Reviewed by Alexey Proskuryakov.
2267 Implement the "Open in Preview" button for PDFPlugin, by moving the implementation from PDFViewController
2268 onto WebPageProxyMac, and reusing it in PDFViewController and PDFPlugin.
2270 * UIProcess/API/mac/PDFViewController.h:
2271 (PDFViewController): Remove unnecessary members in favor of a UUID that identifies our PDF on disk.
2272 * UIProcess/API/mac/PDFViewController.mm:
2273 (WebKit::PDFViewController::openPDFInFinder): Move PDFViewController's implementation of openPDFInFinder
2274 and related functions to WebPageProxyMac. This will allow it to be shared with PDFPlugin.
2275 * UIProcess/WebPageProxy.h:
2276 (WebPageProxy): Add savePDFToFileInTemporaryFolderAndOpenWithNativeApplication,
2277 savePDFToFileInTemporaryFolderAndOpenWithNativeApplicationRaw, and openPDFFromTemporaryFolderWithNativeApplication.
2278 Add m_temporaryPDFFiles, which is used to keep track of the filenames of PDFs that we've saved to disk.
2279 * UIProcess/WebPageProxy.messages.in:
2280 Add SavePDFToFileInTemporaryFolderAndOpenWithNativeApplication and OpenPDFFromTemporaryFolderWithNativeApplication.
2281 * UIProcess/mac/WebPageProxyMac.mm:
2282 (WebKit::temporaryPDFDirectoryPath): Copied from PDFViewController. Construct the path to a
2283 WebKitPDFs temporary directory into which PDFs to be opened with a native application are downloaded.
2284 (WebKit::pathToPDFOnDisk): Copied from PDFViewController. Combine temporaryPDFDirectoryPath
2285 with the suggested filename for the given PDF, creating a new filename if the file already exists.
2286 (WebKit::WebPageProxy::savePDFToTemporaryFolderAndOpenWithNativeApplicationRaw):
2287 (WebKit::WebPageProxy::savePDFToTemporaryFolderAndOpenWithNativeApplication):
2288 Save the given PDF data to a temporary file, given the suggested filename. This inserts the
2289 filename used into m_temporaryPDFFiles, where it can later be retrieved by UUID when asked
2290 to open the PDF again in a native application. Then, open it with NSWorkspace.
2291 (WebKit::WebPageProxy::openPDFFromTemporaryFolderWithNativeApplication):
2292 Open the previously saved PDF file with NSWorkspace, referenced by UUID.
2293 We identify the file by UUID instead of name so that only the UIProcess needs
2294 to keep track of the actual filename, and so that the WebProcess
2295 cannot hand an arbitrary filename back to the UIProcess to open.
2296 * WebProcess/Plugins/PDF/PDFPlugin.h:
2297 (PDFPlugin): Add openWithNativeApplication and storage for the UUID that identifies our PDF on disk.
2298 * WebProcess/Plugins/PDF/PDFPlugin.mm:
2299 (-[WKPDFLayerControllerDelegate openWithPreview]): Forward openWithPreview to PDFPlugin's openWithNativeApplication.
2300 (WebKit::PDFPlugin::saveToPDF):
2301 Hand raw data to WebPage and have it send the message to WebPageProxy instead of using IPC types in PDFPlugin.
2302 (WebKit::PDFPlugin::openWithNativeApplication):
2303 Ask WebPage to save the current PDF to a temporary directory and open it with a native application.
2304 If we've already downloaded the PDF (and have a non-null m_temporaryPDFUUID),
2305 we can just open the existing file.
2306 * WebProcess/WebPage/WebPage.cpp:
2307 (WebKit::WebPage::savePDFToFileInDownloadsFolder): Hand the PDF data to WebPageProxy to save.
2308 (WebKit::WebPage::savePDFToTemporaryFolderAndOpenWithNativeApplication): Hand the PDF data to WebPageProxy to save and open.
2309 * WebProcess/WebPage/WebPage.h:
2310 (WebPage): Add savePDFToFileInDownloadsFolder and savePDFToTemporaryFolderAndOpenWithNativeApplication.
2312 2012-12-16 Seokju Kwon <seokju.kwon@gmail.com>
2314 [WK2] Remote Web Inspector requires the inspector
2315 https://bugs.webkit.org/show_bug.cgi?id=105088
2317 Reviewed by Sam Weinig.
2319 Inspector server should not be started without inspector.
2323 2012-12-16 Seokju Kwon <seokju.kwon@gmail.com>
2325 Fix unused parameter compile warnings
2326 https://bugs.webkit.org/show_bug.cgi?id=105089
2328 Reviewed by Kentaro Hara.
2330 Use UNUSED_PARAM macro to fix build warning -Wunused-parameter.
2332 * UIProcess/API/efl/ewk_view.cpp:
2333 (ewk_view_inspector_show):
2334 (ewk_view_inspector_close):
2336 2012-12-16 Ryuan Choi <ryuan.choi@samsung.com>
2338 [EFL][WK2] Header files of ewk_context_menu should be installed
2339 https://bugs.webkit.org/show_bug.cgi?id=105069
2341 Reviewed by Gyuyoung Kim.
2343 * PlatformEfl.cmake:
2344 Modified to install ewk_context_menu.h and ewk_context_menu_item.h which
2345 are included in EWebKit2.h
2347 2012-12-16 Alexey Proskuryakov <ap@apple.com>
2349 <rdar://problem/12886898> Bundle uploads don't work
2350 https://bugs.webkit.org/show_bug.cgi?id=105149
2352 Reviewed by Sam Weinig.
2354 * NetworkProcess/NetworkResourceLoader.cpp:
2355 (WebKit::NetworkResourceLoader::didReceiveResponse):
2356 (WebKit::NetworkResourceLoader::didFail):
2357 Clean up generated files when they are no longer needed. This has to be done before FormData
2358 destruction. This duplicates same work done in WebProcess, but duplicaiton is safe, and may
2359 be helpful if one of the sides prematurely exits.
2361 2012-12-16 Jon Lee <jonlee@apple.com>
2363 Allow built-in PDF plugin and plugin documents to auto-start
2364 https://bugs.webkit.org/show_bug.cgi?id=105000
2365 <rdar://problem/12633351>
2367 Reviewed by Sam Weinig.
2369 Overrides PluginViewBase::shouldAlwaysAutoStart().
2370 * WebProcess/Plugins/PluginView.cpp:
2371 (WebKit::PluginView::shouldAlwaysAutoStart): If there's no plug-in, return the default,
2372 otherwise return the plug-in's behavior.
2373 * WebProcess/Plugins/PluginView.h:
2375 * WebProcess/Plugins/Plugin.h:
2376 (WebKit::Plugin::shouldAlwaysAutoStart): Added. By default, return false.
2377 * WebProcess/Plugins/PDF/SimplePDFPlugin.h: Built-in PDF plug-ins should auto-start.
2379 2012-12-16 Huang Dongsung <luxtella@company100.net>
2381 Coordinated Graphics: Small refactor of CoordinatedLayerTreeHost and CoordinatedGraphicsLayer.
2382 https://bugs.webkit.org/show_bug.cgi?id=104880
2384 Reviewed by Noam Rosenthal.
2386 This patch changes two points.
2387 1. Remove layerByIDMap() in CoordinatedGraphicsLayer because it is unused.
2388 2. Remove code swapping m_registeredLayers in CoordinatedLayerTreeHost because
2389 setCoordinator(0) does not call detachLayer().
2391 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
2392 (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
2393 (WebCore::CoordinatedGraphicsLayer::~CoordinatedGraphicsLayer):
2394 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2395 (WebKit::CoordinatedLayerTreeHost::~CoordinatedLayerTreeHost):
2397 2012-12-16 Anders Carlsson <andersca@apple.com>
2399 Remove the random crash thread
2400 https://bugs.webkit.org/show_bug.cgi?id=105147
2402 Reviewed by Sam Weinig.
2404 Remove old crashy code.
2406 * WebProcess/WebProcess.cpp:
2407 (WebKit::WebProcess::initialize):
2409 2012-12-16 Anders Carlsson <andersca@apple.com>
2411 Implement authentication for downloads
2412 https://bugs.webkit.org/show_bug.cgi?id=105146
2413 <rdar://problem/12239483>
2415 Reviewed by Sam Weinig.
2417 * NetworkProcess/NetworkProcess.cpp:
2418 (WebKit::NetworkProcess::NetworkProcess):
2419 (WebKit::NetworkProcess::initialize):
2420 (WebKit::NetworkProcess::didReceiveMessage):
2421 (WebKit::NetworkProcess::didReceiveSyncMessage):
2422 (WebKit::NetworkProcess::downloadsAuthenticationManager):
2423 * NetworkProcess/NetworkProcess.h:
2424 * UIProcess/Downloads/DownloadProxy.cpp:
2425 (WebKit::DownloadProxy::didReceiveAuthenticationChallenge):
2426 * WebProcess/Downloads/Download.cpp:
2427 (WebKit::Download::didReceiveAuthenticationChallenge):
2428 * WebProcess/Downloads/DownloadManager.cpp:
2429 (WebKit::DownloadManager::downloadsAuthenticationManager):
2430 * WebProcess/Downloads/DownloadManager.h:
2431 * WebProcess/Downloads/mac/DownloadMac.mm:
2432 * WebProcess/WebProcess.cpp:
2433 (WebKit::WebProcess::downloadsAuthenticationManager):
2434 (WebKit::WebProcess::didReceiveSyncMessage):
2435 * WebProcess/WebProcess.h:
2437 2012-12-16 Huang Dongsung <luxtella@company100.net>
2439 Coordinated Graphics: Small refactor of CoordinatedLayerTreeHost and CoordinatedGraphicsLayer.
2440 https://bugs.webkit.org/show_bug.cgi?id=104880
2442 Reviewed by Noam Rosenthal.
2444 Delete backing stores explicitly in ~CoordinatedLayerTreeHost().
2446 Clarify the lifecycle of backing stores in CoordinatedGraphicsLayer.
2447 Currently, CoordinatedGraphicsLayer::removeTile() checks if m_coordinator
2448 exists, because ~CoordinatedLayerTreeHost() sets m_coordinator in
2449 CoordinatedGraphicsLayer to 0. This patch purges backing stores before setting
2450 m_coordinator to 0. This change makes code more readable.
2452 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
2453 (WebCore::CoordinatedGraphicsLayer::~CoordinatedGraphicsLayer):
2454 (WebCore::CoordinatedGraphicsLayer::beginContentUpdate):
2455 (WebCore::CoordinatedGraphicsLayer::createTile):
2456 (WebCore::CoordinatedGraphicsLayer::updateTile):
2457 (WebCore::CoordinatedGraphicsLayer::removeTile):
2458 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2459 (WebKit::CoordinatedLayerTreeHost::~CoordinatedLayerTreeHost):
2461 2012-12-16 Anders Carlsson <andersca@apple.com>
2463 Authentication manager cleanup
2464 https://bugs.webkit.org/show_bug.cgi?id=105144
2466 Reviewed by Sam Weinig.
2468 Some cleanup to make it possible to reuse the authentication manager from the network process.
2470 * UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
2471 (WebKit::AuthenticationChallengeProxy::AuthenticationChallengeProxy):
2472 (WebKit::AuthenticationChallengeProxy::~AuthenticationChallengeProxy):
2473 (WebKit::AuthenticationChallengeProxy::useCredential):
2474 (WebKit::AuthenticationChallengeProxy::cancel):
2475 * UIProcess/Authentication/AuthenticationChallengeProxy.h:
2476 (WebKit::AuthenticationChallengeProxy::create):
2477 (AuthenticationChallengeProxy):
2478 * UIProcess/Downloads/DownloadProxy.cpp:
2479 (WebKit::DownloadProxy::didReceiveAuthenticationChallenge):
2480 * UIProcess/WebPageProxy.cpp:
2481 (WebKit::WebPageProxy::didReceiveAuthenticationChallenge):
2482 * WebProcess/Authentication/AuthenticationManager.cpp:
2483 (WebKit::AuthenticationManager::AuthenticationManager):
2484 (WebKit::AuthenticationManager::setConnection):
2485 (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
2486 (WebKit::AuthenticationManager::useCredentialForChallenge):
2487 * WebProcess/Authentication/AuthenticationManager.h:
2488 * WebProcess/Downloads/Download.cpp:
2489 (WebKit::Download::didReceiveAuthenticationChallenge):
2490 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2491 (WebKit::WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
2492 * WebProcess/WebProcess.cpp:
2493 (WebKit::WebProcess::WebProcess):
2494 (WebKit::WebProcess::initialize):
2495 * WebProcess/WebProcess.h:
2496 (WebKit::WebProcess::authenticationManager):
2499 2012-12-16 Anders Carlsson <andersca@apple.com>
2501 Rudimentary support for main resource downloads
2502 https://bugs.webkit.org/show_bug.cgi?id=105141
2504 Reviewed by Sam Weinig.
2506 For now, instead of converting a main resource load into a download, just cancel it and start
2507 a new separate download.
2509 * NetworkProcess/NetworkProcess.cpp:
2510 (WebKit::NetworkProcess::downloadRequest):
2511 Call through to the download manager.
2513 (WebKit::NetworkProcess::cancelDownload):
2514 Call through to the download manager.
2516 * NetworkProcess/NetworkProcess.messages.in:
2519 * UIProcess/Downloads/DownloadProxy.cpp:
2520 (WebKit::DownloadProxy::cancel):
2521 Send the cancel message to the network process when needed.
2523 * UIProcess/WebContext.cpp:
2524 (WebKit::WebContext::download):
2525 Handle the network process case.
2527 * UIProcess/WebPageProxy.cpp:
2528 (WebKit::WebPageProxy::WebPageProxy):
2529 (WebKit::WebPageProxy::receivedPolicyDecision):
2530 (WebKit::WebPageProxy::decidePolicyForResponse):
2531 Keep track of the current request when calling decidePolicyForResponse.
2533 2012-12-16 Andy Estes <aestes@apple.com>
2535 [WebKit2] CustomProtocolManager should intercept messages of class MessageClassCustomProtocolManager sent to the network process
2536 https://bugs.webkit.org/show_bug.cgi?id=105137
2538 Reviewed by Anders Carlsson.
2540 * NetworkProcess/NetworkProcess.cpp:
2541 (WebKit::NetworkProcess::didReceiveMessage):
2543 2012-12-16 Levi Weintraub <leviw@chromium.org>
2545 Push pixel snapping logic into TransformState
2546 https://bugs.webkit.org/show_bug.cgi?id=101779
2548 Reviewed by Simon Fraser.
2550 Eliminating use of SnapOffsetForTransforms as it's no longer needed.
2552 * WebProcess/FullScreen/WebFullScreenManager.cpp:
2553 (WebKit::screenRectOfContents):
2555 2012-12-16 Anders Carlsson <andersca@apple.com>
2557 Rename WebFrame::convertHandleToDownload to convertMainResourceLoadToDownload
2558 https://bugs.webkit.org/show_bug.cgi?id=105134
2560 Reviewed by Sam Weinig.
2562 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2563 (WebKit::WebFrameLoaderClient::convertMainResourceLoadToDownload):
2564 * WebProcess/WebPage/WebFrame.cpp:
2565 (WebKit::WebFrame::convertMainResourceLoadToDownload):
2566 * WebProcess/WebPage/WebFrame.h:
2569 2012-12-15 Anders Carlsson <andersca@apple.com>
2571 Rename FrameLoaderClient::download to convertMainResourceLoadToDownload
2572 https://bugs.webkit.org/show_bug.cgi?id=105122
2574 Reviewed by Andreas Kling.
2576 Update for WebCore changes.
2578 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2579 (WebKit::WebFrameLoaderClient::convertMainResourceLoadToDownload):
2580 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2581 (WebFrameLoaderClient):
2583 2012-12-15 Anders Carlsson <andersca@apple.com>
2587 * UIProcess/WebContext.cpp:
2588 (WebKit::WebContext::createDownloadProxy):
2590 2012-12-15 Andy Estes <aestes@apple.com>
2592 [WebKit2] Have CustomProtocolManager and CustomProtocolManagerProxy store Connections for messaging
2593 https://bugs.webkit.org/show_bug.cgi?id=105124
2595 Reviewed by Anders Carlsson.
2597 Remove CustomProtocolManagerProxy's assumption that all messages go to
2598 a web process. Have it take a ChildProcessProxy instead and extract its
2601 Similarly, remove CustomProtocolManager's assumption that all messages
2602 go through a shared WebProcess. Initialize the shared CustomProtocolManager
2603 with a Connection object instead.
2605 * NetworkProcess/NetworkProcess.cpp:
2606 (WebKit::NetworkProcess::initializeNetworkProcess): Initialize the
2607 shared CustomProtocolManager with the NetworkProcess's connection to
2609 * Shared/Network/CustomProtocols/CustomProtocolManager.h:
2610 (WebKit::CustomProtocolManager::connection): Assert m_connection is
2611 non-0 and return it.
2612 * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
2613 (+[WKCustomProtocol canInitWithRequest:]): Remove an unnecessary
2615 (-[WKCustomProtocol initWithRequest:cachedResponse:client:]): Ditto.
2616 (-[WKCustomProtocol startLoading]): Send a message on the
2617 CustomProtocolManager's connection rather than assuming there is a
2618 shared WebProcess in our address space.
2619 (-[WKCustomProtocol stopLoading]): Ditto.
2620 (WebKit::CustomProtocolManager::initialize): Initialize the shared
2621 CustomProtocolManager with a Connection and register our custom
2622 protocol handler with NSURLProtocol.
2623 * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
2625 (CustomProtocolManagerProxy): Take a ChildProcessProxy* rather than a
2627 * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
2628 (WebKit::CustomProtocolManagerProxy::CustomProtocolManagerProxy): Ditto.
2629 (WebKit::CustomProtocolManagerProxy::startLoading): Ditto.
2630 * UIProcess/Network/NetworkProcessProxy.cpp:
2631 (WebKit::NetworkProcessProxy::NetworkProcessProxy): Instantiate a
2632 CustomProtocolManagerProxy for the network process.
2633 (WebKit::NetworkProcessProxy::didReceiveMessage): Route messages of
2634 class MessageClassCustomProtocolManagerProxy to the
2635 CustomProtocolManagerProxy.
2636 * UIProcess/Network/NetworkProcessProxy.h:
2637 * UIProcess/WebProcessProxy.cpp:
2638 (WebKit::WebProcessProxy::didReceiveMessage): Assert that we aren't
2639 using the network process since we've received a message from a
2640 web process's CustomProtocolManager.
2641 * WebProcess/WebProcess.cpp:
2642 (WebKit::WebProcess::initializeWebProcess): Break CustomProtocolManager
2643 initialization out into a helper function.
2644 (WebKit::WebProcess::initializeCustomProtocolManager): Initialize our
2645 CustomProtocolManager.
2646 * WebProcess/WebProcess.h:
2648 2012-12-15 Anders Carlsson <andersca@apple.com>
2650 Happy little Qt build fix.
2652 * UIProcess/WebContext.cpp:
2653 (WebKit::WebContext::download):
2655 2012-12-15 Alexey Proskuryakov <ap@apple.com>
2657 <rdar://problem/12886312> Cannot upload patches to Bugzilla (<input type=file> doesn't work)
2658 https://bugs.webkit.org/show_bug.cgi?id=105120
2660 Reviewed by Sam Weinig.
2662 Serialize HTTP body. ResourceRequest serialization cannot (and shouldn't) know about
2663 body streams, as used with files.
2665 * Shared/Network/NetworkResourceLoadParameters.cpp:
2666 (WebKit::NetworkResourceLoadParameters::encode):
2667 (WebKit::NetworkResourceLoadParameters::decode):
2668 * Shared/WebCoreArgumentCoders.cpp:
2669 (CoreIPC::::encode):
2671 2012-12-15 Anders Carlsson <andersca@apple.com>
2673 Handle downloads in the network process
2674 https://bugs.webkit.org/show_bug.cgi?id=105117
2676 Reviewed by Sam Weinig.
2678 Start using the download manager in the network process.
2680 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2681 (WebKit::NetworkConnectionToWebProcess::startDownload):
2682 Call through to the download manager.
2684 * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
2685 Add StartDownload message.
2687 * NetworkProcess/NetworkProcess.cpp:
2688 (WebKit::NetworkProcess::downloadManager):
2689 Add "singleton" download manager.
2691 (WebKit::NetworkProcess::didCreateDownload):
2692 (WebKit::NetworkProcess::didDestroyDownload):
2693 (WebKit::NetworkProcess::downloadProxyConnection):
2694 Implement DownloadManager::Client.
2696 * UIProcess/Network/NetworkProcessProxy.cpp:
2697 (WebKit::NetworkProcessProxy::didReceiveMessage):
2698 (WebKit::NetworkProcessProxy::didReceiveSyncMessage):
2699 Call through to the message receiver map.
2701 * WebProcess/Downloads/Download.cpp:
2702 * WebProcess/Downloads/DownloadManager.cpp:
2703 (WebKit::DownloadManager::downloadProxyConnection):
2704 * WebProcess/Downloads/DownloadManager.h:
2705 Rename connection to downloadProxyConnection.
2707 * WebProcess/WebPage/WebFrame.cpp:
2708 (WebKit::WebFrame::startDownload):
2709 When using the network process, send a message to it with the request that needs to be downloaded.
2711 * WebProcess/WebProcess.cpp:
2712 (WebKit::WebProcess::downloadProxyConnection):
2713 Return the connection to the UI process.
2715 2012-12-15 Sam Weinig <sam@webkit.org>
2717 NSURLCache should be disabled in the WebProcess when using the NetworkProcess
2718 <rdar://problem/12872266>
2719 https://bugs.webkit.org/show_bug.cgi?id=105119
2721 Reviewed by Alexey Proskuryakov.
2723 Set the size of the NSURLCache to 0 (both disk and memory) in the WebProcess when using
2726 * WebProcess/mac/WebProcessMac.mm:
2727 (WebKit::WebProcess::platformSetCacheModel):
2728 (WebKit::WebProcess::platformInitializeWebProcess):
2730 2012-12-15 Sam Weinig <sam@webkit.org>
2732 The network process should use the correct NSURLCache location and set its size correctly for the CacheModel
2733 <rdar://problem/12848505>
2734 https://bugs.webkit.org/show_bug.cgi?id=105115
2736 Reviewed by Anders Carlsson.
2738 * NetworkProcess/NetworkProcess.cpp:
2739 (WebKit::NetworkProcess::NetworkProcess):
2740 (WebKit::NetworkProcess::initializeNetworkProcess):
2741 (WebKit::NetworkProcess::setCacheModel):
2742 * NetworkProcess/NetworkProcess.h:
2744 * NetworkProcess/mac/NetworkProcessMac.mm:
2745 (WebKit::NetworkProcess::platformInitialize):
2746 (WebKit::memorySize):
2747 (WebKit::volumeFreeSize):
2748 (WebKit::NetworkProcess::platformSetCacheModel):
2749 Copy code from the WebProcess to set up the NSURLCache correctly (location and size).
2750 We should eventually move the calculation of this to the WebContext so it can be done
2753 * Shared/Network/NetworkProcessCreationParameters.cpp:
2754 (WebKit::NetworkProcessCreationParameters::encode):
2755 (WebKit::NetworkProcessCreationParameters::decode):
2756 * Shared/Network/NetworkProcessCreationParameters.h:
2757 (NetworkProcessCreationParameters):
2758 Add the necessary creation parameters to set up the cache.
2760 * UIProcess/Network/NetworkProcessProxy.cpp:
2761 (WebKit::NetworkProcessProxy::didFinishLaunching):
2762 * UIProcess/Network/NetworkProcessProxy.h:
2763 (NetworkProcessProxy):
2764 * UIProcess/Network/mac/NetworkProcessProxyMac.mm:
2765 * UIProcess/WebContext.cpp:
2766 (WebKit::WebContext::ensureNetworkProcess):
2767 (WebKit::WebContext::setCacheModel):
2768 * UIProcess/WebContext.h:
2771 * UIProcess/mac/WebContextMac.mm:
2773 (WebKit::WebContext::platformInitializeNetworkProcess):
2774 Move initializing the NetworkProcess to just after creating (matching the WebProcess),
2775 rather than waiting for it finish loading before sending the creation parameters.
2776 Additionally, this moves the setting up of the creation parameters to the WebContext,
2777 as that is where all the interesting state resides (and also matches the WebProcess).
2779 2012-12-15 Andy Estes <aestes@apple.com>
2781 [WebKit2] Register the custom protocol handler in the network process if it exists
2782 https://bugs.webkit.org/show_bug.cgi?id=105118
2784 Reviewed by Anders Carlsson.
2786 Register our custom protocol handler with NSURLProtocol when starting
2787 up the network process; do not register the custom protocol handler in
2788 web processes if a network process is being used.
2790 * NetworkProcess/NetworkProcess.cpp:
2791 (WebKit::NetworkProcess::initializeNetworkProcess):
2792 * WebProcess/WebProcess.cpp:
2793 (WebKit::WebProcess::initializeWebProcess):
2794 * WebProcess/mac/WebProcessMac.mm:
2795 (WebKit::WebProcess::platformInitializeWebProcess):
2797 2012-12-15 Sam Weinig <sam@webkit.org>
2799 The network process should use the correct NSURLCache location and set its size correctly for the CacheModel
2800 <rdar://problem/12848505>
2801 https://bugs.webkit.org/show_bug.cgi?id=105115
2803 Reviewed by Anders Carlsson.
2805 * NetworkProcess/NetworkProcess.cpp:
2806 (WebKit::NetworkProcess::NetworkProcess):
2807 (WebKit::NetworkProcess::initializeNetworkProcess):
2808 (WebKit::NetworkProcess::setCacheModel):
2809 * NetworkProcess/NetworkProcess.h:
2811 * NetworkProcess/mac/NetworkProcessMac.mm:
2812 (WebKit::NetworkProcess::platformInitialize):
2813 (WebKit::memorySize):
2814 (WebKit::volumeFreeSize):
2815 (WebKit::NetworkProcess::platformSetCacheModel):
2816 Copy code from the WebProcess to set up the NSURLCache correctly (location and size).
2817 We should eventually move the calculation of this to the WebContext so it can be done
2820 * Shared/Network/NetworkProcessCreationParameters.cpp:
2821 (WebKit::NetworkProcessCreationParameters::encode):
2822 (WebKit::NetworkProcessCreationParameters::decode):
2823 * Shared/Network/NetworkProcessCreationParameters.h:
2824 (NetworkProcessCreationParameters):
2825 Add the necessary creation parameters to set up the cache.
2827 * UIProcess/Network/NetworkProcessProxy.cpp:
2828 (WebKit::NetworkProcessProxy::didFinishLaunching):
2829 * UIProcess/Network/NetworkProcessProxy.h:
2830 (NetworkProcessProxy):
2831 * UIProcess/Network/mac/NetworkProcessProxyMac.mm:
2832 * UIProcess/WebContext.cpp:
2833 (WebKit::WebContext::ensureNetworkProcess):
2834 (WebKit::WebContext::setCacheModel):
2835 * UIProcess/WebContext.h:
2838 * UIProcess/mac/WebContextMac.mm:
2840 (WebKit::WebContext::platformInitializeNetworkProcess):
2841 Move initializing the NetworkProcess to just after creating (matching the WebProcess),
2842 rather than waiting for it finish loading before sending the creation parameters.
2843 Additionally, this moves the setting up of the creation parameters to the WebContext,
2844 as that is where all the interesting state resides (and also matches the WebProcess).
2846 2012-12-15 Andy Estes <aestes@apple.com>
2848 Clean up the previous build fix; access m_networkProcess directly.
2850 * UIProcess/WebContext.cpp:
2851 (WebKit::WebContext::registerSchemeForCustomProtocol):
2852 (WebKit::WebContext::unregisterSchemeForCustomProtocol):
2854 2012-12-15 Andy Estes <aestes@apple.com>
2858 * UIProcess/WebContext.cpp:
2859 (WebKit::WebContext::registerSchemeForCustomProtocol):
2860 (WebKit::WebContext::unregisterSchemeForCustomProtocol):
2862 2012-12-15 Andy Estes <aestes@apple.com>
2864 [WebKit2] Register schemes with the network process if it is being used
2865 https://bugs.webkit.org/show_bug.cgi?id=105113
2867 Reviewed by Anders Carlsson.
2869 If a WebContext is using the network process, it needs to be told about
2870 scheme (un)registration rather than the context's web processes.
2872 * NetworkProcess/NetworkProcess.cpp:
2873 (WebKit::NetworkProcess::initializeNetworkProcess): Tell the shared
2874 CustomProtocolManager about schemes registered at process creation time.
2875 (WebKit::NetworkProcess::registerSchemeForCustomProtocol): Tell the
2876 shared CustomProtocolManager about a new scheme.
2877 (WebKit::NetworkProcess::unregisterSchemeForCustomProtocol): Remove a
2878 scheme from the shared CustomProtocolManager.
2879 * NetworkProcess/NetworkProcess.h:
2880 * NetworkProcess/NetworkProcess.messages.in: Add registration and
2881 unregistration messages for the NetworkProcess.
2882 * Shared/Network/NetworkProcessCreationParameters.cpp:
2883 (WebKit::NetworkProcessCreationParameters::encode): Encode
2884 urlSchemesRegisteredForCustomProtocols.
2885 (WebKit::NetworkProcessCreationParameters::decode): Decode
2886 urlSchemesRegisteredForCustomProtocols.
2887 * Shared/Network/NetworkProcessCreationParameters.h: Define
2888 urlSchemesRegisteredForCustomProtocols.
2889 * UIProcess/Network/mac/NetworkProcessProxyMac.mm:
2890 (WebKit::NetworkProcessProxy::platformInitializeNetworkProcess): Populate
2891 urlSchemesRegisteredForCustomProtocols with the current set of schemes.
2892 * UIProcess/WebContext.cpp:
2893 (WebKit::WebContext::registerSchemeForCustomProtocol): Send a new
2894 scheme to either the network process or to the context's web processes.
2895 (WebKit::WebContext::unregisterSchemeForCustomProtocol): Ditto for
2897 * UIProcess/WebContext.h:
2898 * UIProcess/mac/WebContextMac.mm:
2899 (WebKit::WebContext::platformInitializeWebProcess): Only populate
2900 urlSchemesRegisteredForCustomProtocols if the network process isn't
2902 (WebKit::WebContext::registerNotificationObservers):
2903 * WebProcess/mac/WebProcessMac.mm:
2904 (WebKit::WebProcess::platformInitializeWebProcess):
2905 urlSchemesRegisteredForCustomProtocols should only be non-empty if the
2906 network process isn't being used. Assert this.
2908 2012-12-15 Anders Carlsson <andersca@apple.com>
2910 Remove the unneeded NetworkProcessCrashed message
2911 https://bugs.webkit.org/show_bug.cgi?id=105114
2913 Reviewed by Sam Weinig.
2915 Remove the NetworkProcessCrashed message; it's not needed since the connection member variable is already
2916 nulled out in WebProcess::networkProcessConnectionClosed which is called when the Connection::Client::didClose member
2917 function is called on the connection between the web process and network process.
2919 Furthermore, this message was handled on the connection queue which runs on a different thread and the handler was not
2920 thread-safe so this could in theory cause bad crashes.
2922 * UIProcess/Network/NetworkProcessProxy.cpp:
2923 (WebKit::NetworkProcessProxy::didClose):
2924 * WebProcess/WebProcess.cpp:
2925 * WebProcess/WebProcess.h:
2927 * WebProcess/WebProcess.messages.in:
2929 2012-12-15 Anders Carlsson <andersca@apple.com>
2931 Add a DownloadProxyMap object to the NetworkProcessProxy object
2932 https://bugs.webkit.org/show_bug.cgi?id=105112
2934 Reviewed by Sam Weinig.
2936 * UIProcess/Network/NetworkProcessProxy.cpp:
2937 (WebKit::NetworkProcessProxy::createDownloadProxy):
2938 (WebKit::NetworkProcessProxy::didClose):
2939 * UIProcess/Network/NetworkProcessProxy.h:
2940 * UIProcess/WebContext.cpp:
2941 (WebKit::WebContext::createDownloadProxy):
2942 * UIProcess/WebProcessProxy.cpp:
2943 * UIProcess/WebProcessProxy.h:
2945 2012-12-15 Anders Carlsson <andersca@apple.com>
2947 Move the download proxy map from the web context to the web process proxy
2948 https://bugs.webkit.org/show_bug.cgi?id=105109
2950 Reviewed by Andreas Kling.
2952 More progress towards making downloads work with the networking process. Since downloads are handled by the
2953 web process when not using a networking process, it makes sense for the download proxy map to live in the
2954 web process proxy object.
2956 * UIProcess/WebContext.cpp:
2957 (WebKit::WebContext::WebContext):
2958 (WebKit::WebContext::shouldTerminate):
2959 (WebKit::WebContext::disconnectProcess):
2960 (WebKit::WebContext::download):
2961 (WebKit::WebContext::createDownloadProxy):
2962 * UIProcess/WebContext.h:
2964 * UIProcess/WebProcessProxy.cpp:
2965 (WebKit::WebProcessProxy::disconnect):
2966 (WebKit::WebProcessProxy::shouldTerminate):
2968 (WebKit::WebProcessProxy::createDownloadProxy):
2969 * UIProcess/WebProcessProxy.h:
2972 2012-12-15 Anders Carlsson <andersca@apple.com>
2974 DownloadProxy should keep a strong reference to its associated web context
2975 https://bugs.webkit.org/show_bug.cgi?id=105107
2977 Reviewed by Alexey Proskuryakov.
2979 While this does create a ref-cycle, it's broken when the download completes, fails, is canceled or
2980 if the process that's doing the download crashes.
2982 * UIProcess/Downloads/DownloadProxy.cpp:
2983 (WebKit::DownloadProxy::processDidClose):
2984 (WebKit::DownloadProxy::didStart):
2985 (WebKit::DownloadProxy::didReceiveAuthenticationChallenge):
2986 (WebKit::DownloadProxy::didReceiveResponse):
2987 (WebKit::DownloadProxy::didReceiveData):
2988 (WebKit::DownloadProxy::shouldDecodeSourceDataOfMIMEType):
2989 (WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
2990 (WebKit::DownloadProxy::didCreateDestination):
2991 (WebKit::DownloadProxy::didFinish):
2992 (WebKit::DownloadProxy::didFail):
2993 (WebKit::DownloadProxy::didCancel):
2994 * UIProcess/Downloads/DownloadProxy.h:
2997 2012-12-15 Anders Carlsson <andersca@apple.com>
2999 Remove WebContext::downloadFinished
3000 https://bugs.webkit.org/show_bug.cgi?id=105105
3002 Reviewed by Sam Weinig.
3004 Have DownloadProxyMap manage the message receiver map and remove WebContext::downloadFinished.
3006 * UIProcess/Downloads/DownloadProxy.cpp:
3007 (WebKit::DownloadProxy::didFinish):
3008 (WebKit::DownloadProxy::didFail):
3009 (WebKit::DownloadProxy::didCancel):
3010 * UIProcess/Downloads/DownloadProxyMap.cpp:
3011 (WebKit::DownloadProxyMap::DownloadProxyMap):
3012 (WebKit::DownloadProxyMap::createDownloadProxy):
3013 (WebKit::DownloadProxyMap::downloadFinished):
3014 * UIProcess/Downloads/DownloadProxyMap.h:
3016 * UIProcess/WebContext.cpp:
3017 (WebKit::WebContext::WebContext):
3018 (WebKit::WebContext::createDownloadProxy):
3019 * UIProcess/WebContext.h:
3021 2012-12-15 Sam Weinig <sam@webkit.org>
3023 Make the NetworkProcess be managed by the WebContext, rather than a singleton NetworkProcessMananger
3024 https://bugs.webkit.org/show_bug.cgi?id=105104
3026 Reviewed by Alexey Proskuryakov.
3028 Move to having the WebContext own and manage the NetworkProcessProxy.
3030 * UIProcess/Network/NetworkProcessManager.cpp: Removed.
3031 * UIProcess/Network/NetworkProcessManager.h: Removed.
3032 * UIProcess/Network/NetworkProcessProxy.cpp:
3033 (WebKit::NetworkProcessProxy::create):
3034 (WebKit::NetworkProcessProxy::NetworkProcessProxy):
3035 (WebKit::NetworkProcessProxy::networkProcessCrashedOrFailedToLaunch):
3036 * UIProcess/Network/NetworkProcessProxy.h:
3038 (NetworkProcessProxy):
3039 * UIProcess/Network/mac/NetworkProcessManagerMac.mm: Removed.
3040 * UIProcess/WebContext.cpp:
3041 (WebKit::WebContext::ensureNetworkProcess):
3042 (WebKit::WebContext::removeNetworkProcessProxy):
3043 (WebKit::WebContext::getNetworkProcessConnection):
3044 (WebKit::WebContext::willStartUsingPrivateBrowsing):
3045 (WebKit::WebContext::willStopUsingPrivateBrowsing):
3046 (WebKit::WebContext::createNewWebProcess):
3047 * UIProcess/WebContext.h:
3050 (WebKit::WebContext::networkProcess):
3051 * UIProcess/WebProcessProxy.cpp:
3052 (WebKit::WebProcessProxy::getNetworkProcessConnection):
3053 * UIProcess/mac/WebContextMac.mm:
3054 (WebKit::WebContext::applicationBecameVisible):
3055 (WebKit::WebContext::applicationBecameOccluded):
3056 * WebKit2.xcodeproj/project.pbxproj:
3058 2012-12-15 Anders Carlsson <andersca@apple.com>
3060 DownloadProxy objects should know which DownloadProxyMap they belong to
3061 https://bugs.webkit.org/show_bug.cgi?id=105102
3063 Reviewed by Andy Estes.
3065 * UIProcess/Downloads/DownloadProxy.cpp:
3066 (WebKit::DownloadProxy::create):
3067 (WebKit::DownloadProxy::DownloadProxy):
3068 * UIProcess/Downloads/DownloadProxy.h:
3071 * UIProcess/Downloads/DownloadProxyMap.cpp:
3072 (WebKit::DownloadProxyMap::createDownloadProxy):
3074 2012-12-15 Andy Estes <aestes@apple.com>
3076 [WebKit2] Move CustomProtocolManager to Shared/
3077 https://bugs.webkit.org/show_bug.cgi?id=105103
3079 Reviewed by Sam Weinig.
3081 CustomProtocolManager can be instantiated either in the NetworkProcess or the WebProcess, so it should live in Shared/.
3083 * DerivedSources.make: Update the path where CustomProtocolManager.messages.in can be found.
3084 * Shared/Network/CustomProtocols/CustomProtocolManager.h: Renamed from Source/WebKit2/WebProcess/Network/CustomProtocols/CustomProtocolManager.h.
3085 * Shared/Network/CustomProtocols/CustomProtocolManager.messages.in: Renamed from Source/WebKit2/WebProcess/Network/CustomProtocols/CustomProtocolManager.messages.in.
3086 * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm: Renamed from Source/WebKit2/WebProcess/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm.
3087 * WebKit2.xcodeproj/project.pbxproj:
3089 2012-12-15 Sam Weinig <sam@webkit.org>
3091 Try to fix the Qt build.
3095 2012-12-15 Anders Carlsson <andersca@apple.com>
3097 Get rid of DownloadProxyMap::downloads()
3098 https://bugs.webkit.org/show_bug.cgi?id=105100
3100 Reviewed by Sam Weinig.
3102 Add the needed member functions to DownloadProxyMap and remove the downloads() member function.
3104 * UIProcess/Downloads/DownloadProxyMap.cpp:
3105 (WebKit::DownloadProxyMap::downloadFinished):
3106 (WebKit::DownloadProxyMap::processDidClose):
3108 * UIProcess/Downloads/DownloadProxyMap.h:
3109 (WebKit::DownloadProxyMap::isEmpty):
3111 * UIProcess/WebContext.cpp:
3112 (WebKit::WebContext::shouldTerminate):
3113 (WebKit::WebContext::disconnectProcess):
3114 (WebKit::WebContext::downloadFinished):
3116 2012-12-15 Sam Weinig <sam@webkit.org>
3118 Move calculation of caches sizes based on the cache model to CacheModel.h/cpp
3119 https://bugs.webkit.org/show_bug.cgi?id=105098
3121 Reviewed by Anders Carlsson.
3123 Move calculation of caches sizes based on the cache model to CacheModel.h/cpp so
3124 that it can be used by more than just the WebProcess.
3127 * GNUmakefile.list.am:
3128 * Shared/CacheModel.cpp: Added.
3130 (WebKit::calculateCacheSizes):
3131 * Shared/CacheModel.h:
3133 * WebKit2.xcodeproj/project.pbxproj:
3134 * WebProcess/WebProcess.cpp:
3135 * WebProcess/WebProcess.h:
3137 * win/WebKit2.vcproj:
3139 2012-12-15 Anders Carlsson <andersca@apple.com>
3141 DownloadProxyMap shouldn't be a singleton after all
3142 https://bugs.webkit.org/show_bug.cgi?id=105099
3144 Reviewed by Sam Weinig.
3146 Make the DownloadProxyMap be per context instead, and get rid of the m_downloads hash map from WebContext.
3148 * UIProcess/Downloads/DownloadProxy.cpp:
3149 (WebKit::DownloadProxy::didFinish):
3150 (WebKit::DownloadProxy::didFail):
3151 (WebKit::DownloadProxy::didCancel):
3152 * UIProcess/Downloads/DownloadProxyMap.cpp:
3153 (WebKit::DownloadProxyMap::~DownloadProxyMap):
3154 * UIProcess/Downloads/DownloadProxyMap.h:
3156 (WebKit::DownloadProxyMap::downloads):
3157 * UIProcess/WebContext.cpp:
3158 (WebKit::WebContext::shouldTerminate):
3159 (WebKit::WebContext::disconnectProcess):
3160 (WebKit::WebContext::createDownloadProxy):
3161 (WebKit::WebContext::downloadFinished):
3162 * UIProcess/WebContext.h:
3165 2012-12-15 No'am Rosenthal <noam.rosenthal@nokia.com>
3167 Disambiguate "background color" and "contents as solid color" on GraphicsLayer
3168 https://bugs.webkit.org/show_bug.cgi?id=104842
3170 Reviewed by Simon Fraser.
3172 Rename overloads in coordinated graphics to account for the rename in GraphicsLayer.
3174 * Shared/CoordinatedGraphics/CoordinatedLayerInfo.h:
3175 (CoordinatedLayerInfo):
3176 * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
3177 (WebKit::LayerTreeRenderer::setLayerState):
3178 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
3179 (WebCore::CoordinatedGraphicsLayer::setContentsToSolidColor):
3180 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
3181 (CoordinatedGraphicsLayer):
3183 2012-12-15 Christophe Dumez <christophe.dumez@intel.com>
3185 [GTK][WK2] Memory leak in ChunkedUpdateDrawingArea::paintIntoUpdateChunk()
3186 https://bugs.webkit.org/show_bug.cgi?id=105095
3188 Reviewed by Martin Robinson.
3190 Adopt the pointer returned by cairo_create() in
3191 ChunkedUpdateDrawingArea::paintIntoUpdateChunk() to avoid leaking
3194 * WebProcess/WebPage/gtk/ChunkedUpdateDrawingAreaGtk.cpp:
3195 (WebKit::ChunkedUpdateDrawingArea::paintIntoUpdateChunk):
3197 2012-12-15 Mark Lam <mark.lam@apple.com>
3199 Added #if ENABLE(SQL_DATABASE) around WebPlatformStrategies::getDatabaseServer().
3200 https://bugs.webkit.org/show_bug.cgi?id=104934..
3204 Greening the Qt Linux Release Minimal bot.
3206 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3208 * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
3209 (WebPlatformStrategies):
3211 2012-12-15 Mark Lam <mark.lam@apple.com>
3213 Re-landing patch for "Introducing the DatabaseStrategy and database servers".
3214 https://bugs.webkit.org/show_bug.cgi?id=104934.
3218 Merged from r137767. Previously reviewed by Sam Weinig.
3221 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3222 (WebKit::WebPlatformStrategies::createDatabaseStrategy):
3224 (WebKit::WebPlatformStrategies::getDatabaseServer):
3225 * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
3226 (WebPlatformStrategies):
3228 2012-12-14 Anders Carlsson <andersca@apple.com>
3230 DownloadProxy objects should be message receivers
3231 https://bugs.webkit.org/show_bug.cgi?id=105068
3233 Reviewed by Andreas Kling.
3235 This simplifies the WebContext message dispatch code somewhat.
3237 * UIProcess/Downloads/DownloadProxy.cpp:
3238 (WebKit::DownloadProxy::didReceiveMessage):
3239 (WebKit::DownloadProxy::didReceiveSyncMessage):
3240 * UIProcess/Downloads/DownloadProxy.h:
3242 * UIProcess/WebContext.cpp:
3243 (WebKit::WebContext::createDownloadProxy):
3244 (WebKit::WebContext::didReceiveMessage):
3245 (WebKit::WebContext::didReceiveSyncMessage):
3247 2012-12-14 Sheriff Bot <webkit.review.bot@gmail.com>
3249 Unreviewed, rolling out r137767.
3250 http://trac.webkit.org/changeset/137767
3251 https://bugs.webkit.org/show_bug.cgi?id=105062
3253 Broke Mac builds. (Requested by mlam on #webkit).
3256 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3257 * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
3258 (WebPlatformStrategies):
3260 2012-12-14 Alexey Proskuryakov <ap@apple.com>
3262 <rdar://problem/12874760> NetworkProcess loads may get stuck when WebProcess quits
3263 https://bugs.webkit.org/show_bug.cgi?id=105056
3265 Reviewed by Anders Carlsson.
3267 Make response maps per-connection.
3269 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3270 (WebKit::NetworkConnectionToWebProcess::didClose): Cancel waiting for responses
3271 from WebProcess, they will never arrive.
3273 * NetworkProcess/NetworkConnectionToWebProcess.h:
3274 (WebKit::NetworkConnectionToWebProcess::willSendRequestResponseMap):
3275 (WebKit::NetworkConnectionToWebProcess::canAuthenticateAgainstProtectionSpaceResponseMap):
3278 * NetworkProcess/NetworkResourceLoader.cpp:
3279 (WebKit::NetworkResourceLoader::connectionToWebProcessDidClose): Added a FIXME.
3281 (WebKit::NetworkResourceLoader::willSendRequest):
3282 (WebKit::NetworkResourceLoader::willSendRequestHandled):
3283 (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpace):
3284 (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceHandled):
3285 Handle the cases where we can't send a request, or can't expect a response any more.
3287 * Shared/BlockingResponseMap.h:
3288 (BlockingResponseMap):
3289 (BlockingResponseMap::BlockingResponseMap):
3290 (BlockingResponseMap::~BlockingResponseMap):
3291 (BlockingResponseMap::waitForResponse):
3292 (BlockingResponseMap::didReceiveResponse):
3293 (BlockingResponseMap::cancel):
3294 (BlockingBoolResponseMap):
3295 (BlockingBoolResponseMap::BlockingBoolResponseMap):
3296 (BlockingBoolResponseMap::~BlockingBoolResponseMap):
3297 (BlockingBoolResponseMap::waitForResponse):
3298 (BlockingBoolResponseMap::didReceiveResponse):
3299 (BlockingBoolResponseMap::cancel):
3300 Added an ability to cancel, and slightly beefed up overall.
3302 2012-12-14 Anders Carlsson <andersca@apple.com>
3304 DownloadProxyMap should keep track of outstanding DownloadProxy objects
3305 https://bugs.webkit.org/show_bug.cgi?id=105053
3307 Reviewed by Andreas Kling.
3309 This is more work towards removing the m_downloads map from every WebContext object.
3311 * UIProcess/Downloads/DownloadProxy.cpp:
3312 (WebKit::DownloadProxy::didFinish):
3313 (WebKit::DownloadProxy::didFail):
3314 (WebKit::DownloadProxy::didCancel):
3315 * UIProcess/Downloads/DownloadProxyMap.cpp:
3316 (WebKit::DownloadProxyMap::createDownloadProxy):
3318 (WebKit::DownloadProxyMap::downloadFinished):
3319 * UIProcess/Downloads/DownloadProxyMap.h:
3321 * UIProcess/WebContext.cpp:
3322 (WebKit::WebContext::createDownloadProxy):
3324 2012-12-14 Mark Lam <mark.lam@apple.com>
3326 Introducing the DatabaseStrategy and database servers.
3327 https://bugs.webkit.org/show_bug.cgi?id=104934.
3329 Reviewed by Sam Weinig.
3331 The database server is currently a placeholder that does nothing.
3334 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3335 (WebKit::WebPlatformStrategies::createDatabaseStrategy):
3337 (WebKit::WebPlatformStrategies::getDatabaseServer):
3338 * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
3339 (WebPlatformStrategies):
3341 2012-12-14 Alexey Proskuryakov <ap@apple.com>
3343 Resource loads sometimes stall
3344 https://bugs.webkit.org/show_bug.cgi?id=104976
3346 Apply the same quick an dirty fix to BlockingBoolResponseMap.
3348 * Shared/BlockingResponseMap.h:
3349 (BlockingBoolResponseMap::didReceiveResponse):
3351 2012-12-14 Anders Carlsson <andersca@apple.com>
3353 Add a DownloadsProxyMap class in preparation for moving the downloads map away from WebContext
3354 https://bugs.webkit.org/show_bug.cgi?id=104980
3356 Reviewed by Andreas Kling.
3358 Currently the DownloadProxyMap doesn't really do anything; this initial change is to make sure that
3359 adding the new files won't break any builds.
3362 * GNUmakefile.list.am:
3364 * UIProcess/Downloads/DownloadProxyMap.cpp: Added.
3366 (WebKit::DownloadProxyMap::shared):
3367 (WebKit::DownloadProxyMap::DownloadProxyMap):
3368 (WebKit::DownloadProxyMap::~DownloadProxyMap):
3369 (WebKit::DownloadProxyMap::createDownloadProxy):
3370 * UIProcess/Downloads/DownloadProxyMap.h: Added.
3373 * UIProcess/WebContext.cpp:
3374 (WebKit::WebContext::createDownloadProxy):
3375 * WebKit2.xcodeproj/project.pbxproj:
3376 * win/WebKit2.vcproj:
3378 2012-12-14 Anders Carlsson <andersca@apple.com>
3380 Fix assertion failure when the network process is enabled
3381 https://bugs.webkit.org/show_bug.cgi?id=105040
3382 <rdar://problem/12883632>
3384 Reviewed by Alexey Proskuryakov.
3386 Make sure that we don't call into the download manager when running with a network process.
3388 * WebProcess/WebProcess.cpp:
3389 (WebKit::WebProcess::shouldTerminate):
3391 2012-12-14 Michelangelo De Simone <michelangelo@webkit.org>
3393 [CSS Shaders] Remove code for the other mesh box types (border-box | padding-box | content-box)
3394 https://bugs.webkit.org/show_bug.cgi?id=103776
3396 Reviewed by Dean Jackson.
3398 The MeshBoxType has been removed and the code has been refactored. The specs will be updated shortly
3399 and therefore this feature - even though it was not fully implemented yet - shall not be used anymore.
3401 In this patch we remove everything but the parsing code, which shall be addressed in a different patch
3402 (see: https://bugs.webkit.org/show_bug.cgi?id=103778).
3404 Specification to be updated: http://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#ltboxgt
3406 Existing tests have been updated and new parsing legacy cases have been added.
3408 * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
3409 (CoreIPC::::encode):
3410 (CoreIPC::::decode):
3411 * Shared/CoordinatedGraphics/WebCustomFilterOperation.h:
3412 (WebCore::WebCustomFilterOperation::create):
3413 (WebCore::WebCustomFilterOperation::WebCustomFilterOperation):
3415 2012-12-14 Alexey Proskuryakov <ap@apple.com>
3417 <rdar://problem/12880750> RGRESSION: Crash when emptying cookie jar
3418 https://bugs.webkit.org/show_bug.cgi?id=105038
3420 Reviewed by Jessie Berlin.
3422 Handle null context, which is used for cookie management functions.
3424 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3425 (WebKit::WebPlatformStrategies::cookiesForDOM):
3426 (WebKit::WebPlatformStrategies::setCookiesFromDOM):
3427 (WebKit::WebPlatformStrategies::cookiesEnabled):
3428 (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
3429 (WebKit::WebPlatformStrategies::getRawCookies):
3430 (WebKit::WebPlatformStrategies::deleteCookie):
3431 (WebKit::WebPlatformStrategies::getHostnamesWithCookies):
3432 (WebKit::WebPlatformStrategies::deleteCookiesForHostname):
3433 (WebKit::WebPlatformStrategies::deleteAllCookies):
3435 2012-12-14 Alberto Garcia <agarcia@igalia.com>
3437 [GTK] When in private mode WebKitGTK+ should not save HTTP authentication credentials to the persistent storage
3438 https://bugs.webkit.org/show_bug.cgi?id=104910
3440 Reviewed by Martin Robinson.
3442 * UIProcess/API/gtk/WebKit2GtkAuthenticationDialog.cpp:
3443 (WebKit::WebKit2GtkAuthenticationDialog::WebKit2GtkAuthenticationDialog):
3444 * UIProcess/API/gtk/WebKit2GtkAuthenticationDialog.h:
3445 (WebKit2GtkAuthenticationDialog):
3446 GtkAuthenticationDialog has a new credential storage mode
3447 parameter, so add it here too.
3449 * UIProcess/API/gtk/WebKitWebView.cpp:
3450 (webkitWebViewHandleAuthenticationChallenge):
3451 When creating the GtkAuthenticationDialog, set the credential
3452 storage mode using the private browsing setting from the current
3455 2012-12-14 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
3457 [EFL][WK2] Fix EFL build after r137718
3458 https://bugs.webkit.org/show_bug.cgi?id=105018
3460 Unreviewed build fix.
3462 The problem was that UNUSED_PARAM(size) was left in the code
3463 for non-existent variable 'size'.
3465 * UIProcess/efl/PageClientDefaultImpl.cpp:
3466 (WebKit::PageClientDefaultImpl::updateViewportSize):
3467 * UIProcess/efl/PageClientLegacyImpl.cpp:
3468 (WebKit::PageClientLegacyImpl::updateViewportSize):
3470 2012-12-13 Kenneth Rohde Christiansen <kenneth@webkit.org>
3472 [EFL][WK2] Do not pass size to updateViewportSize
3473 https://bugs.webkit.org/show_bug.cgi?id=104994
3475 Reviewed by Gyuyoung Kim.
3477 There is no need to pass size to updateViewportSize as we
3478 have direct access to it. This makes the code differ less
3481 * UIProcess/API/efl/ewk_view.cpp:
3482 (_ewk_view_smart_calculate):
3483 * UIProcess/PageViewportController.cpp:
3484 (WebKit::PageViewportController::pageDidRequestScroll):
3485 * UIProcess/efl/PageClientBase.h:
3487 * UIProcess/efl/PageClientDefaultImpl.cpp:
3488 (WebKit::PageClientDefaultImpl::updateViewportSize):
3489 * UIProcess/efl/PageClientDefaultImpl.h:
3490 (PageClientDefaultImpl):
3491 * UIProcess/efl/PageClientLegacyImpl.cpp:
3492 (WebKit::PageClientLegacyImpl::updateViewportSize):
3493 * UIProcess/efl/PageClientLegacyImpl.h:
3494 (PageClientLegacyImpl):
3495 * UIProcess/efl/PageViewportControllerClientEfl.cpp:
3496 (WebKit::PageViewportControllerClientEfl::updateViewportSize):
3497 * UIProcess/efl/PageViewportControllerClientEfl.h:
3498 (PageViewportControllerClientEfl):
3500 2012-12-13 Sanghyup Lee <sh53.lee@samsung.com>
3503 https://bugs.webkit.org/show_bug.cgi?id=104978
3505 Reviewed by Kentaro Hara.
3507 Initialize parameter 'downloadID' to fix 'unused parameter' build warning.
3509 * WebProcess/Downloads/Download.cpp:
3510 (WebKit::Download::Download):
3512 2012-12-13 Alexey Proskuryakov <ap@apple.com>
3514 Resource loads sometimes stall
3515 https://bugs.webkit.org/show_bug.cgi?id=104976
3517 Reviewed by Anders Carlsson.
3519 Quick and dirty partial fix.
3521 * Shared/BlockingResponseMap.h: (BlockingResponseMap::didReceiveResponse):
3522 Wake up all threads, so that non-sequential responses don't break us. This is still
3523 horribly inefficient,but should improve behavior quite a bit.
3525 2012-12-13 Seokju Kwon <seokju.kwon@gmail.com>
3527 Fix unused parameter compile warnings
3528 https://bugs.webkit.org/show_bug.cgi?id=104907
3530 Reviewed by Kentaro Hara.
3532 Use UNUSED_PARAM macro to fix build warning -Wunused-parameter
3533 when ENABLE_INSPECTOR is disabled.
3535 * UIProcess/API/C/WKInspector.cpp:
3536 (WKInspectorGetPage):
3537 (WKInspectorIsVisible):
3538 (WKInspectorIsFront):
3541 (WKInspectorShowConsole):
3542 (WKInspectorShowResources):
3543 (WKInspectorShowMainResourceForFrame):
3544 (WKInspectorIsAttached):
3545 (WKInspectorAttach):
3546 (WKInspectorDetach):
3547 (WKInspectorIsDebuggingJavaScript):
3548 (WKInspectorToggleJavaScriptDebugging):
3549 (WKInspectorIsProfilingJavaScript):
3550 (WKInspectorToggleJavaScriptProfiling):
3551 (WKInspectorIsProfilingPage):
3552 (WKInspectorTogglePageProfiling):
3553 * UIProcess/API/C/WKPage.cpp:
3554 (WKPageGetInspector):
3556 2012-12-13 Seokju Kwon <seokju.kwon@gmail.com>
3558 [QT][GTK][EFL] Add guard for WebInspectorServer
3559 https://bugs.webkit.org/show_bug.cgi?id=104889
3561 Reviewed by Kenneth Rohde Christiansen.
3563 Add ENABLE(INSPECTOR_SERVER) guard around platform-specific implementation for WebInspectorServer.
3565 * UIProcess/InspectorServer/efl/WebInspectorServerEfl.cpp:
3566 * UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
3567 * UIProcess/InspectorServer/qt/WebInspectorServerQt.cpp:
3569 2012-12-13 Huang Dongsung <luxtella@company100.net>
3571 Coordinated Graphics: Reorder messages to CoordinatedLayerTreeHostProxy
3572 https://bugs.webkit.org/show_bug.cgi?id=103843
3574 Reviewed by Noam Rosenthal.
3576 Clarify LayerTreeRenderer::setRootLayerID() can be called only once during its
3577 lifecycle. LayerTreeRenderer, CoordinatedLayerTreeHost and CoordinatedLayerTreeHostProxy
3578 have the same lifecycle to WebPage and the root layer is reused even if loading
3579 new page, so it is impossible to call LayerTreeRenderer::setRootLayerID() more
3582 * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
3583 (WebKit::LayerTreeRenderer::setRootLayerID):
3585 2012-12-13 Alexey Proskuryakov <ap@apple.com>
3587 <rdar://problem/12838354> DOM cookie access functions should respect private browsing
3588 https://bugs.webkit.org/show_bug.cgi?id=104691
3590 Reviewed by Anders Carlsson.
3592 Remove obsolete FIXMEs, and fix one function that I overlooked.
3594 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3595 (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
3596 (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
3597 (WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
3598 (WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
3599 (WebKit::NetworkConnectionToWebProcess::getRawCookies):
3600 (WebKit::NetworkConnectionToWebProcess::deleteCookie):
3601 (WebKit::NetworkConnectionToWebProcess::getHostnamesWithCookies):
3602 (WebKit::NetworkConnectionToWebProcess::deleteCookiesForHostname):
3603 (WebKit::NetworkConnectionToWebProcess::deleteAllCookies):
3605 2012-12-13 Anders Carlsson <andersca@apple.com>
3607 DownloadManager shouldn't call the web process directly
3608 https://bugs.webkit.org/show_bug.cgi?id=104946
3610 Reviewed by Antti Koivisto.
3612 Introduce the needed DownloadManager::Client member functions and have Download call them instead of calling the web process directly.
3614 * WebProcess/Downloads/Download.cpp:
3615 (WebKit::Download::Download):
3616 (WebKit::Download::~Download):
3617 (WebKit::Download::connection):
3618 * WebProcess/Downloads/DownloadManager.cpp:
3619 (WebKit::DownloadManager::DownloadManager):
3620 (WebKit::DownloadManager::didCreateDownload):
3621 (WebKit::DownloadManager::didDestroyDownload):
3622 (WebKit::DownloadManager::connection):
3623 * WebProcess/Downloads/DownloadManager.h:
3624 * WebProcess/WebProcess.cpp:
3625 (WebKit::WebProcess::didCreateDownload):
3626 (WebKit::WebProcess::didDestroyDownload):
3627 * WebProcess/WebProcess.h:
3629 2012-12-13 Alexey Proskuryakov <ap@apple.com>
3631 <rdar://problem/12838354> Per-Tab WebProcess: DOM cookie access functions should respect private browsing
3632 https://bugs.webkit.org/show_bug.cgi?id=104691
3634 Reviewed by Sam Weinig.
3636 Pass private browsing state from local context to remote one.
3638 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3639 (WebKit::networkingContext):
3640 (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
3641 (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
3642 (WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
3643 (WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
3644 (WebKit::NetworkConnectionToWebProcess::getRawCookies):
3645 (WebKit::NetworkConnectionToWebProcess::deleteCookie):
3646 (WebKit::NetworkConnectionToWebProcess::getHostnamesWithCookies):
3647 (WebKit::NetworkConnectionToWebProcess::deleteCookiesForHostname):
3648 (WebKit::NetworkConnectionToWebProcess::deleteAllCookies):
3649 * NetworkProcess/NetworkConnectionToWebProcess.h:
3650 * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
3651 * NetworkProcess/mac/RemoteNetworkingContext.h:
3652 * NetworkProcess/mac/RemoteNetworkingContext.mm:
3653 (WebKit::RemoteNetworkingContext::inPrivateBrowsingMode):
3654 (WebKit::RemoteNetworkingContext::storageSession):
3655 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3656 (WebKit::WebPlatformStrategies::cookiesForDOM):
3657 (WebKit::WebPlatformStrategies::setCookiesFromDOM):
3658 (WebKit::WebPlatformStrategies::cookiesEnabled):
3659 (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
3660 (WebKit::WebPlatformStrategies::getRawCookies):
3661 (WebKit::WebPlatformStrategies::deleteCookie):
3662 (WebKit::WebPlatformStrategies::getHostnamesWithCookies):
3663 (WebKit::WebPlatformStrategies::deleteCookiesForHostname):
3664 (WebKit::WebPlatformStrategies::deleteAllCookies):
3665 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
3666 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
3667 (WebKit::WebFrameNetworkingContext::inPrivateBrowsingMode):
3668 (WebKit::WebFrameNetworkingContext::storageSession):
3669 * WebProcess/WebCoreSupport/win/WebFrameNetworkingContext.h:
3670 (WebFrameNetworkingContext::inPrivateBrowsingMode):
3672 2012-12-13 Anders Carlsson <andersca@apple.com>
3674 Get rid of DownloadManager::shared
3675 https://bugs.webkit.org/show_bug.cgi?id=104939
3677 Reviewed by Andreas Kling.
3679 Move the DownloadManager singleton to WebProcess and stub out a DownloadManager::Client class.
3681 * WebProcess/Downloads/DownloadManager.cpp:
3682 (WebKit::DownloadManager::DownloadManager):
3683 * WebProcess/Downloads/DownloadManager.h:
3685 (WebKit::DownloadManager::Client::~Client):
3687 * WebProcess/WebPage/WebFrame.cpp:
3688 (WebKit::WebFrame::startDownload):
3689 (WebKit::WebFrame::convertHandleToDownload):
3690 * WebProcess/WebProcess.cpp:
3691 (WebKit::WebProcess::downloadManager):
3693 (WebKit::WebProcess::shouldTerminate):
3694 (WebKit::WebProcess::downloadRequest):
3695 (WebKit::WebProcess::cancelDownload):
3696 (WebKit::WebProcess::startTransfer):
3697 * WebProcess/WebProcess.h:
3700 2012-12-12 Andy Estes <aestes@apple.com>
3702 [WebKit2] Only register NSNotificationCenter observers once per WebContext
3703 https://bugs.webkit.org/show_bug.cgi?id=104879
3705 Reviewed by Alexey Proskuryakov.
3707 WebContext was mistakenly registering NSNotificationCenter observers
3708 every time a new web process was created. In a multi-WebProcess world,
3709 this caused duplicate observers to be needlessly registered. Fix this
3710 by registering observers at WebContext creation time (and fix a related
3711 bug where two of the observers were never unregistered).
3713 * UIProcess/WebContext.h:
3714 * UIProcess/mac/WebContextMac.mm:
3715 (WebKit::WebContext::platformInitialize): Register observers when initializing the context.
3716 (WebKit::WebContext::platformInitializeWebProcess): Don't register observers here.
3717 (WebKit::WebContext::platformInvalidateContext): Unregister observers when invalidating the context.
3718 (WebKit::WebContext::registerNotificationObservers):
3719 (WebKit::WebContext::unregisterNotificationObservers):
3721 2012-12-13 Anders Carlsson <andersca@apple.com>
3723 Download objects should keep track of their associated DownloadManager object
3724 https://bugs.webkit.org/show_bug.cgi?id=104936
3726 Reviewed by Andreas Kling.
3728 This is the first step towards eliminating DownloadManager::shared.
3730 * WebProcess/Downloads/Download.cpp:
3731 (WebKit::Download::create):
3732 (WebKit::Download::Download):
3733 (WebKit::Download::didFinish):
3734 (WebKit::Download::didFail):
3735 (WebKit::Download::didCancel):
3736 * WebProcess/Downloads/Download.h:
3737 * WebProcess/Downloads/DownloadManager.cpp:
3738 (WebKit::DownloadManager::startDownload):
3739 (WebKit::DownloadManager::convertHandleToDownload):
3741 2012-12-13 Anders Carlsson <andersca@apple.com>
3743 Remove unused initiatingPage parameter from download objects
3744 https://bugs.webkit.org/show_bug.cgi?id=104933
3746 Reviewed by Alexey Proskuryakov.
3748 * WebProcess/Downloads/Download.h:
3750 * WebProcess/Downloads/DownloadManager.cpp:
3751 (WebKit::DownloadManager::startDownload):
3752 (WebKit::DownloadManager::convertHandleToDownload):
3753 * WebProcess/Downloads/DownloadManager.h:
3755 * WebProcess/Downloads/cfnet/DownloadCFNet.cpp:
3756 (WebKit::Download::start):
3757 (WebKit::Download::startWithHandle):
3758 * WebProcess/Downloads/curl/DownloadCurl.cpp:
3759 (WebKit::Download::start):
3760 (WebKit::Download::startWithHandle):
3761 * WebProcess/Downloads/mac/DownloadMac.mm:
3762 (WebKit::Download::start):
3763 (WebKit::Download::startWithHandle):
3764 * WebProcess/Downloads/qt/DownloadQt.cpp:
3765 (WebKit::Download::start):
3766 (WebKit::Download::startWithHandle):
3767 * WebProcess/Downloads/soup/DownloadSoup.cpp:
3768 (WebKit::Download::start):
3769 (WebKit::Download::startWithHandle):
3770 * WebProcess/WebPage/WebFrame.cpp:
3771 (WebKit::WebFrame::startDownload):
3772 (WebKit::WebFrame::convertHandleToDownload):
3773 * WebProcess/WebProcess.cpp:
3774 (WebKit::WebProcess::downloadRequest):
3776 2012-12-13 Alexey Proskuryakov <ap@apple.com>
3778 <rdar://problem/12870065> Frequent NetworkProcess crashes due to null connection when closing tabs
3779 https://bugs.webkit.org/show_bug.cgi?id=104922
3781 Reviewed by Anders Carlsson.
3783 Don't zero out connection pointers when a connection closes. There doesn't appear
3784 to be any reason to do this.
3786 Tested by hitting breakpoints in all relevant objects destructors to confirm that
3787 this doesn't introduce leaks.
3789 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3790 (WebKit::NetworkConnectionToWebProcess::~NetworkConnectionToWebProcess):
3791 (WebKit::NetworkConnectionToWebProcess::didClose):
3792 * NetworkProcess/NetworkResourceLoader.cpp:
3793 (WebKit::NetworkResourceLoader::connectionToWebProcessDidClose):
3795 2012-12-13 Thiago Marcos P. Santos <thiago.santos@intel.com>
3797 [EFL] Update the way we set the cookies policy
3798 https://bugs.webkit.org/show_bug.cgi?id=104915
3800 Reviewed by Kenneth Rohde Christiansen.
3802 We are mistakenly assigning the cookie policy to the persistent storage
3803 type which is not correct. This was caused by r137432 and is making
3804 the unit tests fail.
3806 * UIProcess/efl/WebContextEfl.cpp:
3807 (WebKit::WebContext::platformInitializeWebProcess):
3809 2012-12-13 Andras Becsi <andras.becsi@digia.com>
3811 [Qt][WK2] Fix painting on Mac with retina display
3812 https://bugs.webkit.org/show_bug.cgi?id=104574
3814 Unreviewed, removing leftover API test.
3816 This hunk somehow did not make it into the final patch.
3818 * UIProcess/API/qt/tests/qmltests/WebView/tst_devicePixelRatio.qml: Removed.
3820 2012-12-13 Andras Becsi <andras.becsi@digia.com>
3822 [Qt][WK2] Fix painting on Mac with retina display
3823 https://bugs.webkit.org/show_bug.cgi?id=104574
3825 Reviewed by Kenneth Rohde Christiansen.
3827 Since HiDPI support has been added and enabled in Qt we ended up
3828 painting incorrectly scaled content on high-resolution screens.
3829 Because the intrinsic device pixel ratio is always taken into
3830 account by Qt when painting to high-resolution screens we should
3831 automatically obtain the scale ratio from the window in which the
3832 item is rendered instead of setting it in QML.
3834 Qt does not make it possible to override the device pixel ratio
3835 of the native window, therefore our experimental QML API for setting
3836 a custom value is of no use any more and should be removed.
3838 This patch fixes the scaling issue on Mac retina display by querying
3839 the underlying window for the device scale factor and applying it to
3840 the backing store and the scene-graph rendering of the content node.
3841 Additionally removes the experimental API and related API tests.
3843 * UIProcess/API/qt/qquickwebpage.cpp:
3844 (QQuickWebPage::updatePaintNode):
3845 * UIProcess/API/qt/qquickwebview.cpp:
3846 (QQuickWebViewPrivate::QQuickWebViewPrivate):
3847 (QQuickWebViewLegacyPrivate::updateViewportSize):
3848 (QQuickWebViewFlickablePrivate::onComponentComplete):
3849 * UIProcess/API/qt/qquickwebview_p.h:
3850 * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
3851 (tst_QQuickWebView::newWebView):
3852 * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
3853 (WebKit::CoordinatedLayerTreeHostProxy::setVisibleContentsRect):
3854 (WebKit::CoordinatedLayerTreeHostProxy::deviceScaleFactor):
3855 * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
3856 (CoordinatedLayerTreeHostProxy):
3857 * UIProcess/qt/QtWebPageSGNode.cpp:
3858 (WebKit::ContentsSGNode::ContentsSGNode):
3859 (WebKit::ContentsSGNode::render):
3860 (WebKit::ContentsSGNode::clipRect):
3862 (WebKit::QtWebPageSGNode::QtWebPageSGNode):
3863 (WebKit::QtWebPageSGNode::devicePixelRatio):
3865 (WebKit::QtWebPageSGNode::setRenderer):
3866 * UIProcess/qt/QtWebPageSGNode.h:
3869 2012-12-13 Thiago Marcos P. Santos <thiago.santos@intel.com>
3871 [EFL] API tests failing because Vibration API is using unsigned as duration since r137410
3872 https://bugs.webkit.org/show_bug.cgi?id=104914
3874 Reviewed by Kenneth Rohde Christiansen.
3876 Update the tests to reflect the data type coming from WebCore.
3878 * UIProcess/API/efl/tests/test_ewk2_view.cpp:
3882 2012-12-13 Kenneth Rohde Christiansen <kenneth@webkit.org>
3884 [EFL][WK2] Device pixel ratio lost upon relaunch of the web process
3885 https://bugs.webkit.org/show_bug.cgi?id=104913
3887 Reviewed by Simon Hausmann.
3889 Use setIntrinsicDeviceScaleFactor instead of setCustomDeviceScaleFactor
3890 when setting the device pixel ratio to make the setting permanent and
3891 make sure it is set as part of the web process creation parameters.
3893 * UIProcess/API/efl/ewk_view.cpp:
3894 (ewk_view_device_pixel_ratio_set):
3896 2012-12-13 Jerome Pasion <jerome.pasion@digia.com>
3898 [Qt] Doc: Fixing Qt WebKit reference documentation.
3900 Reviewed by Simon Hausmann.
3903 -added \module for C++ classes and \qmlmodule for QML types
3904 -added links to the Qt WebKit Examples pages
3905 -fixed the qhp settings for Qt Creator
3907 Task-number: QTBUG-28583
3908 Task-number: QTBUG-28418
3909 Task-number: QTBUG-27646
3911 * UIProcess/API/qt/qquickwebview.cpp:
3913 2012-12-13 Jussi Kukkonen <jussi.kukkonen@intel.com>
3915 [EFL][GTK] Don't call deprecated g_type_init when glib => 2.35
3916 https://bugs.webkit.org/show_bug.cgi?id=103209
3918 Reviewed by Kenneth Rohde Christiansen.
3920 g_type_init() is deprecated from 2.35.0 onwards. Don't call it
3921 in that case to avoid warnings and/or build failure.
3923 Also, remove a call to g_type_init() from WebProcessMainGtk():
3924 It is not needed if gtk_init() is called.
3926 * UIProcess/API/efl/ewk_main.cpp:
3928 * WebProcess/efl/WebProcessMainEfl.cpp:
3929 (WebKit::WebProcessMainEfl):
3930 * WebProcess/gtk/WebProcessMainGtk.cpp:
3931 (WebKit::WebProcessMainGtk):
3933 2012-12-13 Joaquim Rocha <jrocha@igalia.com>
3935 REGRESSION (r137432): The /webkit2/WebKitCookieManager/accept-policy unit test is failing
3936 https://bugs.webkit.org/show_bug.cgi?id=104790
3938 Reviewed by Carlos Garcia Campos.
3940 The cookies accept policy and the cookies persistent storage type
3941 were not being correctly assigned.
3943 * UIProcess/WebContext.cpp: Set the default value of the cookie
3945 (WebKit::WebContext::WebContext):
3946 * UIProcess/gtk/WebContextGtk.cpp: Fix setting the cookies persistent
3947 storage type (it was mistakenly assigning the policy instead) and
3948 set the accept policy which was missing.
3949 (WebKit::WebContext::platformInitializeWebProcess):
3951 2012-12-13 Jon Lee <jonlee@apple.com>
3953 plugin snapshotting accepts bad snapshot after 5 seconds
3954 https://bugs.webkit.org/show_bug.cgi?id=104886
3955 <rdar://problem/12838753>
3957 Reviewed by Maciej Stachowiak.
3959 * WebProcess/Plugins/PluginView.cpp: Increase to 60 tries, equating to a little over 60 seconds total.
3961 2012-12-12 Gyuyoung Kim <gyuyoung.kim@samsung.com>
3963 NetworkInfoController needs to support destructor
3964 https://bugs.webkit.org/show_bug.cgi?id=104642
3966 Reviewed by Kentaro Hara.
3968 Though NetworkInfoController can be referenced by each port in order to update network status change,
3969 there is no virtual interface to destroy it. Beside each port client also needs to be destroyed when
3970 controller is destroyed.
3972 * UIProcess/efl/NetworkInfoProvider.cpp:
3973 (NetworkInfoProvider::networkInfoControllerDestroyed):
3974 * UIProcess/efl/NetworkInfoProvider.h:
3975 (NetworkInfoProvider):
3976 * WebProcess/WebCoreSupport/WebNetworkInfoClient.cpp:
3977 (WebKit::WebNetworkInfoClient::networkInfoControllerDestroyed):
3979 * WebProcess/WebCoreSupport/WebNetworkInfoClient.h:
3980 (WebNetworkInfoClient):
3982 2012-12-12 Andy Estes <aestes@apple.com>
3984 Rename currentMousePosition() to lastKnownMousePosition() and mark it as OVERRIDE.
3986 * WebProcess/Plugins/PDF/PDFPlugin.h:
3988 2012-12-12 Seokju Kwon <seokju.kwon@gmail.com>
3990 [EFL] Refactor duplicate code into EflInspectorUtilities
3991 https://bugs.webkit.org/show_bug.cgi?id=104329
3993 Reviewed by Kenneth Rohde Christiansen.
3995 Remove duplicated work to get the resource path for inspector.
3996 And use WebCore::inspectorResourcePath().
3998 * UIProcess/InspectorServer/efl/WebInspectorServerEfl.cpp:
3999 (WebKit::WebInspectorServer::platformResourceForPath):
4000 * UIProcess/efl/WebInspectorProxyEfl.cpp:
4001 (WebKit::WebInspectorProxy::inspectorBaseURL):
4003 2012-12-12 Mark Lam <mark.lam@apple.com>
4005 Encapsulate externally used webdatabase APIs in DatabaseManager.
4006 https://bugs.webkit.org/show_bug.cgi?id=104741.
4008 Reviewed by Sam Weinig.
4010 Use DatabaseManager instead of accessing DatabaseTracker, AbstractDatabase,
4011 and DatabaseContext directly. This is to prepare for upcoming webkit2
4014 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
4015 (WebKit::WebChromeClient::exceededDatabaseQuota):
4016 * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
4017 (WebKit::WebDatabaseManager::initialize):
4018 (WebKit::WebDatabaseManager::WebDatabaseManager):
4019 (WebKit::WebDatabaseManager::getDatabasesByOrigin):
4020 (WebKit::WebDatabaseManager::getDatabaseOrigins):
4021 (WebKit::WebDatabaseManager::deleteDatabaseWithNameForOrigin):
4022 (WebKit::WebDatabaseManager::deleteDatabasesForOrigin):
4023 (WebKit::WebDatabaseManager::deleteAllDatabases):
4024 (WebKit::WebDatabaseManager::setQuotaForOrigin):
4025 * WebProcess/WebCoreSupport/WebDatabaseManager.h:
4026 (WebDatabaseManager):
4027 * WebProcess/WebPage/WebPage.cpp:
4028 (WebKit::WebPage::updatePreferences):
4030 2012-12-12 Alexey Proskuryakov <ap@apple.com>
4032 <rdar://problem/12862512> Crashes in NetworkResourceLoadScheduler::receivedRedirect
4033 https://bugs.webkit.org/show_bug.cgi?id=104844
4035 Reviewed by Sam Weinig.
4037 * NetworkProcess/NetworkResourceLoadScheduler.cpp:
4038 (WebKit::NetworkResourceLoadScheduler::receivedRedirect): The load may be already
4041 * WebProcess/Network/WebResourceLoader.cpp:
4042 (WebKit::WebResourceLoader::didReceiveResponse): Expanded logging a little.
4044 2012-12-12 Andras Becsi <andras.becsi@digia.com>
4046 [Qt][WK2] Fix the build on Mac
4048 Unreviewed build fix.
4050 Add missing virtual destructor with empty
4051 definition to fix missing vtable error
4052 in test util's LoadStartedCatcher.
4054 * UIProcess/API/qt/tests/util.h:
4055 (LoadStartedCatcher::~LoadStartedCatcher):
4057 2012-12-12 Alexey Proskuryakov <ap@apple.com>
4059 Make LOG() work in WebProcess and NetworkProcess
4060 https://bugs.webkit.org/show_bug.cgi?id=104718
4062 Reviewed by Tim Horton.
4064 * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::initializeNetworkProcess):
4065 Initialize WebCore and WebKit2 logging.
4067 * Platform/Logging.cpp: (WebKit::initializeLogChannelsIfNecessary):
4068 Added Network and NetworkScheduling. Re-ordered to match declaration order,
4069 alphabetical clearly doesn't help here.
4071 * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): Initialize WebKit2
4072 logging in addition to WebCore.
4074 * UIProcess/WebContext.cpp: (WebKit::WebContext::WebContext): Initialize WebKit2
4075 logging in addition to WebCore.
4077 2012-12-12 Simon Pena <spena@igalia.com>
4079 [GTK] Add sections documentation to WebKit2 GTK+ API
4080 https://bugs.webkit.org/show_bug.cgi?id=104484
4082 Reviewed by Martin Robinson.
4084 Many of the sections in the WebKit2 GTK+ API documentation were
4085 missing. This commit adds new documentation, in some cases
4086 adapting it from WebKitGtk+ and in others writing it from the