diff options
author | Josh Rickmar <jrick@conformal.com> | 2013-07-10 09:56:44 -0400 |
---|---|---|
committer | Josh Rickmar <jrick@conformal.com> | 2013-07-10 09:56:44 -0400 |
commit | 569f827d97415ebb9b074e23385a36ffd4f85fda (patch) | |
tree | 2072a5269125a5a73148eb123dd053489fcad6b2 | |
parent | 5b1ee64417bece200bef05972a0d4ac205120121 (diff) | |
download | xombrero-569f827d97415ebb9b074e23385a36ffd4f85fda.tar.gz |
Check if the DOM node is a WebKitDOMHTMLDocument.
-rw-r--r-- | inputfocus.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/inputfocus.c b/inputfocus.c index eb46841..b5b4e19 100644 --- a/inputfocus.c +++ b/inputfocus.c @@ -159,7 +159,7 @@ focus_input(struct tab *t) /* try current active element */ a = webkit_dom_html_document_get_active_element( - (WebKitDOMHTMLDocument*)doc); + WEBKIT_DOM_HTML_DOCUMENT(doc); if (node_is_valid_entry((WebKitDOMNode *)a)) { rv = 1; /* found */ goto done; @@ -245,6 +245,8 @@ dom_is_input(struct tab *t, char **text) /* unwind frames and iframes until the cows come home */ for (;;) { + if (!WEBKIT_DOM_IS_HTML_DOCUMENT(doc)) + return (0); a = webkit_dom_html_document_get_active_element( (WebKitDOMHTMLDocument*)doc); if (a == NULL) |