[Win] fast/forms/HTMLOptionElement_label03.html failing on win7 after rebaseline in <http://trac.webkit.org/changeset/191964> <https://build.webkit.org/results/Apple%20Win%207%20Release%20(Tests)/r192034%20(54928)/results.html>
Marked as ImageOnlyFailure in <https://trac.webkit.org/r192041>
Chris, do you have a suggestion on how to address this? The test is comparing this: <body> <select> <option label=" ">white space label should display empty string to match IE</option> </select> </body> To this: <body> <select> <option> </option> </select> </body> I expect that the DOM is stripping the spaces from the text content but not the label attribute. The tests probably match on some platforms because the platform itself strips spaces from menu labels. But I guess that doesn't happen on Win7. If we keep this test and this approach, it's not apparent to me how to make it pass.
<rdar://problem/23539673>
Created attachment 265502 [details] Patch
Comment on attachment 265502 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=265502&action=review > Source/WebCore/html/HTMLOptionElement.cpp:271 > + return label.stripWhiteSpace(isHTMLSpace).simplifyWhiteSpace(isHTMLSpace); Stripping leading and trailing whitespace is correct. “Simplifying” whitespace seems highly unlikely to be correct.
Simplifying whitespace is what we were already doing to the text content when that was returned as the text to be displayed. I'm just applying that to the label value when that's being returned. That seems internally consistent, and matches what Chrome 46 and IE 11 are doing. But I guess you're saying that extra internal spaces in the label attribute are less likely to be incidental and are more likely to be intentional and so should be retained, regardless of the above?
Created attachment 265687 [details] Patch
Comment on attachment 265687 [details] Patch Clearing flags on attachment: 265687 Committed r193368: <http://trac.webkit.org/changeset/193368>
All reviewed patches have been landed. Closing bug.