Bug 148862 - HTMLOptionElement.text should never return the value of label
Summary: HTMLOptionElement.text should never return the value of label
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Keith Rollin
URL:
Keywords: InRadar
: 138256 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-09-04 18:10 PDT by Ryosuke Niwa
Modified: 2022-09-19 02:22 PDT (History)
7 users (show)

See Also:


Attachments
Patch (29.19 KB, patch)
2015-10-30 16:00 PDT, Keith Rollin
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews103 for mac-mavericks (845.25 KB, application/zip)
2015-10-30 16:30 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews105 for mac-mavericks-wk2 (875.85 KB, application/zip)
2015-10-30 16:35 PDT, Build Bot
no flags Details
Patch (34.57 KB, patch)
2015-10-30 17:02 PDT, Keith Rollin
no flags Details | Formatted Diff | Diff
Converted some render tests to reference tests. (428.22 KB, patch)
2015-11-03 11:02 PST, Keith Rollin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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. ***