New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 894661 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Last visit > 30 days ago
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 651762



Sign in to add a comment

Some IDL attributes of METER element don't reflect values correctly

Project Member Reported by tkent@chromium.org, Oct 11

Issue description

Chrome Version: ToT
OS: All but iOS

What steps will reproduce the problem?
(1) Open http://w3c-test.org/html/dom/reflection-forms.html
(2) Observe

What is the expected result?
No failing tests

What happens instead?
Some of meter.value, meter.min, meter.max, meter.low, meter.high, meter.optimum tests fail.


Please use labels and text to provide additional information.
It's a bug of Element::SetFloatingPointAttribute().  AtomicString::Number() should not be used, and should use SerializeForNumberType() instead.

Also, I'm not sure if our binding generator supports [Reflect] extended attribute for 'double' attribute. If not, we should implement it.

 
Cc: foolip@chromium.org
Components: Blink>HTML>Meter Blink>Bindings
Labels: Hotlist-Interop Hotlist-GoodFirstBug
Status: Available (was: Untriaged)
FYI: This was found by https://gist.github.com/foolip/32285c7baf22f7ca356c80b56b56a484

Comment 2 Deleted

@tkent

Can I take a look at this issue?
I want to be familiar with HTML components
Re: Comment 3
Please take this.

Owner: donghee....@gmail.com
Status: Assigned (was: Available)
Blocking: 651762
@tkent
I found that [Reflect] does not support 'double' attribute yet.
Without that using a SerializeForNumberType() instead AtomicString::Number makes a change on http://w3c-test.org/html/dom/reflection-forms.html.

6722 Pass
3 Fail (Which tests already failed on the current implementation.)

So I think that we should update [Reflect] to support the double attribute,
Where is a good point to start?


> So I think that we should update [Reflect] to support the double attribute,
> Where is a good point to start?

I recommend you to read the code for 'long' Reflect support:
https://cs.chromium.org/search/?q=%5BGS%5DetIntegralAttribute+file:binding.*py&sq=package:chromium&type=cs

Components: -Blink>Bindings
I found these IDL attributes should not be [Reflect] according to the specification.
https://html.spec.whatwg.org/multipage/form-elements.html#dom-meter-value

Project Member

Comment 10 by bugdroid1@chromium.org, Oct 22

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d89a726271a6b6934ec72510c2da3f4495729e5b

commit d89a726271a6b6934ec72510c2da3f4495729e5b
Author: Dong-hee Na <donghee.na92@gmail.com>
Date: Mon Oct 22 07:04:16 2018

Fix IDL attributes of METER element to  reflect values correctly

SerializeForNumberType() should be used instead of AtomicString::Number()
in Element::SetFloatingPointAttribute().

Bug: 894661
Change-Id: I6d4efd2d14fb7e01e0fb47cc703fd2d7d12cde18
Reviewed-on: https://chromium-review.googlesource.com/c/1288929
Commit-Queue: Dong-hee Na <donghee.na92@gmail.com>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601488}
[modify] https://crrev.com/d89a726271a6b6934ec72510c2da3f4495729e5b/third_party/WebKit/LayoutTests/external/wpt/html/dom/reflection-forms-expected.txt
[modify] https://crrev.com/d89a726271a6b6934ec72510c2da3f4495729e5b/third_party/blink/renderer/core/dom/element.cc
[modify] https://crrev.com/d89a726271a6b6934ec72510c2da3f4495729e5b/third_party/blink/renderer/modules/media_controls/media_controls_impl_test.cc

Status: Fixed (was: Assigned)
Status: Assigned (was: Fixed)
@tkent

3 Fail tests left. But can this wpt test be passed?

- meter.max: IDL get with DOM attribute unset:
assert_equals: expected 0 but got 1

But the spec says 
'If the max attribute is specified and a value could be parsed out of it, then the candidate maximum value is that value. Otherwise, the candidate maximum value is 1.0'


- meter.high: IDL get with DOM attribute unset:
assert_equals: expected 0 but got 1

But the spec says

If the candidate high boundary is less than the low boundary, then the high boundary is the low boundary.

Otherwise, if the candidate high boundary is greater than the maximum value, then the high boundary is the maximum value.

- meter.optimum: IDL get with DOM attribute unset: 
assert_equals: expected 0 but got 0.5

I think that reflection-forms.html is a conflict with wpt/html/semantics/forms/the-meter-element/meter.html

So IMHO, reflection-forms.html should be updated to follow spec
WDYT?

> So IMHO, reflection-forms.html should be updated to follow spec

I think so too.  It's a test bug.

@tkent

Then I will update the test and then upload it through CL.
Is it okay?
> Then I will update the test and then upload it through CL.
> Is it okay?

Of course it's okay.
Note that we should move tests for value/min/max/low/high/optimum IDL attributes of METER from reflection-forms.html to wpt/html/semantics/forms/the-meter-element/ because they don't reflect.

Sign in to add a comment