Bug 148862

Summary: HTMLOptionElement.text should never return the value of label
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: DOMAssignee: Keith Rollin <krollin>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, cdumez, commit-queue, krollin, mike, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Archive of layout-test-results from ews103 for mac-mavericks
none
Archive of layout-test-results from ews105 for mac-mavericks-wk2
none
Patch
none
Converted some render tests to reference tests. none

Description Ryosuke Niwa 2015-09-04 18:10:51 PDT
See https://html.spec.whatwg.org/multipage/forms.html#dom-option-text

The text IDL attribute, on getting, must return the result of stripping and collapsing whitespace from the concatenation of data of all the Text node descendants of the option element, in tree order, excluding any that are descendants of descendants of the option element that are themselves script elements in the HTML namespace or script elements in the SVG namespace.

This bug was found by the newly added test:
LayoutTests/http/tests/w3c/html/semantics/forms/the-option-element/option-text-label.html
Comment 1 Radar WebKit Bug Importer 2015-09-04 18:11:27 PDT
<rdar://problem/22589226>
Comment 2 Keith Rollin 2015-10-30 16:00:40 PDT
Created attachment 264433 [details]
Patch
Comment 3 Build Bot 2015-10-30 16:30:18 PDT
Comment on attachment 264433 [details]
Patch

Attachment 264433 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/360328

New failing tests:
fast/forms/HTMLOptionElement_label02.html
fast/forms/HTMLOptionElement_label01.html
fast/forms/HTMLOptionElement_label04.html
fast/forms/HTMLOptionElement_label05.html
Comment 4 Build Bot 2015-10-30 16:30:21 PDT
Created attachment 264437 [details]
Archive of layout-test-results from ews103 for mac-mavericks

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews103  Port: mac-mavericks  Platform: Mac OS X 10.9.5
Comment 5 Build Bot 2015-10-30 16:35:42 PDT
Comment on attachment 264433 [details]
Patch

Attachment 264433 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/360346

New failing tests:
fast/forms/HTMLOptionElement_label02.html
fast/forms/HTMLOptionElement_label01.html
fast/forms/HTMLOptionElement_label04.html
fast/forms/HTMLOptionElement_label05.html
Comment 6 Build Bot 2015-10-30 16:35:45 PDT
Created attachment 264439 [details]
Archive of layout-test-results from ews105 for mac-mavericks-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105  Port: mac-mavericks-wk2  Platform: Mac OS X 10.9.5
Comment 7 Keith Rollin 2015-10-30 17:02:14 PDT
Created attachment 264444 [details]
Patch
Comment 8 Darin Adler 2015-10-31 14:59:57 PDT
Comment on attachment 264444 [details]
Patch

Any time you have to update render tree expected results like in this patch, you should explore whether we can change the tests into reference tests instead, since those can have platform independent results. Render tree expected results almost always end up different per platform. Otherwise, someone else has to update the expected results files for all the non-Mac platforms after we land the patch. Over time we are converting a lot more tests into reference tests.
Comment 9 Keith Rollin 2015-11-03 11:02:52 PST
Created attachment 264698 [details]
Converted some render tests to reference tests.
Comment 10 WebKit Commit Bot 2015-11-03 12:00:52 PST
Comment on attachment 264698 [details]
Converted some render tests to reference tests.

Clearing flags on attachment: 264698

Committed r191964: <http://trac.webkit.org/changeset/191964>
Comment 11 WebKit Commit Bot 2015-11-03 12:00:57 PST
All reviewed patches have been landed.  Closing bug.
Comment 12 Ms2ger (he/him; ⌚ UTC+1/+2) 2022-09-19 02:22:13 PDT
*** Bug 138256 has been marked as a duplicate of this bug. ***