Bug 80466 - [Forms] The "output" element should have labels.
Summary: [Forms] The "output" element should 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/FP5ur/
Keywords:
Depends on: 80392 80574
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-06 18:06 PST by yosin
Modified: 2012-03-13 23:36 PDT (History)
4 users (show)

See Also:


Attachments
Patch 1 (3.87 KB, patch)
2012-03-07 19:51 PST, yosin
no flags Details | Formatted Diff | Diff
Patch 2 (9.89 KB, patch)
2012-03-13 19:17 PDT, yosin
no flags Details | Formatted Diff | Diff
Patch 3 (11.51 KB, patch)
2012-03-13 21:34 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 18:06:17 PST
According to the specification[1], the "output" element is a labelable.

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

Sample URI(http://jsfiddle.net/FP5ur/) should output only "Output(1)".

[1] http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#category-label
Comment 1 yosin 2012-03-07 19:51:37 PST
Created attachment 130752 [details]
Patch 1
Comment 2 Kent Tamura 2012-03-07 21:52:16 PST
Comment on attachment 130752 [details]
Patch 1

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

> LayoutTests/fast/forms/output/output-labels.html:1
> +<script src="../../js/resources/js-test-pre.js"></script>

The test coverage is not good.
I recommend you add "output" cases to existing fast/forms/labels-* tests.

> LayoutTests/fast/forms/output/output-labels.html:7
> +function collect(xs)

What does "xs" stand for?
The name "collect" is not so descriptive.

> LayoutTests/fast/forms/output/output-labels.html:14
> +{
> +  var result = '';
> +  for (var i = 0; i < xs.length; i++) {
> +    result += xs[i].id;
> +  }
> +  return result;
> +}

Wrong indentation.
Comment 3 Philippe Normand 2012-03-13 02:58:34 PDT
fast/forms/label/labelable-elements.html fails partly because of this issue in GTK.
Comment 4 Jessie Berlin 2012-03-13 11:46:18 PDT
Will this fix https://bugs.webkit.org/show_bug.cgi?id=80985?
Comment 5 Kent Tamura 2012-03-13 18:10:02 PDT
(In reply to comment #4)
> Will this fix https://bugs.webkit.org/show_bug.cgi?id=80985?

No, this won't.  Bug 80985 is caused by ENABLE flag differences and JSC/V8 difference.
Comment 6 Kent Tamura 2012-03-13 18:12:33 PDT
(In reply to comment #5)
> (In reply to comment #4)
> > Will this fix https://bugs.webkit.org/show_bug.cgi?id=80985?
> 
> No, this won't.  Bug 80985 is caused by ENABLE flag differences and JSC/V8 difference.

Correction: JSC/V8 difference will be solved by this bug. ENABLE flag difference won't be solved.
Comment 7 yosin 2012-03-13 19:17:42 PDT
Created attachment 131772 [details]
Patch 2
Comment 8 Kent Tamura 2012-03-13 21:20:03 PDT
Comment on attachment 131772 [details]
Patch 2

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

The code change is ok.


> LayoutTests/platform/chromium/fast/forms/label/labelable-elements-expected.txt:48
>  Labelable: output [object HTMLOutputElement]
> -FAIL element.labels.length should be 1. Threw exception TypeError: Cannot read property 'length' of null
> +PASS element.labels.length is 1

You need to update the following files too:

LayoutTests/platform/mac/fast/forms/label/labelable-elements-expected.txt
LayoutTests/fast/forms/label/labelable-elements-expected.txt
Comment 9 yosin 2012-03-13 21:34:12 PDT
Created attachment 131783 [details]
Patch 3
Comment 10 Kent Tamura 2012-03-13 21:43:54 PDT
Comment on attachment 131783 [details]
Patch 3

ok
Comment 11 WebKit Review Bot 2012-03-13 23:36:06 PDT
Comment on attachment 131783 [details]
Patch 3

Clearing flags on attachment: 131783

Committed r110664: <http://trac.webkit.org/changeset/110664>
Comment 12 WebKit Review Bot 2012-03-13 23:36:11 PDT
All reviewed patches have been landed.  Closing bug.