[WebKit2] Add the ability to send messages to the WebPageGroupProxy
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2012-10-02  Andy Estes  <aestes@apple.com>
2
3         [WebKit2] Add the ability to send messages to the WebPageGroupProxy
4         https://bugs.webkit.org/show_bug.cgi?id=98233
5
6         Reviewed by Anders Carlsson.
7
8         Add a WebPageGroupProxy.messages.in, implement a stub message receiver
9         in WebPageGroupProxy, and teach WebProcess how to route messages to the
10         appropriate WebPageGroupProxy.
11
12         * CMakeLists.txt: Tell a build system about added files.
13         * DerivedSources.make: Ditto.
14         * DerivedSources.pri: Ditto.
15         * GNUmakefile.list.am: Ditto.
16         * WebKit2.xcodeproj/project.pbxproj: Ditto.
17         * win/WebKit2.vcproj: Ditto.
18         * Platform/CoreIPC/MessageID.h: Add MessageClassWebPageGroupProxy.
19         * WebProcess/WebPage/WebPageGroupProxy.cpp:
20         (WebKit::WebPageGroupProxy::didReceiveMessage): Stub out the method
21         that will receive messages.
22         (WebKit::WebPageGroupProxy::didReceiveWebPageGroupProxyMessage): Stub
23         out a method that will exist in WebPageGroupProxyMessageReceiver.cpp
24         once WebPageGroupProxy.messages.in contains messages.
25         * WebProcess/WebPage/WebPageGroupProxy.h:
26         * WebProcess/WebPage/WebPageGroupProxy.messages.in: Added.
27         * WebProcess/WebProcess.cpp:
28         (WebKit::WebProcess::didReceiveMessage): Route messages to the
29         WebPageGroupProxy matching destinationID if the message is of class
30         MessageClassWebPageGroupProxy.
31
32 2012-10-02  Anders Carlsson  <andersca@apple.com>
33
34         Change most GraphicsLayer::create calls to use the version that takes a GraphicsLayerFactory
35         https://bugs.webkit.org/show_bug.cgi?id=98217
36
37         Reviewed by Andreas Kling.
38
39         * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
40         (WebKit::LayerTreeCoordinator::LayerTreeCoordinator):
41         (WebKit::LayerTreeCoordinator::createPageOverlayLayer):
42         * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
43         (WebKit::LayerTreeHostCA::initialize):
44         (WebKit::LayerTreeHostCA::createPageOverlayLayer):
45         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
46         (WebKit::LayerTreeHostGtk::initialize):
47         (WebKit::LayerTreeHostGtk::createPageOverlayLayer):
48         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
49         (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
50
51 2012-10-03  Alberto Garcia  <agarcia@igalia.com>
52
53         [GTK] [WK2] Unused variable in webkitWebViewLoadChanged
54         https://bugs.webkit.org/show_bug.cgi?id=98271
55
56         Reviewed by Martin Robinson.
57
58         Use the priv variable to directly access private attributes
59         instead of dereferencing webView->priv all the time.
60         Fixes -Wunused-variable.
61
62         * UIProcess/API/gtk/WebKitWebView.cpp:
63         (webkitWebViewLoadChanged):
64
65 2012-10-03  Christophe Dumez  <christophe.dumez@intel.com>
66
67         [EFL][WK2] Implement focus/unfocus in UIClient
68         https://bugs.webkit.org/show_bug.cgi?id=98253
69
70         Reviewed by Gyuyoung Kim.
71
72         Implement focus-related functionality in
73         WebKitEFL's UIClient.
74
75         * UIProcess/API/efl/ewk_view_ui_client.cpp:
76         (focus):
77         (unfocus):
78         (takeFocus):
79         (ewk_view_ui_client_attach):
80
81 2012-10-03  Carlos Garcia Campos  <cgarcia@igalia.com>
82
83         [GTK] WebKitWebView doesn't emit notify:favicon when it changes in some cases in WebKit2
84         https://bugs.webkit.org/show_bug.cgi?id=98153
85
86         Reviewed by Martin Robinson.
87
88         The main problem is that it relies on icon-ready signal to be
89         emitted by the favicon database, but that signal is only emitted
90         when the icon is loaded from the network or imported from the
91         database, but not when the icon is already in memory. The way to
92         detect if a web page doesn't have a favicon or it's unknown it's
93         also incorrectly done and the wrong error is returned for pages
94         not having a favicon.
95
96         * UIProcess/API/gtk/WebKitFaviconDatabase.cpp:
97         (GetFaviconSurfaceAsyncData): Add a GError field.
98         (getIconSurfaceSynchronously): Add a GError parameter and fill it
99         accordingly. Use imageForPageURL() instead of
100         nativeImageForPageURL() because the latter always returns NULL for
101         empty images, so it's not possible to know whether it's an empty
102         image or not. If the image is empty is because the web page is
103         known by the database and it doesn't have a favicon.
104         (processPendingIconsForURI): Pass the data error to
105         getIconSurfaceSynchronously(). Don't set the icon if the request
106         has been cancelled.
107         (webkitFaviconDatabaseGetFavicon): Pass NULL as error to
108         getIconSurfaceSynchronously().
109         (setErrorForAsyncResult): Fill also error for
110         WEBKIT_FAVICON_DATABASE_ERROR_FAVICON_UNKNOWN.
111         (webkit_favicon_database_get_favicon): If we get NULL as icon in
112         the first place, check the error code returned by
113         getIconSurfaceSynchronously() and return early if the page doesn't
114         have a favicon. Remove the cancelled signal to avoid race
115         conditions.
116         (webkit_favicon_database_get_favicon_finish): Errors are processed
117         before now, so simply propagate the error if any or return the
118         favicon.
119         * UIProcess/API/gtk/WebKitWebView.cpp:
120         (_WebKitWebViewPrivate): Keep a reference of the favicon.
121         (webkitWebViewCancelFaviconRequest): Cancel any async operation to
122         get the favicon.
123         (webkitWebViewUpdateFavicon): Check if favicon has changed and
124         save it emitting also notify::favicon signal.
125         (iconReadyCallback): Only update the favicon if we don't have one
126         already.
127         (webkitWebViewFinalize): Call webkitWebViewCancelFaviconRequest().
128         (getFaviconReadyCallback): Update the favicon.
129         (webkitWebViewRequestFavicon): Request a new favicon.
130         (webkitWebViewLoadChanged): Try to get the favicon when the load
131         has been committed and the URI is the final one.
132         (webkit_web_view_get_favicon): Return the cached favicon.
133         * UIProcess/API/gtk/tests/TestWebKitFaviconDatabase.cpp:
134         (serverCallback):
135         (testSetDirectory):
136         (testGetFavicon):
137         (testWebViewFavicon):
138
139 2012-10-02  Carlos Garcia Campos  <cgarcia@igalia.com>
140
141         [GTK] Add API to get the web view that initiated a custom URI request to WebKit2 GTK+
142         https://bugs.webkit.org/show_bug.cgi?id=97895
143
144         Reviewed by Martin Robinson.
145
146         The message DidReceiveURIRequest is now sent to the page that
147         initiated the request that forwards the mesassage to the
148         WebSoupRequestManagerProxy.
149
150         * UIProcess/API/C/soup/WKSoupRequestManager.h: Update
151         didReceiveURIRequest callback to receive the initiating page ID.
152         * UIProcess/API/efl/ewk_context_request_manager_client.cpp:
153         (didReceiveURIRequest): Update the callback API change.
154         * UIProcess/API/gtk/WebKitRequestManagerClient.cpp:
155         (didReceiveURIRequest): Pass the initiating page to the
156         WebKitURISchemeRequest constructor.
157         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
158         (_WebKitURISchemeRequestPrivate): Keep a reference to the
159         WebPageProxy that initiatesd the request.
160         (webkitURISchemeRequestCreate): Save the initiating page.
161         (webkit_uri_scheme_request_get_web_view): Return the view widget
162         of the initiating WebPageProxy.
163         * UIProcess/API/gtk/WebKitURISchemeRequest.h:
164         * UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h:
165         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol.
166         * UIProcess/API/gtk/tests/TestWebKitWebContext.cpp:
167         * UIProcess/WebPageProxy.cpp:
168         (WebKit::WebPageProxy::didReceiveURIRequest): Forward the request
169         to the soup request manager proxy.
170         * UIProcess/WebPageProxy.h:
171         (WebPageProxy): Add didReceiveURIRequest().
172         * UIProcess/WebPageProxy.messages.in: Add DidReceiveURIRequest
173         message.
174         * UIProcess/soup/WebSoupRequestManagerClient.cpp:
175         (WebKit::WebSoupRequestManagerClient::didReceiveURIRequest):
176         Pass the inititing page to the client callback.
177         * UIProcess/soup/WebSoupRequestManagerClient.h:
178         (WebSoupRequestManagerClient):
179         * UIProcess/soup/WebSoupRequestManagerProxy.cpp:
180         (WebKit::WebSoupRequestManagerProxy::didReceiveURIRequest): Pass
181         the inititing page to the client.
182         * UIProcess/soup/WebSoupRequestManagerProxy.h:
183         (WebSoupRequestManagerProxy):
184         * UIProcess/soup/WebSoupRequestManagerProxy.messages.in: Remove
185         DidReceiveURIRequest message.
186         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
187         (WebKit::WebFrameNetworkingContext::WebFrameNetworkingContext):
188         Save the pageID of the WebFrame.
189         (WebKit::WebFrameNetworkingContext::initiatingPageID): Return the
190         inititing page ID.
191         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
192         * WebProcess/soup/WebSoupRequestManager.cpp:
193         (WebKit::WebSoupRequestManager::send): Send DidReceiveURIRequest
194         message to the WebPage that initiated the request.
195
196 2012-10-02  Zan Dobersek  <zandobersek@gmail.com>
197
198         Unreviewed build fix for the GTK port after r130207.
199         Use proper file separators for new entries.
200
201         * GNUmakefile.list.am:
202
203 2012-10-02  Joone Hur  <joone.hur@intel.com>
204
205         Unreviewed, GTK+,Efl debug build fix after r130225.
206
207         This patch allows to include the static xErrorString variable when LOG_DISABLED is 0.
208
209         * PluginProcess/unix/PluginProcessMainUnix.cpp:
210         (WebKit):
211
212 2012-10-02  Sam Weinig  <sam@webkit.org>
213
214         Fix a typo and add some \n's to make Mark happy.
215
216         Rubber-stamped by Mark "logging must be fast" Rowe.
217
218         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
219         (WebKit::InjectedBundle::load):
220
221 2012-10-02  Sam Weinig  <sam@webkit.org>
222
223         Add Objective-C API for the InjectedBundle
224         https://bugs.webkit.org/show_bug.cgi?id=98222
225
226         Reviewed by Anders Carlsson.
227
228         Add skeleton of the Objective-C API for the InjectedBundle.
229
230         * WebKit2.xcodeproj/project.pbxproj:
231         Add new API files.
232
233         * WebProcess/InjectedBundle/API/mac: Added.
234         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h: Added.
235         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm: Added.
236         (-[WKWebProcessPlugIn _initWithPrincipalClassInstance:injectedBundle:]):
237         Initialization method for the WKWebProcessPlugIn object. This object will act as the WKBundleRef
238         object does in the C-SPI.
239         (+[WKWebProcessPlugIn _shared]):
240         Access the shared instance.
241         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInInternal.h: Added.
242
243         * WebProcess/InjectedBundle/InjectedBundle.h:
244         Store an NSBundle rather than a CFBundleRef as the platform bundle.
245
246         * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp: Removed.
247         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm: Copied from Source/WebKit2/WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp.
248         (WebKit::InjectedBundle::load):
249         If a principal class is provided and no WKBundleInitialize function is present in the bundle, use the principal class
250         as the initialization point. The principal class must conform to the WKWebProcessPlugIn protocol and if a
251         webProcessPlugInInitialize: method is present, it is called. 
252
253 2012-10-02  Dan Bernstein  <mitz@apple.com>
254
255         Fixed a crash when the localization option is not passed to the web process.
256
257         Reviewed by Sam Weinig.
258
259         * PluginProcess/mac/PluginProcessMainMac.mm:
260         (WebKit::PluginProcessMain): Changed to not call WKSetDefaultLocalization
261         with the empty string.
262         * WebProcess/mac/WebProcessMainMac.mm:
263         (WebKit::WebProcessMain): Ditto.
264
265 == Rolled over to ChangeLog-2012-10-02 ==