SVG path disappears when any of its coordinates is higher than 8388607

NEW
Unassigned

Status

()

Core
Layout
P3
normal
a year ago
6 months ago

People

(Reporter: Mateusz, Unassigned)

Tracking

({regression, testcase})

13 Branch
All
Windows
regression, testcase
Points:
---

Firefox Tracking Flags

(firefox49 wontfix, firefox50 fix-optional, firefox51 fix-optional, firefox52 fix-optional)

Details

(Whiteboard: [regressed 2012])

(Reporter)

Description

a year ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36

Steps to reproduce:

See this jsfiddle: https://jsfiddle.net/9sj0q4s8/ It shows 3 svg elements. First one has viewBox set to 0 0 100 100, second to 0 8388507 100 100, and third one to 0 8388508 100 100. Each of these svg elements contains a 100x100px square created by path and positioned in top left corner of viewBox. 



Actual results:

As you can see first two squares render correctly but third one is not visible.
That problem is visible only on Windows, on Mac it works correctly.


Expected results:

All three squares should be visible. 

The problem is that Y position of the bottom edge of the third square is placed at 8388608 (viewBox Y is 8388508 plus 100px of square height gives 8388608), which is 11111111111111111111111 + 1. I'm not sure what exactly goes wrong under the hood but it looks like the coordinate exceeds fraction part of single precision floating point value (23 bits) and the path disappears in such case.

Updated

a year ago
Has STR: --- → yes
Keywords: testcase
OS: Unspecified → Windows
Hardware: Unspecified → All

Comment 1

a year ago
Regression window:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=c90c9f273cad&tochange=60edf587f4af
Status: UNCONFIRMED → NEW
Component: Untriaged → Layout
Ever confirmed: true
Keywords: regression
Product: Firefox → Core
status-firefox49: --- → affected
status-firefox50: --- → affected
status-firefox51: --- → affected
status-firefox52: --- → affected
Version: 49 Branch → 13 Branch
Given the length of time this bug has existed I'm going to mark this fix-optional for the next upcoming releases.
status-firefox50: affected → fix-optional
status-firefox51: affected → fix-optional
status-firefox52: affected → fix-optional
status-firefox49: affected → wontfix
(In reply to YF (Yang) from comment #1)
> Regression window:
> https://hg.mozilla.org/mozilla-central/
> pushloghtml?fromchange=c90c9f273cad&tochange=60edf587f4af

I don't see anything relevant in those changesets, but it was about here that we switched to Display List based rendering which caused a bunch of similar regressions.
See Also: → bug 1242275, bug 1126940
Whiteboard: [regressed 2012]

Updated

6 months ago
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.