<?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>63603</bug_id>
          
          <creation_ts>2011-06-28 20:31:56 -0700</creation_ts>
          <short_desc>[Qt] QWebFrame::findAllElements fails to retireve elements on non-valid web pages.</short_desc>
          <delta_ts>2014-02-03 03:18:07 -0800</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 Qt</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Qt</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Dawit A.">adawit</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>allan.jensen</cc>
    
    <cc>lindsay.mathieson</cc>
    
    <cc>pierre.rossi</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>429398</commentid>
    <comment_count>0</comment_count>
    <who name="Dawit A.">adawit</who>
    <bug_when>2011-06-28 20:31:56 -0700</bug_when>
    <thetext>Calling &quot;QWebFrame::findAllElements(QLatin1String(&quot;form[method=post]&quot;))&quot; on the reduced snippet from an actual page below fails to return all the &lt;input&gt; elements of the form. I am not sure if this is a bug since the HTML below is clearly invalid, but unfortunately there are many such broken web sites out there. In fact this snippet comes from a bug reported downstream, https://bugs.kde.org/show_bug.cgi?id=256029. As such for parsing web forms in kdewebkit we are forced to use JavaScript and the DOM. The question is, this something QtWebKit/webkit should handle properly ? Or is this the limitation of the QWebElement interface due to it reliance on the CSS 3 query language to retrieve elements ?

&lt;table cellspacing=1 cellpadding=5&gt;
  &lt;tr&gt;
    &lt;td class=listtitle colspan=2&gt;Please enter your Username and Password&lt;/td&gt;
  &lt;/tr&gt;
  &lt;form action=&quot;/CMD_LOGIN&quot; method=&quot;POST&quot; name=&quot;form&quot;&gt;
     &lt;input type=hidden name=referer value=&quot;/&quot;&gt;
   &lt;tr&gt;
     &lt;td class=list align=right&gt;Username:&lt;/td&gt;
     &lt;td class=list&gt;&lt;input type=text name=username&gt;&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
     &lt;td class=list align=right&gt;Password:&lt;/td&gt;
     &lt;td class=list&gt;&lt;input type=password name=password&gt;&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
     &lt;td class=listtitle align=right colspan=2&gt;&lt;input type=submit value=&apos;Login&apos;&gt;&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
     &lt;td align=center colspan=2&gt;&lt;a href=&quot;/CMD_LOST_PASSWORD&quot;&gt;Forgot your Password?&lt;/a&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/form&gt;
&lt;/table&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>749519</commentid>
    <comment_count>1</comment_count>
    <who name="Allan Sandfeld Jensen">allan.jensen</who>
    <bug_when>2012-10-24 04:04:33 -0700</bug_when>
    <thetext>The form element do not necessarily contain all their inputs as children. I think they are accessible as HTMLFormElement::associatedElements(). So it is kind of a separate structure to deal with illformed html.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>975246</commentid>
    <comment_count>2</comment_count>
    <who name="Jocelyn Turcotte">jturcotte</who>
    <bug_when>2014-02-03 03:18:07 -0800</bug_when>
    <thetext>=== Bulk closing of Qt bugs ===

If you believe that this bug report is still relevant for a non-Qt port of webkit.org, please re-open it and remove [Qt] from the summary.

If you believe that this is still an important QtWebKit bug, please fill a new report at https://bugreports.qt-project.org and add a link to this issue. See http://qt-project.org/wiki/ReportingBugsInQt for additional guidelines.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>