Yet another Windows build fix attempt. Try exporting more symbols.
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2013-01-02  Ryosuke Niwa  <rniwa@webkit.org>
2
3         Yet another Windows build fix attempt. Try exporting more symbols.
4
5         * win/WebKit2.def.in:
6
7 2013-01-02  Alexey Proskuryakov  <ap@apple.com>
8
9         REGRESSION (r138464): Safari hangs when opening Privacy preferences
10         https://bugs.webkit.org/show_bug.cgi?id=105933
11
12         Reviewed by Sam Weinig.
13
14         Quick and dirty fix - added a special case for main thread. But I'm not sure if
15         dispatch_sync on main queue is really the best idiom here.
16
17         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
18         (WebKit::getPluginInfoFromCarbonResources):
19
20 2013-01-02  Ryosuke Niwa  <rniwa@webkit.org>
21
22         Don't include a header that has been removed in r138413.
23
24         * WebProcess/win/WebProcessWin.cpp:
25
26 2013-01-02  Carlos Garcia Campos  <cgarcia@igalia.com>
27
28         [WK2] Rename SetFrameInViewSourceMode to SetMainFrameInViewSourceMode
29         https://bugs.webkit.org/show_bug.cgi?id=105885
30
31         Reviewed by Martin Robinson.
32
33         This way we don't depend on a WebFrameProxy and
34         webkit_web_view_set_view_mode() works even if the main frame proxy
35         hasn't been created yet.
36
37         * UIProcess/API/gtk/WebKitWebView.cpp:
38         (webkit_web_view_set_view_mode): Call
39         WebPageProxy::setMainFrameInViewSourceMode() directly.
40         * UIProcess/WebFrameProxy.cpp:
41         (WebKit::WebFrameProxy::WebFrameProxy): Remove
42         setInViewSourceMode().
43         * UIProcess/WebFrameProxy.h:
44         (WebFrameProxy):
45         * UIProcess/WebPageProxy.cpp:
46         (WebKit::WebPageProxy::setMainFrameInViewSourceMode):
47         * UIProcess/WebPageProxy.h:
48         (WebPageProxy):
49         * WebProcess/WebPage/WebPage.cpp:
50         (WebKit::WebPage::setMainFrameInViewSourceMode):
51         * WebProcess/WebPage/WebPage.h:
52         (WebPage):
53         * WebProcess/WebPage/WebPage.messages.in:
54
55 2013-01-02  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
56
57         [Qt] Use WebPageGroup to create user scripts instead of Qt-specific function in WebPage
58         https://bugs.webkit.org/show_bug.cgi?id=105921
59
60         Reviewed by Simon Hausmann.
61
62         After r131281 the WebPageGroup.h (in UIProcess) exposes a way to add user scripts, so we can
63         use this directly to implement the user script functionality in Qt. The previous solution was
64         a Qt-port specific function in WebPage that can be removed now.
65
66         * UIProcess/API/qt/qquickwebview.cpp:
67         (QQuickWebViewPrivate::updateUserScripts): Use WebPageGroup functions to manipulate user scripts directly.
68         * UIProcess/WebPageProxy.h:
69         (WebPageProxy): Remove now unused function.
70         * UIProcess/qt/WebPageProxyQt.cpp: Ditto.
71         * WebProcess/WebPage/WebPage.messages.in: Ditto.
72         * WebProcess/WebPage/qt/WebPageQt.cpp: Remove now unused function and headers.
73
74 2013-01-02  Heikki Paajanen  <heikki.paajanen@palm.com>
75
76         [Qt][WK2] Add experimental API to find text from page
77         https://bugs.webkit.org/show_bug.cgi?id=96481
78
79         Reviewed by Jocelyn Turcotte.
80
81         Expose findString and PageFindClient provided functionality to QtQuick
82         applications.
83
84         * Target.pri:
85         * UIProcess/API/qt/qquickwebview.cpp:
86         (QQuickWebViewPrivate::initialize):
87         (QQuickWebViewExperimental::findText):
88         (QQuickWebViewPrivate::didFindString):
89         * UIProcess/API/qt/qquickwebview_p.h:
90         (WebKit):
91         * UIProcess/API/qt/qquickwebview_p_p.h:
92         (QQuickWebViewPrivate):
93         * UIProcess/API/qt/tests/qmltests/WebView/tst_findText.qml: Added.
94         * UIProcess/qt/QtWebPageFindClient.cpp: Added.
95         (WebKit):
96         (WebKit::QtWebPageFindClient::QtWebPageFindClient):
97         (WebKit::QtWebPageFindClient::didFindString):
98         (WebKit::toQtWebPageFindClient):
99         (WebKit::QtWebPageFindClient::didFailToFindString):
100         * UIProcess/qt/QtWebPageFindClient.h: Added.
101         (WebKit):
102         (QtWebPageFindClient):
103
104 2013-01-02  Christophe Dumez  <christophe.dumez@intel.com>
105
106         Regression(r138607): Causes crashes related to WebIconDatabase
107         https://bugs.webkit.org/show_bug.cgi?id=105909
108
109         Reviewed by Gyuyoung Kim.
110
111         Add back WebIconDatabase initialization statement
112         in WebContext constructor. It was removed in
113         r138607 and causing a lot of crashes on WebKit2.
114
115         * UIProcess/WebContext.cpp:
116         (WebKit::WebContext::WebContext):
117
118 2012-12-31  Sam Weinig  <sam@webkit.org>
119
120         Convert more classes to be WebContextSupplements
121         https://bugs.webkit.org/show_bug.cgi?id=105890
122
123         Reviewed by Dan Bernstein.
124
125         * UIProcess/API/C/WKContext.cpp:
126         (WKContextGetCookieManager):
127         (WKContextGetDatabaseManager):
128         (WKContextGetGeolocationManager):
129         (WKContextGetKeyValueStorageManager):
130         (WKContextGetMediaCacheManager):
131         (WKContextGetNotificationManager):
132         (WKContextGetResourceCacheManager):
133         * UIProcess/API/efl/ewk_context.cpp:
134         (EwkContext::cookieManager):
135         (EwkContext::clearResourceCache):
136         * UIProcess/API/efl/ewk_database_manager_private.h:
137         (EwkDatabaseManager::create):
138         * UIProcess/API/efl/ewk_storage_manager_private.h:
139         (EwkStorageManager::create):
140         * UIProcess/API/gtk/WebKitWebContext.cpp:
141         (createDefaultWebContext):
142         (webkit_web_context_clear_cache):
143         (webkit_web_context_get_cookie_manager):
144         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
145         (WebKit::WebNotificationManagerProxy::supplementName):
146         (WebKit):
147         (WebKit::WebNotificationManagerProxy::WebNotificationManagerProxy):
148         (WebKit::WebNotificationManagerProxy::initializeProvider):
149         (WebKit::WebNotificationManagerProxy::contextDestroyed):
150         (WebKit::WebNotificationManagerProxy::processDidClose):
151         (WebKit::WebNotificationManagerProxy::refWebContextSupplement):
152         (WebKit::WebNotificationManagerProxy::derefWebContextSupplement):
153         (WebKit::WebNotificationManagerProxy::didReceiveMessage):
154         (WebKit::WebNotificationManagerProxy::providerDidShowNotification):
155         (WebKit::WebNotificationManagerProxy::providerDidClickNotification):
156         (WebKit::WebNotificationManagerProxy::providerDidCloseNotifications):
157         (WebKit::WebNotificationManagerProxy::providerDidUpdateNotificationPolicy):
158         (WebKit::WebNotificationManagerProxy::providerDidRemoveNotificationPolicies):
159         * UIProcess/Notifications/WebNotificationManagerProxy.h:
160         (WebNotificationManagerProxy):
161         * UIProcess/WebContext.cpp:
162         (WebKit::WebContext::WebContext):
163         (WebKit::WebContext::~WebContext):
164         (WebKit::WebContext::removeNetworkProcessProxy):
165         (WebKit::WebContext::createNewWebProcess):
166         (WebKit::WebContext::shouldTerminate):
167         (WebKit::WebContext::disconnectProcess):
168         * UIProcess/WebContext.h:
169         (WebKit):
170         (WebContext):
171         (WebKit::WebContext::iconDatabase):
172         * UIProcess/WebContextSupplement.h:
173         (WebKit):
174         (WebKit::WebContextSupplement::contextDestroyed):
175         (WebKit::WebContextSupplement::processDidClose):
176         (WebContextSupplement):
177         (WebKit::WebContextSupplement::shouldTerminate):
178         (WebKit::WebContextSupplement::ref):
179         (WebKit::WebContextSupplement::deref):
180         * UIProcess/WebCookieManagerProxy.cpp:
181         (WebKit::WebCookieManagerProxy::supplementName):
182         (WebKit):
183         (WebKit::WebCookieManagerProxy::WebCookieManagerProxy):
184         (WebKit::WebCookieManagerProxy::initializeClient):
185         (WebKit::WebCookieManagerProxy::contextDestroyed):
186         (WebKit::WebCookieManagerProxy::processDidClose):
187         (WebKit::WebCookieManagerProxy::shouldTerminate):
188         (WebKit::WebCookieManagerProxy::refWebContextSupplement):
189         (WebKit::WebCookieManagerProxy::derefWebContextSupplement):
190         (WebKit::WebCookieManagerProxy::getHostnamesWithCookies):
191         (WebKit::WebCookieManagerProxy::deleteCookiesForHostname):
192         (WebKit::WebCookieManagerProxy::deleteAllCookies):
193         (WebKit::WebCookieManagerProxy::startObservingCookieChanges):
194         (WebKit::WebCookieManagerProxy::stopObservingCookieChanges):
195         (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy):
196         (WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
197         * UIProcess/WebCookieManagerProxy.h:
198         (WebCookieManagerProxy):
199         * UIProcess/WebDatabaseManagerProxy.cpp:
200         (WebKit::WebDatabaseManagerProxy::supplementName):
201         (WebKit):
202         (WebKit::WebDatabaseManagerProxy::WebDatabaseManagerProxy):
203         (WebKit::WebDatabaseManagerProxy::initializeClient):
204         (WebKit::WebDatabaseManagerProxy::contextDestroyed):
205         (WebKit::WebDatabaseManagerProxy::processDidClose):
206         (WebKit::WebDatabaseManagerProxy::refWebContextSupplement):
207         (WebKit::WebDatabaseManagerProxy::derefWebContextSupplement):
208         (WebKit::WebDatabaseManagerProxy::didReceiveMessage):
209         (WebKit::WebDatabaseManagerProxy::getDatabasesByOrigin):
210         (WebKit::WebDatabaseManagerProxy::getDatabaseOrigins):
211         (WebKit::WebDatabaseManagerProxy::deleteDatabaseWithNameForOrigin):
212         (WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin):
213         (WebKit::WebDatabaseManagerProxy::deleteAllDatabases):
214         (WebKit::WebDatabaseManagerProxy::setQuotaForOrigin):
215         * UIProcess/WebDatabaseManagerProxy.h:
216         (WebDatabaseManagerProxy):
217         * UIProcess/WebGeolocationManagerProxy.cpp:
218         (WebKit::WebGeolocationManagerProxy::supplementName):
219         (WebKit):
220         (WebKit::WebGeolocationManagerProxy::WebGeolocationManagerProxy):
221         (WebKit::WebGeolocationManagerProxy::initializeProvider):
222         (WebKit::WebGeolocationManagerProxy::contextDestroyed):
223         (WebKit::WebGeolocationManagerProxy::processDidClose):
224         (WebKit::WebGeolocationManagerProxy::refWebContextSupplement):
225         (WebKit::WebGeolocationManagerProxy::derefWebContextSupplement):
226         (WebKit::WebGeolocationManagerProxy::didReceiveMessage):
227         (WebKit::WebGeolocationManagerProxy::providerDidChangePosition):
228         (WebKit::WebGeolocationManagerProxy::providerDidFailToDeterminePosition):
229         * UIProcess/WebGeolocationManagerProxy.h:
230         (WebGeolocationManagerProxy):
231         * UIProcess/WebKeyValueStorageManagerProxy.cpp:
232         (WebKit::WebKeyValueStorageManagerProxy::supplementName):
233         (WebKit):
234         (WebKit::WebKeyValueStorageManagerProxy::WebKeyValueStorageManagerProxy):
235         (WebKit::WebKeyValueStorageManagerProxy::contextDestroyed):
236         (WebKit::WebKeyValueStorageManagerProxy::processDidClose):
237         (WebKit::WebKeyValueStorageManagerProxy::refWebContextSupplement):
238         (WebKit::WebKeyValueStorageManagerProxy::derefWebContextSupplement):
239         (WebKit::WebKeyValueStorageManagerProxy::getKeyValueStorageOrigins):
240         (WebKit::WebKeyValueStorageManagerProxy::deleteEntriesForOrigin):
241         (WebKit::WebKeyValueStorageManagerProxy::deleteAllEntries):
242         * UIProcess/WebKeyValueStorageManagerProxy.h:
243         (WebKeyValueStorageManagerProxy):
244         * UIProcess/WebMediaCacheManagerProxy.cpp:
245         (WebKit::WebMediaCacheManagerProxy::supplementName):
246         (WebKit):
247         (WebKit::WebMediaCacheManagerProxy::WebMediaCacheManagerProxy):
248         (WebKit::WebMediaCacheManagerProxy::contextDestroyed):
249         (WebKit::WebMediaCacheManagerProxy::processDidClose):
250         (WebKit::WebMediaCacheManagerProxy::refWebContextSupplement):
251         (WebKit::WebMediaCacheManagerProxy::derefWebContextSupplement):
252         (WebKit::WebMediaCacheManagerProxy::getHostnamesWithMediaCache):
253         (WebKit::WebMediaCacheManagerProxy::clearCacheForHostname):
254         (WebKit::WebMediaCacheManagerProxy::clearCacheForAllHostnames):
255         * UIProcess/WebMediaCacheManagerProxy.h:
256         (WebMediaCacheManagerProxy):
257         * UIProcess/WebPageProxy.cpp:
258         (WebKit::WebPageProxy::showNotification):
259         * UIProcess/WebResourceCacheManagerProxy.cpp:
260         (WebKit::WebResourceCacheManagerProxy::supplementName):
261         (WebKit):
262         (WebKit::WebResourceCacheManagerProxy::WebResourceCacheManagerProxy):
263         (WebKit::WebResourceCacheManagerProxy::contextDestroyed):
264         (WebKit::WebResourceCacheManagerProxy::processDidClose):
265         (WebKit::WebResourceCacheManagerProxy::refWebContextSupplement):
266         (WebKit::WebResourceCacheManagerProxy::derefWebContextSupplement):
267         (WebKit::WebResourceCacheManagerProxy::didReceiveMessage):
268         (WebKit::WebResourceCacheManagerProxy::getCacheOrigins):
269         (WebKit::WebResourceCacheManagerProxy::clearCacheForOrigin):
270         (WebKit::WebResourceCacheManagerProxy::clearCacheForAllOrigins):
271         * UIProcess/WebResourceCacheManagerProxy.h:
272         (WebResourceCacheManagerProxy):
273         * UIProcess/efl/WebContextEfl.cpp:
274         (WebKit::WebContext::platformInitializeWebProcess):
275         * UIProcess/gtk/WebContextGtk.cpp:
276         (WebKit::WebContext::platformInitializeWebProcess):
277         * UIProcess/qt/WebContextQt.cpp:
278         (WebKit::WebContext::platformInitializeWebProcess):
279
280 2013-01-01  Dan Bernstein  <mitz@apple.com>
281
282         <rdar://problem/12942239> Update copyright strings
283
284         Reviewed by Sam Weinig.
285
286         * Info.plist:
287         * NetworkProcess/Info.plist:
288         * PluginProcess/Info.plist:
289         * SharedWorkerProcess/Info.plist:
290         * WebProcess/Info.plist:
291         * WebProcessService/Info.plist:
292         * WebProcessServiceForWebKitDevelopment/Info.plist:
293
294 2013-01-01  KwangYong Choi  <ky0.choi@samsung.com>
295
296         [EFL] Enable MHTML feature
297         https://bugs.webkit.org/show_bug.cgi?id=105815
298
299         Reviewed by Laszlo Gombos.
300
301         Add missing include directory for ENABLE_MHTML.
302
303         * CMakeLists.txt:
304
305 2012-12-30  Sam Weinig  <sam@webkit.org>
306
307         Add supplementability for WebContext
308         https://bugs.webkit.org/show_bug.cgi?id=105878
309
310         Reviewed by Dan Bernstein.
311
312         Add WebContextSupplement and convert WebApplicationCacheManagerProxy to it.
313
314         * UIProcess/API/C/WKContext.cpp:
315         (WKContextGetApplicationCacheManager):
316         * UIProcess/WebApplicationCacheManagerProxy.cpp:
317         (WebKit::WebApplicationCacheManagerProxy::supplementName):
318         (WebKit::WebApplicationCacheManagerProxy::WebApplicationCacheManagerProxy):
319         (WebKit::WebApplicationCacheManagerProxy::contextDestroyed):
320         (WebKit::WebApplicationCacheManagerProxy::processDidClose):
321         (WebKit::WebApplicationCacheManagerProxy::refWebContextSupplement):
322         (WebKit::WebApplicationCacheManagerProxy::derefWebContextSupplement):
323         (WebKit::WebApplicationCacheManagerProxy::getApplicationCacheOrigins):
324         (WebKit::WebApplicationCacheManagerProxy::deleteEntriesForOrigin):
325         (WebKit::WebApplicationCacheManagerProxy::deleteAllEntries):
326         * UIProcess/WebApplicationCacheManagerProxy.h:
327         (WebApplicationCacheManagerProxy):
328         * UIProcess/WebContext.cpp:
329         (WebKit::WebContext::WebContext):
330         (WebKit::WebContext::~WebContext):
331         (WebKit::WebContext::shouldTerminate):
332         (WebKit::WebContext::disconnectProcess):
333         * UIProcess/WebContext.h:
334         (WebKit::WebContext::supplement):
335         (WebKit::WebContext::addSupplement):
336         * UIProcess/WebContextSupplement.h: Added.
337         (WebKit::WebContextSupplement::WebContextSupplement):
338         (WebKit::WebContextSupplement::~WebContextSupplement):
339         (WebKit::WebContextSupplement::ref):
340         (WebKit::WebContextSupplement::deref):
341         (WebKit::WebContextSupplement::context):
342         (WebKit::WebContextSupplement::clearContext):
343         * WebKit2.xcodeproj/project.pbxproj:
344
345 2012-12-31  Christophe Dumez  <christophe.dumez@intel.com>
346
347         [EFL[WK2] Regression(r138574): Should not allocate memory in the fork
348         https://bugs.webkit.org/show_bug.cgi?id=105868
349
350         Reviewed by Kenneth Rohde Christiansen.
351
352         Store prefixed executable path in a CString before the fork to
353         avoid allocating memory in the fork by calling String::utf8().
354         Allocating memory in the fork may lead to deadlocks due to
355         FastMalloc and the fork not inheriting the threads.
356
357         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
358         (WebKit::ProcessLauncher::launchProcess):
359
360 2012-12-31  Carlos Garcia Campos  <cgarcia@igalia.com>
361
362         [GTK] Add API to set a WebKitWebView in view source mode to WebKit2
363         https://bugs.webkit.org/show_bug.cgi?id=99315
364
365         Reviewed by Martin Robinson.
366
367         Add a generic API to set/get a view mode. For now there are only
368         two modes, Web and Source, but the API can be extended if we
369         eventually support other view modes like Printing for example.
370
371         * UIProcess/API/gtk/WebKitWebView.cpp:
372         (webkitWebViewSetProperty): Implement setter for view-mode
373         property.
374         (webkitWebViewGetProperty): Implement getter for view-mode
375         property.
376         (webkit_web_view_class_init): Add view-source property.
377         (webkit_web_view_set_view_mode): Public method to set the view
378         mode.
379         (webkit_web_view_get_view_mode): Public method to get the view
380         mode.
381         * UIProcess/API/gtk/WebKitWebView.h: Add WebKitViewMode enum.
382         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
383         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
384         (testWebViewMode):
385         (beforeAll):
386         * UIProcess/WebFrameProxy.cpp:
387         (WebKit::WebFrameProxy::WebFrameProxy): Initialize
388         m_inViewSourceMode.
389         (WebKit::WebFrameProxy::setInViewSourceMode): Set
390         m_inViewSourceMode if it has changed and call
391         WebPageProxy::setFrameInViewSourceMode() to notify the WebProcess.
392         * UIProcess/WebFrameProxy.h:
393         (WebKit::WebFrameProxy::inViewSourceMode): Return whether the
394         frame is currently in view source mode.
395         * UIProcess/WebPageProxy.cpp:
396         (WebKit::WebPageProxy::setFrameInViewSourceMode): Send a message
397         to the WebProcess to set the given frame in view source mode or not.
398         * UIProcess/WebPageProxy.h:
399         (WebPageProxy): Add setFrameInViewSourceMode().
400         * WebProcess/WebPage/WebPage.cpp:
401         (WebKit::WebPage::setFrameInViewSourceMode): Call
402         setInViewSourceMode for the main frame.
403         * WebProcess/WebPage/WebPage.h:
404         (WebPage): Add setFrameInViewSourceMode().
405         * WebProcess/WebPage/WebPage.messages.in: Add new message
406         SetFrameInViewSourceMode.
407
408 2012-12-30  Christophe Dumez  <christophe.dumez@intel.com>
409
410         [EFL][WK2] Invalid use of temporary object in ProcessLauncher::launchProcess()
411         https://bugs.webkit.org/show_bug.cgi?id=105867
412
413         Reviewed by Kenneth Rohde Christiansen.
414
415         Fix invalid use of temporary object in ProcessLauncher::launchProcess()
416         for prefixedExecutablePath.
417
418         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
419         (WebKit::ProcessLauncher::launchProcess):
420
421 2012-12-29  Sam Weinig  <sam@webkit.org>
422
423         Windows build fix.
424
425         * win/WebKit2Common.vsprops:
426
427 2012-12-29  Sam Weinig  <sam@webkit.org>
428
429         Add supplementability to the NetworkProcess
430         https://bugs.webkit.org/show_bug.cgi?id=105838
431
432         Reviewed by Dan Bernstein.
433
434         This patch adds a NetworkProcessSupplement, which is almost identical to
435         WebProcessSupplement, but has a different initialization override. It also
436         stops WebProcessSupplement from inheriting from MessageReceiver (and makes
437         everything that is a WebProcessSupplement also a MessageReceiver) as keeping
438         that would cause classes that need to be both WebProcessSupplements and
439         NetworkProcessSupplements inherit from MessageReceiver twice.
440
441         * GNUmakefile.list.am:
442         * NetworkProcess/NetworkProcess.cpp:
443         (WebKit::NetworkProcess::NetworkProcess):
444         (WebKit::NetworkProcess::downloadsAuthenticationManager):
445         (WebKit::NetworkProcess::initializeNetworkProcess):
446         * NetworkProcess/NetworkProcess.h:
447         (WebKit):
448         (NetworkProcess):
449         (WebKit::NetworkProcess::supplement):
450         (WebKit::NetworkProcess::addSupplement):
451         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
452         (CustomProtocolManager):
453         * Shared/Network/NetworkProcessSupplement.h: Added.
454         (WebKit):
455         (NetworkProcessSupplement):
456         (WebKit::NetworkProcessSupplement::~NetworkProcessSupplement):
457         (WebKit::NetworkProcessSupplement::initialize):
458         * Target.pri:
459         * WebKit2.xcodeproj/project.pbxproj:
460         * WebProcess/ApplicationCache/WebApplicationCacheManager.h:
461         * WebProcess/Authentication/AuthenticationManager.h:
462         * WebProcess/Cookies/WebCookieManager.h:
463         * WebProcess/Geolocation/WebGeolocationManager.h:
464         * WebProcess/KeyValueStorage/WebKeyValueStorageManager.h:
465         * WebProcess/MediaCache/WebMediaCacheManager.h:
466         * WebProcess/Notifications/WebNotificationManager.h:
467         * WebProcess/ResourceCache/WebResourceCacheManager.h:
468         * WebProcess/WebCoreSupport/WebDatabaseManager.h:
469         * WebProcess/WebProcessSupplement.h:
470         * win/WebKit2.vcproj:
471
472 2012-12-28  Ryuan Choi  <ryuan.choi@samsung.com>
473
474         [EFL][WK2] MiniBrowser could not be launched on specific machine
475         https://bugs.webkit.org/show_bug.cgi?id=105844
476
477         Reviewed by Gyuyoung Kim.
478
479         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
480         (WebKit::ProcessLauncher::launchProcess):
481         Modified to avoid bad use of temporary object.
482
483 2012-12-28  Joone Hur  <joone.hur@intel.com>
484
485         [EFL][WK2] Implement ewk_context_resource_cache_clear
486         https://bugs.webkit.org/show_bug.cgi?id=104782
487
488         The purpose of this API is to clear HTTP caches in local storage and 
489         all resources cached in memory such as images, CSS, JavaScript, XSL, 
490         and fonts.
491
492         Reviewed by Kenneth Rohde Christiansen.
493
494         * UIProcess/API/efl/ewk_context.cpp:
495         (EwkContext::clearResourceCache): Call WebResourceCacheManager::ClearCacheForAllOrigins.
496         (ewk_context_resource_cache_clear):
497         * UIProcess/API/efl/ewk_context.h: Add ewk_context_resource_cache_clear. 
498         * UIProcess/API/efl/ewk_context_private.h:
499         (EwkContext):
500
501 2012-12-28  Mark Rowe  <mrowe@apple.com>
502
503         Move logic for extracting the OS X marketing version in to WebCore
504         <http://webkit.org/b/105841> / <rdar://problem/10736041>
505
506         Reviewed by Dan Bernstein.
507
508         * UIProcess/mac/WebPageProxyMac.mm:
509         (WebKit::systemMarketingVersionForUserAgentString): Call the WebCore function instead
510         of the WKSI function.
511         (WebKit::WebPageProxy::standardUserAgent):
512         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
513         (InitWebCoreSystemInterface): Remove the code related to the WKSI symbol.
514
515 2012-12-28  Sam Weinig  <sam@webkit.org>
516
517         Fix assert seen when adding a custom protocol handler before an initial
518         web process has been created.
519
520         * UIProcess/WebContext.h:
521         (WebKit::WebContext::sendToNetworkingProcess):
522
523 2012-12-28  Martin Robinson  <mrobinson@igalia.com>
524
525         [GTK][WK2] Add support for IME Composition
526         https://bugs.webkit.org/show_bug.cgi?id=65093
527
528         Reviewed by Carlos Garcia Campos.
529
530         Add a WebKit2 implementation of the GtkInputMethodFilter and provide
531         the necessary plumbing to pass composition information along with
532         input method events.
533
534         * GNUmakefile.list.am: Add new files to the source list.
535         * Shared/EditorState.cpp: The cursorRect is now passed for GTK+ as well as
536         Qt, so update the encode and decode methods to pass that along.
537         * Shared/EditorState.h: Add the cursorRect member for GTK+ as well.
538         * Shared/NativeWebKeyboardEvent.h:
539         (NativeWebKeyboardEvent): Keyboard events should also have knowledge of
540         the compositionResults and whether or not the event was faked for composition
541         purposes.
542         * Shared/gtk/NativeWebKeyboardEventGtk.cpp: Ditto.
543         * Shared/gtk/WebEventFactory.cpp:
544         (WebKit::WebEventFactory::createWebKeyboardEvent): Copy the logic of PlatformKeyEvent,
545         for properly setting the windows key code and the event text from the composition
546         results.
547         * Shared/gtk/WebEventFactory.h: The createWebKeyboardEvent factory now takes a
548         CompositionResults argument.
549         * UIProcess/API/gtk/PageClientImpl.cpp:
550         (WebKit::PageClientImpl::doneWithKeyEvent): Don't forward keyboard events that
551         were faked for composition reasons. These events originated from WebKit and should
552         never be passed to parent classes.
553         (WebKit::PageClientImpl::updateTextInputState): Plumb through the updateTextInputState
554         method to the WebViewBase.
555         * UIProcess/API/gtk/PageClientImpl.h:
556         (PageClientImpl): Add a updateTextInputState method.
557         * UIProcess/API/gtk/WebKitWebViewBase.cpp: 
558         (_WebKitWebViewBasePrivate): Instead of having an input method context as a member
559         keep a WebViewBaseInputMethodFilter.
560         (webkitWebViewBaseRealize): Set the filter widget when the WebViewBase is realized.
561         (webkit_web_view_base_init): No longer create a input method context during init.
562         (webkitWebViewBaseFocusInEvent): Pass along focus in events to the filter.
563         (webkitWebViewBaseFocusOutEvent): Pass along focus out events to the filter.
564         (webkitWebViewBaseKeyPressEvent): Instead of passing key presses directly to the WebProcess,
565         filter them through the input method filter.
566         (webkitWebViewBaseKeyReleaseEvent): Ditto.
567         (webkitWebViewBaseButtonPressEvent): Notify the input method filter about button press events.
568         (webkitWebViewBaseGetIMContext): The input method filter owns the input method now.
569         (webkitWebViewBaseSetInputMethodState): Add a bit of plumbing for the PageClient.
570         (webkitWebViewBaseUpdateTextInputState): Ditto.
571         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: Add plumbing declarations.
572         * UIProcess/API/gtk/WebViewBaseInputMethodFilter.cpp: Added. An implementation of GtkInputMethodFilter for WebKit2.
573         * UIProcess/API/gtk/WebViewBaseInputMethodFilter.h: Copied from Source/WebKit/gtk/WebCoreSupport/WebViewInputMethodFilter.h.
574         * UIProcess/PageClient.h:
575         (PageClient): updateInputMethod state is now for both Qt and GTK+.
576         * UIProcess/WebPageProxy.cpp:
577         (WebKit::WebPageProxy::editorStateChanged): Pass the editor state for GTK+ as well as Qt.
578         (WebKit::WebPageProxy::setComposition): Moved this method from WebPageProxyQt as it's used for GTK+ now as well.
579         (WebKit::WebPageProxy::confirmComposition): Ditto.
580         (WebKit::WebPageProxy::cancelComposition): Ditto.
581         * UIProcess/WebPageProxy.h:
582         (WebPageProxy): The setInputMethodState message is for GTK+ as well as Qt now.
583         * UIProcess/WebPageProxy.messages.in: Ditto.
584         * UIProcess/gtk/WebPageProxyGtk.cpp:
585         (WebKit::WebPageProxy::setInputMethodState): Ditto.
586         * UIProcess/qt/WebPageProxyQt.cpp: Move some methods to the platform-independent file.
587         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: More closely match the WebKit1
588         logic for dealing with key events so that composition events will be handled properly.
589         * WebProcess/WebPage/WebPage.cpp:
590         (WebKit::WebPage::editorState): Properly pass the cursorRect for GTK+.
591         (WebKit::targetFrameForEditing): Moved from the Qt file, because its used by GTK+ as well. They
592         now pass along the updated EditorState as well, just like the Mac versions.
593         (WebKit::WebPage::confirmComposition): Ditto.
594         (WebKit::WebPage::setComposition): Ditto.
595         (WebKit::WebPage::cancelComposition): Ditto.
596         * WebProcess/WebPage/WebPage.h: The above messages are now for GTK+ as well as Qt.
597         * WebProcess/WebPage/WebPage.messages.in: Ditto.
598         * WebProcess/WebPage/qt/WebPageQt.cpp: Moved some methods to the platform-independent file.
599
600 2012-12-28  Sam Weinig  <sam@webkit.org>
601
602         Appease the Windows Gods.
603
604         * WebProcess/Notifications/WebNotificationManager.cpp:
605
606 2012-12-27  Sam Weinig  <sam@webkit.org>
607
608         Make CustomProtocolManager a WebProcessSupplement
609         https://bugs.webkit.org/show_bug.cgi?id=105814
610
611         Reviewed by Dan Bernstein.
612
613         This converts CustomProtocolManager from a global singleton, to be a
614         supplement of the WebProcess. Since it also needs to act as a supplement
615         of the NetworkProcess, it adds an initialization function for the NetworkProcess
616         as well, while we await the arrival of the forthcoming NetworkProcessSupplement.
617         
618         In addition, this moves the handling of registering and unregistering schemes
619         directly to the CustomProtocolManager, instead of requiring an unnecessary trip
620         in the ChildProcess.
621
622         * NetworkProcess/NetworkProcess.cpp:
623         (WebKit::NetworkProcess::NetworkProcess):
624         (WebKit::NetworkProcess::initializeNetworkProcess):
625         * NetworkProcess/NetworkProcess.h:
626         * NetworkProcess/NetworkProcess.messages.in:
627         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
628         (CustomProtocolManager):
629         * Shared/Network/CustomProtocols/CustomProtocolManager.messages.in:
630         * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
631         (+[WKCustomProtocol canInitWithRequest:]):
632         (-[WKCustomProtocol initWithRequest:cachedResponse:client:]):
633         (-[WKCustomProtocol startLoading]):
634         (-[WKCustomProtocol stopLoading]):
635         (WebKit::CustomProtocolManager::supplementName):
636         (WebKit::CustomProtocolManager::CustomProtocolManager):
637         (WebKit::CustomProtocolManager::initialize):
638         * UIProcess/WebContext.cpp:
639         (WebKit::WebContext::registerSchemeForCustomProtocol):
640         (WebKit::WebContext::unregisterSchemeForCustomProtocol):
641         * WebProcess/WebProcess.cpp:
642         (WebKit::WebProcess::WebProcess):
643         (WebKit::WebProcess::initializeWebProcess):
644         * WebProcess/WebProcess.h:
645         * WebProcess/WebProcess.messages.in:
646
647 2012-12-27  Sam Weinig  <sam@webkit.org>
648
649         Convert a few other WebProcess managers to be WebProcessSupplements
650         https://bugs.webkit.org/show_bug.cgi?id=105812
651
652         Reviewed by Dan Bernstein.
653
654         * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
655         (WebKit::WebApplicationCacheManager::supplementName):
656         * WebProcess/ApplicationCache/WebApplicationCacheManager.h:
657         (WebApplicationCacheManager):
658         * WebProcess/Authentication/AuthenticationManager.cpp:
659         (WebKit::AuthenticationManager::supplementName):
660         * WebProcess/Authentication/AuthenticationManager.h:
661         (AuthenticationManager):
662         * WebProcess/Cookies/WebCookieManager.cpp:
663         (WebKit::WebCookieManager::supplementName):
664         * WebProcess/Cookies/WebCookieManager.h:
665         (WebCookieManager):
666         * WebProcess/Geolocation/WebGeolocationManager.cpp:
667         (WebKit::WebGeolocationManager::supplementName):
668         * WebProcess/Geolocation/WebGeolocationManager.h:
669         (WebGeolocationManager):
670         * WebProcess/InjectedBundle/InjectedBundle.cpp:
671         (WebKit::InjectedBundle::setAlwaysAcceptCookies):
672         (WebKit::InjectedBundle::clearApplicationCache):
673         (WebKit::InjectedBundle::setAppCacheMaximumSize):
674         (WebKit::InjectedBundle::webNotificationID):
675         * WebProcess/MediaCache/WebMediaCacheManager.cpp:
676         (WebKit::WebMediaCacheManager::supplementName):
677         * WebProcess/MediaCache/WebMediaCacheManager.h:
678         (WebMediaCacheManager):
679         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
680         (WebKit::NotificationPermissionRequestManager::permissionLevel):
681         (WebKit::NotificationPermissionRequestManager::setPermissionLevelForTesting):
682         (WebKit::NotificationPermissionRequestManager::removeAllPermissionsForTesting):
683         (WebKit::NotificationPermissionRequestManager::didReceiveNotificationPermissionDecision):
684         * WebProcess/Notifications/WebNotificationManager.cpp:
685         (WebKit::WebNotificationManager::supplementName):
686         (WebKit::WebNotificationManager::initialize):
687         * WebProcess/Notifications/WebNotificationManager.h:
688         (WebNotificationManager):
689         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
690         (WebKit::WebResourceCacheManager::supplementName):
691         * WebProcess/ResourceCache/WebResourceCacheManager.h:
692         (WebResourceCacheManager):
693         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
694         (WebKit::WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
695         * WebProcess/WebCoreSupport/WebGeolocationClient.cpp:
696         (WebKit::WebGeolocationClient::geolocationDestroyed):
697         (WebKit::WebGeolocationClient::startUpdating):
698         (WebKit::WebGeolocationClient::stopUpdating):
699         * WebProcess/WebCoreSupport/WebNotificationClient.cpp:
700         (WebKit::WebNotificationClient::show):
701         (WebKit::WebNotificationClient::cancel):
702         (WebKit::WebNotificationClient::clearNotifications):
703         (WebKit::WebNotificationClient::notificationObjectDestroyed):
704         * WebProcess/WebProcess.cpp:
705         (WebKit::WebProcess::WebProcess):
706         (WebKit::WebProcess::downloadsAuthenticationManager):
707         * WebProcess/WebProcess.h:
708         (WebKit::WebProcess::textCheckerState):
709         (WebKit::WebProcess::networkAccessManager):
710         (WebKit::WebProcess::soupRequestManager):
711         * WebProcess/mac/WebProcessMac.mm:
712         (WebKit::WebProcess::platformInitializeWebProcess):
713         * WebProcess/soup/WebProcessSoup.cpp:
714         (WebKit::WebProcess::platformInitializeWebProcess):
715         * WebProcess/win/WebProcessWin.cpp:
716         (WebKit::WebProcess::platformInitializeWebProcess):
717
718 2012-12-27  Viatcheslav Ostapenko  <sl.ostapenko@samsung.com>
719
720         [EFL][WK2] Regression(138462) Sometimes garbage in snapshots
721         https://bugs.webkit.org/show_bug.cgi?id=105803
722
723         Reviewed by Kenneth Rohde Christiansen.
724
725         Instead of creating temporary buffer and then creating cairo surface
726         from it, create cairo surface 1st and use surface image internal buffer
727         to read pixels from GL buffer. 
728
729         * UIProcess/API/efl/EwkViewImpl.cpp:
730         (EwkViewImpl::takeSnapshot):
731         * UIProcess/API/efl/SnapshotImageGL.cpp:
732         (getImageSurfaceFromFrameBuffer):
733         * UIProcess/API/efl/SnapshotImageGL.h:
734
735 2012-12-27  Sam Weinig  <sam@webkit.org>
736
737         Actually make use of the WebProcessSupplements by adding a supplement map to WebProcess
738         https://bugs.webkit.org/show_bug.cgi?id=105804
739
740         Reviewed by Dan Bernstein.
741
742         This continues the work of adding extensibility to WebProcess by adding a supplement
743         map, and using it as proof of concept for WebDatabaseManager and WebKeyValueStorageManager.
744
745         - A supplement is added to WebProcess by calling:
746             process->addSupplement<SupplementFoo>();
747         - A supplement can be used accessed by calling:
748             process->supplement<SupplementFoo>();
749
750         * WebProcess/InjectedBundle/InjectedBundle.cpp:
751         (WebKit::InjectedBundle::clearAllDatabases):
752         (WebKit::InjectedBundle::setDatabaseQuota):
753         * WebProcess/WebPage/WebPage.cpp:
754         (WebKit::WebPage::updatePreferences):
755         Switch to using the new supplement accessor.
756
757         * WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp:
758         (WebKit::WebKeyValueStorageManager::supplementName):
759         * WebProcess/KeyValueStorage/WebKeyValueStorageManager.h:
760         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
761         (WebKit::WebDatabaseManager::supplementName):
762         * WebProcess/WebCoreSupport/WebDatabaseManager.h:
763         Add static supplementName functions. We might want to merge this with
764         the message class name, but for now we have both. 
765
766         * WebProcess/WebProcess.cpp:
767         (WebKit::WebProcess::WebProcess):
768         Add supplements the new way. This should eventually move to the caller
769         of WebProcess::initialize, so that we can reduce #ifdefs and ports have
770         a chance to customize.
771         
772         (WebKit::WebProcess::initializeWebProcess):
773         Iterate the supplements to give each a chance to initialize.
774
775         * WebProcess/WebProcess.h:
776         (WebKit::WebProcess::supplement):
777         (WebKit::WebProcess::addSupplement):
778         Add functions to add and get WebProcessSupplements.
779
780 2012-12-26  Sam Weinig  <sam@webkit.org>
781
782         Add an initial stab at a generic supplemental interface for WebProcess
783         https://bugs.webkit.org/show_bug.cgi?id=105779
784
785         Reviewed by Darin Adler.
786
787         This starts the process of adding a mechanism to WebProcess to extend its
788         functionality without actually changing it (similar to the Supplement
789         mechanism in WebCore). This will make it possible for ports to add functionality
790         that might not be needed or wanted by other ports.
791
792         * WebKit2.xcodeproj/project.pbxproj:
793         * WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp:
794         (WebKit::WebKeyValueStorageManager::initialize):
795         (WebKit):
796         * WebProcess/KeyValueStorage/WebKeyValueStorageManager.h:
797         (WebKeyValueStorageManager):
798         (WebKit::WebKeyValueStorageManager::localStorageDirectory):
799         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
800         (WebKit::WebDatabaseManager::WebDatabaseManager):
801         (WebKit::WebDatabaseManager::initialize):
802         * WebProcess/WebCoreSupport/WebDatabaseManager.h:
803         (WebDatabaseManager):
804         * WebProcess/WebPage/WebPage.cpp:
805         (WebKit::WebPage::updatePreferences):
806         * WebProcess/WebProcess.cpp:
807         (WebKit::WebProcess::initializeWebProcess):
808         (WebKit::WebProcess::keyValueStorageManager):
809         (WebKit):
810         * WebProcess/WebProcess.h:
811         (WebProcess):
812         * WebProcess/WebProcessSupplement.h: Added.
813         (WebKit):
814         (WebProcessSupplement):
815         (WebKit::WebProcessSupplement::~WebProcessSupplement):
816         (WebKit::WebProcessSupplement::initialize):
817
818 2012-12-27  Christophe Dumez  <christophe.dumez@intel.com>
819
820         [EFL][WK2] Regression(135935) layout tests snapshots are flaky
821         https://bugs.webkit.org/show_bug.cgi?id=103468
822
823         Reviewed by Kenneth Rohde Christiansen.
824
825         Make sure that we wait for pending repaints before taking a
826         snapshot to avoid flakiness in pixel / ref tests. We also
827         suspend all animations before taking the snapshot to make
828         sure we don't wait forever for repaint events to be processed.
829
830         * UIProcess/API/efl/EwkViewImpl.cpp:
831         (EwkViewImpl::takeSnapshot):
832
833 2012-12-26  Csaba Osztrogonác  <ossy@webkit.org>
834
835         Unreviewed Xmas buildfix after r138479.
836
837         * WebProcess/MediaCache/WebMediaCacheManager.h:
838
839 2012-12-25  Sam Weinig  <sam@webkit.org>
840
841         Convert WebKeyValueStorageManager and WebMediaCacheManager to MessageReceiver
842         https://bugs.webkit.org/show_bug.cgi?id=105751
843
844         Reviewed by Andreas Kling.
845
846         * WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp:
847         (WebKit::WebKeyValueStorageManager::WebKeyValueStorageManager):
848         (WebKit::WebKeyValueStorageManager::dispatchDidGetKeyValueStorageOrigins):
849         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
850         (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
851         (WebKit::WebKeyValueStorageManager::deleteAllEntries):
852         * WebProcess/KeyValueStorage/WebKeyValueStorageManager.h:
853         (WebKeyValueStorageManager): Remove unused m_originsLoaded member variable.
854         * WebProcess/MediaCache/WebMediaCacheManager.cpp:
855         (WebKit::WebMediaCacheManager::WebMediaCacheManager):
856         (WebKit::WebMediaCacheManager::getHostnamesWithMediaCache):
857         (WebKit::WebMediaCacheManager::clearCacheForHostname):
858         (WebKit::WebMediaCacheManager::clearCacheForAllHostnames):
859         * WebProcess/MediaCache/WebMediaCacheManager.h:
860         (WebMediaCacheManager):
861         Convert the managers to MessageReceiver.
862
863         * WebProcess/WebProcess.cpp:
864         (WebKit::WebProcess::WebProcess):
865         (WebKit::WebProcess::initializeWebProcess):
866         (WebKit::WebProcess::didReceiveMessage):
867         * WebProcess/WebProcess.h:
868         (WebProcess):
869         Add the new managers.
870
871 2012-12-25  Sam Weinig  <sam@webkit.org>
872
873         Fix the Database manager assert, again.
874
875         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
876         (WebKit):
877         (WebKit::WebDatabaseManager::WebDatabaseManager):
878         (WebKit::WebDatabaseManager::initialize):
879         * WebProcess/WebCoreSupport/WebDatabaseManager.h:
880         (WebDatabaseManager):
881         * WebProcess/WebProcess.cpp:
882         (WebKit::WebProcess::initializeWebProcess):
883
884 2012-12-25  Huang Dongsung  <luxtella@company100.net>
885
886         Coordinated Graphics: Manage the lifecycle of CoordinatedGraphicsLayer explicitly.
887         https://bugs.webkit.org/show_bug.cgi?id=104990
888
889         Reviewed by Noam Rosenthal.
890
891         Send explicit commands to the UI process to create/delete compositing
892         layers, instead of having the UI process decide lazily when to create
893         them.
894
895         Avoid creating a compositing layer at all if it was deleted in the same
896         cycle.
897
898         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
899         (WebKit::CoordinatedLayerTreeHostProxy::createCompositingLayer):
900         (WebKit):
901         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
902         (CoordinatedLayerTreeHostProxy):
903         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in:
904         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
905         (WebKit::LayerTreeRenderer::createCanvas):
906         (WebKit::LayerTreeRenderer::destroyCanvas):
907         (WebKit::LayerTreeRenderer::setLayerChildren):
908         (WebKit::LayerTreeRenderer::setLayerFilters):
909         (WebKit::LayerTreeRenderer::setLayerState):
910         (WebKit::LayerTreeRenderer::getLayerByIDIfExists):
911         (WebKit):
912         (WebKit::LayerTreeRenderer::createLayer):
913         (WebKit::LayerTreeRenderer::deleteLayer):
914         (WebKit::LayerTreeRenderer::setRootLayerID):
915         (WebKit::LayerTreeRenderer::createTile):
916         (WebKit::LayerTreeRenderer::removeTile):
917         (WebKit::LayerTreeRenderer::updateTile):
918         (WebKit::LayerTreeRenderer::ensureRootLayer):
919         (WebKit::LayerTreeRenderer::setLayerAnimations):
920         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
921         (LayerTreeRenderer):
922         (WebKit::LayerTreeRenderer::layerByID):
923         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
924         (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges):
925         (WebKit::CoordinatedLayerTreeHost::createCompositingLayers):
926         (WebKit):
927         (WebKit::CoordinatedLayerTreeHost::deleteCompositingLayers):
928         (WebKit::CoordinatedLayerTreeHost::detachLayer):
929         (WebKit::CoordinatedLayerTreeHost::createGraphicsLayer):
930         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
931
932 2012-12-25  Sam Weinig  <sam@webkit.org>
933
934         Fix Qt build.
935
936         * WebProcess/WebPage/qt/WebPageQt.cpp:
937
938 2012-12-24  Sam Weinig  <sam@webkit.org>
939
940         Reduce the number of includes in WebProcess.h
941         https://bugs.webkit.org/show_bug.cgi?id=105709
942
943         Reviewed by Dan Bernstein.
944
945         * NetworkProcess/NetworkProcess.cpp:
946         (WebKit::NetworkProcess::NetworkProcess):
947         (WebKit::NetworkProcess::downloadsAuthenticationManager):
948         * NetworkProcess/NetworkProcess.h:
949         (WebKit):
950         * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
951         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
952         * WebProcess/FullScreen/WebFullScreenManager.cpp:
953         * WebProcess/InjectedBundle/InjectedBundle.cpp:
954         * WebProcess/Network/NetworkProcessConnection.cpp:
955         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
956         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
957         * WebProcess/WebPage/FindController.cpp:
958         * WebProcess/WebPage/WebContextMenu.cpp:
959         * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
960         * WebProcess/WebProcess.cpp:
961         (WebKit::WebProcess::WebProcess):
962         (WebKit::WebProcess::downloadsAuthenticationManager):
963         (WebKit::WebProcess::initializeWebProcess):
964         (WebKit::WebProcess::geolocationManager):
965         (WebKit):
966         (WebKit::WebProcess::applicationCacheManager):
967         (WebKit::WebProcess::resourceCacheManager):
968         (WebKit::WebProcess::cookieManager):
969         (WebKit::WebProcess::authenticationManager):
970         (WebKit::WebProcess::databaseManager):
971         (WebKit::WebProcess::notificationManager):
972         (WebKit::WebProcess::pluginProcessConnectionManager):
973         (WebKit::WebProcess::networkProcessConnectionClosed):
974         (WebKit::WebProcess::webResourceLoadScheduler):
975         (WebKit::WebProcess::pluginProcessCrashed):
976         * WebProcess/WebProcess.h:
977         (WebCore):
978         (WebKit):
979         (WebProcess):
980         * WebProcess/mac/WebProcessMac.mm:
981         (WebKit::WebProcess::platformInitializeWebProcess):
982
983 2012-12-25  Andreas Kling  <akling@apple.com>
984
985         [WK2][Mac] Call Carbon resource APIs on main thread only.
986         <rdar://problem/11760262>
987         <http://webkit.org/b/105746>
988
989         Reviewed by Anders Carlsson.
990
991         The Carbon resource APIs are not thread-safe, so use a little libdispatch sugar to make
992         sure that plugin enumeration never calls them on a secondary thread.
993
994         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
995         (WebKit::getPluginInfoFromCarbonResourcesOnMainThread):
996         (WebKit::getPluginInfoFromCarbonResources):
997
998 2012-12-25  Seokju Kwon  <seokju.kwon@gmail.com>
999
1000         [EFL][WK2] Build breaks with --no-input-type-color
1001         https://bugs.webkit.org/show_bug.cgi?id=105740
1002
1003         Reviewed by Laszlo Gombos.
1004
1005         * UIProcess/API/efl/EwkViewImpl.h: Add INPUT_TYPE_COLOR guard.
1006         (EwkViewImpl):
1007
1008 2012-12-25  Christophe Dumez  <christophe.dumez@intel.com>
1009
1010         [EFL][WK2] Refactor snapshot taking code
1011         https://bugs.webkit.org/show_bug.cgi?id=105687
1012
1013         Reviewed by Kenneth Rohde Christiansen.
1014
1015         Refactor EFL WK2 snapshot taking code to use
1016         smart pointers when possible and follow naming
1017         conventions.
1018
1019         * UIProcess/API/C/efl/WKView.cpp:
1020         (WKViewCreateSnapshot):
1021         * UIProcess/API/C/efl/WKView.h: Rename WKViewGetSnapshot
1022         to WKViewCreateSnapshot to follow C API naming conventions,
1023         since the returned value needs to be adopted.
1024         * UIProcess/API/efl/EwkViewImpl.cpp:
1025         (EwkViewImpl::takeSnapshot):
1026         * UIProcess/API/efl/EwkViewImpl.h: Have takeSnapshot() return
1027         a cairo_surface_t instead of a WKType. The value should be
1028         converted to a WKType at C API level.
1029         (EwkViewImpl):
1030         * UIProcess/API/efl/SnapshotImageGL.cpp: Use OwnArrayPtr for the
1031         buffer to avoid manual memory handling. Remove useless call to
1032         glBindTexture() since glReadPixels() reads pixels from the frame
1033         buffer, not from the texture.
1034         (getImageDataFromFrameBuffer):
1035         * UIProcess/API/efl/SnapshotImageGL.h: Rename getImageFromCurrentTexture
1036         to getImageDataFromFrameBuffer for consistency since we technically
1037         return the pixel data of the image and since glReadPixels does not
1038         actually read from the texture. Have the function return a smart
1039         pointer instead of a raw one to avoid manual memory handling.
1040
1041 2012-12-25  Tim Horton  <timothy_horton@apple.com>
1042
1043         PDFPlugin: Find-in-page
1044         https://bugs.webkit.org/show_bug.cgi?id=105710
1045         <rdar://problem/12555331>
1046
1047         Reviewed by Alexey Proskuryakov.
1048
1049         Make use of PDFLayerController's find-in-page functionality to mimic WebKit's.
1050         Add two Plugin methods, countFindMatches and findString, and make use of them
1051         if attempting to find-in-page within a PluginDocument.
1052
1053         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1054         (WebKit::NetscapePlugin::countFindMatches): Added. We don't support find-in-page for NetscapePlugin.
1055         (WebKit::NetscapePlugin::findString): Added. We don't support find-in-page for NetscapePlugin.
1056         * WebProcess/Plugins/Netscape/NetscapePlugin.h: Add countFindMatches and findString.
1057         * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: Add requisite PDFLayerController interfaces.
1058         * WebProcess/Plugins/PDF/PDFPlugin.h: Add countFindMatches, findString, and nextMatchForString,
1059         as well as  storage for the most-recently-searched string.
1060         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1061         (WebKit::PDFPlugin::writeItemsToPasteboard):
1062         (WebKit::PDFPlugin::countFindMatches):
1063         (WebKit::PDFPlugin::nextMatchForString):
1064         (WebKit::PDFPlugin::findString):
1065         * WebProcess/Plugins/PDF/SimplePDFPlugin.h: Add countFindMatches and findString.
1066         * WebProcess/Plugins/Plugin.h: Add countFindMatches and findString.
1067         * WebProcess/Plugins/PluginProxy.h: Add countFindMatches and findString, but since PDFPlugin
1068         is in-process, we don't need to forward these calls to the PluginProcess.
1069         * WebProcess/Plugins/PluginView.cpp: 
1070         (WebKit::PluginView::countFindMatches): Forward countFindMatches to the plugin.
1071         (WebKit::PluginView::findString): Forward findString to the plugin.
1072         * WebProcess/Plugins/PluginView.h: Add countFindMatches and findString.
1073         * WebProcess/WebPage/FindController.cpp:
1074         (WebKit::pluginViewForFrame): If the given frame hosts a PluginDocument, grab its PluginView.
1075         (WebKit::FindController::countStringMatches): Forward countStringMatches to PluginView if necessary.
1076         (WebKit::FindController::updateFindUIAfterPageScroll): Only use unmarkAllTextMatches if we're using
1077         ordinary find-in-page and don't have a plugin. If we have a plugin, disable our overlay, as it must
1078         be handled by the plugin itself, and request the number of matches for the search from the plugin.
1079         (WebKit::FindController::findString): If necessary, forward findString to the plugin.
1080         (WebKit::FindController::hideFindUI): Hide the search highlight by searching for an empty string.
1081
1082 2012-12-24  Laszlo Gombos  <l.gombos@samsung.com>
1083
1084         Remove wtf/Platform.h includes from {c|cpp} files
1085         https://bugs.webkit.org/show_bug.cgi?id=105678
1086
1087         Reviewed by Kentaro Hara.
1088
1089         Remove wtf/Platform.h from the include list as it is already
1090         included in config.h.
1091
1092         * Shared/qt/QtNetworkRequestData.cpp:
1093
1094 2012-12-24  Sam Weinig  <sam@webkit.org>
1095
1096         Assert fix take 2.
1097
1098         * WebProcess/WebProcess.cpp:
1099         (WebKit::WebProcess::WebProcess):
1100         (WebKit::WebProcess::initializeWebProcess):
1101
1102 2012-12-24  Sam Weinig  <sam@webkit.org>
1103
1104         Fix WebKit2 asserting on launch.
1105
1106         * WebProcess/WebProcess.cpp:
1107         (WebKit::WebProcess::WebProcess):
1108         * WebProcess/WebProcess.h:
1109         (WebKit::WebProcess::databaseManager):
1110         (WebProcess):
1111
1112 2012-12-24  Csaba Osztrogonác  <ossy@webkit.org>
1113
1114         [Qt][Win] Unreviewed Xmas buildfix after r138433.
1115
1116         * WebProcess/Cookies/WebCookieManager.h:
1117
1118 2012-12-23  Seokju Kwon  <seokju.kwon@gmail.com>
1119
1120         Fix the incorrect use of preprocessor statement in API header
1121         https://bugs.webkit.org/show_bug.cgi?id=105675
1122
1123         Reviewed by Sam Weinig.
1124
1125         Remove a preprocessor statement in WKBundlePage.h
1126
1127         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1128         (WKBundlePageGetInspector):
1129         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1130
1131 2012-12-23  Sam Weinig  <sam@webkit.org>
1132
1133         Switch WebCookieManager and AuthenticationManager to use the ChildProcess rather than holding on to a Connection
1134         https://bugs.webkit.org/show_bug.cgi?id=105703
1135
1136         Reviewed by Dan Bernstein.
1137
1138         Also switches WebCookieManager over to be a MessageReceiver while we are at it.
1139
1140         * NetworkProcess/NetworkProcess.cpp:
1141         (WebKit::NetworkProcess::NetworkProcess):
1142         (WebKit::NetworkProcess::initialize):
1143         (WebKit::NetworkProcess::didReceiveMessage):
1144         * NetworkProcess/NetworkProcess.h:
1145         (WebKit):
1146         * WebProcess/Authentication/AuthenticationManager.cpp:
1147         (WebKit::AuthenticationManager::AuthenticationManager):
1148         (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
1149         * WebProcess/Authentication/AuthenticationManager.h:
1150         (AuthenticationManager):
1151         * WebProcess/Cookies/WebCookieManager.cpp:
1152         (WebKit):
1153         (WebKit::WebCookieManager::WebCookieManager):
1154         (WebKit::WebCookieManager::didReceiveMessage):
1155         (WebKit::WebCookieManager::getHostnamesWithCookies):
1156         (WebKit::WebCookieManager::cookiesDidChange):
1157         (WebKit::WebCookieManager::dispatchCookiesDidChange):
1158         (WebKit::WebCookieManager::getHTTPCookieAcceptPolicy):
1159         * WebProcess/Cookies/WebCookieManager.h:
1160         (WebKit):
1161         (WebCookieManager):
1162         * WebProcess/Cookies/soup/WebCookieManagerSoup.cpp:
1163         (WebKit::WebCookieManager::setCookiePersistentStorage):
1164         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1165         (WebKit::InjectedBundle::setAlwaysAcceptCookies):
1166         * WebProcess/WebProcess.cpp:
1167         (WebKit::WebProcess::WebProcess):
1168         (WebKit::WebProcess::initialize):
1169         (WebKit::WebProcess::didReceiveMessage):
1170         * WebProcess/WebProcess.h:
1171         (WebProcess):
1172         (WebKit::WebProcess::cookieManager):
1173
1174 2012-12-23  Sam Weinig  <sam@webkit.org>
1175
1176         Try to fix the Qt build.
1177
1178         * WebProcess/WebCoreSupport/WebDatabaseManager.h:
1179
1180 2012-12-23  Sam Weinig  <sam@webkit.org>
1181
1182         Remove more special cased message receiving code from WebProcess
1183         https://bugs.webkit.org/show_bug.cgi?id=105700
1184
1185         Reviewed by Dan Bernstein.
1186
1187         Makes WebApplicationCacheManager, WebResourceCacheManager and WebDatabaseManager
1188         CoreIPC::MessageReceivers, removes them as special cases in WebProcess.
1189
1190         * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
1191         (WebKit::WebApplicationCacheManager::WebApplicationCacheManager):
1192         (WebKit::WebApplicationCacheManager::getApplicationCacheOrigins):
1193         (WebKit::WebApplicationCacheManager::deleteEntriesForOrigin):
1194         (WebKit::WebApplicationCacheManager::deleteAllEntries):
1195         (WebKit::WebApplicationCacheManager::setAppCacheMaximumSize):
1196         * WebProcess/ApplicationCache/WebApplicationCacheManager.h:
1197         (WebKit):
1198         (WebApplicationCacheManager):
1199         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1200         (WebKit::InjectedBundle::clearAllDatabases):
1201         (WebKit::InjectedBundle::setDatabaseQuota):
1202         (WebKit::InjectedBundle::clearApplicationCache):
1203         (WebKit::InjectedBundle::setAppCacheMaximumSize):
1204         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
1205         (WebKit::WebResourceCacheManager::WebResourceCacheManager):
1206         (WebKit::WebResourceCacheManager::getCacheOrigins):
1207         (WebKit::WebResourceCacheManager::clearCacheForOrigin):
1208         (WebKit::WebResourceCacheManager::clearCacheForAllOrigins):
1209         * WebProcess/ResourceCache/WebResourceCacheManager.h:
1210         (WebKit):
1211         (WebResourceCacheManager):
1212         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
1213         (WebKit):
1214         (WebKit::WebDatabaseManager::WebDatabaseManager):
1215         (WebKit::WebDatabaseManager::getDatabasesByOrigin):
1216         (WebKit::WebDatabaseManager::getDatabaseOrigins):
1217         (WebKit::WebDatabaseManager::deleteDatabaseWithNameForOrigin):
1218         (WebKit::WebDatabaseManager::deleteDatabasesForOrigin):
1219         (WebKit::WebDatabaseManager::deleteAllDatabases):
1220         (WebKit::WebDatabaseManager::setQuotaForOrigin):
1221         (WebKit::WebDatabaseManager::dispatchDidModifyOrigin):
1222         (WebKit::WebDatabaseManager::dispatchDidModifyDatabase):
1223         * WebProcess/WebCoreSupport/WebDatabaseManager.h:
1224         (WebKit):
1225         (WebDatabaseManager):
1226         * WebProcess/WebProcess.cpp:
1227         (WebKit::WebProcess::WebProcess):
1228         (WebKit::WebProcess::didReceiveMessage):
1229         * WebProcess/WebProcess.h:
1230         (WebProcess):
1231         (WebKit::WebProcess::applicationCacheManager):
1232         (WebKit::WebProcess::resourceCacheManager):
1233         (WebKit::WebProcess::databaseManager):
1234
1235 2012-12-23  Alexey Proskuryakov  <ap@apple.com>
1236
1237         <rdar://problem/12808377> Network process should respect cookie accept policy
1238         https://bugs.webkit.org/show_bug.cgi?id=105684
1239
1240         Reviewed by Sam Weinig.
1241
1242         * NetworkProcess/NetworkProcess.cpp:
1243         (WebKit::NetworkProcess::initialize): Tell cookie manager which connection to
1244         make calls on. Now that the code can run in either WebProcess or NetworkProcess,
1245         it cannot use WebProcess singleton.
1246         (WebKit::NetworkProcess::didReceiveMessage): Dispatch WebCookieManager messages.
1247
1248         * WebProcess/WebProcess.cpp:
1249         (WebKit::WebProcess::initialize): Tell cookie manager which connection to
1250         make calls on.
1251
1252         * UIProcess/Downloads/DownloadProxy.cpp:
1253         (WebKit::DownloadProxy::didReceiveAuthenticationChallenge): Changed to use
1254         WebContext::networkingProcessConnection() instead of deciding upon the connection here.
1255
1256         * UIProcess/Network/NetworkProcessProxy.cpp:
1257         (WebKit::NetworkProcessProxy::didReceiveMessage): Call m_webContext->dispatchMessage),
1258         as WebCookieManagerProxy handlers are registered on the context. This may seem wasteful,
1259         but a lot of registered managers will need the ame handling soon.
1260
1261         * UIProcess/WebContext.cpp:
1262         (WebKit::WebContext::networkingProcessConnection): Added a way to get connection
1263         to whichever process performs networking.
1264         (WebKit::WebContext::removeNetworkProcessProxy): Invalidate cookie manager proxy,
1265         so that expected responses could be cleared.
1266         (WebKit::WebContext::disconnectProcess): Updated a FIXME.
1267
1268         * UIProcess/WebContext.h: Deleted deprecatedSharedProcess().
1269         (WebKit::WebContext::networkingProcessConnection): Added.
1270         (WebKit::WebContext::sendToNetworkingProcess): Added.
1271         (WebKit::WebContext::sendToNetworkingProcessRelaunchingIfNecessary): Added.
1272
1273         * UIProcess/WebCookieManagerProxy.cpp:
1274         (WebKit::WebCookieManagerProxy::shouldTerminate): Should not prevent WebProcess
1275         termination when NetworkProcess is in use.
1276         (WebKit::WebCookieManagerProxy::getHostnamesWithCookies): Removed a useless ASSERT
1277         that neiter documents expectations nor helps find bugs. Send a message to correct
1278         process, whether WebProcess or NetworkProcess.
1279         (WebKit::WebCookieManagerProxy::deleteCookiesForHostname): Ditto.
1280         (WebKit::WebCookieManagerProxy::deleteAllCookies): Ditto.
1281         (WebKit::WebCookieManagerProxy::startObservingCookieChanges): Ditto.
1282         (WebKit::WebCookieManagerProxy::stopObservingCookieChanges): Ditto.
1283         (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy): Ditto.
1284         (WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy): Ditto.
1285
1286         * WebProcess/Cookies/WebCookieManager.h:
1287         * WebProcess/Cookies/WebCookieManager.cpp: Made the class usable in either WebProcess
1288         or NetworkProcess.
1289         (WebKit::WebCookieManager::setConnection): WebCookieManager now remembers which
1290         connection to talk back on.
1291         (WebKit::WebCookieManager::didReceiveMessage): Added an assertion that stored connection
1292         matches the one being used to reciev messages.
1293         (WebKit::WebCookieManager::getHostnamesWithCookies): Use the stored connection to
1294         send a reply.
1295         (WebKit::WebCookieManager::startObservingCookieChanges): Pass a callback function,
1296         so that WebCore doesn't have to use a platform strategy.
1297         (WebKit::WebCookieManager::cookiesDidChange): The new callback.
1298         (WebKit::WebCookieManager::dispatchCookiesDidChange): Use the stored connection.
1299         (WebKit::WebCookieManager::getHTTPCookieAcceptPolicy): Use the stored connection.
1300
1301         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1302         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1303         Removed notifyCookiesChanged() which is no longer part of CookiesStrategy.
1304
1305 2012-12-22  Sam Weinig  <sam@webkit.org>
1306
1307         Make CustomProtocolManager a MessageReceiver to remove more special casing
1308         https://bugs.webkit.org/show_bug.cgi?id=105682
1309
1310         Reviewed by Dan Bernstein.
1311
1312         To avoid storing a Connection in CustomProtocolManager, which is not a great idea without
1313         it being the Connection::Client and therefore getting death notifications, I also made
1314         ChildProcess a MessageSender so that extensions to it, like CustomProtocolManager, can
1315         easily send messages to the parent process.
1316
1317         * NetworkProcess/NetworkProcess.cpp:
1318         (WebKit::NetworkProcess::NetworkProcess):
1319         Initialize the shared CustomProtocolManager, which will add it to the MessageReceiverMap in 
1320         the ChildProcess.
1321
1322         (WebKit::NetworkProcess::didReceiveMessage):
1323         Remove the special case for CustomProtocolManager.
1324
1325         (WebKit::NetworkProcess::initializeNetworkProcess):
1326         Call connectionEstablished on the CustomProtocolManager to make it start working as a NSURLProtocol handler.
1327
1328         * NetworkProcess/NetworkProcess.h:
1329         Add overrides necessary for MessageSender.
1330
1331         * PluginProcess/PluginProcess.h:
1332         Ditto.
1333
1334         * Shared/ChildProcess.h:
1335         (ChildProcess):
1336         Make ChildProcess a MessageSender.
1337
1338         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
1339         (CustomProtocolManager):
1340         (WebKit::CustomProtocolManager::childProcess):
1341         * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
1342         (-[WKCustomProtocol startLoading]):
1343         (-[WKCustomProtocol stopLoading]):
1344         (WebKit::CustomProtocolManager::CustomProtocolManager):
1345         (WebKit::CustomProtocolManager::initialize):
1346         (WebKit::CustomProtocolManager::connectionEstablished):
1347         Make CustomProtocolManager a MessageReceiver and split initialization and the time when it can 
1348         start acting as protocol handler as these happen at different times now. It also now stores a
1349         ChildProcess rather than a Connection.
1350
1351         * SharedWorkerProcess/SharedWorkerProcess.h:
1352         Add overrides necessary for MessageSender.
1353
1354         * WebProcess/WebProcess.cpp:
1355         (WebKit::WebProcess::WebProcess):
1356         Initialize the shared CustomProtocolManager, which will add it to the MessageReceiverMap in 
1357         the ChildProcess.
1358
1359         (WebKit::WebProcess::didReceiveMessage):
1360         Remove the special case for CustomProtocolManager.
1361
1362         (WebKit::WebProcess::initializeCustomProtocolManager):
1363         Call connectionEstablished on the CustomProtocolManager to make it start working as a NSURLProtocol handler.
1364
1365         * WebProcess/WebProcess.h:
1366         Add overrides necessary for MessageSender.
1367
1368 2012-12-20  Martin Robinson  <mrobinson@igalia.com>
1369
1370         [GTK] Remove plugin process configuration option
1371         https://bugs.webkit.org/show_bug.cgi?id=105564
1372
1373         Reviewed by Carlos Garcia Campos.
1374
1375         Remove the --enable-plugin-process configuration option, opting instead to
1376         always build the plugin process when building WebKit2. It isn't very interesting
1377         for downstream to enable or disable the plugin process. It should always be
1378         enabled for WebKit2 and it's better for us not to have to keep a disabled plugin
1379         process building. Additionally, the in-process plugin isn't functional, since
1380         plugins depend on GTK+ 2 and WebKit2 depends on GTK+ 3.
1381
1382         * GNUmakefile.am: Remove the option.
1383         * GNUmakefile.list.am: Remote the option.
1384
1385 2012-12-22  Sam Weinig  <sam@webkit.org>
1386
1387         Give the ChildProcess a MessageReceiverMap
1388         https://bugs.webkit.org/show_bug.cgi?id=105681
1389
1390         Reviewed by Dan Bernstein.
1391
1392         Moving the MessageReceiverMap to the ChildProcess will help shared code
1393         between the WebProcess and NetworkProcess.
1394
1395         * NetworkProcess/NetworkProcess.cpp:
1396         (WebKit::NetworkProcess::NetworkProcess):
1397         Pass 'this' instead of the MessageReceiverMap, now that ChildProcess
1398         can be used to access the MessageReceiverMap.
1399
1400         * NetworkProcess/NetworkProcess.h:
1401         (NetworkProcess):
1402         Remove the now extraneous MessageReceiverMap.
1403
1404         * Shared/ChildProcess.cpp:
1405         (WebKit::ChildProcess::ChildProcess):
1406         (WebKit):
1407         (WebKit::ChildProcess::~ChildProcess):
1408         (WebKit::ChildProcess::addMessageReceiver):
1409         (WebKit::ChildProcess::removeMessageReceiver):
1410         * Shared/ChildProcess.h:
1411         (ChildProcess):
1412         Add a MessageReceiverMap and helper functions from WebProcess.
1413
1414         * WebProcess/Authentication/AuthenticationManager.cpp:
1415         (WebKit::AuthenticationManager::AuthenticationManager):
1416         * WebProcess/Authentication/AuthenticationManager.h:
1417         (AuthenticationManager):
1418         Fix the FIXME, passing the ChildProcess rather than the MessageReceiverMap.
1419
1420         * WebProcess/WebProcess.cpp:
1421         (WebKit::WebProcess::WebProcess):
1422         * WebProcess/WebProcess.h:
1423         (WebProcess):
1424         Remove the MessageReceiverMap and helper functions.
1425
1426 2012-12-22  Alexey Proskuryakov  <ap@apple.com>
1427
1428         Windows build fix.
1429
1430         * WebProcess/Cookies/cf/WebCookieManagerCFNet.cpp:
1431
1432 2012-12-22  Alexey Proskuryakov  <ap@apple.com>
1433
1434         Add a separate class for networking related storage
1435         https://bugs.webkit.org/show_bug.cgi?id=105676
1436
1437         Reviewed by Sam Weinig.
1438
1439         * NetworkProcess/NetworkConnectionToWebProcess.cpp: We no longer need to create
1440         fake RemoteNetworkingContexts here! Use an actual default or private storage session.
1441
1442         * NetworkProcess/mac/NetworkProcessMainMac.mm: Updated form of WebSystemInterface.h include,
1443         it's not a system one.
1444
1445         * NetworkProcess/mac/RemoteNetworkingContext.h: Expose privateBrowsingSession(),
1446         so that NetworkConnectionToWebProcess could use it. We can generalize the interface
1447         one we support more sessions.
1448
1449         * NetworkProcess/mac/RemoteNetworkingContext.mm: This class now only tracks private
1450         browsing session, with most other code being in NetworkStorageSession.
1451
1452         * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
1453         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
1454         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
1455         * WebProcess/WebProcess.cpp:
1456         * WebProcess/efl/WebProcessMainEfl.cpp:
1457         * WebProcess/gtk/WebProcessMainGtk.cpp:
1458         * WebProcess/Downloads/cfnet/DownloadCFNet.cpp:
1459         * WebProcess/Downloads/efl/DownloadSoupErrorsEfl.cpp:
1460         * WebProcess/Downloads/gtk/DownloadSoupErrorsGtk.cpp:
1461         * WebProcess/Downloads/mac/DownloadMac.mm:
1462         * WebProcess/Network/WebResourceLoader.cpp:
1463         Updated includes for ResourceHandle change. For some ports, the includes could be
1464         made more tight, but I have no practical way to do that.
1465
1466         * WebKit2.xcodeproj/project.pbxproj: Removed WebPlatformStrategiesMac.mm.
1467
1468         * WebProcess/Cookies/WebCookieManager.cpp:
1469         (WebKit::WebCookieManager::getHostnamesWithCookies):
1470         (WebKit::WebCookieManager::deleteCookiesForHostname):
1471         (WebKit::WebCookieManager::deleteAllCookies):
1472         Pass a proper session instead of relying on a strategy to call back to WebKit
1473         for default cookie storage (we don't even have strategies initialized in NetworkProcess).
1474
1475         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1476         (WebKit::InjectedBundle::switchNetworkLoaderToNewTestingSession): Initialize WCSI
1477         before calling a function that now uses in in WebCore.
1478
1479         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1480         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: We no longer need a strategy
1481         for default cookie storage! Updated other functions to use sessions.
1482
1483         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
1484         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
1485         * WebProcess/WebCoreSupport/mac/WebPlatformStrategiesMac.mm: Removed.
1486         * WebProcess/WebCoreSupport/win/WebFrameNetworkingContext.h:
1487         WebFrameNetworkingContext is now simpler, with more tracking being donre through WebCore.
1488
1489 2012-12-21  Elliott Sprehn  <esprehn@chromium.org>
1490
1491         Replace documentFragmentIsShadowRoot with isTreeScope
1492         https://bugs.webkit.org/show_bug.cgi?id=105345
1493
1494         Reviewed by Dimitri Glazkov.
1495
1496         Expose isTreeScope symbol.
1497
1498         * win/WebKit2.def.in:
1499
1500 2012-12-21  Sheriff Bot  <webkit.review.bot@gmail.com>
1501
1502         Unreviewed, rolling out r138331.
1503         http://trac.webkit.org/changeset/138331
1504         https://bugs.webkit.org/show_bug.cgi?id=105668
1505
1506         Broke Windows clean builds; can't figure out how to fix it
1507         (Requested by rniwa on #webkit).
1508
1509         * win/WebKit2.def.in:
1510
1511 2012-12-21  Brady Eidson  <beidson@apple.com>
1512
1513         ASSERT in WebResourceLoadScheduler::scheduleLoad with a crashed NetworkProcess.
1514         <rdar://problem/12924845> and https://bugs.webkit.org/show_bug.cgi?id=105646
1515
1516         Reviewed by Alexey Proskuryakov.
1517
1518         If we fail to schedule a loader with the NetworkProcess it is probably because the NetworkProcess crashed.
1519
1520         Since these loaders will never succeed in loading we should schedule them to fail on a timer.
1521
1522         * WebProcess/Network/WebResourceLoadScheduler.cpp:
1523         (WebKit::WebResourceLoadScheduler::WebResourceLoadScheduler):
1524         (WebKit::WebResourceLoadScheduler::scheduleLoad):
1525         (WebKit::WebResourceLoadScheduler::addUnschedulableLoad):
1526         (WebKit::WebResourceLoadScheduler::unscheduledLoadTimerFired):
1527         (WebKit::WebResourceLoadScheduler::remove):
1528         * WebProcess/Network/WebResourceLoadScheduler.h:
1529
1530 2012-12-21  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1531
1532         Unreviewed potential fix EFL/Qt test breakage on WK2
1533
1534         Only disable scrollbars when in fixed layout mode.
1535
1536         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1537         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
1538
1539 2012-12-21  Brady Eidson  <beidson@apple.com>
1540
1541         Remove ResourceLoadScheduler::addMainResourceLoad and all related code
1542         <rdar://problem/12925275> and https://bugs.webkit.org/show_bug.cgi?id=105644
1543
1544         Reviewed by Alexey Proskuryakov.
1545
1546         Now that main resources loads are scheduled (bug 49246) we don't need this stuff anymore.
1547
1548         * WebProcess/Network/WebResourceLoadScheduler.cpp:
1549         (WebKit::WebResourceLoadScheduler::remove):
1550         (WebKit::WebResourceLoadScheduler::networkProcessCrashed):
1551         * WebProcess/Network/WebResourceLoadScheduler.h:
1552
1553 2012-12-20  Sam Weinig  <sam@webkit.org>
1554
1555         Add WebKit2 SPI to get the current selection as a WebArchive
1556         https://bugs.webkit.org/show_bug.cgi?id=105613
1557
1558         Reviewed by Anders Carlsson.
1559
1560         * UIProcess/API/C/WKPage.cpp:
1561         (WKPageGetSelectionAsWebArchiveData):
1562         * UIProcess/API/C/WKPage.h:
1563         Add SPI.
1564
1565         * UIProcess/WebPageProxy.cpp:
1566         (WebKit::WebPageProxy::getSelectionAsWebArchiveData):
1567         (WebKit):
1568         * UIProcess/WebPageProxy.h:
1569         (WebPageProxy):
1570         * WebProcess/WebPage/WebPage.cpp:
1571         (WebKit):
1572         (WebKit::frameWithSelection):
1573         (WebKit::WebPage::getSelectionAsWebArchiveData):
1574         * WebProcess/WebPage/WebPage.h:
1575         (WebPage):
1576         * WebProcess/WebPage/WebPage.messages.in:
1577         Pipe getter to the WebProcess and back.
1578
1579 2012-12-21  Brady Eidson  <beidson@apple.com>
1580
1581         Perform cleanup in WebProcess if the NetworkProcess crashes.
1582         <rdar://problem/12903117> and https://bugs.webkit.org/show_bug.cgi?id=105592
1583
1584         Reviewed by Alexey Proskuryakov.
1585
1586         If the NetworkProcess crashes, a whole bunch of WebResourceLoaders (and WebCore::ResourceLoaders)
1587         might be orphaned in the WebProcess.
1588
1589         These loaders need to fail once it is apparent they will never finish loading.
1590
1591         * Shared/API/c/WKError.h: Add a new error representing an "WebKit Internal Error."
1592
1593         * WebProcess/WebCoreSupport/WebErrors.h:
1594         * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
1595         (WebKit::internalError):
1596
1597         * WebProcess/Network/WebResourceLoadScheduler.cpp:
1598         (WebKit::WebResourceLoadScheduler::networkProcessCrashed): Call didFail all outstanding ResourceLoaders
1599           and tell all WebResourceLoaders the NetworkProcess crashed.
1600         * WebProcess/Network/WebResourceLoadScheduler.h:
1601
1602         * WebProcess/Network/WebResourceLoader.cpp:
1603         (WebKit::WebResourceLoader::networkProcessCrashed): Call didFail with the new InternalError
1604         * WebProcess/Network/WebResourceLoader.h:
1605
1606         * WebProcess/WebProcess.cpp:
1607         (WebKit::WebProcess::networkProcessConnectionClosed): Tell the scheduled the NetworkProcess crashed.
1608
1609 2012-12-21  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1610
1611         [EFL][WK2] Never create WebCore scrollbars for EFL/WK2
1612         https://bugs.webkit.org/show_bug.cgi?id=105632
1613
1614         Reviewed by Antonio Gomes.
1615
1616         Then creating the frame ask to not create scrollbars and
1617         lock it so they won't be created at any later time.
1618
1619         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1620         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
1621
1622 2012-12-21  Seokju Kwon  <seokju.kwon@gmail.com>
1623
1624         [EFL] Add guard around ContextMenuItemTagInspectElement
1625         https://bugs.webkit.org/show_bug.cgi?id=105267
1626
1627         Reviewed by Ryosuke Niwa.
1628
1629         Need INSPECTOR guard for using ContextMenuItemTagInspectElement.
1630
1631         * UIProcess/API/efl/ewk_context_menu_item.cpp:
1632
1633 2012-12-21  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
1634
1635         [WK2] TiledBackingStore: Scroll position is not reset when new page is loaded
1636         https://bugs.webkit.org/show_bug.cgi?id=105627
1637
1638         Reviewed by Kenneth Rohde Christiansen.
1639
1640         Reset scroll position to (0,0) when new page is loaded.
1641
1642         * WebProcess/WebPage/WebPage.cpp:
1643         (WebKit::WebPage::sendViewportAttributesChanged):
1644
1645 2012-12-21  Tim Horton  <timothy_horton@apple.com>
1646
1647         PDFPlugin: Cannot drop files/URLs on PDFPlugin
1648         https://bugs.webkit.org/show_bug.cgi?id=105516
1649         <rdar://problem/12729443>
1650
1651         Reviewed by Alexey Proskuryakov.
1652
1653         Add shouldAllowNavigationFromDrags to Plugin/PluginView/etc., which WebCore will
1654         consult when dragging over a PluginDocument to decide whether or not a drag may result in navigation.
1655
1656         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1657         (WebKit::NetscapePlugin::shouldAllowNavigationFromDrags): Added, always returning false to keep existing behavior.
1658         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1659         (NetscapePlugin): Added.
1660         * WebProcess/Plugins/PDF/SimplePDFPlugin.h:
1661         (WebKit::SimplePDFPlugin::shouldAllowNavigationFromDrags): Added, always returning true. (Simple)PDFPlugin should
1662         navigate when dropped onto, just like an image or HTML document would.
1663         * WebProcess/Plugins/Plugin.h:
1664         (Plugin): Add shouldAllowNavigationFromDrags.
1665         * WebProcess/Plugins/PluginProxy.h: Add shouldAllowNavigationFromDrags.
1666         * WebProcess/Plugins/PluginView.cpp:
1667         (WebKit::PluginView::shouldAllowNavigationFromDrags): Forward shouldAllowNavigationFromDrags to the plugin.
1668         * WebProcess/Plugins/PluginView.h: Add shouldAllowNavigationFromDrags.
1669
1670 2012-12-21  Sheriff Bot  <webkit.review.bot@gmail.com>
1671
1672         Unreviewed, rolling out r138357.
1673         http://trac.webkit.org/changeset/138357
1674         https://bugs.webkit.org/show_bug.cgi?id=105622
1675
1676         wrong fix for the problem\1f (the original author actually
1677         already did this, and it's not helping) (Requested by thorton
1678         on #webkit).
1679
1680         * win/WebKit2.def.in:
1681
1682 2012-12-21  Sheriff Bot  <webkit.review.bot@gmail.com>
1683
1684         Unreviewed, rolling out r138338.
1685         http://trac.webkit.org/changeset/138338
1686         https://bugs.webkit.org/show_bug.cgi?id=105621
1687
1688         speculative rollout because fast/dom/shadow/content-element-
1689         distributed-nodes.html is crashing on linux debug. (Requested
1690         by loislo on #webkit).
1691
1692         * win/WebKit2.def.in:
1693
1694 2012-12-21  Tim Horton  <timothy_horton@apple.com>
1695
1696         Unreviewed Windows build fix after http://trac.webkit.org/changeset/138338
1697
1698         * win/WebKit2.def.in:
1699
1700 2012-12-21  Tim Horton  <timothy_horton@apple.com>
1701
1702         Reducing print preview scale significantly causes a crash
1703         https://bugs.webkit.org/show_bug.cgi?id=105519
1704         <rdar://problem/12807090>
1705
1706         Reviewed by Alexey Proskuryakov.
1707
1708         The bitmap image used for print previews was being created respecting the print preview scale.
1709         This doesn't make any sense, as the scale does not affect the size of the image required to
1710         represent the previewed page. Instead, we should not scale the size, creating the buffer at a
1711         size that is constant regardless of scale, and do the scaling when drawing *into* the buffer instead.
1712
1713         In some cases, this could cause an out-of-memory crash.
1714
1715         * UIProcess/API/mac/WKPrintingView.mm:
1716         (-[WKPrintingView _drawPreview:]): Rename rect to scaledPrintingRect for clarity. Compute print
1717         preview bitmap image size from the original non-scaled drawing size and the device scale factor.
1718         Hand the image size to drawRectToImage. Draw the image without scaling, as it's always created
1719         at the correct size. Don't compute the scale factor from the size of the image, we can know it from WebPageProxy.
1720         * UIProcess/WebPageProxy.cpp:
1721         (WebKit::WebPageProxy::drawRectToImage): Add a parameter to drawRectForImage, imageSize.
1722         * UIProcess/WebPageProxy.h:
1723         (WebPageProxy): Add a parameter to drawRectForImage, imageSize.
1724         * WebProcess/WebPage/WebPage.cpp:
1725         (WebKit::WebPage::drawRectToImage): Use imageSize to size our buffer, and scale up to make the printing rect
1726         fit in the bitmap's bounds.
1727         * WebProcess/WebPage/WebPage.h:
1728         (WebPage): Add a parameter to drawRectForImage, imageSize.
1729         * WebProcess/WebPage/WebPage.messages.in: Add a parameter to drawRectForImage, imageSize.
1730
1731 2012-12-20  Helder Correia  <helder.correia@nokia.com>
1732
1733         [CoordGfx] Make single-argument AreaAllocator constructors explicit
1734         https://bugs.webkit.org/show_bug.cgi?id=105598
1735
1736         Reviewed by Noam Rosenthal.
1737
1738         Follow the coding style for AreaAllocator and GeneralAreaAllocator.
1739
1740         * WebProcess/WebPage/CoordinatedGraphics/AreaAllocator.h:
1741         (AreaAllocator):
1742         (GeneralAreaAllocator):
1743
1744 2012-12-20  Elliott Sprehn  <esprehn@chromium.org>
1745
1746         Replace documentFragmentIsShadowRoot with isTreeScope
1747         https://bugs.webkit.org/show_bug.cgi?id=105345
1748
1749         Reviewed by Dimitri Glazkov.
1750
1751         Expose isTreeScope symbol.
1752
1753         * win/WebKit2.def.in:
1754
1755 2012-12-20  Kiran Muppala  <cmuppala@apple.com>
1756
1757         Set timer coalescing policy for WebKit2 processes on Mac until process visible assertion handles it automatically
1758         https://bugs.webkit.org/show_bug.cgi?id=105594
1759
1760         Reviewed by Mark Rowe.
1761
1762         * Shared/mac/ChildProcessMac.mm:
1763         (WebKit::initializeTimerCoalescingPolicy): Set task_latency and task_throughput QOS tiers as appropriate
1764         for visible applications.
1765         (WebKit::ChildProcess::platformInitialize): Add call to initializeTimerCoalescingPolicy.
1766
1767 2012-12-20  Anders Carlsson  <andersca@apple.com>
1768
1769         Stop building WebKit2 for Windows
1770         https://bugs.webkit.org/show_bug.cgi?id=105585
1771
1772         Reviewed by Brian Weinstein.
1773
1774         Remove an unneeded export.
1775
1776         * win/WebKit2.def.in:
1777
1778 2012-12-20  Ryuan Choi  <ryuan.choi@samsung.com>
1779
1780         [EFL] Build break with latest EFL libraries.
1781         https://bugs.webkit.org/show_bug.cgi?id=104827
1782
1783         Reviewed by Laszlo Gombos.
1784
1785         The eo EFL package is introduced and evas and ecore use it since 1.8.
1786         While introducing Eo, EFL changed several structures of Evas and Ecore
1787         from own specific class to Eo.
1788
1789         So, this patch adds FindEo and changes declaration of Evas, Evas_Object,
1790         Ecore_Timer to build with latest EFL libraries.
1791
1792         * PlatformEfl.cmake: Includes eo EFL library.
1793         * UIProcess/API/C/efl/WKAPICastEfl.h: Modified declaration of Evas_Object.
1794         * UIProcess/API/C/efl/WKView.h: Modified declaration of Evas.
1795         * UIProcess/efl/WebPopupMenuProxyEfl.h: Removed unnecessary declaration.
1796
1797 2012-12-20  Helder Correia  <helder.correia@nokia.com>
1798
1799         [CoordGfx] Remove CoordinatedLayerUpdateInfo class forwarding
1800         https://bugs.webkit.org/show_bug.cgi?id=105588
1801
1802         Reviewed by Noam Rosenthal.
1803
1804         There is no such class.
1805
1806         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
1807         (WebKit):
1808         * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
1809         (WebKit):
1810
1811 2012-12-20  Pratik Solanki  <psolanki@apple.com>
1812
1813         Rename HAVE(NETWORK_CFDATA_ARRAY_CALLBACK) to USE(NETWORK_CFDATA_ARRAY_CALLBACK)
1814         https://bugs.webkit.org/show_bug.cgi?id=105578
1815
1816         Reviewed by Alexey Proskuryakov.
1817
1818         * NetworkProcess/NetworkResourceLoader.cpp:
1819         * NetworkProcess/NetworkResourceLoader.h:
1820
1821 2012-12-20  Alexey Proskuryakov  <ap@apple.com>
1822
1823         LocalTerminationDisabler is not needed in WebCookieManager.cpp
1824         https://bugs.webkit.org/show_bug.cgi?id=105581
1825
1826         Reviewed by Anders Carlsson.
1827
1828         All WebCookieManager functions are synchronous, and all LocalTerminationDisabler does
1829         is enable/disable a timer that cannot fire inside the function anyway.
1830
1831         * WebProcess/Cookies/WebCookieManager.cpp:
1832         (WebKit::WebCookieManager::getHostnamesWithCookies):
1833         (WebKit::WebCookieManager::deleteCookiesForHostname):
1834         (WebKit::WebCookieManager::deleteAllCookies):
1835         (WebKit::WebCookieManager::startObservingCookieChanges):
1836         (WebKit::WebCookieManager::setHTTPCookieAcceptPolicy):
1837         (WebKit::WebCookieManager::getHTTPCookieAcceptPolicy):
1838
1839 2012-12-20  Brady Eidson  <beidson@apple.com>
1840
1841         NetworkProcess has no need for suspend/resumePendingRequests.
1842         <rdar://problem/12866005> and https://bugs.webkit.org/show_bug.cgi?id=105550
1843
1844         Reviewed by Alexey Proskuryakov.
1845
1846         suspend/resumePendingRequests were important in a single-process, WebKit1 API world to help prevent
1847         client callbacks from occurring during layout/painting.
1848
1849         In a WebKit2 + NetworkProcess world, they aren't important.
1850
1851         Remove the Web->Network process messages:
1852         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1853         * NetworkProcess/NetworkConnectionToWebProcess.h:
1854         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1855         * NetworkProcess/NetworkResourceLoadScheduler.cpp:
1856         * NetworkProcess/NetworkResourceLoadScheduler.h:
1857
1858         For now, still keep the per-WebProcess count to help keep servePendingRequest working as WebCore intends:
1859         * WebProcess/Network/WebResourceLoadScheduler.cpp:
1860         (WebKit::WebResourceLoadScheduler::servePendingRequests):
1861         (WebKit::WebResourceLoadScheduler::suspendPendingRequests):
1862         (WebKit::WebResourceLoadScheduler::resumePendingRequests):
1863
1864 2012-12-20  Carlos Garcia Campos  <cgarcia@igalia.com>
1865
1866         [GTK] Add API to set a TLS errors policy to WebKit2 GTK+ API
1867         https://bugs.webkit.org/show_bug.cgi?id=104482
1868
1869         Reviewed by Martin Robinson.
1870
1871         Add an emum for TLS errors policy with values IGNORE and FAIL and
1872         API to WebKitWebContext to set/get the policy.
1873
1874         * Shared/WebProcessCreationParameters.cpp:
1875         (WebKit::WebProcessCreationParameters::encode): Encode ignoreTLSErrors.
1876         (WebKit::WebProcessCreationParameters::decode): Decode ignoreTLSErrors.
1877         * Shared/WebProcessCreationParameters.h:
1878         (WebProcessCreationParameters): Add ignoreTLSErrors when building
1879         with soup network backend.
1880         * Shared/soup/PlatformCertificateInfo.cpp:
1881         (WebKit::PlatformCertificateInfo::PlatformCertificateInfo): Add a
1882         constructor that receives a ResourceError.
1883         * Shared/soup/PlatformCertificateInfo.h:
1884         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
1885         (CoreIPC::::encodePlatformData): Encode the
1886         PlatformCertificateInfo as part for the ResourceError.
1887         (CoreIPC::::decodePlatformData): Decode the
1888         PlatformCertificateInfo and set certificate and TLS errors in the
1889         ResourceError.
1890         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
1891         (didFailProvisionalLoadWithErrorForFrame): Call
1892         webkitWebViewLoadFailedWithTLSErrors() if the load failed due to
1893         TLS errors.
1894         * UIProcess/API/gtk/WebKitWebContext.cpp:
1895         (_WebKitWebContextPrivate): Add tlsErrorsPolicy member.
1896         (createDefaultWebContext): Initiales tlsErrorsPolicy.
1897         (webkit_web_context_set_tls_errors_policy): Set the TLS errors
1898         policy notify WebContext to ignore TLS errors or not.
1899         (webkit_web_context_get_tls_errors_policy): Return the current TLS
1900         errors policy.
1901         * UIProcess/API/gtk/WebKitWebContext.h:
1902         * UIProcess/API/gtk/WebKitWebView.cpp:
1903         (webkitWebViewLoadFailedWithTLSErrors): Finish the load with an
1904         error if the TLS errors policy is FAIL.
1905         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
1906         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
1907         * UIProcess/API/gtk/tests/TestSSL.cpp:
1908         (testTLSErrorsPolicy):
1909         (beforeAll):
1910         * UIProcess/WebContext.cpp:
1911         (WebKit::WebContext::WebContext): Initialize m_ignoreTLSErrors.
1912         * UIProcess/WebContext.h:
1913         (WebContext): Add m_ignoreTLSErrors member.
1914         (WebKit::WebContext::ignoreTLSErrors): Return m_ignoreTLSErrors.
1915         * UIProcess/efl/WebContextEfl.cpp:
1916         (WebKit::WebContext::platformInitializeWebProcess): Set
1917         ignoreTLSErrors parameter.
1918         (WebKit::WebContext::setIgnoreTLSErrors): Send SetIgnoreTLSErrors
1919         message to the web process.
1920         * UIProcess/gtk/WebContextGtk.cpp:
1921         (WebKit::WebContext::platformInitializeWebProcess): Set
1922         ignoreTLSErrors parameter.
1923         (WebKit::WebContext::setIgnoreTLSErrors): Send SetIgnoreTLSErrors
1924         message to the web process.
1925         (WebKit):
1926         * WebProcess/WebProcess.h:
1927         * WebProcess/WebProcess.messages.in:
1928         * WebProcess/efl/WebProcessMainEfl.cpp:
1929         (WebKit::WebProcessMainEfl): Remove the call to
1930         ResourceHandle::setIgnoreSSLErrors().
1931         * WebProcess/gtk/WebProcessMainGtk.cpp:
1932         (WebKit::WebProcessMainGtk): Remove the call to
1933         ResourceHandle::setIgnoreSSLErrors().
1934         * WebProcess/soup/WebProcessSoup.cpp:
1935         (WebKit::WebProcess::platformInitializeWebProcess):
1936         (WebKit::WebProcess::setIgnoreTLSErrors): Call
1937         ResourceHandle::setIgnoreSSLErrors().
1938         (WebKit):
1939
1940 2012-12-20  Dominik Röttsches  <dominik.rottsches@intel.com>
1941
1942         [EFL] MiniBrowser does not play Infinite Gangnam Style
1943         https://bugs.webkit.org/show_bug.cgi?id=103531
1944
1945         Reviewed by Kenneth Rohde Christiansen.
1946
1947         WebAudio preference now defaults to switched on.
1948
1949         * UIProcess/API/efl/EwkViewImpl.cpp:
1950         (EwkViewImpl::EwkViewImpl):
1951
1952 2012-12-20  Huang Dongsung  <luxtella@company100.net>
1953
1954         Remove GraphicsLayer::setGraphicsLayerFactory().
1955         https://bugs.webkit.org/show_bug.cgi?id=105503
1956
1957         Reviewed by Kenneth Rohde Christiansen.
1958
1959         We don't need GraphicsLayer::setGraphicsLayerFactory() anymore. After r130302,
1960         we have used a graphics layer factory explicitly.
1961
1962         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
1963         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
1964         * WebProcess/efl/WebProcessMainEfl.cpp:
1965         (WebKit::WebProcessMainEfl):
1966         * WebProcess/qt/WebProcessMainQt.cpp:
1967         (WebKit::WebProcessMainQt):
1968
1969 2012-12-20  Dominik Röttsches  <dominik.rottsches@intel.com>
1970
1971         [WK2] WebAudio WKTR support
1972         https://bugs.webkit.org/show_bug.cgi?id=95084
1973
1974         Reviewed by Kenneth Rohde Christiansen.
1975
1976         Implementing audio data dump support for WebKitTestRunner,
1977         by adding the API to the IDL, enabling IPC for transferring
1978         the audio data as bytebuffer and dumping it according
1979         to run-webkit-tests script's expectations.
1980
1981         I am adding a testrunner specific bundle method to extract data
1982         from a Uint8Array into a bytebuffer. This API is used by
1983         WebKitTestRunner's TestRunner to extract the data into a local
1984         variable, then sending it over IPC.
1985
1986         * DerivedSources.pri: Fixing Qt build by adding JSUint8Array.h header to list of forwarding headers.
1987         * Target.pri: Adding missing WKData.* files. Qt build fix.
1988         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1989         (WKBundleCreateWKDataFromUint8Array): Added.
1990         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: Adding WKBundleCreateWKDataFromUint8Array.
1991         * WebProcess/InjectedBundle/InjectedBundle.cpp: Convert Uint8Array to WebData.
1992         (WebKit::InjectedBundle::createWebDataFromUint8Array):
1993         (WebKit):
1994         * WebProcess/InjectedBundle/InjectedBundle.h:
1995         (WebKit):
1996         (InjectedBundle):
1997
1998 2012-12-19  Kiran Muppala  <cmuppala@apple.com>
1999
2000         Adopt new assertion SPI for process suppression on Mac
2001         https://bugs.webkit.org/show_bug.cgi?id=105378
2002
2003         Reviewed by Mark Rowe.
2004
2005         Process suppression for WebKit2 child processes is currently enabled or disabled using AutomaticTermination.
2006         This should be replaced with a new assertion SPI specific to process suppression.
2007
2008         * Shared/ChildProcess.cpp:
2009         (WebKit::ChildProcess::ChildProcess): Remove unused member variable m_applicationIsOccluded.
2010         * Shared/ChildProcess.h:
2011         (WebKit::ChildProcess::applicationIsOccluded): Infer occlusion state from m_processVisibleAssertion.
2012         * Shared/mac/ChildProcessMac.mm:
2013         (WebKit::ChildProcess::setApplicationIsOccluded): Use applicationIsOccluded() accessor to check if the
2014         occlusion state has changed and take or release a process visible assertion accordingly.
2015         (WebKit::ChildProcess::platformInitialize): Remove call to initializeTimerCoalescingPolicy(), since taking
2016         a process visible assertion also sets the timer coalescing policy appropriately.  Set the occlusion
2017         state to false on initialization.
2018
2019 2012-12-19  Alexey Proskuryakov  <ap@apple.com>
2020
2021         <rdar://problem/12890242> [WK2 NetworkProcess] Client doesn't receive SSL certificates
2022         https://bugs.webkit.org/show_bug.cgi?id=105467
2023
2024         Reviewed by Brady Eidson.
2025
2026         * NetworkProcess/NetworkResourceLoader.cpp:
2027         (WebKit::NetworkResourceLoader::didReceiveResponse):
2028         * Shared/mac/PlatformCertificateInfo.mm:
2029         (WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
2030         * WebProcess/Network/WebResourceLoader.cpp:
2031         (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
2032         * WebProcess/Network/WebResourceLoader.h:
2033         * WebProcess/Network/WebResourceLoader.messages.in:
2034         Pass certificate chain over IPC, so that we could ultimately send it to client
2035         via WebPageProxy::DidCommitLoadForFrame message.
2036
2037         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface):
2038         Initialize a WKSI function we've been missing.
2039
2040 2012-12-19  Jon Lee  <jonlee@apple.com>
2041
2042         Add a function to set the origin hash table
2043         https://bugs.webkit.org/show_bug.cgi?id=105447
2044         <rdar://problem/12910985>
2045
2046         Reviewed by Brian Weinstein.
2047
2048         Add a new API called WKContextSetPlugInAutoStartOriginHashes. It assigns the table of hashes,
2049         keyed by main frame origin, to the WebContext. That, in turn, notifies all existing web
2050         processes, so that each web process can update its copy of the auto-start hashes.
2051
2052         * UIProcess/API/C/WKContext.cpp:
2053         (WKContextSetPlugInAutoStartOriginHashes): To clear the table, an empty dictionary must be
2054         provided.
2055         * UIProcess/API/C/WKContext.h:
2056
2057         * UIProcess/WebContext.cpp:
2058         (WebKit::WebContext::setPlugInAutoStartOriginHashes): Forward to PlugInAutoStartProvider.
2059         * UIProcess/WebContext.h:
2060
2061         * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
2062         (WebKit::PlugInAutoStartProvider::setAutoStartOriginsTable): Clear the map and set of hashes,
2063         and convert the data from the provided dictionary. Also add it to a temporary vector, which will
2064         be used to pass along to all of the active web processes.
2065         * UIProcess/Plugins/PlugInAutoStartProvider.h:
2066
2067         * WebProcess/WebProcess.messages.in: Add plugInAutoStartOriginsChanged. Takes in a vector of
2068         the new set of hashes.
2069         * WebProcess/WebProcess.cpp:
2070         (WebKit::WebProcess::plugInAutoStartOriginsChanged): Clear the existing set, and copy the new
2071         hashes.
2072         * WebProcess/WebProcess.h:
2073
2074 2012-12-18  Jon Lee  <jonlee@apple.com>
2075
2076         Notify context client of change to table, and allow client to get a copy of it
2077         https://bugs.webkit.org/show_bug.cgi?id=105364
2078         <rdar://problem/12906267>
2079
2080         Reviewed by Brady Eidson.
2081
2082         Add a callback to notify the context client that the origin hashes have changed.
2083         The client may choose to get a copy of that table and save it to disk.
2084
2085         * UIProcess/API/C/WKContext.cpp:
2086         (WKContextCopyPlugInAutoStartOriginHashes): Added to the context client.
2087         * UIProcess/API/C/WKContext.h:
2088         * UIProcess/WebContext.cpp:
2089         (WebKit::WebContext::plugInAutoStartOriginHashes): Return a copy of the origin hash
2090         table.
2091         * UIProcess/WebContext.h:
2092
2093         * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
2094         (WebKit::PlugInAutoStartProvider::addAutoStartOrigin): When the origin is added to
2095         the table, notify the context client.
2096         (WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy): Create a copy of the
2097         table.
2098         * UIProcess/Plugins/PlugInAutoStartProvider.h:
2099
2100         * UIProcess/WebContextClient.cpp:
2101         (WebKit::WebContextClient::plugInAutoStartOriginHashesChanged): Call the client.
2102         * UIProcess/WebContextClient.h:
2103
2104 2012-12-19  Alexis Menard  <alexis@webkit.org>
2105
2106         Implement CSS parsing for CSS transitions unprefixed.
2107         https://bugs.webkit.org/show_bug.cgi?id=104804
2108
2109         Reviewed by Dean Jackson.
2110
2111         Add a new flag ENABLE_CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED
2112         to cover the work of unprefixing Transforms, Animations and 
2113         Transitions. It will let the possibility of each ports to turn it off 
2114         in their release branches until we're confident that these CSS 
2115         properties are ready to be unprefixed.
2116
2117         * Configurations/FeatureDefines.xcconfig:
2118
2119 2012-12-19  Kondapally Kalyan  <kalyan.kondapally@intel.com>
2120
2121         [EFL][WK2][AC] Avoid creating an empty surface.
2122         https://bugs.webkit.org/show_bug.cgi?id=105410
2123
2124         Reviewed by Kenneth Rohde Christiansen.
2125
2126         Ensure that the view has valid size before creating the surface.
2127
2128         * UIProcess/API/efl/EvasGLSurface.h:
2129         (WebKit::EvasGLSurface::create):
2130         * UIProcess/API/efl/EwkViewImpl.cpp:
2131         (EwkViewImpl::displayTimerFired):
2132
2133 2012-12-19  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2134
2135         [EFL][Qt][WK2] Going back to 47-amazing-css3-animation-demos shows nothing or wrong position
2136         https://bugs.webkit.org/show_bug.cgi?id=104414
2137
2138         Reviewed by Simon Hausmann.
2139
2140         When contents size changes, make sure to apply any pending position
2141         change if possible.
2142
2143         * UIProcess/PageViewportController.cpp:
2144         (WebKit::PageViewportController::didChangeContentsSize):
2145
2146 2012-12-19  Alberto Garcia  <agarcia@igalia.com>
2147
2148         [GTK] [WK2] Trailing semicolon in an #include line
2149         https://bugs.webkit.org/show_bug.cgi?id=105418
2150
2151         Reviewed by Xan Lopez.
2152
2153         * UIProcess/gtk/WebContextGtk.cpp:
2154         Remove trailing semicolon in #include line.
2155
2156 2012-12-19  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2157
2158         [EFL][WK2] Move deviceScaleFactor to our view as it's view related
2159         https://bugs.webkit.org/show_bug.cgi?id=105412
2160
2161         Reviewed by Laszlo Gombos.
2162
2163         * UIProcess/API/efl/EwkViewImpl.cpp:
2164         (EwkViewImpl::setDeviceScaleFactor):
2165         (EwkViewImpl::transformFromScene):
2166         * UIProcess/API/efl/EwkViewImpl.h:
2167         (EwkViewImpl):
2168         * UIProcess/API/efl/ewk_view.cpp:
2169         (ewk_view_device_pixel_ratio_set):
2170
2171 2012-12-19  Zeno Albisser  <zeno@webkit.org>
2172
2173         [Qt] Missing vtable for LoadStartedCatcher.
2174         https://bugs.webkit.org/show_bug.cgi?id=105313
2175
2176         Properly splitting class declarations and function
2177         definitions into headers/cpp-files.
2178         This makes including util.moc redundant
2179         and avoids the well known vtable issues with QObject classes.
2180
2181         Reviewed by Simon Hausmann.
2182
2183         * UIProcess/API/qt/tests/util.cpp:
2184         (LoadSpy::LoadSpy):
2185         (LoadSpy::onLoadingChanged):
2186         * UIProcess/API/qt/tests/util.h:
2187         (LoadSpy):
2188
2189 2012-12-19  KyungTae Kim  <ktf.kim@samsung.com>
2190
2191         Unused parameters on WebContext.cpp
2192         https://bugs.webkit.org/show_bug.cgi?id=105395
2193
2194         Reviewed by Kentaro Hara.
2195
2196         Because the parameters 'certficate', 'host' are not used if !ENABLE(NETWORK_PROCESS), 
2197         use UNUSED_PARAM macro to fix build warning -Wunused-parameter.
2198
2199         * UIProcess/WebContext.cpp:
2200         (WebKit::WebContext::allowSpecificHTTPSCertificateForHost):
2201
2202 2012-12-18  Alexey Proskuryakov  <ap@apple.com>
2203
2204         Remove unnecessary functions from CookiesStrategy
2205         https://bugs.webkit.org/show_bug.cgi?id=105369
2206
2207         Reviewed by Brady Eidson.
2208
2209         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2210         * NetworkProcess/NetworkConnectionToWebProcess.h:
2211         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
2212         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2213         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2214
2215         * WebProcess/Cookies/WebCookieManager.cpp: Call PlatformCookieJar directly.
2216         Cookie messages to NetworkProcess should not be sent through WebProcess. In a future
2217         patch, I'll make WebCookieManagerProxy message NetworkProcess instead.
2218
2219 2012-12-18  Jon Lee  <jonlee@apple.com>
2220
2221         [WK2] Create a context client
2222         https://bugs.webkit.org/show_bug.cgi?id=105316
2223         <rdar://problem/12901762>
2224
2225         Reviewed by Brady Eidson.
2226
2227         Web contexts already have clients related to downloads or history.
2228         Miscellaneous callbacks can be grouped into a generic client for the
2229         web context.
2230
2231         * UIProcess/API/C/WKContext.cpp:
2232         (WKContextSetClient): Set the client for the context.
2233         * UIProcess/API/C/WKContext.h: Define a new, empty WKContextClient.
2234
2235         * UIProcess/WebContext.cpp:
2236         (WebKit::WebContext::initializeClient):
2237         * UIProcess/WebContext.h: Add a variable for the new client. Move the
2238         download client so that all the clients are grouped together.
2239         (WebKit::WebContext::client): Returns the context client.
2240         * UIProcess/WebContextClient.cpp: Added. Currently empty, but will be
2241         filled out in a pending patch.
2242         * UIProcess/WebContextClient.h: Added.
2243
2244         Add WebContextClient.{h,cpp}.
2245         * CMakeLists.txt:
2246         * GNUmakefile.list.am:
2247         * Target.pri:
2248         * WebKit2.xcodeproj/project.pbxproj:
2249         * win/WebKit2.vcproj:
2250
2251 2012-12-18  Ivan Krstić  <ike@apple.com>
2252
2253         <rdar://problem/12720539> per-pid private temporary directories for sandboxed webkit2 plugins
2254
2255         Reviewed by Sam Weinig, Alexey Proskuryakov, Anders Carlsson.
2256
2257         Previously we assigned each PluginProcess a private temporary and
2258         cache directory based on the bundle name of the plugin that was
2259         running. This sometimes led to overly-long pathnames (sockets on OS X
2260         can only be 103 characters long), and didn't provide isolation between
2261         multiple running instances of the same plugin on behalf of different
2262         processes. We now assign each PluginProcess its own private
2263         temporary and cache directory regardless of which plugin it's running,
2264         and make an attempt to clean these up when the process terminates.
2265
2266         We also pass the temporary directory into the sandbox
2267         profile as a parameter, in case the plugin profile needs to apply
2268         additional rules beyond the default read/write policy.
2269
2270         * PluginProcess/mac/PluginProcessMainMac.mm:
2271         (WebKit::PluginProcessMain):
2272         * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm:
2273         (enterSandbox):
2274
2275 2012-12-18  Beth Dakin  <bdakin@apple.com>
2276
2277         https://bugs.webkit.org/show_bug.cgi?id=102579
2278         [mac] Enable scaled cursors
2279
2280         Reviewed by Dean Jackson.
2281
2282         * Configurations/FeatureDefines.xcconfig:
2283
2284 2012-12-18  Joseph Pecoraro  <pecoraro@apple.com>
2285
2286         [Mac] Add Build Phase to Check Headers for Inappropriate Macros (Platform.h macros)
2287         https://bugs.webkit.org/show_bug.cgi?id=104279
2288
2289         Reviewed by David Kilzer.
2290
2291         Add a build phase to check the public WebKit2 headers for
2292         inappropriate macros. Also set the executable as an input
2293         path on the other check-* build phases.
2294
2295         * WebKit2.xcodeproj/project.pbxproj:
2296
2297 2012-12-18  Jer Noble  <jer.noble@apple.com>
2298
2299         REGRESSION: Using the Exit Full Screen button in the menu bar to exit HTML5 / media full screen breaks Safari windows
2300         https://bugs.webkit.org/show_bug.cgi?id=104610
2301
2302         Reviewed by Anders Carlsson.
2303
2304         When a user clicks on the menu-bar exit fullscreen button, that skips notifying the document that 
2305         the window is exiting fullscreen and tearing down the placeholder. Manually call that part of the code
2306         when we detect that it has been skipped.
2307
2308         * UIProcess/mac/WKFullScreenWindowController.mm:
2309         (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
2310
2311 2012-12-18  Brady Eidson  <beidson@apple.com>
2312
2313         WebProcesses often crash if they access the network after a NetworkProcess crash.
2314         <rdar://problem/12865789> and https://bugs.webkit.org/show_bug.cgi?id=105338
2315
2316         Reviewed by Alexey Proskuryakov.
2317
2318         After a NetworkProcess crash we should try to re-establish a connection to a new NetworkProcess
2319         when it is needed.
2320
2321         If that attempt fails, then the WebProcess should "cleanly" crash.
2322
2323         * WebProcess/WebProcess.cpp:
2324         (WebKit::WebProcess::networkConnection):
2325
2326 2012-12-17  Sam Weinig  <sam@webkit.org>
2327
2328         Try to fix the Mac build.
2329
2330         * NetworkProcess/mac/NetworkProcessMac.mm:
2331
2332 2012-12-17  Halton Huo  <halton.huo@intel.com>
2333
2334         [EFL] Add ecore_imf_evas to FindEcore.cmake
2335         https://bugs.webkit.org/show_bug.cgi?id=105159
2336
2337         Reviewed by Laszlo Gombos.
2338
2339         * PlatformEfl.cmake: Add ECORE_IMF_EVAS_LIBRARIES to WebProcess_LIBRARIES
2340
2341 2012-12-17  Huang Dongsung  <luxtella@company100.net>
2342
2343         Coordinated Graphics: Refactor TiledBackingStore code in CoordinatedGraphicsLayer.
2344         https://bugs.webkit.org/show_bug.cgi?id=103959
2345
2346         Reviewed by Kenneth Rohde Christiansen.
2347
2348         Currently, CoordinatedGraphicsLayer has complex code related to TiledBackingStore.
2349         It has two problem.
2350         1. CoordinatedGraphicsLayer hacks TiledBackingStore to prevent
2351         TiledBackingStore from asynchronously sending UpdateTile message to UI
2352         Process.
2353         2. CreateTile and RemoveTile message can be sent to UI Process at any time.
2354
2355         This patch makes CoordinatedGraphicsLayer use TiledBackingStore more explicitly.
2356         It means only during flushing layer states, CoordinatedGraphicsLayer
2357         calls methods of TiledBackingStore, which indirectly call createTile(),
2358         updateTile() and removeTile().
2359
2360         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
2361         (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
2362         (WebCore::CoordinatedGraphicsLayer::setVisibleContentRectTrajectoryVector):
2363         (WebCore::CoordinatedGraphicsLayer::setContentsScale):
2364         (WebCore::CoordinatedGraphicsLayer::adjustContentsScale):
2365         (WebCore::CoordinatedGraphicsLayer::tiledBackingStoreHasPendingTileCreation):
2366         (WebCore::CoordinatedGraphicsLayer::beginContentUpdate):
2367         (WebCore::CoordinatedGraphicsLayer::createTile):
2368         (WebCore::CoordinatedGraphicsLayer::updateTile):
2369         (WebCore::CoordinatedGraphicsLayer::removeTile):
2370         (WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
2371         (WebCore::CoordinatedGraphicsLayer::purgeBackingStores):
2372         (WebCore::CoordinatedGraphicsLayer::setNeedsVisibleRectAdjustment):
2373         (WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect):
2374         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
2375         (CoordinatedGraphicsLayerClient):
2376         (CoordinatedGraphicsLayer):
2377         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2378         (WebKit::CoordinatedLayerTreeHost::notifyFlushRequired):
2379         (WebKit::CoordinatedLayerTreeHost::createGraphicsLayer):
2380         (WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect):
2381         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
2382
2383 2012-12-17  Brady Eidson  <beidson@apple.com>
2384
2385         Can't visit sites with untrusted certs with the NetworkProcess.
2386         <rdar://problem/12885641> and https://bugs.webkit.org/show_bug.cgi?id=105235
2387
2388         Reviewed by Sam Weinig.
2389
2390         For Mac the missing functionality is being able to tell the network layer in the
2391         NetworkProcess to temporarily accept a certificate chain for the given host.
2392
2393         This patch adds some SPI supporting the way this works on Mac.
2394
2395         Add a message and Mac implementation for "allowSpecificHTTPSCertificateForHost":
2396         * NetworkProcess/NetworkProcess.h:
2397         * NetworkProcess/NetworkProcess.messages.in:
2398         * NetworkProcess/mac/NetworkProcessMac.mm:
2399         (WebKit::NetworkProcess::allowSpecificHTTPSCertificateForHost):
2400
2401         Add SPI for the embedding app"
2402         * UIProcess/API/C/WKContext.cpp:
2403         (WKContextAllowSpecificHTTPSCertificateForHost):
2404         * UIProcess/API/C/WKContextPrivate.h:
2405
2406         * UIProcess/WebContext.cpp:
2407         (WebKit::WebContext::allowSpecificHTTPSCertificateForHost):
2408         * UIProcess/WebContext.h:
2409
2410 2012-12-17  Huang Dongsung  <luxtella@company100.net>
2411
2412         [CoordinatedGraphics] Assertion hit in WebKit::LayerTreeRenderer::setLayerState()
2413         https://bugs.webkit.org/show_bug.cgi?id=104518
2414
2415         Reviewed by Noam Rosenthal.
2416
2417         CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly() must perform
2418         only during flushing pending layer changes in CoordinatedLayerTreeHost.
2419         RenderLayerCompositor can call GraphicsLayer::flushCompositingState() regardless
2420         of CoordinatedLayerTreeHost and it breaks our assumption. It means that
2421         CoordinatedGraphicsLayer can send messages although m_waitingForUIProcess in
2422         CoordinatedLayerTreeHost is true.
2423
2424         Assertion hits because of the same reason. If RenderLayerCompositor calls
2425         flushCompositingState() before the first CoordinatedLayerTreeHost::flushPendingLayerChanges(),
2426         SetCompositingLayerState message can be prior to SetRootCompositingLayer message.
2427
2428         We fix this by ensuring that we perform the layer flush only in the code
2429         path originating from CoordinatedLayerTreeHost.
2430
2431         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
2432         (WebCore::CoordinatedGraphicsLayer::flushCompositingState):
2433         (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
2434         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
2435         (CoordinatedGraphicsLayerClient):
2436         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2437         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
2438         (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges):
2439         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
2440
2441 2012-12-17  Alexey Proskuryakov  <ap@apple.com>
2442
2443         <rdar://problem/12895354> NetworkProcess should not exit after downloading
2444         https://bugs.webkit.org/show_bug.cgi?id=105209
2445
2446         Reviewed by Anders Carlsson.
2447
2448         * NetworkProcess/NetworkProcess.cpp:
2449         (WebKit::NetworkProcess::shouldTerminate): This process should never voluntarily
2450         terminate, because it keeps session auth and cookies.
2451
2452 2012-12-17  Thiago Marcos P. Santos  <thiago.santos@intel.com>
2453
2454         [EFL] Unit tests process hanging on WK2 Release bots
2455         https://bugs.webkit.org/show_bug.cgi?id=105021
2456
2457         Reviewed by Kenneth Rohde Christiansen.
2458
2459         Follow-up of r137605, which made it more difficult to reproduce
2460         the race condition but doesn't entirely solve the problem. Now
2461         we are handling only points in the middle of the fork()/exec().
2462
2463         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
2464         (WebKit::ProcessLauncher::launchProcess):
2465
2466 2012-12-17  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2467
2468         [EFL][WK2] window_create doesn't receive the url
2469         https://bugs.webkit.org/show_bug.cgi?id=105184
2470
2471         Reviewed by Alexis Menard.
2472
2473         Pass the url to the window_create method.
2474
2475         * UIProcess/API/efl/EwkViewImpl.cpp:
2476         (EwkViewImpl::createNewPage):
2477         * UIProcess/API/efl/EwkViewImpl.h:
2478         (EwkViewImpl):
2479         * UIProcess/API/efl/ewk_view.h:
2480         * UIProcess/API/efl/tests/test_ewk2_window_features.cpp:
2481         (createDefaultWindow):
2482         (createWindow):
2483         * UIProcess/efl/PageUIClientEfl.cpp:
2484         (WebKit::PageUIClientEfl::createNewPage):
2485
2486 2012-12-17  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2487
2488         [WK2] TiledBackingStore: css3/device-adapt/viewport-width-not-affecting-next-page.html is flaky
2489         https://bugs.webkit.org/show_bug.cgi?id=105131
2490
2491         Reviewed by Kenneth Rohde Christiansen.
2492
2493         The problem was lead by truncation of the scaled result for 'contentFixedSize'.
2494         Fixed now with using FloatSize::scale() instead of IntSize::scale().
2495
2496         * WebProcess/WebPage/WebPage.cpp:
2497         (WebKit::WebPage::sendViewportAttributesChanged):
2498
2499 2012-12-17  Oswald Buddenhagen  <oswald.buddenhagen@digia.com>
2500
2501         [Qt] remove some unnecessary CONFIG additions
2502
2503         Reviewed by Simon Hausmann.
2504
2505         qt is already added by spec_pre.prf, warn_on and depend_includepath by
2506         default_pre.prf.
2507
2508         * UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro:
2509         * UIProcess/API/qt/tests/qmltests/WebView.pro:
2510
2511 2012-12-17  Oswald Buddenhagen  <oswald.buddenhagen@digia.com>
2512
2513         [Qt] rely on automatic output directory setup
2514
2515         Reviewed by Simon Hausmann.
2516
2517         Now being a proper qt module (by virtue of having load(qt_build_config)
2518         in .qmake.conf), webkit gets the path setup goodies for free.
2519
2520         This also fixes Makefile.api.Debug/Release trying to generate qrc_WebKit.cpp
2521         at the same time, instead of the debug and release version ending up in different
2522         directories as they should.
2523
2524         * UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro:
2525         * UIProcess/API/qt/tests/qmltests/WebView.pro:
2526
2527 2012-12-17  Thiago Marcos P. Santos  <thiago.santos@intel.com>
2528
2529         [EFL] Unit tests process hanging on WK2 Release bots
2530         https://bugs.webkit.org/show_bug.cgi?id=105021
2531
2532         Reviewed by Kenneth Rohde Christiansen.
2533
2534         Do not allocate memory in the middle of a fork()/exec().
2535         EFL uses global FastMalloc new operator and when we fork(), the
2536         process is in a very delicate state. We were being lucky most of the
2537         time, but sometimes FastMalloc enters in a busy wait and hangs
2538         because it's data structures cannot be trusted after the fork().
2539
2540         This explains why sometimes we see UIProcess hanging on the bots:
2541         they are in fact UIProcess trying to exec() into a WebProcess but
2542         hanged just after the fork(). CMake test runner kills the original
2543         UIProcess due to timeout and the buggy one stays forever.
2544
2545         * PlatformEfl.cmake:
2546         Set the timeout back to the original value.
2547
2548         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
2549         (WebKit::ProcessLauncher::launchProcess):
2550         I'm keeping the original behavior, including the call to
2551         system() when wrapping the WebProcess on Debug mode. This
2552         should be changed to exec() in another patch.
2553
2554 2012-12-17  Csaba Osztrogonác  <ossy@webkit.org>
2555
2556         Fix the Qt Windows build after r137803
2557         https://bugs.webkit.org/show_bug.cgi?id=105152
2558
2559         Reviewed by Kentaro Hara.
2560
2561         * Shared/CacheModel.h:
2562
2563 2012-12-16  Tim Horton  <timothy_horton@apple.com>
2564
2565         PDFPlugin: The "Open in Preview" HUD button should work
2566         https://bugs.webkit.org/show_bug.cgi?id=102448
2567         <rdar://problem/12695729>
2568
2569         Reviewed by Alexey Proskuryakov.
2570
2571         Implement the "Open in Preview" button for PDFPlugin, by moving the implementation from PDFViewController
2572         onto WebPageProxyMac, and reusing it in PDFViewController and PDFPlugin.
2573
2574         * UIProcess/API/mac/PDFViewController.h:
2575         (PDFViewController): Remove unnecessary members in favor of a UUID that identifies our PDF on disk.
2576         * UIProcess/API/mac/PDFViewController.mm:
2577         (WebKit::PDFViewController::openPDFInFinder): Move PDFViewController's implementation of openPDFInFinder
2578         and related functions to WebPageProxyMac. This will allow it to be shared with PDFPlugin.
2579         * UIProcess/WebPageProxy.h:
2580         (WebPageProxy): Add savePDFToFileInTemporaryFolderAndOpenWithNativeApplication,
2581         savePDFToFileInTemporaryFolderAndOpenWithNativeApplicationRaw, and openPDFFromTemporaryFolderWithNativeApplication.
2582         Add m_temporaryPDFFiles, which is used to keep track of the filenames of PDFs that we've saved to disk.
2583         * UIProcess/WebPageProxy.messages.in:
2584         Add SavePDFToFileInTemporaryFolderAndOpenWithNativeApplication and OpenPDFFromTemporaryFolderWithNativeApplication.
2585         * UIProcess/mac/WebPageProxyMac.mm:
2586         (WebKit::temporaryPDFDirectoryPath): Copied from PDFViewController. Construct the path to a
2587         WebKitPDFs temporary directory into which PDFs to be opened with a native application are downloaded.
2588         (WebKit::pathToPDFOnDisk): Copied from PDFViewController. Combine temporaryPDFDirectoryPath
2589         with the suggested filename for the given PDF, creating a new filename if the file already exists.
2590         (WebKit::WebPageProxy::savePDFToTemporaryFolderAndOpenWithNativeApplicationRaw):
2591         (WebKit::WebPageProxy::savePDFToTemporaryFolderAndOpenWithNativeApplication):
2592         Save the given PDF data to a temporary file, given the suggested filename. This inserts the
2593         filename used into m_temporaryPDFFiles, where it can later be retrieved by UUID when asked
2594         to open the PDF again in a native application. Then, open it with NSWorkspace.
2595         (WebKit::WebPageProxy::openPDFFromTemporaryFolderWithNativeApplication):
2596         Open the previously saved PDF file with NSWorkspace, referenced by UUID.
2597         We identify the file by UUID instead of name so that only the UIProcess needs
2598         to keep track of the actual filename, and so that the WebProcess
2599         cannot hand an arbitrary filename back to the UIProcess to open.
2600         * WebProcess/Plugins/PDF/PDFPlugin.h:
2601         (PDFPlugin): Add openWithNativeApplication and storage for the UUID that identifies our PDF on disk.
2602         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2603         (-[WKPDFLayerControllerDelegate openWithPreview]): Forward openWithPreview to PDFPlugin's openWithNativeApplication.
2604         (WebKit::PDFPlugin::saveToPDF):
2605         Hand raw data to WebPage and have it send the message to WebPageProxy instead of using IPC types in PDFPlugin.
2606         (WebKit::PDFPlugin::openWithNativeApplication):
2607         Ask WebPage to save the current PDF to a temporary directory and open it with a native application.
2608         If we've already downloaded the PDF (and have a non-null m_temporaryPDFUUID),
2609         we can just open the existing file.
2610         * WebProcess/WebPage/WebPage.cpp:
2611         (WebKit::WebPage::savePDFToFileInDownloadsFolder): Hand the PDF data to WebPageProxy to save.
2612         (WebKit::WebPage::savePDFToTemporaryFolderAndOpenWithNativeApplication): Hand the PDF data to WebPageProxy to save and open.
2613         * WebProcess/WebPage/WebPage.h:
2614         (WebPage): Add savePDFToFileInDownloadsFolder and savePDFToTemporaryFolderAndOpenWithNativeApplication.
2615
2616 2012-12-16  Seokju Kwon  <seokju.kwon@gmail.com>
2617
2618         [WK2] Remote Web Inspector requires the inspector
2619         https://bugs.webkit.org/show_bug.cgi?id=105088
2620
2621         Reviewed by Sam Weinig.
2622
2623         Inspector server should not be started without inspector.
2624
2625         * config.h:
2626
2627 2012-12-16  Seokju Kwon  <seokju.kwon@gmail.com>
2628
2629         Fix unused parameter compile warnings
2630         https://bugs.webkit.org/show_bug.cgi?id=105089
2631
2632         Reviewed by Kentaro Hara.
2633
2634         Use UNUSED_PARAM macro to fix build warning -Wunused-parameter.
2635
2636         * UIProcess/API/efl/ewk_view.cpp:
2637         (ewk_view_inspector_show):
2638         (ewk_view_inspector_close):
2639
2640 2012-12-16  Ryuan Choi  <ryuan.choi@samsung.com>
2641
2642         [EFL][WK2] Header files of ewk_context_menu should be installed
2643         https://bugs.webkit.org/show_bug.cgi?id=105069
2644
2645         Reviewed by Gyuyoung Kim.
2646
2647         * PlatformEfl.cmake:
2648         Modified to install ewk_context_menu.h and ewk_context_menu_item.h which
2649         are included in EWebKit2.h
2650
2651 2012-12-16  Alexey Proskuryakov  <ap@apple.com>
2652
2653         <rdar://problem/12886898> Bundle uploads don't work
2654         https://bugs.webkit.org/show_bug.cgi?id=105149
2655
2656         Reviewed by Sam Weinig.
2657
2658         * NetworkProcess/NetworkResourceLoader.cpp:
2659         (WebKit::NetworkResourceLoader::didReceiveResponse):
2660         (WebKit::NetworkResourceLoader::didFail):
2661         Clean up generated files when they are no longer needed. This has to be done before FormData
2662         destruction. This duplicates same work done in WebProcess, but duplicaiton is safe, and may
2663         be helpful if one of the sides prematurely exits.
2664
2665 2012-12-16  Jon Lee  <jonlee@apple.com>
2666
2667         Allow built-in PDF plugin and plugin documents to auto-start
2668         https://bugs.webkit.org/show_bug.cgi?id=105000
2669         <rdar://problem/12633351>
2670
2671         Reviewed by Sam Weinig.
2672
2673         Overrides PluginViewBase::shouldAlwaysAutoStart().
2674         * WebProcess/Plugins/PluginView.cpp:
2675         (WebKit::PluginView::shouldAlwaysAutoStart): If there's no plug-in, return the default,
2676         otherwise return the plug-in's behavior.
2677         * WebProcess/Plugins/PluginView.h:
2678
2679         * WebProcess/Plugins/Plugin.h:
2680         (WebKit::Plugin::shouldAlwaysAutoStart): Added. By default, return false.
2681         * WebProcess/Plugins/PDF/SimplePDFPlugin.h: Built-in PDF plug-ins should auto-start.
2682
2683 2012-12-16  Huang Dongsung  <luxtella@company100.net>
2684
2685         Coordinated Graphics: Small refactor of CoordinatedLayerTreeHost and CoordinatedGraphicsLayer.
2686         https://bugs.webkit.org/show_bug.cgi?id=104880
2687
2688         Reviewed by Noam Rosenthal.
2689
2690         This patch changes two points.
2691         1. Remove layerByIDMap() in CoordinatedGraphicsLayer because it is unused.
2692         2. Remove code swapping m_registeredLayers in CoordinatedLayerTreeHost because
2693         setCoordinator(0) does not call detachLayer().
2694
2695         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
2696         (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
2697         (WebCore::CoordinatedGraphicsLayer::~CoordinatedGraphicsLayer):
2698         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2699         (WebKit::CoordinatedLayerTreeHost::~CoordinatedLayerTreeHost):
2700
2701 2012-12-16  Anders Carlsson  <andersca@apple.com>
2702
2703         Remove the random crash thread
2704         https://bugs.webkit.org/show_bug.cgi?id=105147
2705
2706         Reviewed by Sam Weinig.
2707
2708         Remove old crashy code.
2709
2710         * WebProcess/WebProcess.cpp:
2711         (WebKit::WebProcess::initialize):
2712
2713 2012-12-16  Anders Carlsson  <andersca@apple.com>
2714
2715         Implement authentication for downloads
2716         https://bugs.webkit.org/show_bug.cgi?id=105146
2717         <rdar://problem/12239483>
2718
2719         Reviewed by Sam Weinig.
2720
2721         * NetworkProcess/NetworkProcess.cpp:
2722         (WebKit::NetworkProcess::NetworkProcess):
2723         (WebKit::NetworkProcess::initialize):
2724         (WebKit::NetworkProcess::didReceiveMessage):
2725         (WebKit::NetworkProcess::didReceiveSyncMessage):
2726         (WebKit::NetworkProcess::downloadsAuthenticationManager):
2727         * NetworkProcess/NetworkProcess.h:
2728         * UIProcess/Downloads/DownloadProxy.cpp:
2729         (WebKit::DownloadProxy::didReceiveAuthenticationChallenge):
2730         * WebProcess/Downloads/Download.cpp:
2731         (WebKit::Download::didReceiveAuthenticationChallenge):
2732         * WebProcess/Downloads/DownloadManager.cpp:
2733         (WebKit::DownloadManager::downloadsAuthenticationManager):
2734         * WebProcess/Downloads/DownloadManager.h:
2735         * WebProcess/Downloads/mac/DownloadMac.mm:
2736         * WebProcess/WebProcess.cpp:
2737         (WebKit::WebProcess::downloadsAuthenticationManager):
2738         (WebKit::WebProcess::didReceiveSyncMessage):
2739         * WebProcess/WebProcess.h:
2740
2741 2012-12-16  Huang Dongsung  <luxtella@company100.net>
2742
2743         Coordinated Graphics: Small refactor of CoordinatedLayerTreeHost and CoordinatedGraphicsLayer.
2744         https://bugs.webkit.org/show_bug.cgi?id=104880
2745
2746         Reviewed by Noam Rosenthal.
2747
2748         Delete backing stores explicitly in ~CoordinatedLayerTreeHost().
2749
2750         Clarify the lifecycle of backing stores in CoordinatedGraphicsLayer.
2751         Currently, CoordinatedGraphicsLayer::removeTile() checks if m_coordinator
2752         exists, because ~CoordinatedLayerTreeHost() sets m_coordinator in
2753         CoordinatedGraphicsLayer to 0. This patch purges backing stores before setting
2754         m_coordinator to 0. This change makes code more readable.
2755
2756         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
2757         (WebCore::CoordinatedGraphicsLayer::~CoordinatedGraphicsLayer):
2758         (WebCore::CoordinatedGraphicsLayer::beginContentUpdate):
2759         (WebCore::CoordinatedGraphicsLayer::createTile):
2760         (WebCore::CoordinatedGraphicsLayer::updateTile):
2761         (WebCore::CoordinatedGraphicsLayer::removeTile):
2762         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2763         (WebKit::CoordinatedLayerTreeHost::~CoordinatedLayerTreeHost):
2764
2765 2012-12-16  Anders Carlsson  <andersca@apple.com>
2766
2767         Authentication manager cleanup
2768         https://bugs.webkit.org/show_bug.cgi?id=105144
2769
2770         Reviewed by Sam Weinig.
2771
2772         Some cleanup to make it possible to reuse the authentication manager from the network process.
2773
2774         * UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
2775         (WebKit::AuthenticationChallengeProxy::AuthenticationChallengeProxy):
2776         (WebKit::AuthenticationChallengeProxy::~AuthenticationChallengeProxy):
2777         (WebKit::AuthenticationChallengeProxy::useCredential):
2778         (WebKit::AuthenticationChallengeProxy::cancel):
2779         * UIProcess/Authentication/AuthenticationChallengeProxy.h:
2780         (WebKit::AuthenticationChallengeProxy::create):
2781         (AuthenticationChallengeProxy):
2782         * UIProcess/Downloads/DownloadProxy.cpp:
2783         (WebKit::DownloadProxy::didReceiveAuthenticationChallenge):
2784         * UIProcess/WebPageProxy.cpp:
2785         (WebKit::WebPageProxy::didReceiveAuthenticationChallenge):
2786         * WebProcess/Authentication/AuthenticationManager.cpp:
2787         (WebKit::AuthenticationManager::AuthenticationManager):
2788         (WebKit::AuthenticationManager::setConnection):
2789         (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
2790         (WebKit::AuthenticationManager::useCredentialForChallenge):
2791         * WebProcess/Authentication/AuthenticationManager.h:
2792         * WebProcess/Downloads/Download.cpp:
2793         (WebKit::Download::didReceiveAuthenticationChallenge):
2794         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2795         (WebKit::WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
2796         * WebProcess/WebProcess.cpp:
2797         (WebKit::WebProcess::WebProcess):
2798         (WebKit::WebProcess::initialize):
2799         * WebProcess/WebProcess.h:
2800         (WebKit::WebProcess::authenticationManager):
2801         (WebProcess):
2802
2803 2012-12-16  Anders Carlsson  <andersca@apple.com>
2804
2805         Rudimentary support for main resource downloads
2806         https://bugs.webkit.org/show_bug.cgi?id=105141
2807
2808         Reviewed by Sam Weinig.
2809
2810         For now, instead of converting a main resource load into a download, just cancel it and start
2811         a new separate download.
2812
2813         * NetworkProcess/NetworkProcess.cpp:
2814         (WebKit::NetworkProcess::downloadRequest):
2815         Call through to the download manager.
2816         
2817         (WebKit::NetworkProcess::cancelDownload):
2818         Call through to the download manager.
2819
2820         * NetworkProcess/NetworkProcess.messages.in:
2821         Add new messages.
2822
2823         * UIProcess/Downloads/DownloadProxy.cpp:
2824         (WebKit::DownloadProxy::cancel):
2825         Send the cancel message to the network process when needed.
2826
2827         * UIProcess/WebContext.cpp:
2828         (WebKit::WebContext::download):
2829         Handle the network process case.
2830
2831         * UIProcess/WebPageProxy.cpp:
2832         (WebKit::WebPageProxy::WebPageProxy):
2833         (WebKit::WebPageProxy::receivedPolicyDecision):
2834         (WebKit::WebPageProxy::decidePolicyForResponse):
2835         Keep track of the current request when calling decidePolicyForResponse.
2836
2837 2012-12-16  Andy Estes  <aestes@apple.com>
2838
2839         [WebKit2] CustomProtocolManager should intercept messages of class MessageClassCustomProtocolManager sent to the network process
2840         https://bugs.webkit.org/show_bug.cgi?id=105137
2841
2842         Reviewed by Anders Carlsson.
2843
2844         * NetworkProcess/NetworkProcess.cpp:
2845         (WebKit::NetworkProcess::didReceiveMessage):
2846
2847 2012-12-16  Levi Weintraub  <leviw@chromium.org>
2848
2849         Push pixel snapping logic into TransformState
2850         https://bugs.webkit.org/show_bug.cgi?id=101779
2851
2852         Reviewed by Simon Fraser.
2853
2854         Eliminating use of SnapOffsetForTransforms as it's no longer needed.
2855
2856         * WebProcess/FullScreen/WebFullScreenManager.cpp:
2857         (WebKit::screenRectOfContents):
2858
2859 2012-12-16  Anders Carlsson  <andersca@apple.com>
2860
2861         Rename WebFrame::convertHandleToDownload to convertMainResourceLoadToDownload
2862         https://bugs.webkit.org/show_bug.cgi?id=105134
2863
2864         Reviewed by Sam Weinig.
2865
2866         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2867         (WebKit::WebFrameLoaderClient::convertMainResourceLoadToDownload):
2868         * WebProcess/WebPage/WebFrame.cpp:
2869         (WebKit::WebFrame::convertMainResourceLoadToDownload):
2870         * WebProcess/WebPage/WebFrame.h:
2871         (WebFrame):
2872
2873 2012-12-15  Anders Carlsson  <andersca@apple.com>
2874
2875         Rename FrameLoaderClient::download to convertMainResourceLoadToDownload
2876         https://bugs.webkit.org/show_bug.cgi?id=105122
2877
2878         Reviewed by Andreas Kling.
2879
2880         Update for WebCore changes.
2881
2882         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2883         (WebKit::WebFrameLoaderClient::convertMainResourceLoadToDownload):
2884         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2885         (WebFrameLoaderClient):
2886
2887 2012-12-15  Anders Carlsson  <andersca@apple.com>
2888
2889         Another build fix.
2890
2891         * UIProcess/WebContext.cpp:
2892         (WebKit::WebContext::createDownloadProxy):
2893
2894 2012-12-15  Andy Estes  <aestes@apple.com>
2895
2896         [WebKit2] Have CustomProtocolManager and CustomProtocolManagerProxy store Connections for messaging
2897         https://bugs.webkit.org/show_bug.cgi?id=105124
2898
2899         Reviewed by Anders Carlsson.
2900
2901         Remove CustomProtocolManagerProxy's assumption that all messages go to
2902         a web process. Have it take a ChildProcessProxy instead and extract its
2903         connection.
2904
2905         Similarly, remove CustomProtocolManager's assumption that all messages
2906         go through a shared WebProcess. Initialize the shared CustomProtocolManager
2907         with a Connection object instead.
2908
2909         * NetworkProcess/NetworkProcess.cpp:
2910         (WebKit::NetworkProcess::initializeNetworkProcess): Initialize the
2911         shared CustomProtocolManager with the NetworkProcess's connection to
2912         the UI process.
2913         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
2914         (WebKit::CustomProtocolManager::connection): Assert m_connection is
2915         non-0 and return it.
2916         * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
2917         (+[WKCustomProtocol canInitWithRequest:]): Remove an unnecessary
2918         namespace.
2919         (-[WKCustomProtocol initWithRequest:cachedResponse:client:]): Ditto.
2920         (-[WKCustomProtocol startLoading]): Send a message on the
2921         CustomProtocolManager's connection rather than assuming there is a
2922         shared WebProcess in our address space.
2923         (-[WKCustomProtocol stopLoading]): Ditto.
2924         (WebKit::CustomProtocolManager::initialize): Initialize the shared
2925         CustomProtocolManager with a Connection and register our custom
2926         protocol handler with NSURLProtocol.
2927         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
2928         (WebKit):
2929         (CustomProtocolManagerProxy): Take a ChildProcessProxy* rather than a
2930         WebProcessProxy*.
2931         * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
2932         (WebKit::CustomProtocolManagerProxy::CustomProtocolManagerProxy): Ditto.
2933         (WebKit::CustomProtocolManagerProxy::startLoading): Ditto.
2934         * UIProcess/Network/NetworkProcessProxy.cpp:
2935         (WebKit::NetworkProcessProxy::NetworkProcessProxy): Instantiate a
2936         CustomProtocolManagerProxy for the network process.
2937         (WebKit::NetworkProcessProxy::didReceiveMessage): Route messages of
2938         class MessageClassCustomProtocolManagerProxy to the
2939         CustomProtocolManagerProxy.
2940         * UIProcess/Network/NetworkProcessProxy.h:
2941         * UIProcess/WebProcessProxy.cpp:
2942         (WebKit::WebProcessProxy::didReceiveMessage): Assert that we aren't
2943         using the network process since we've received a message from a
2944         web process's CustomProtocolManager.
2945         * WebProcess/WebProcess.cpp:
2946         (WebKit::WebProcess::initializeWebProcess): Break CustomProtocolManager
2947         initialization out into a helper function.
2948         (WebKit::WebProcess::initializeCustomProtocolManager): Initialize our
2949         CustomProtocolManager.
2950         * WebProcess/WebProcess.h:
2951
2952 2012-12-15  Anders Carlsson  <andersca@apple.com>
2953
2954         Happy little Qt build fix.
2955
2956         * UIProcess/WebContext.cpp:
2957         (WebKit::WebContext::download):
2958
2959 2012-12-15  Alexey Proskuryakov  <ap@apple.com>
2960
2961         <rdar://problem/12886312> Cannot upload patches to Bugzilla (<input type=file> doesn't work)
2962         https://bugs.webkit.org/show_bug.cgi?id=105120
2963
2964         Reviewed by Sam Weinig.
2965
2966         Serialize HTTP body. ResourceRequest serialization cannot (and shouldn't) know about
2967         body streams, as used with files.
2968
2969         * Shared/Network/NetworkResourceLoadParameters.cpp:
2970         (WebKit::NetworkResourceLoadParameters::encode):
2971         (WebKit::NetworkResourceLoadParameters::decode):
2972         * Shared/WebCoreArgumentCoders.cpp:
2973         (CoreIPC::::encode):
2974
2975 2012-12-15  Anders Carlsson  <andersca@apple.com>
2976
2977         Handle downloads in the network process
2978         https://bugs.webkit.org/show_bug.cgi?id=105117
2979
2980         Reviewed by Sam Weinig.
2981
2982         Start using the download manager in the network process.
2983
2984         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2985         (WebKit::NetworkConnectionToWebProcess::startDownload):
2986         Call through to the download manager.
2987
2988         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
2989         Add StartDownload message.
2990
2991         * NetworkProcess/NetworkProcess.cpp:
2992         (WebKit::NetworkProcess::downloadManager):
2993         Add "singleton" download manager.
2994
2995         (WebKit::NetworkProcess::didCreateDownload):
2996         (WebKit::NetworkProcess::didDestroyDownload):
2997         (WebKit::NetworkProcess::downloadProxyConnection):
2998         Implement DownloadManager::Client.
2999
3000         * UIProcess/Network/NetworkProcessProxy.cpp:
3001         (WebKit::NetworkProcessProxy::didReceiveMessage):
3002         (WebKit::NetworkProcessProxy::didReceiveSyncMessage):
3003         Call through to the message receiver map.
3004
3005         * WebProcess/Downloads/Download.cpp:
3006         * WebProcess/Downloads/DownloadManager.cpp:
3007         (WebKit::DownloadManager::downloadProxyConnection):
3008         * WebProcess/Downloads/DownloadManager.h:
3009         Rename connection to downloadProxyConnection.
3010
3011         * WebProcess/WebPage/WebFrame.cpp:
3012         (WebKit::WebFrame::startDownload):
3013         When using the network process, send a message to it with the request that needs to be downloaded.
3014
3015         * WebProcess/WebProcess.cpp:
3016         (WebKit::WebProcess::downloadProxyConnection):
3017         Return the connection to the UI process.
3018
3019 2012-12-15  Sam Weinig  <sam@webkit.org>
3020
3021         NSURLCache should be disabled in the WebProcess when using the NetworkProcess
3022         <rdar://problem/12872266>
3023         https://bugs.webkit.org/show_bug.cgi?id=105119
3024
3025         Reviewed by Alexey Proskuryakov.
3026
3027         Set the size of the NSURLCache to 0 (both disk and memory) in the WebProcess when using
3028         the NetworkProcess.
3029
3030         * WebProcess/mac/WebProcessMac.mm:
3031         (WebKit::WebProcess::platformSetCacheModel):
3032         (WebKit::WebProcess::platformInitializeWebProcess):
3033
3034 2012-12-15  Sam Weinig  <sam@webkit.org>
3035
3036         The network process should use the correct NSURLCache location and set its size correctly for the CacheModel
3037         <rdar://problem/12848505>
3038         https://bugs.webkit.org/show_bug.cgi?id=105115
3039
3040         Reviewed by Anders Carlsson.
3041
3042         * NetworkProcess/NetworkProcess.cpp:
3043         (WebKit::NetworkProcess::NetworkProcess):
3044         (WebKit::NetworkProcess::initializeNetworkProcess):
3045         (WebKit::NetworkProcess::setCacheModel):
3046         * NetworkProcess/NetworkProcess.h:
3047         (NetworkProcess):
3048         * NetworkProcess/mac/NetworkProcessMac.mm:
3049         (WebKit::NetworkProcess::platformInitialize):
3050         (WebKit::memorySize):
3051         (WebKit::volumeFreeSize):
3052         (WebKit::NetworkProcess::platformSetCacheModel):
3053         Copy code from the WebProcess to set up the NSURLCache correctly (location and size).
3054         We should eventually move the calculation of this to the WebContext so it can be done
3055         once.
3056
3057         * Shared/Network/NetworkProcessCreationParameters.cpp:
3058         (WebKit::NetworkProcessCreationParameters::encode):
3059         (WebKit::NetworkProcessCreationParameters::decode):
3060         * Shared/Network/NetworkProcessCreationParameters.h:
3061         (NetworkProcessCreationParameters):
3062         Add the necessary creation parameters to set up the cache.
3063
3064         * UIProcess/Network/NetworkProcessProxy.cpp:
3065         (WebKit::NetworkProcessProxy::didFinishLaunching):
3066         * UIProcess/Network/NetworkProcessProxy.h:
3067         (NetworkProcessProxy):
3068         * UIProcess/Network/mac/NetworkProcessProxyMac.mm:
3069         * UIProcess/WebContext.cpp:
3070         (WebKit::WebContext::ensureNetworkProcess):
3071         (WebKit::WebContext::setCacheModel):
3072         * UIProcess/WebContext.h:
3073         (WebKit):
3074         (WebContext):
3075         * UIProcess/mac/WebContextMac.mm:
3076         (WebKit):
3077         (WebKit::WebContext::platformInitializeNetworkProcess):
3078         Move initializing the NetworkProcess to just after creating (matching the WebProcess),
3079         rather than waiting for it finish loading before sending the creation parameters.
3080         Additionally, this moves the setting up of the creation parameters to the WebContext,
3081         as that is where all the interesting state resides (and also matches the WebProcess).
3082
3083 2012-12-15  Andy Estes  <aestes@apple.com>
3084
3085         [WebKit2] Register the custom protocol handler in the network process if it exists
3086         https://bugs.webkit.org/show_bug.cgi?id=105118
3087
3088         Reviewed by Anders Carlsson.
3089
3090         Register our custom protocol handler with NSURLProtocol when starting
3091         up the network process; do not register the custom protocol handler in
3092         web processes if a network process is being used.
3093
3094         * NetworkProcess/NetworkProcess.cpp:
3095         (WebKit::NetworkProcess::initializeNetworkProcess):
3096         * WebProcess/WebProcess.cpp:
3097         (WebKit::WebProcess::initializeWebProcess):
3098         * WebProcess/mac/WebProcessMac.mm:
3099         (WebKit::WebProcess::platformInitializeWebProcess):
3100
3101 2012-12-15  Sam Weinig  <sam@webkit.org>
3102
3103         The network process should use the correct NSURLCache location and set its size correctly for the CacheModel
3104         <rdar://problem/12848505>
3105         https://bugs.webkit.org/show_bug.cgi?id=105115
3106
3107         Reviewed by Anders Carlsson.
3108
3109         * NetworkProcess/NetworkProcess.cpp:
3110         (WebKit::NetworkProcess::NetworkProcess):
3111         (WebKit::NetworkProcess::initializeNetworkProcess):
3112         (WebKit::NetworkProcess::setCacheModel):
3113         * NetworkProcess/NetworkProcess.h:
3114         (NetworkProcess):
3115         * NetworkProcess/mac/NetworkProcessMac.mm:
3116         (WebKit::NetworkProcess::platformInitialize):
3117         (WebKit::memorySize):
3118         (WebKit::volumeFreeSize):
3119         (WebKit::NetworkProcess::platformSetCacheModel):
3120         Copy code from the WebProcess to set up the NSURLCache correctly (location and size).
3121         We should eventually move the calculation of this to the WebContext so it can be done
3122         once.
3123
3124         * Shared/Network/NetworkProcessCreationParameters.cpp:
3125         (WebKit::NetworkProcessCreationParameters::encode):
3126         (WebKit::NetworkProcessCreationParameters::decode):
3127         * Shared/Network/NetworkProcessCreationParameters.h:
3128         (NetworkProcessCreationParameters):
3129         Add the necessary creation parameters to set up the cache.
3130
3131         * UIProcess/Network/NetworkProcessProxy.cpp:
3132         (WebKit::NetworkProcessProxy::didFinishLaunching):
3133         * UIProcess/Network/NetworkProcessProxy.h:
3134         (NetworkProcessProxy):
3135         * UIProcess/Network/mac/NetworkProcessProxyMac.mm:
3136         * UIProcess/WebContext.cpp:
3137         (WebKit::WebContext::ensureNetworkProcess):
3138         (WebKit::WebContext::setCacheModel):
3139         * UIProcess/WebContext.h:
3140         (WebKit):
3141         (WebContext):
3142         * UIProcess/mac/WebContextMac.mm:
3143         (WebKit):
3144         (WebKit::WebContext::platformInitializeNetworkProcess):
3145         Move initializing the NetworkProcess to just after creating (matching the WebProcess),
3146         rather than waiting for it finish loading before sending the creation parameters.
3147         Additionally, this moves the setting up of the creation parameters to the WebContext,
3148         as that is where all the interesting state resides (and also matches the WebProcess).
3149
3150 2012-12-15  Andy Estes  <aestes@apple.com>
3151
3152         Clean up the previous build fix; access m_networkProcess directly.
3153
3154         * UIProcess/WebContext.cpp:
3155         (WebKit::WebContext::registerSchemeForCustomProtocol):
3156         (WebKit::WebContext::unregisterSchemeForCustomProtocol):
3157
3158 2012-12-15  Andy Estes  <aestes@apple.com>
3159
3160         Fix the build.
3161
3162         * UIProcess/WebContext.cpp:
3163         (WebKit::WebContext::registerSchemeForCustomProtocol):
3164         (WebKit::WebContext::unregisterSchemeForCustomProtocol):
3165
3166 2012-12-15  Andy Estes  <aestes@apple.com>
3167
3168         [WebKit2] Register schemes with the network process if it is being used
3169         https://bugs.webkit.org/show_bug.cgi?id=105113
3170
3171         Reviewed by Anders Carlsson.
3172
3173         If a WebContext is using the network process, it needs to be told about
3174         scheme (un)registration rather than the context's web processes.
3175
3176         * NetworkProcess/NetworkProcess.cpp:
3177         (WebKit::NetworkProcess::initializeNetworkProcess): Tell the shared
3178         CustomProtocolManager about schemes registered at process creation time.
3179         (WebKit::NetworkProcess::registerSchemeForCustomProtocol): Tell the
3180         shared CustomProtocolManager about a new scheme.
3181         (WebKit::NetworkProcess::unregisterSchemeForCustomProtocol): Remove a
3182         scheme from the shared CustomProtocolManager.
3183         * NetworkProcess/NetworkProcess.h:
3184         * NetworkProcess/NetworkProcess.messages.in: Add registration and
3185         unregistration messages for the NetworkProcess.
3186         * Shared/Network/NetworkProcessCreationParameters.cpp:
3187         (WebKit::NetworkProcessCreationParameters::encode): Encode
3188         urlSchemesRegisteredForCustomProtocols.
3189         (WebKit::NetworkProcessCreationParameters::decode): Decode
3190         urlSchemesRegisteredForCustomProtocols.
3191         * Shared/Network/NetworkProcessCreationParameters.h: Define
3192         urlSchemesRegisteredForCustomProtocols.
3193         * UIProcess/Network/mac/NetworkProcessProxyMac.mm:
3194         (WebKit::NetworkProcessProxy::platformInitializeNetworkProcess): Populate
3195         urlSchemesRegisteredForCustomProtocols with the current set of schemes.
3196         * UIProcess/WebContext.cpp:
3197         (WebKit::WebContext::registerSchemeForCustomProtocol): Send a new
3198         scheme to either the network process or to the context's web processes.
3199         (WebKit::WebContext::unregisterSchemeForCustomProtocol): Ditto for
3200         removing a scheme.
3201         * UIProcess/WebContext.h:
3202         * UIProcess/mac/WebContextMac.mm:
3203         (WebKit::WebContext::platformInitializeWebProcess): Only populate
3204         urlSchemesRegisteredForCustomProtocols if the network process isn't
3205         being used.
3206         (WebKit::WebContext::registerNotificationObservers):
3207         * WebProcess/mac/WebProcessMac.mm:
3208         (WebKit::WebProcess::platformInitializeWebProcess):
3209         urlSchemesRegisteredForCustomProtocols should only be non-empty if the
3210         network process isn't being used. Assert this.
3211
3212 2012-12-15  Anders Carlsson  <andersca@apple.com>
3213
3214         Remove the unneeded NetworkProcessCrashed message
3215         https://bugs.webkit.org/show_bug.cgi?id=105114
3216
3217         Reviewed by Sam Weinig.
3218
3219         Remove the NetworkProcessCrashed message; it's not needed since the connection member variable is already
3220         nulled out in WebProcess::networkProcessConnectionClosed which is called when the Connection::Client::didClose member
3221         function is called on the connection between the web process and network process.
3222         
3223         Furthermore, this message was handled on the connection queue which runs on a different thread and the handler was not
3224         thread-safe so this could in theory cause bad crashes.
3225
3226         * UIProcess/Network/NetworkProcessProxy.cpp:
3227         (WebKit::NetworkProcessProxy::didClose):
3228         * WebProcess/WebProcess.cpp:
3229         * WebProcess/WebProcess.h:
3230         (WebProcess):
3231         * WebProcess/WebProcess.messages.in:
3232
3233 2012-12-15  Anders Carlsson  <andersca@apple.com>
3234
3235         Add a DownloadProxyMap object to the NetworkProcessProxy object
3236         https://bugs.webkit.org/show_bug.cgi?id=105112
3237
3238         Reviewed by Sam Weinig.
3239
3240         * UIProcess/Network/NetworkProcessProxy.cpp:
3241         (WebKit::NetworkProcessProxy::createDownloadProxy):
3242         (WebKit::NetworkProcessProxy::didClose):
3243         * UIProcess/Network/NetworkProcessProxy.h:
3244         * UIProcess/WebContext.cpp:
3245         (WebKit::WebContext::createDownloadProxy):
3246         * UIProcess/WebProcessProxy.cpp:
3247         * UIProcess/WebProcessProxy.h:
3248
3249 2012-12-15  Anders Carlsson  <andersca@apple.com>
3250
3251         Move the download proxy map from the web context to the web process proxy
3252         https://bugs.webkit.org/show_bug.cgi?id=105109
3253
3254         Reviewed by Andreas Kling.
3255
3256         More progress towards making downloads work with the networking process. Since downloads are handled by the
3257         web process when not using a networking process, it makes sense for the download proxy map to live in the
3258         web process proxy object.
3259
3260         * UIProcess/WebContext.cpp:
3261         (WebKit::WebContext::WebContext):
3262         (WebKit::WebContext::shouldTerminate):
3263         (WebKit::WebContext::disconnectProcess):
3264         (WebKit::WebContext::download):
3265         (WebKit::WebContext::createDownloadProxy):
3266         * UIProcess/WebContext.h:
3267         (WebContext):
3268         * UIProcess/WebProcessProxy.cpp:
3269         (WebKit::WebProcessProxy::disconnect):
3270         (WebKit::WebProcessProxy::shouldTerminate):
3271         (WebKit):
3272         (WebKit::WebProcessProxy::createDownloadProxy):
3273         * UIProcess/WebProcessProxy.h:
3274         (WebProcessProxy):
3275
3276 2012-12-15  Anders Carlsson  <andersca@apple.com>
3277
3278         DownloadProxy should keep a strong reference to its associated web context
3279         https://bugs.webkit.org/show_bug.cgi?id=105107
3280
3281         Reviewed by Alexey Proskuryakov.
3282
3283         While this does create a ref-cycle, it's broken when the download completes, fails, is canceled or
3284         if the process that's doing the download crashes.
3285
3286         * UIProcess/Downloads/DownloadProxy.cpp:
3287         (WebKit::DownloadProxy::processDidClose):
3288         (WebKit::DownloadProxy::didStart):
3289         (WebKit::DownloadProxy::didReceiveAuthenticationChallenge):
3290         (WebKit::DownloadProxy::didReceiveResponse):
3291         (WebKit::DownloadProxy::didReceiveData):
3292         (WebKit::DownloadProxy::shouldDecodeSourceDataOfMIMEType):
3293         (WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
3294         (WebKit::DownloadProxy::didCreateDestination):
3295         (WebKit::DownloadProxy::didFinish):
3296         (WebKit::DownloadProxy::didFail):
3297         (WebKit::DownloadProxy::didCancel):
3298         * UIProcess/Downloads/DownloadProxy.h:
3299         (DownloadProxy):
3300
3301 2012-12-15  Anders Carlsson  <andersca@apple.com>
3302
3303         Remove WebContext::downloadFinished
3304         https://bugs.webkit.org/show_bug.cgi?id=105105
3305
3306         Reviewed by Sam Weinig.
3307
3308         Have DownloadProxyMap manage the message receiver map and remove WebContext::downloadFinished.
3309
3310         * UIProcess/Downloads/DownloadProxy.cpp:
3311         (WebKit::DownloadProxy::didFinish):
3312         (WebKit::DownloadProxy::didFail):
3313         (WebKit::DownloadProxy::didCancel):
3314         * UIProcess/Downloads/DownloadProxyMap.cpp:
3315         (WebKit::DownloadProxyMap::DownloadProxyMap):
3316         (WebKit::DownloadProxyMap::createDownloadProxy):
3317         (WebKit::DownloadProxyMap::downloadFinished):
3318         * UIProcess/Downloads/DownloadProxyMap.h:
3319         (DownloadProxyMap):
3320         * UIProcess/WebContext.cpp:
3321         (WebKit::WebContext::WebContext):
3322         (WebKit::WebContext::createDownloadProxy):
3323         * UIProcess/WebContext.h:
3324
3325 2012-12-15  Sam Weinig  <sam@webkit.org>
3326
3327         Make the NetworkProcess be managed by the WebContext, rather than a singleton NetworkProcessMananger
3328         https://bugs.webkit.org/show_bug.cgi?id=105104
3329
3330         Reviewed by Alexey Proskuryakov.
3331
3332         Move to having the WebContext own and manage the NetworkProcessProxy.
3333
3334         * UIProcess/Network/NetworkProcessManager.cpp: Removed.
3335         * UIProcess/Network/NetworkProcessManager.h: Removed.
3336         * UIProcess/Network/NetworkProcessProxy.cpp:
3337         (WebKit::NetworkProcessProxy::create):
3338         (WebKit::NetworkProcessProxy::NetworkProcessProxy):
3339         (WebKit::NetworkProcessProxy::networkProcessCrashedOrFailedToLaunch):
3340         * UIProcess/Network/NetworkProcessProxy.h:
3341         (WebKit):
3342         (NetworkProcessProxy):
3343         * UIProcess/Network/mac/NetworkProcessManagerMac.mm: Removed.
3344         * UIProcess/WebContext.cpp:
3345         (WebKit::WebContext::ensureNetworkProcess):
3346         (WebKit::WebContext::removeNetworkProcessProxy):
3347         (WebKit::WebContext::getNetworkProcessConnection):
3348         (WebKit::WebContext::willStartUsingPrivateBrowsing):
3349         (WebKit::WebContext::willStopUsingPrivateBrowsing):
3350         (WebKit::WebContext::createNewWebProcess):
3351         * UIProcess/WebContext.h:
3352         (WebKit):
3353         (WebContext):
3354         (WebKit::WebContext::networkProcess):
3355         * UIProcess/WebProcessProxy.cpp:
3356         (WebKit::WebProcessProxy::getNetworkProcessConnection):
3357         * UIProcess/mac/WebContextMac.mm:
3358         (WebKit::WebContext::applicationBecameVisible):
3359         (WebKit::WebContext::applicationBecameOccluded):
3360         * WebKit2.xcodeproj/project.pbxproj:
3361
3362 2012-12-15  Anders Carlsson  <andersca@apple.com>
3363
3364         DownloadProxy objects should know which DownloadProxyMap they belong to
3365         https://bugs.webkit.org/show_bug.cgi?id=105102
3366
3367         Reviewed by Andy Estes.
3368
3369         * UIProcess/Downloads/DownloadProxy.cpp:
3370         (WebKit::DownloadProxy::create):
3371         (WebKit::DownloadProxy::DownloadProxy):
3372         * UIProcess/Downloads/DownloadProxy.h:
3373         (WebKit):
3374         (DownloadProxy):
3375         * UIProcess/Downloads/DownloadProxyMap.cpp:
3376         (WebKit::DownloadProxyMap::createDownloadProxy):
3377
3378 2012-12-15  Andy Estes  <aestes@apple.com>
3379
3380         [WebKit2] Move CustomProtocolManager to Shared/
3381         https://bugs.webkit.org/show_bug.cgi?id=105103
3382
3383         Reviewed by Sam Weinig.
3384
3385         CustomProtocolManager can be instantiated either in the NetworkProcess or the WebProcess, so it should live in Shared/.
3386
3387         * DerivedSources.make: Update the path where CustomProtocolManager.messages.in can be found.
3388         * Shared/Network/CustomProtocols/CustomProtocolManager.h: Renamed from Source/WebKit2/WebProcess/Network/CustomProtocols/CustomProtocolManager.h.
3389         * Shared/Network/CustomProtocols/CustomProtocolManager.messages.in: Renamed from Source/WebKit2/WebProcess/Network/CustomProtocols/CustomProtocolManager.messages.in.
3390         * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm: Renamed from Source/WebKit2/WebProcess/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm.
3391         * WebKit2.xcodeproj/project.pbxproj:
3392
3393 2012-12-15  Sam Weinig  <sam@webkit.org>
3394
3395         Try to fix the Qt build.
3396
3397         * Target.pri:
3398
3399 2012-12-15  Anders Carlsson  <andersca@apple.com>
3400
3401         Get rid of DownloadProxyMap::downloads()
3402         https://bugs.webkit.org/show_bug.cgi?id=105100
3403
3404         Reviewed by Sam Weinig.
3405
3406         Add the needed member functions to DownloadProxyMap and remove the downloads() member function.
3407
3408         * UIProcess/Downloads/DownloadProxyMap.cpp:
3409         (WebKit::DownloadProxyMap::downloadFinished):
3410         (WebKit::DownloadProxyMap::processDidClose):
3411         (WebKit):
3412         * UIProcess/Downloads/DownloadProxyMap.h:
3413         (WebKit::DownloadProxyMap::isEmpty):
3414         (DownloadProxyMap):
3415         * UIProcess/WebContext.cpp:
3416         (WebKit::WebContext::shouldTerminate):
3417         (WebKit::WebContext::disconnectProcess):
3418         (WebKit::WebContext::downloadFinished):
3419
3420 2012-12-15  Sam Weinig  <sam@webkit.org>
3421
3422         Move calculation of caches sizes based on the cache model to CacheModel.h/cpp
3423         https://bugs.webkit.org/show_bug.cgi?id=105098
3424
3425         Reviewed by Anders Carlsson.
3426
3427         Move calculation of caches sizes based on the cache model to CacheModel.h/cpp so
3428         that it can be used by more than just the WebProcess.
3429
3430         * CMakeLists.txt:
3431         * GNUmakefile.list.am:
3432         * Shared/CacheModel.cpp: Added.
3433         (WebKit):
3434         (WebKit::calculateCacheSizes):
3435         * Shared/CacheModel.h:
3436         * Target.pri:
3437         * WebKit2.xcodeproj/project.pbxproj:
3438         * WebProcess/WebProcess.cpp:
3439         * WebProcess/WebProcess.h:
3440         (WebProcess):
3441         * win/WebKit2.vcproj:
3442
3443 2012-12-15  Anders Carlsson  <andersca@apple.com>
3444
3445         DownloadProxyMap shouldn't be a singleton after all
3446         https://bugs.webkit.org/show_bug.cgi?id=105099
3447
3448         Reviewed by Sam Weinig.
3449
3450         Make the DownloadProxyMap be per context instead, and get rid of the m_downloads hash map from WebContext.
3451
3452         * UIProcess/Downloads/DownloadProxy.cpp:
3453         (WebKit::DownloadProxy::didFinish):
3454         (WebKit::DownloadProxy::didFail):
3455         (WebKit::DownloadProxy::didCancel):
3456         * UIProcess/Downloads/DownloadProxyMap.cpp:
3457         (WebKit::DownloadProxyMap::~DownloadProxyMap):
3458         * UIProcess/Downloads/DownloadProxyMap.h:
3459         (DownloadProxyMap):
3460         (WebKit::DownloadProxyMap::downloads):
3461         * UIProcess/WebContext.cpp:
3462         (WebKit::WebContext::shouldTerminate):
3463         (WebKit::WebContext::disconnectProcess):
3464         (WebKit::WebContext::createDownloadProxy):
3465         (WebKit::WebContext::downloadFinished):
3466         * UIProcess/WebContext.h: