[gnome-online-accounts] web-extension: Port away from deprecated WebKitDOMDocument API



commit 206092328be93c5ca217fb63166b642d751d6342
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Nov 2 14:59:07 2017 +0100

    web-extension: Port away from deprecated WebKitDOMDocument API
    
    Bump minimum WebKitGTK+ version to 2.12.0.

 configure.ac                     |    2 +-
 src/goabackend/goawebextension.c |    8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 7993b3d..bace15a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -124,7 +124,7 @@ if test "$enable_backend" != "no"; then
   AC_SUBST(GTK_CFLAGS)
   AC_SUBST(GTK_LIBS)
 
-  PKG_CHECK_MODULES(WEBKIT_GTK, [webkit2gtk-4.0 >= 2.7.2])
+  PKG_CHECK_MODULES(WEBKIT_GTK, [webkit2gtk-4.0 >= 2.12.0])
   AC_SUBST(WEBKIT_GTK_CFLAGS)
   AC_SUBST(WEBKIT_GTK_LIBS)
 
diff --git a/src/goabackend/goawebextension.c b/src/goabackend/goawebextension.c
index e331d89..6a25ab9 100644
--- a/src/goabackend/goawebextension.c
+++ b/src/goabackend/goawebextension.c
@@ -77,19 +77,19 @@ web_extension_document_loaded_cb (WebKitWebPage *web_page, gpointer user_data)
   GoaWebExtension *self = GOA_WEB_EXTENSION (user_data);
   WebKitDOMDocument *document;
   WebKitDOMDOMWindow *dom_window;
-  WebKitDOMNodeList *elements = NULL;
+  WebKitDOMHTMLCollection *elements = NULL;
   gulong element_count;
   gulong i;
 
   document = webkit_web_page_get_dom_document (web_page);
-  elements = webkit_dom_document_get_elements_by_tag_name (document, "*");
-  element_count = webkit_dom_node_list_get_length (elements);
+  elements = webkit_dom_document_get_elements_by_tag_name_as_html_collection (document, "*");
+  element_count = webkit_dom_html_collection_get_length (elements);
 
   dom_window = webkit_dom_document_get_default_view (document);
 
   for (i = 0; i < element_count; i++)
     {
-      WebKitDOMNode *element = webkit_dom_node_list_item (elements, i);
+      WebKitDOMNode *element = webkit_dom_html_collection_item (elements, i);
 
       if ((GOA_IS_OAUTH_PROVIDER (self->provider)
            && goa_oauth_provider_is_deny_node (GOA_OAUTH_PROVIDER (self->provider), element))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]