diff options
| author | Chris Lord <chris@openedhand.com> | 2006-02-01 09:52:55 +0000 |
|---|---|---|
| committer | Chris Lord <chris@openedhand.com> | 2006-02-01 09:52:55 +0000 |
| commit | da8ed2882801ca513eef5b696de14ea99c485354 (patch) | |
| tree | ad43f2132fd8896e1c2c4aefe75ad572273d469a /openembedded/packages/gtkhtml2/files/css-stylesheet-user.patch | |
| parent | 27700c91dd31d47332e6533241982d856772e08b (diff) | |
| download | poky-da8ed2882801ca513eef5b696de14ea99c485354.tar.gz | |
Add libsoup, libspidermonkey, libxml2 cvs, patched gtkhtml2 and web
packages
git-svn-id: https://svn.o-hand.com/repos/poky@245 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'openembedded/packages/gtkhtml2/files/css-stylesheet-user.patch')
| -rw-r--r-- | openembedded/packages/gtkhtml2/files/css-stylesheet-user.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/openembedded/packages/gtkhtml2/files/css-stylesheet-user.patch b/openembedded/packages/gtkhtml2/files/css-stylesheet-user.patch new file mode 100644 index 0000000000..85fe535126 --- /dev/null +++ b/openembedded/packages/gtkhtml2/files/css-stylesheet-user.patch | |||
| @@ -0,0 +1,54 @@ | |||
| 1 | Index: gtkhtml2/libgtkhtml/document/htmldocument.c | ||
| 2 | =================================================================== | ||
| 3 | --- gtkhtml2.orig/libgtkhtml/document/htmldocument.c 2006-01-21 02:24:09.000000000 +0000 | ||
| 4 | +++ gtkhtml2/libgtkhtml/document/htmldocument.c 2006-01-21 04:21:37.000000000 +0000 | ||
| 5 | @@ -1127,3 +1127,35 @@ | ||
| 6 | else | ||
| 7 | return NULL; | ||
| 8 | } | ||
| 9 | + | ||
| 10 | +CssStylesheet * | ||
| 11 | +html_document_add_stylesheet (HtmlDocument *document, const gchar *buffer, gint len) | ||
| 12 | +{ | ||
| 13 | + CssStylesheet *sheet; | ||
| 14 | + HtmlStyleChange style_change; | ||
| 15 | + | ||
| 16 | + g_return_val_if_fail (buffer && (len > 0) && HTML_IS_DOCUMENT (document), NULL); | ||
| 17 | + | ||
| 18 | + /* Note: @import not supported for user stylesheets, due to | ||
| 19 | + * complications it would cause with removal. | ||
| 20 | + */ | ||
| 21 | + | ||
| 22 | + sheet = css_parser_parse_stylesheet (buffer, len, NULL); | ||
| 23 | + document->stylesheets = g_slist_append (document->stylesheets, sheet); | ||
| 24 | + | ||
| 25 | + style_change = html_document_restyle_node (document, DOM_NODE (dom_Document__get_documentElement (document->dom_document)), NULL, TRUE); | ||
| 26 | + g_signal_emit (G_OBJECT (document), document_signals [STYLE_UPDATED], 0, DOM_NODE (dom_Document__get_documentElement (document->dom_document)), style_change); | ||
| 27 | + | ||
| 28 | + return sheet; | ||
| 29 | +} | ||
| 30 | + | ||
| 31 | +gboolean | ||
| 32 | +html_document_remove_stylesheet (HtmlDocument *document, CssStylesheet *stylesheet) | ||
| 33 | +{ | ||
| 34 | + g_return_val_if_fail (stylesheet && HTML_IS_DOCUMENT (document), FALSE); | ||
| 35 | + | ||
| 36 | + document->stylesheets = g_slist_remove (document->stylesheets, stylesheet); | ||
| 37 | + | ||
| 38 | + return TRUE; | ||
| 39 | +} | ||
| 40 | + | ||
| 41 | Index: gtkhtml2/libgtkhtml/document/htmldocument.h | ||
| 42 | =================================================================== | ||
| 43 | --- gtkhtml2.orig/libgtkhtml/document/htmldocument.h 2006-01-21 02:24:09.000000000 +0000 | ||
| 44 | +++ gtkhtml2/libgtkhtml/document/htmldocument.h 2006-01-21 03:48:55.000000000 +0000 | ||
| 45 | @@ -113,6 +113,9 @@ | ||
| 46 | void html_document_update_focus_element (HtmlDocument *document, DomElement *element); | ||
| 47 | DomNode *html_document_find_anchor (HtmlDocument *doc, const gchar *anchor); | ||
| 48 | |||
| 49 | +CssStylesheet *html_document_add_stylesheet (HtmlDocument *document, const gchar *buffer, gint len); | ||
| 50 | +gboolean html_document_remove_stylesheet (HtmlDocument *document, CssStylesheet *stylesheet); | ||
| 51 | + | ||
| 52 | G_END_DECLS | ||
| 53 | |||
| 54 | #endif /* __HTMLDOCUMENT_H__ */ | ||
