Bug 161196

Summary: Drop-down list options display blank when a comment is added between option tags testcase
Product: [Applications] konqueror Reporter: Jonathan Allison <jonathanallison>
Component: khtmlAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: maksim
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

Description Jonathan Allison 2008-04-23 15:32:11 UTC
Version:            (using KDE 4.0.3)
Installed from:    Ubuntu Packages
OS:                Linux

The problem is that if there is an comment in between the opening option tag and the text to be displayed as an option, then the text option won't display. If the comment is after the text it displays fine. In the below testcase, option 1 will fail to display, but options 2 and 3 will display correctly.

Here's the testcase:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

<head>
<title>Testcase</title>

</head>
<body>

<form action="whatever">
<p>
<select>
<option value="1" ><!--comment-->Option 1</option>
<option value="2" >Option 2</option>
<option value="3" >Option 3<!--comment--></option>
</select>
</p>
</form>

</body>
</html>

Thanks for your help.
Comment 1 Maksim Orlovich 2008-04-23 17:13:09 UTC
Thank you for the report..

DOMString HTMLOptionElementImpl::text() const is bogus in this case..
Comment 2 Maksim Orlovich 2008-05-26 21:24:38 UTC
SVN commit 812983 by orlovich:

More sensible option behavior when the first kid isn't text....
BUG:161196


 M  +10 -14    html_formimpl.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=812983
Comment 3 Maksim Orlovich 2008-05-26 21:26:58 UTC
SVN commit 812985 by orlovich:

Backport fix for #161196
CCBUG:161196


 M  +10 -14    html_formimpl.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=812985
Comment 4 Maksim Orlovich 2008-05-26 21:28:53 UTC
SVN commit 812986 by orlovich:

Regression test for #161196
CCBUG:161196


 A             baseline/forms/161196.html-dom  
 AM            baseline/forms/161196.html-dump.png  
 A             baseline/forms/161196.html-render  
 A             tests/forms/161196.html  


WebSVN link: http://websvn.kde.org/?view=rev&revision=812986