<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Label of an <option> element should not be displayed when textContent of the element is empty"
href="https://bugs.webkit.org/show_bug.cgi?id=169296#c9">Comment # 9</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Label of an <option> element should not be displayed when textContent of the element is empty"
href="https://bugs.webkit.org/show_bug.cgi?id=169296">bug 169296</a>
from <span class="vcard"><a class="email" href="mailto:cdumez@apple.com" title="Chris Dumez <cdumez@apple.com>"> <span class="fn">Chris Dumez</span></a>
</span></b>
<pre>Corresponding Blink code:
String HTMLOptionElement::displayLabel() const {
Document& document = this->document();
String text;
// WinIE does not use the label attribute, so as a quirk, we ignore it.
if (!document.inQuirksMode())
text = fastGetAttribute(labelAttr);
// FIXME: The following treats an element with the label attribute set to
// the empty string the same as an element with no label attribute at all.
// Is that correct? If it is, then should the label function work the same
// way?
if (text.isEmpty())
text = collectOptionInnerText();
return text.stripWhiteSpace(isHTMLSpace<UChar>)
.simplifyWhiteSpace(isHTMLSpace<UChar>);
}
So we're likely missing:
// WinIE does not use the label attribute, so as a quirk, we ignore it.
if (!document.inQuirksMode())
text = fastGetAttribute(labelAttr);</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>