Issue 96178 in chromium: SVG - Transformations mangle multi-Element Clip-Paths

14 views
Skip to first unread message

chro...@googlecode.com

unread,
Sep 11, 2011, 12:31:46 AM9/11/11
to chromi...@chromium.org
Status: Unconfirmed
Owner: ----
Labels: Type-Bug Pri-2 Area-Undefined

New issue 96178 by crj.wal...@gmail.com: SVG - Transformations mangle
multi-Element Clip-Paths
http://code.google.com/p/chromium/issues/detail?id=96178

Chrome Version : 13.0.782.220 and 14.0.835.159
URLs (if applicable) :
Other browsers tested:

Safari 5.1: OK
Firefox 6.0.2: OK
Inkscape: OK

If an object is transformed via scaling or translation,
AND IF... a clipping path is applied to that object,
AND IF... that clipping path contains "two" or more elements,
THEN... the clipping path will be mangled.

Note: the transformation can be a direct transformation on an object or a
group of objects; it can also be the result of scaling due the the
inclusion of a "viewBox".

It appears that transformations are applied twice to the clipping path
instead of once.

Also... assume an imaginary bounding box that would have surrounded the
clipping path if the transformation had been applied only once.
Refer to this as bounding box #1.
And assume there is a real bounding box around the clipping path after the
second transformation is errounerously applied.
Refer to this as bounding box #2.
The area that lies inside bounding box #1 and outside of bounding box #2
does not act as a clipping region and may lead to the rendering of some
strange rectangular shapes.

I have attached six very small SVG files... four of the six files exhibit
the problem.
All drawings are supposed to show two circles filled with blue and outlined
with red.
The blue fill is rendered with a rectangle that is subject to a clipping
path. The clipping path consists of two circles.
The red lines are simple circles rendered with no clipping; these only
serve to show the intended location of the clipping path.

#####################################################################
file1 - PASS
Clip-path contains two "circle" elements.
Clipped object is not subject to any transformation.
File renders correctly.
#####################################################################

#####################################################################
file2 - FAIL
Clip-path contains two "circle" elements.
Clipped object is part of a group that is scaled to 75%.
File does not render correctly in Chrome.
#####################################################################

#####################################################################
file3 - FAIL
Clip-path contains two "circle" elements.
Clipped object is part of a group that is scaled to 125%.
File does not render correctly in Chrome.
#####################################################################

#####################################################################
file4 - FAIL
Clip-path contains two "circle" elements.
Clipped object is part of a group that is translated right by 50px.
File does not render correctly in Chrome.
#####################################################################

#####################################################################
file5 - FAIL
Clip-path contains two circular "path" elements.
Clipped object is part of a group that is scaled to 125%.
Note: this file is the same as file3 except that clip-path contains
"path" elements instead of "circle" elements. Result is the same.
File does not render correctly in Chrome.
#####################################################################

#####################################################################
file6 - PASS
Clip-path contains one compound "path" element comprised of two circular
subpaths.
Clipped object is part of a group that is scaled to 125%.
File renders correctly; bug does not surface when clip-path contains
only one element.
#####################################################################


Attachments:
file1--two_circle_elements--no_transform--PASS.svg 692 bytes
file2--two_circle_elements--0.75_scaling--FAIL.svg 716 bytes
file3--two_circle_elements--1.25_scaling--FAIL.svg 716 bytes
file4--two_circle_elements--50px_translation--FAIL.svg 720 bytes
file5--two_simple_path_elements--1.25_scaling--FAIL.svg 775 bytes
file6--one_compound_path_element--1.25_scaling--PASS.svg 684 bytes
file3-rendered-with-chrome.png 28.4 KB

chro...@googlecode.com

unread,
Nov 1, 2011, 12:53:30 PM11/1/11
to chromi...@chromium.org
Updates:
Cc: dgla...@chromium.org

Comment #6 on issue 96178 by dgla...@chromium.org: SVG - Transformations

(No comment was entered for this change.)

chro...@googlecode.com

unread,
Dec 20, 2011, 5:51:22 AM12/20/11
to chromi...@chromium.org

Comment #13 on issue 96178 by blam...@google.com: SVG - Transformations

This is now fixed in WebKit (see
https://bugs.webkit.org/show_bug.cgi?id=53378).

Reply all
Reply to author
Forward
0 new messages