mirror of
https://git.yoctoproject.org/poky
synced 2026-02-09 18:23:02 +01:00
update gtkhtml2 patches and update to a newer more functional Web snapshot git-svn-id: https://svn.o-hand.com/repos/poky@251 311d38ba-8fff-0310-9ca6-ca027cbcb966
51 lines
2.0 KiB
Diff
51 lines
2.0 KiB
Diff
Index: libgtkhtml/document/htmldocument.c
|
|
===================================================================
|
|
--- libgtkhtml/document/htmldocument.c.orig 2006-02-05 18:19:17.000000000 +0000
|
|
+++ libgtkhtml/document/htmldocument.c 2006-02-05 18:20:06.000000000 +0000
|
|
@@ -1122,3 +1122,31 @@ html_document_find_anchor (HtmlDocument
|
|
else
|
|
return NULL;
|
|
}
|
|
+
|
|
+void
|
|
+html_document_add_stylesheet (HtmlDocument *document, CssStylesheet *sheet)
|
|
+{
|
|
+ HtmlStyleChange style_change;
|
|
+
|
|
+ g_return_val_if_fail (HTML_IS_DOCUMENT (document), NULL);
|
|
+
|
|
+ /* Note: @import not supported for user stylesheets, due to
|
|
+ * complications it would cause with removal.
|
|
+ */
|
|
+
|
|
+ document->stylesheets = g_slist_append (document->stylesheets, sheet);
|
|
+
|
|
+ style_change = html_document_restyle_node (document, DOM_NODE (dom_Document__get_documentElement (document->dom_document)), NULL, TRUE);
|
|
+ g_signal_emit (G_OBJECT (document), document_signals [STYLE_UPDATED], 0, DOM_NODE (dom_Document__get_documentElement (document->dom_document)), style_change);
|
|
+}
|
|
+
|
|
+gboolean
|
|
+html_document_remove_stylesheet (HtmlDocument *document, CssStylesheet *stylesheet)
|
|
+{
|
|
+ g_return_val_if_fail (stylesheet && HTML_IS_DOCUMENT (document), FALSE);
|
|
+
|
|
+ document->stylesheets = g_slist_remove (document->stylesheets, stylesheet);
|
|
+
|
|
+ return TRUE;
|
|
+}
|
|
+
|
|
Index: libgtkhtml/document/htmldocument.h
|
|
===================================================================
|
|
--- libgtkhtml/document/htmldocument.h.orig 2006-02-05 18:19:17.000000000 +0000
|
|
+++ libgtkhtml/document/htmldocument.h 2006-02-05 18:20:06.000000000 +0000
|
|
@@ -113,6 +113,9 @@ void html_document_update_active_nod
|
|
void html_document_update_focus_element (HtmlDocument *document, DomElement *element);
|
|
DomNode *html_document_find_anchor (HtmlDocument *doc, const gchar *anchor);
|
|
|
|
+void html_document_add_stylesheet (HtmlDocument *document, CssStylesheet *stylesheet);
|
|
+gboolean html_document_remove_stylesheet (HtmlDocument *document, CssStylesheet *stylesheet);
|
|
+
|
|
G_END_DECLS
|
|
|
|
#endif /* __HTMLDOCUMENT_H__ */
|