Issue metadata
Sign in to add a comment
|
Small, complex SVGs do not render in latest Chrome
Reported by
dox...@encircleapp.com,
Jun 4 2018
|
||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.62 Safari/537.36 Steps to reproduce the problem: Open the attached [index.html] in latest Chrome (67.0.3396.62) What is the expected behavior? You should see three SVG images - two garbage cans of different sizes, and a checkmark. See the attached Firefox screenshot. What went wrong? In Chrome 67, only the larger garbage can is visible. See the attached Chrome screenshot. Did this work before? Yes 66.0.3359.181 Chrome version: 67.0.3396.62 Channel: stable OS Version: Flash Version: This seems to be related to the viewbox size/proportions and path complexity of a particular SVG. As you can see from the HTML file, the garbage SVG is much more complex. The minimum (square) size at which it successfully renders in Chrome is 74x74. The checkmark is simpler, and can go as low as 9x9 before disappearing. Firefox and past versions of Chrome can render these SVGs at any size, even 8x8 and below.
,
Jun 4 2018
Bisected to r552511 = a016ca5071c9d0a3848a2c55fd0e13339d27d994 "[SPv175+] Don't create transform operations for identity transforms" Landed in 68.0.3402.0 Merged to 67.0.3396.17 Confirmed by disabling SP175 via "--disable-blink-features=SlimmingPaintV175" command line and observing the bug is gone.
,
Jun 4 2018
,
Jun 4 2018
,
Jun 5 2018
The bug occurs when mapping from:
root
PaintOffsetTranslation {}
PaintOffsetTranslation {"matrix":translation(21,17,0)}
Transform {"matrix":"scale(6.16356e-05,6.16356e-05,1)","origin":"0,0,0"}
to
root
PaintOffsetTranslation {}
PaintOffsetTranslation {"matrix":translation(21,17,0)}
The correct result should be the inversion of the scale transform, but the actual result is an identity transform.
A simple fix is to simplify the identity condition just to check if the child transform is identity. This can cover most of the cases that two consecutive clips can be combined.
The root cause seems that we treat the Scale(6e-5, 6e-5) transformation is non-invertible, but based on this bug, it seems reasonable that an SVG is defined using huge dimensions then scaled down to a tiny icon. Should we loose the condition of Isinvertible?
,
Jun 5 2018
An observation is that AffineTransform::IsInvertible is much more lax than TransformationMatrix::IsInvertible (the former is just != 0.) (FWIW though, I would not recommend using unnecessarily large values in viewBox for exactly reasons like this.)
,
Jun 5 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b0708fdad511e82684a474b12fd932026ea33a12 commit b0708fdad511e82684a474b12fd932026ea33a12 Author: Xianzhu Wang <wangxianzhu@chromium.org> Date: Tue Jun 05 21:59:36 2018 [PE] Relax TransformationMatrix::IsInvertible Previously it treated transforms with abs(determinant) less than 1e-8 as non-invertible. This was too strict that transforms like Scale(9.9e-5) were treated as non-invertible. Now just check if determinant is zero, which is consistent with AffineTransform and SkMatrix[44]. The code was added here: https://chromium.googlesource.com/chromium/src/+/041f0d1e8d01d8dc0cd2f4fe2579e1f09a9ae27a in an initial commit of 3D transforms. Bug: 849382 Change-Id: I01e395f373493f61fcf85851b694be9aed7b41c5 Reviewed-on: https://chromium-review.googlesource.com/1087362 Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org> Reviewed-by: Fredrik Söderquist <fs@opera.com> Reviewed-by: Chris Harrelson <chrishtr@chromium.org> Cr-Commit-Position: refs/heads/master@{#564680} [modify] https://crrev.com/b0708fdad511e82684a474b12fd932026ea33a12/third_party/blink/renderer/platform/transforms/transformation_matrix.cc [modify] https://crrev.com/b0708fdad511e82684a474b12fd932026ea33a12/third_party/blink/renderer/platform/transforms/transformation_matrix_test.cc
,
Jun 6 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/717c1c2988ffba7c956ec3c0d00b9225fe2c48a1 commit 717c1c2988ffba7c956ec3c0d00b9225fe2c48a1 Author: Xianzhu Wang <wangxianzhu@chromium.org> Date: Wed Jun 06 22:55:50 2018 [PE] Don't combine clips across non-invertible transform GeometryMapper::SourceToDestinationProjection(parent, child) returns identity if child transform is not invertible, so it's not reliable to use it to check if parent and child are in the same transform space. Now avoid the function, while still handle most common cases to combine clips through identity transforms. Bug: 849382 Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Change-Id: I747e857d3828a5fb6eea0f69ed8746843912baf4 Reviewed-on: https://chromium-review.googlesource.com/1086492 Reviewed-by: Tien-Ren Chen <trchen@chromium.org> Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org> Cr-Commit-Position: refs/heads/master@{#565078} [modify] https://crrev.com/717c1c2988ffba7c956ec3c0d00b9225fe2c48a1/third_party/blink/renderer/platform/graphics/compositing/paint_chunks_to_cc_layer.cc [modify] https://crrev.com/717c1c2988ffba7c956ec3c0d00b9225fe2c48a1/third_party/blink/renderer/platform/graphics/compositing/paint_chunks_to_cc_layer_test.cc
,
Jun 7 2018
Request to merge the CL in #c8.
,
Jun 7 2018
This bug requires manual review: M68 has already been promoted to the beta branch, so this requires manual review Please contact the milestone owner if you have questions. Owners: cmasso@(Android), kariahda@(iOS), bhthompson@(ChromeOS), abdulsyed@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jun 8 2018
Approved. branch:3440
,
Jun 11 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/cef4e5301177e9bc00923c4d13993b01fbbcc4a4 commit cef4e5301177e9bc00923c4d13993b01fbbcc4a4 Author: Xianzhu Wang <wangxianzhu@chromium.org> Date: Mon Jun 11 15:59:10 2018 [PE] Don't combine clips across non-invertible transform GeometryMapper::SourceToDestinationProjection(parent, child) returns identity if child transform is not invertible, so it's not reliable to use it to check if parent and child are in the same transform space. Now avoid the function, while still handle most common cases to combine clips through identity transforms. TBR=wangxianzhu@chromium.org (cherry picked from commit 717c1c2988ffba7c956ec3c0d00b9225fe2c48a1) Bug: 849382 Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Change-Id: I747e857d3828a5fb6eea0f69ed8746843912baf4 Reviewed-on: https://chromium-review.googlesource.com/1086492 Reviewed-by: Tien-Ren Chen <trchen@chromium.org> Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#565078} Reviewed-on: https://chromium-review.googlesource.com/1095423 Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org> Cr-Commit-Position: refs/branch-heads/3440@{#276} Cr-Branched-From: 010ddcfda246975d194964ccf20038ebbdec6084-refs/heads/master@{#561733} [modify] https://crrev.com/cef4e5301177e9bc00923c4d13993b01fbbcc4a4/third_party/blink/renderer/platform/graphics/compositing/paint_chunks_to_cc_layer.cc [modify] https://crrev.com/cef4e5301177e9bc00923c4d13993b01fbbcc4a4/third_party/blink/renderer/platform/graphics/compositing/paint_chunks_to_cc_layer_test.cc
,
Jun 11 2018
,
Jun 13 2018
Verified the fix on Ubuntu 14.04 using Chrome version #68.0.3440.25 as per the comment#0. Attaching screen shot for reference. Observed that three SVG images are seen upon opening index.html Hence, the fix is working as expected. Adding the verified labels. Note: Able to reproduce the issue on chrome version 67.0.3396.62 Thanks...!!
,
Jun 13 2018
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by dox...@encircleapp.com
, Jun 4 2018