WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
Bug 63603
[Qt] QWebFrame::findAllElements fails to retireve elements on non-valid web pages.
https://bugs.webkit.org/show_bug.cgi?id=63603
Summary
[Qt] QWebFrame::findAllElements fails to retireve elements on non-valid web p...
Dawit A.
Reported
2011-06-28 20:31:56 PDT
Calling "QWebFrame::findAllElements(QLatin1String("form[method=post]"))" on the reduced snippet from an actual page below fails to return all the <input> 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 ? <table cellspacing=1 cellpadding=5> <tr> <td class=listtitle colspan=2>Please enter your Username and Password</td> </tr> <form action="/CMD_LOGIN" method="POST" name="form"> <input type=hidden name=referer value="/"> <tr> <td class=list align=right>Username:</td> <td class=list><input type=text name=username></td> </tr> <tr> <td class=list align=right>Password:</td> <td class=list><input type=password name=password></td> </tr> <tr> <td class=listtitle align=right colspan=2><input type=submit value='Login'></td> </tr> <tr> <td align=center colspan=2><a href="/CMD_LOST_PASSWORD">Forgot your Password?</a></td> </tr> </form> </table>
Attachments
Add attachment
proposed patch, testcase, etc.
Allan Sandfeld Jensen
Comment 1
2012-10-24 04:04:33 PDT
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.
Jocelyn Turcotte
Comment 2
2014-02-03 03:18:07 PST
=== 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.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug