summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/scripts.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/scripts.c b/src/scripts.c
index 2ce29c7a..bee4fc9d 100644
--- a/src/scripts.c
+++ b/src/scripts.c
@@ -939,7 +939,7 @@ wv_inject(JSContextRef ctx, JSObjectRef function, JSObjectRef this, size_t argc,
}
return NIL;
}/*}}}*/
-#if WEBKIT_CHECK_VERSION(1, 10, 0)
+#if WEBKIT_CHECK_VERSION(1, 10, 0) && CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 12, 0)
/**
* Renders a webview to a png file
@@ -5227,7 +5227,7 @@ create_global_object()
{ "history", wv_history, kJSDefaultAttributes },
{ "reload", wv_reload, kJSDefaultAttributes },
{ "inject", wv_inject, kJSDefaultAttributes },
-#if WEBKIT_CHECK_VERSION(1, 10, 0)
+#if WEBKIT_CHECK_VERSION(1, 10, 0) && CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 12, 0)
{ "toPng", wv_to_png, kJSDefaultAttributes },
#endif
{ 0, 0, 0 },