[Webkit-unassigned] [Bug 26302] New: GDOM-Binding: errors when executing XPath

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 10 15:54:31 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=26302

           Summary: GDOM-Binding: errors when executing XPath
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P5
         Component: WebKit API
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: lwi at ring0.de


Hi,

during execution of XPath via GDOM Binding there is intersting output:

 (test:32645): GLib-GObject-CRITICAL **: g_param_spec_double: assertion
  `default_value >= minimum && default_value <= maximum' failed

  (test:32645): GLib-GObject-CRITICAL **:
  g_object_class_install_property: assertion `G_IS_PARAM_SPEC (pspec)'
  failed

Investigation and fix would be nice.

Sample code:

    GdomXPathResult *res;
    char* exp = "//*[@href or @src]";
    GdomDocument *doc = get_dom_document();
    GdomNodeList *els = gdom_document_get_elements_by_tag_name(doc,
"body");
    GdomNode *body = gdom_node_list_item(els, 0);
    GdomXPathNSResolver *resolver =
gdom_document_create_ns_resolver(doc, body);
    GdomNode *node;
    GdomCSSStyleDeclaration *style;
    int i = 0;

    res = gdom_document_evaluate(doc, exp, body, resolver, 0, NULL);
    while(res && (node = gdom_x_path_result_iterate_next(res))) {
        g_object_get(node, "style", &style, NULL);
        gdom_css_style_declaration_set_css_property(style, "border",
"1px dashed red", "");
        gdom_css_style_declaration_set_css_property(style,
"background", "yellow", "");
        g_object_unref(style);
        g_object_unref(node);
        ++i;
    }
    g_object_unref(resolver);
    g_object_unref(body);
    g_object_unref(els);
    g_object_unref(doc);
    g_object_unref(res);

    g_warning("found elements: %d\n", i);


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list