After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 694091 - Implement get best web app icon in WebKit2
Implement get best web app icon in WebKit2
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Backend
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Xan Lopez
Epiphany Maintainers
Depends on: 684437 694144 694659
Blocks: 678610
 
 
Reported: 2013-02-18 14:43 UTC by Manuel Rego Casasnovas
Modified: 2013-03-06 10:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (11.42 KB, patch)
2013-02-18 14:51 UTC, Manuel Rego Casasnovas
none Details | Review
Updated patch fixing identation (11.44 KB, patch)
2013-02-18 16:51 UTC, Manuel Rego Casasnovas
none Details | Review
Updated patch fixing issue returning NULL (11.52 KB, patch)
2013-02-18 18:10 UTC, Manuel Rego Casasnovas
none Details | Review
Use async call to d-bus method (12.33 KB, patch)
2013-02-18 21:43 UTC, Manuel Rego Casasnovas
none Details | Review
Updated patch fixing warning (12.57 KB, patch)
2013-02-19 06:32 UTC, Manuel Rego Casasnovas
none Details | Review
Patch 1/2 (16.39 KB, patch)
2013-02-25 16:13 UTC, Manuel Rego Casasnovas
reviewed Details | Review
Patch 2/2 (7.49 KB, patch)
2013-02-25 16:15 UTC, Manuel Rego Casasnovas
none Details | Review
Patch 2/2 (7.71 KB, patch)
2013-02-25 18:53 UTC, Manuel Rego Casasnovas
none Details | Review
Patch 2/2 (7.65 KB, patch)
2013-02-26 16:14 UTC, Manuel Rego Casasnovas
none Details | Review
Patch 1/2 fixing naming issue and indentation (16.53 KB, patch)
2013-02-28 22:59 UTC, Manuel Rego Casasnovas
committed Details | Review
Patch 2/2 fixing naming issue (8.54 KB, patch)
2013-02-28 22:59 UTC, Manuel Rego Casasnovas
reviewed Details | Review
Patch 2/2 (8.70 KB, patch)
2013-03-05 08:28 UTC, Manuel Rego Casasnovas
committed Details | Review

Description Manuel Rego Casasnovas 2013-02-18 14:43:03 UTC
Currently it's not implemented the support to select the icon for the web apps in WK2.
Comment 1 Manuel Rego Casasnovas 2013-02-18 14:51:40 UTC
Created attachment 236601 [details] [review]
Patch
Comment 2 Manuel Rego Casasnovas 2013-02-18 16:51:31 UTC
Created attachment 236627 [details] [review]
Updated patch fixing identation
Comment 3 Manuel Rego Casasnovas 2013-02-18 18:10:41 UTC
Created attachment 236640 [details] [review]
Updated patch fixing issue returning NULL

Returning NULL values for uri or color were causing the following messages:
GLib-CRITICAL **: g_variant_new_string: assertion `string != NULL' failed

This has been fixed returning an empty string instead of NULL.
Comment 4 Manuel Rego Casasnovas 2013-02-18 21:43:43 UTC
Created attachment 236669 [details] [review]
Use async call to d-bus method
Comment 5 Manuel Rego Casasnovas 2013-02-19 06:32:31 UTC
Created attachment 236722 [details] [review]
Updated patch fixing warning

This new version fixes a warning in the D-Bus call:
warning: passing argument 7 of 'g_dbus_proxy_call' from incompatible pointer type [enabled by default]
Comment 6 Manuel Rego Casasnovas 2013-02-25 16:13:56 UTC
Created attachment 237363 [details] [review]
Patch 1/2
Comment 7 Manuel Rego Casasnovas 2013-02-25 16:15:40 UTC
Created attachment 237365 [details] [review]
Patch 2/2

Again like for bug #694144 the bug has been split in 2 patches (one for moving the DOM bindings code to ephy-web-dom-utils and the other to implement the functionality in WK2).
Comment 8 Manuel Rego Casasnovas 2013-02-25 18:53:55 UTC
Created attachment 237379 [details] [review]
Patch 2/2

After bug #694519 web extension proxy can be NULL, so included a check before using it .
Comment 9 Manuel Rego Casasnovas 2013-02-26 16:14:59 UTC
Created attachment 237457 [details] [review]
Patch 2/2
Comment 10 Xan Lopez 2013-02-28 17:18:50 UTC
Review of attachment 237363 [details] [review]:

Looks good, also needs to use the right name for the method.

::: src/window-commands.c
@@ +663,3 @@
+	document = webkit_web_view_get_dom_document (WEBKIT_WEB_VIEW (data->view));
+	res = ephy_web_dom_get_best_icon (document,
+									  base_uri,

Indentation is off here.
Comment 11 Manuel Rego Casasnovas 2013-02-28 22:58:25 UTC
I'm preparing the patches to be applied after bug #694144, as I guess previous bug will be accepted and committed before this one.

Moreover, I've rebased everything against master in order to do not lose the change in commit 59b08b8c4f87afcc6b0cc65bc88a0c25da329762.

So the new patches that I'm going to apply, should be applied in master + 2 patches for bug #694144.
Comment 12 Manuel Rego Casasnovas 2013-02-28 22:59:10 UTC
Created attachment 237660 [details] [review]
Patch 1/2 fixing naming issue and indentation
Comment 13 Manuel Rego Casasnovas 2013-02-28 22:59:32 UTC
Created attachment 237661 [details] [review]
Patch 2/2 fixing naming issue
Comment 14 Xan Lopez 2013-03-01 12:43:20 UTC
Review of attachment 237660 [details] [review]:

Looks good.
Comment 15 Xan Lopez 2013-03-01 23:57:47 UTC
Review of attachment 237661 [details] [review]:

::: embed/web-extension/ephy-web-extension.c
@@ +124,3 @@
+
+    g_dbus_method_invocation_return_value (invocation,
+                                           g_variant_new ("(bss)", result, uri ? uri : "", color ? color : ""));

Hrm. this stuff about the validation of the parameters seems a bit repetitive no? Perhaps an out: label with the method error and return.
Comment 16 Xan Lopez 2013-03-02 14:14:13 UTC
Comment on attachment 237660 [details] [review]
Patch 1/2 fixing naming issue and indentation

Pushed this one already to master.
Comment 17 Manuel Rego Casasnovas 2013-03-05 08:28:20 UTC
Created attachment 238097 [details] [review]
Patch 2/2
Comment 18 Xan Lopez 2013-03-06 10:36:02 UTC
Review of attachment 238097 [details] [review]:

Looks better to me!

::: embed/web-extension/ephy-web-extension.c
@@ +85,3 @@
+    if (!web_page) {
+      return;
+    }

The are no braces for one line statements, but I'll fix this before landing.
Comment 19 Xan Lopez 2013-03-06 10:39:50 UTC
All patches landed, closing.