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