New issue
Advanced search Search tips

Issue 817996 link

Starred by 1 user

Issue metadata

Status: ExternalDependency
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

<meter> element doesn't render correctlly

Reported by ohad...@gmail.com, Mar 1 2018

Issue description

UserAgent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:58.0) Gecko/20100101 Firefox/58.0

Example URL:
http://jsbin.com/huhivik/edit?html,output

Steps to reproduce the problem:
I have the following code that renders differently on Chromium(64.0.3282.167) and Firefox(58.0.2) on Linux(32 bit).
If I am not mistaken the correct behavior belongs to firefox.

Here is the code:
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
  <br />
  Firefox
<meter value=0 min=0 max=4 low=2 high=3 optimum=4>D-</meter>
  <meter value=1 min=0 max=4 low=2 high=3 optimum=4>D-</meter>
  <meter value=2 min=0 max=4 low=2 high=3 optimum=4>D-</meter>
  <meter value=3 min=0 max=4 low=2 high=3 optimum=4>Yellow</meter>
<meter value=4 min=0 max=4 low=2 high=3 optimum=4>D-</meter>
  <br />
  <br />
  Chrome
<meter value=0 min=0 max=4 low=2 high=3 optimum=4>D-</meter>
  <meter value=1 min=0 max=4 low=2 high=3 optimum=4>D-</meter>
  <meter value=2 min=0 max=4 low=2 high=3 optimum=4>D-</meter>
  <meter value=3 min=0 max=4 low=2 high=3 optimum=4>Green</meter>
<meter value=4 min=0 max=4 low=2 high=3 optimum=4>D-</meter>
</body>
</html>

What is the expected behavior?
The 4th item shows in yellow.

What went wrong?
The 4th item showed in green.

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 64.0.3282.167  Channel: n/a
OS Version: Lubuntu 17.10
Flash Version: Shockwave Flash 28.0 r0
 

Comment 1 by woxxom@gmail.com, Mar 1 2018

https://html.spec.whatwg.org/multipage/form-elements.html#the-meter-element
Applying to your case (value=3 and the high range is between high=3 and max=4) the spec says:

>Finally, if the optimum point is higher than the high boundary, [...] the region between the high boundary and the maximum value must be treated as the optimum region, the region from the high boundary down to the low boundary must be treated as a suboptimal region, and the remaining region must be treated as an even less good region.

So it says "between" but what "between" means mathematically?
Chrome thinks "high" is included as [high, max], FF thinks it's excluded as (high, max].
I think the spec is ambiguous and should be fixed i.e. Chrome doesn't seem to be wrong here.

Comment 2 by ajha@chromium.org, Mar 2 2018

Labels: Needs-Triage-M64

Comment 3 by tkent@chromium.org, Mar 2 2018

Cc: tkent@chromium.org
Components: -Blink Blink>HTML>Meter
Labels: -Pri-2 -Needs-Triage-M64 Hotlist-Interop Pri-3
Status: ExternalDependency (was: Unconfirmed)
Filed a spec issue; https://github.com/whatwg/html/issues/3520

Sign in to add a comment