[Webkit-unassigned] [Bug 169296] Label of an <option> element should not be displayed when textContent of the element is empty

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 7 12:34:19 PST 2017


https://bugs.webkit.org/show_bug.cgi?id=169296

--- Comment #9 from Chris Dumez <cdumez at apple.com> ---
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);

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170307/429dcd40/attachment.html>


More information about the webkit-unassigned mailing list