[evolution/wip-webkit2] Let the code build with WebKit2 2.0.x versions
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip-webkit2] Let the code build with WebKit2 2.0.x versions
- Date: Thu, 14 Nov 2013 13:52:06 +0000 (UTC)
commit f39b9c47c5691e0e415edd432c2b2639e4dcaad7
Author: Tomas Popela <tpopela redhat com>
Date: Thu Nov 14 14:45:50 2013 +0100
Let the code build with WebKit2 2.0.x versions
e-util/e-dom-utils.c | 10 ++++++++++
e-util/e-dom-utils.h | 1 +
.../module-itip-formatter-dom-utils.c | 9 ++++++++-
.../module-itip-formatter-dom-utils.h | 1 +
4 files changed, 20 insertions(+), 1 deletions(-)
---
diff --git a/e-util/e-dom-utils.c b/e-util/e-dom-utils.c
index 4c5e597..675a835 100644
--- a/e-util/e-dom-utils.c
+++ b/e-util/e-dom-utils.c
@@ -282,9 +282,15 @@ e_dom_utils_create_and_add_css_style_sheet (WebKitDOMDocument *document,
if (!style_element) {
/* Create new <style> element */
style_element = webkit_dom_document_create_element (document, "style", NULL);
+#if WEBKIT_CHECK_VERSION(2,2,0) /* XXX should really be (2,1,something) */
webkit_dom_element_set_id (
style_element,
style_sheet_id);
+#else
+ webkit_dom_html_element_set_id (
+ WEBKIT_DOM_HTML_ELEMENT (style_element),
+ style_sheet_id);
+#endif
webkit_dom_html_style_element_set_media (
WEBKIT_DOM_HTML_STYLE_ELEMENT (style_element),
"screen");
@@ -442,7 +448,11 @@ collapse_contacts_list (WebKitDOMEventTarget *event_target,
gboolean hidden;
document = user_data;
+#if WEBKIT_CHECK_VERSION(2,2,0) /* XXX should really be (2,1,something) */
id = webkit_dom_element_get_id (WEBKIT_DOM_ELEMENT (event_target));
+#else
+ id = webkit_dom_html_element_get_id (WEBKIT_DOM_HTML_ELEMENT (event_target));
+#endif
list_id = g_strconcat ("list-", id, NULL);
list = webkit_dom_document_get_element_by_id (document, list_id);
diff --git a/e-util/e-dom-utils.h b/e-util/e-dom-utils.h
index dac466a..fda8526 100644
--- a/e-util/e-dom-utils.h
+++ b/e-util/e-dom-utils.h
@@ -25,6 +25,7 @@
#define E_DOM_UTILS_H
#include <webkitdom/webkitdom.h>
+#include <webkit2/webkit2.h>
#include <gtk/gtk.h>
diff --git a/modules/itip-formatter/module-itip-formatter-dom-utils.c
b/modules/itip-formatter/module-itip-formatter-dom-utils.c
index 5ff322a..d63ce5f 100644
--- a/modules/itip-formatter/module-itip-formatter-dom-utils.c
+++ b/modules/itip-formatter/module-itip-formatter-dom-utils.c
@@ -148,8 +148,11 @@ alarm_check_toggled_cb (WebKitDOMHTMLInputElement *check1,
gchar *id;
document = webkit_dom_node_get_owner_document (WEBKIT_DOM_NODE (check1));
-
+#if WEBKIT_CHECK_VERSION(2,2,0) /* XXX should really be (2,1,something) */
+ id = webkit_dom_element_get_id (WEBKIT_DOM_ELEMENT (check1));
+#else
id = webkit_dom_html_element_get_id (WEBKIT_DOM_HTML_ELEMENT (check1));
+#endif
if (g_strcmp0 (id, CHECKBOX_INHERIT_ALARM)) {
check2 = webkit_dom_document_get_element_by_id (
@@ -592,7 +595,11 @@ module_itip_formatter_dom_utils_append_info_item_row (WebKitDOMDocument *documen
row = webkit_dom_html_table_element_insert_row (
WEBKIT_DOM_HTML_TABLE_ELEMENT (table), -1, NULL);
+#if WEBKIT_CHECK_VERSION(2,2,0) /* XXX should really be (2,1,something) */
+ webkit_dom_element_set_id (WEBKIT_DOM_ELEMENT (row), row_id);
+#else
webkit_dom_html_element_set_id (row, row_id);
+#endif
cell = webkit_dom_html_table_row_element_insert_cell (
WEBKIT_DOM_HTML_TABLE_ROW_ELEMENT (row), -1, NULL);
diff --git a/modules/itip-formatter/module-itip-formatter-dom-utils.h
b/modules/itip-formatter/module-itip-formatter-dom-utils.h
index b34e2d2..e0ec07e 100644
--- a/modules/itip-formatter/module-itip-formatter-dom-utils.h
+++ b/modules/itip-formatter/module-itip-formatter-dom-utils.h
@@ -20,6 +20,7 @@
#define MODULE_ITIP_FORMATTER_DOM_UTILS_H
#include <webkitdom/webkitdom.h>
+#include <webkit2/webkit2.h>
#include <gtk/gtk.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]