Some IDL attributes of METER element don't reflect values correctly |
||||||
Issue descriptionChrome 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.
,
Oct 12
@tkent Can I take a look at this issue? I want to be familiar with HTML components
,
Oct 12
Re: Comment 3 Please take this.
,
Oct 12
,
Oct 15
,
Oct 15
@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?
,
Oct 15
> 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
,
Oct 22
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
,
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
,
Oct 22
,
Oct 22
,
Oct 22
@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?
,
Oct 22
> So IMHO, reflection-forms.html should be updated to follow spec I think so too. It's a test bug.
,
Oct 22
@tkent Then I will update the test and then upload it through CL. Is it okay?
,
Oct 22
> 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 |
||||||
Comment 1 by tkent@chromium.org
, Oct 11Components: Blink>HTML>Meter Blink>Bindings
Labels: Hotlist-Interop Hotlist-GoodFirstBug
Status: Available (was: Untriaged)