<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>26302</bug_id>
          
          <creation_ts>2009-06-10 15:54:31 -0700</creation_ts>
          <short_desc>GDOM-Binding: errors when executing XPath</short_desc>
          <delta_ts>2009-07-14 04:04:54 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit API</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>16401</dependson>
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Leon Winter">lwi</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>jmalonzo</cc>
    
    <cc>lkcl</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>125224</commentid>
    <comment_count>0</comment_count>
    <who name="Leon Winter">lwi</who>
    <bug_when>2009-06-10 15:54:31 -0700</bug_when>
    <thetext>Hi,

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

 (test:32645): GLib-GObject-CRITICAL **: g_param_spec_double: assertion
  `default_value &gt;= minimum &amp;&amp; default_value &lt;= maximum&apos; failed

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

Investigation and fix would be nice.

Sample code:

    GdomXPathResult *res;
    char* exp = &quot;//*[@href or @src]&quot;;
    GdomDocument *doc = get_dom_document();
    GdomNodeList *els = gdom_document_get_elements_by_tag_name(doc,
&quot;body&quot;);
    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 &amp;&amp; (node = gdom_x_path_result_iterate_next(res))) {
        g_object_get(node, &quot;style&quot;, &amp;style, NULL);
        gdom_css_style_declaration_set_css_property(style, &quot;border&quot;,
&quot;1px dashed red&quot;, &quot;&quot;);
        gdom_css_style_declaration_set_css_property(style,
&quot;background&quot;, &quot;yellow&quot;, &quot;&quot;);
        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(&quot;found elements: %d\n&quot;, i);</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>131418</commentid>
    <comment_count>1</comment_count>
    <who name="Luke Kenneth Casson Leighton">lkcl</who>
    <bug_when>2009-07-13 15:06:43 -0700</bug_when>
    <thetext>(In reply to comment #0)
&gt; Hi,
&gt; 
&gt; during execution of XPath via GDOM Binding there is intersting output:
&gt; 
&gt;  (test:32645): GLib-GObject-CRITICAL **: g_param_spec_double: assertion
&gt;   `default_value &gt;= minimum &amp;&amp; default_value &lt;= maximum&apos; failed
&gt; 
&gt;   (test:32645): GLib-GObject-CRITICAL **:
&gt;   g_object_class_install_property: assertion `G_IS_PARAM_SPEC (pspec)&apos;
&gt;   failed
&gt; 
&gt; Investigation and fix would be nice.

 yehh, it&apos;s one of something like 20,000 properties _somewhere_.  tracking it down is going to be one of those lairy by-rote tasks.  i&apos;ll see if i can find it but it&apos;s not a high priority item, but still important all the same.  thanks for raising it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>131520</commentid>
    <comment_count>2</comment_count>
    <who name="Jan Alonzo">jmalonzo</who>
    <bug_when>2009-07-14 04:04:54 -0700</bug_when>
    <thetext>WebKitGtk do not have an official DOM bindings yet in the WebKit tree.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>