[Xfce4-commits] <midori:master> Recognize -moz-document domain in user stylesheets
Christian Dywan
noreply at xfce.org
Mon Nov 1 20:02:01 CET 2010
Updating branch refs/heads/master
to eae7ec4ac35953cd4c5d8cf1c6a3e030ab82a8cd (commit)
from 10222bffd28df08118ec7b589e90d005bb953aaa (commit)
commit eae7ec4ac35953cd4c5d8cf1c6a3e030ab82a8cd
Author: Paweł Forysiuk <tuxator at o2.pl>
Date: Mon Nov 1 19:35:29 2010 +0100
Recognize -moz-document domain in user stylesheets
extensions/addons.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/extensions/addons.c b/extensions/addons.c
index 13947bf..9fd2f7f 100644
--- a/extensions/addons.c
+++ b/extensions/addons.c
@@ -821,11 +821,14 @@ css_metadata_from_file (const gchar* filename,
gchar* value = NULL;
if (g_str_has_prefix (parts[i], "url-prefix("))
value = g_strdup (parts[i] + strlen ("url-prefix("));
+ else if (g_str_has_prefix (parts[i], "domain("))
+ value = g_strdup (parts[i] + strlen ("domain("));
else if (g_str_has_prefix (parts[i], "url("))
value = g_strdup (parts[i] + strlen ("url("));
if (value)
{
guint j;
+ gchar* domain;
if (value[0] != '\'' && value[0] != '"')
{
@@ -847,11 +850,17 @@ css_metadata_from_file (const gchar* filename,
break;
j++;
}
- *includes = g_slist_prepend (*includes, g_strndup (value + 1, j - 1));
+ domain = g_strndup (value + 1, j - 1);
+ if (!strncmp ("http", domain, 4))
+ *includes = g_slist_prepend (*includes, domain);
+ else
+ {
+ *includes = g_slist_prepend (*includes,
+ g_strdup_printf ("http://*%s/*", domain));
+ g_free (domain);
+ }
g_free (value);
}
-
- /* FIXME: Recognize "domain" */
i++;
}
g_strfreev (parts);
More information about the Xfce4-commits
mailing list