[Webkit-unassigned] [Bug 68684] spec change - option.label should be reflected like option.value
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Sep 27 01:39:57 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=68684
Kent Tamura <tkent at chromium.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #108454|review? |review-
Flag| |
--- Comment #3 from Kent Tamura <tkent at chromium.org> 2011-09-27 01:39:58 PST ---
(From update of attachment 108454)
View in context: https://bugs.webkit.org/attachment.cgi?id=108454&action=review
> Source/WebCore/dom/OptionElement.cpp:136
> +String OptionElement::collectOptionLabel(const OptionElementData& data, const Element* element)
> +{
> + String label = data.label();
> + if (!label.isNull())
> + return label;
> +
> + // Use the text if the Label wasn't set.
> + return collectOptionInnerText(element).stripWhiteSpace();
> +}
I don't think we need to introduce collectOptionLabel(). Making collectOptionInnerText() "protected" is enough.
Also, why do you call stripWhiteSpace()?
> LayoutTests/fast/forms/option-value-and-label.html:27
> -shouldBe('o1.label', '""');
> +shouldBe('o1.label', '"text"');
>
> var o2 = document.getElementById('o2');
> shouldBe('o2.value', '"value"');
> -shouldBe('o2.label', '""');
> +shouldBe('o2.label', '"text"');
We need more test cases:
- updating HTMLOptionElement::label
- getting label when HTMLOptionElement::textContent has leading/trailing whitespaces
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list