Bug 80403 - [Forms] Hidden input element should not have labels.
Summary: [Forms] Hidden input element should not have labels.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: yosin
URL: http://jsfiddle.net/56yRM/
Keywords:
Depends on: 80392 80574
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-06 02:37 PST by yosin
Modified: 2012-03-13 23:54 PDT (History)
4 users (show)

See Also:


Attachments
Patch 1 (5.78 KB, patch)
2012-03-07 21:28 PST, yosin
no flags Details | Formatted Diff | Diff
Patch 2 (13.05 KB, patch)
2012-03-13 01:01 PDT, yosin
no flags Details | Formatted Diff | Diff
Patch 3 (14.72 KB, patch)
2012-03-13 22:04 PDT, yosin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description yosin 2012-03-06 02:37:54 PST
According to the specification[1], "hidden" input type element isn't labelable.

* FF=PASS
* IE=PASS
* OP=FAIL

Sample URI(http://jsfiddle.net/56yRM/) should output only "Hidden".

[1] http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#category-label
Comment 1 yosin 2012-03-07 21:28:38 PST
Created attachment 130763 [details]
Patch 1
Comment 2 yosin 2012-03-13 01:01:58 PDT
Created attachment 131570 [details]
Patch 2
Comment 3 Kent Tamura 2012-03-13 21:24:28 PDT
Comment on attachment 131570 [details]
Patch 2

View in context: https://bugs.webkit.org/attachment.cgi?id=131570&action=review

> Source/WebCore/ChangeLog:12
> +        Note: The HTML5 specification isn't clear for non-labelable element's "labels"
> +        attribute return value. FF and OP return empty node list. IE returns null.

nit: 'FF' 'OP' are not so common abbreviations.

> LayoutTests/fast/forms/label/labelable-elements-expected.txt:84
> -FAIL element.labels should be undefined. Was [object NodeList]
> -PASS element.labels is not null
> +PASS element.labels is null

We need similar changes for LayoutTests/platform/*/fast/forms/label/labelable-elements-expected.txt.
Comment 4 yosin 2012-03-13 22:04:04 PDT
Created attachment 131785 [details]
Patch 3
Comment 5 Kent Tamura 2012-03-13 22:06:11 PDT
Comment on attachment 131785 [details]
Patch 3

ok
Comment 6 WebKit Review Bot 2012-03-13 23:54:20 PDT
Comment on attachment 131785 [details]
Patch 3

Clearing flags on attachment: 131785

Committed r110665: <http://trac.webkit.org/changeset/110665>
Comment 7 WebKit Review Bot 2012-03-13 23:54:25 PDT
All reviewed patches have been landed.  Closing bug.