SVG: SVGLength.value returns wrong results for percentage lengths in display:none blocks

NEW
Unassigned

Status

()

8 years ago
8 years ago

People

(Reporter: birtles, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

8 years ago
Created attachment 506968 [details]
Plain HTML test case

When we have an SVG fragment that is not rendered because it or a parent is display:none, attempts to fetch the value of any percentage-based lengths in user units (by calling SVGLength.value) do not return the expected result.

In the attached test case we have a circle with cy="50%" but querying the value of this length in user units gives us "5.000000245224396e-21" instead of 50.

Not that if we change the block from "display:none" to "visibility:hidden" the result is 50 as expected.

This situation occurs frequently in our mochitest suite where the test content appears in a display:none block.
(Reporter)

Comment 1

8 years ago
Created attachment 506969 [details]
Mochitest version of the test case
You need to log in before you can comment on or make changes to this bug.