about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJosh Rickmar <jrick@devio.us>2012-06-29 13:04:50 -0400
committerJosh Rickmar <jrick@devio.us>2012-06-29 13:04:50 -0400
commit72da277d218e2dd0dfebd8352a9e3db5c1954a28 (patch)
tree750f80a5e22308d63f70dddfc44db0f657d588e4
parentaa2c11c21e9eba26b73ea92f96cc290552b58589 (diff)
downloadxombrero-72da277d218e2dd0dfebd8352a9e3db5c1954a28.tar.gz
Use #if for the webkit_dom_html_element_click function, as it appears this is new to webkit 1.8.x
-rw-r--r--inputfocus.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/inputfocus.c b/inputfocus.c
index ccb371c..ab69947 100644
--- a/inputfocus.c
+++ b/inputfocus.c
@@ -45,7 +45,9 @@ focus_input_document(struct tab *t, WebKitDOMDocument *doc)
 			continue;
 		}
 		webkit_dom_element_focus((WebKitDOMElement*)in);
+#if WEBKIT_CHECK_VERSION(1, 8, 0)
 		webkit_dom_html_element_click((WebKitDOMHTMLElement*)in);
+#endif
 		g_free(es);
 		rv = 1; /* found */
 		goto done;
@@ -61,7 +63,9 @@ focus_input_document(struct tab *t, WebKitDOMDocument *doc)
 			continue;
 		}
 		webkit_dom_element_focus((WebKitDOMElement*)ta);
-		webkit_dom_html_element_click((WebKitDOMHTMLElement*)in);
+#if WEBKIT_CHECK_VERSION(1, 8, 0)
+		webkit_dom_html_element_click((WebKitDOMHTMLElement*)ta);
+#endif
 		rv = 1; /* found */
 		goto done;
 	}
@@ -129,7 +133,9 @@ focus_input(struct tab *t)
 	if (WEBKIT_DOM_IS_HTML_INPUT_ELEMENT((WebKitDOMNode *)t->active) ||
 	    WEBKIT_DOM_IS_HTML_TEXT_AREA_ELEMENT((WebKitDOMNode *)t->active)) {
 		webkit_dom_element_focus((WebKitDOMElement*)t->active);
+#if WEBKIT_CHECK_VERSION(1, 8, 0)
 		webkit_dom_html_element_click((WebKitDOMHTMLElement*)t->active);
+#endif
 		rv = 1; /* found */
 		goto done;
 	}