From 351ffa462d2314c4b60369e2ba0f13b5d90f03b5 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Fri, 14 Sep 2018 20:54:19 +0200 Subject: Fix wrong SVG sizes with non-integer values for viewBox width/height. Includes a standalone reftest. --- dom/svg/test/reftest_viewport_noninteger.html | 175 ++++++++++++++++++++++++++ 1 file changed, 175 insertions(+) create mode 100644 dom/svg/test/reftest_viewport_noninteger.html (limited to 'dom/svg/test/reftest_viewport_noninteger.html') diff --git a/dom/svg/test/reftest_viewport_noninteger.html b/dom/svg/test/reftest_viewport_noninteger.html new file mode 100644 index 000000000..3f4852b53 --- /dev/null +++ b/dom/svg/test/reftest_viewport_noninteger.html @@ -0,0 +1,175 @@ + + + + + SVG size test + + + +

SVG size test

+ +

The grey boxes below are <svg> elements.

+

All SVGs in each row should have the exact same size.

+

Each row has its own viewBox width and height: viewBox="0 0 width height".

+

Each column has its own width/height styling. For example, style="width: 200px; height: auto;".

+

The first column has both an explicit widht and an explicit height, so there's not much that can go wrong there. It acts as a reference.

+

The first row has integer viewBox width and height. Firefox then sizes all SVGs correctly.

+

The remaining rows have at least one non-integer viewBox width and height. Firefox then sizes the SVGs a bit wrong.

+

Chrome, Safari and Edge seem to pass all tests.

+ +

+ +
+ + + + -- cgit v1.2.3