Closed
Bug 1287492
Opened 9 years ago
Closed 8 years ago
Scaling past a certain point with a matrix transform in a SVG in combination with a CSS invert filter on the SVG prevents the SVG from being rendered at all.
Categories
(Core :: SVG, defect)
Tracking
()
RESOLVED
FIXED
mozilla54
Tracking | Status | |
---|---|---|
firefox54 | --- | fixed |
People
(Reporter: wiebe, Assigned: u459114)
References
Details
Attachments
(7 files, 1 obsolete file)
2.67 KB,
text/html
|
Details | |
80.33 KB,
image/png
|
Details | |
119.26 KB,
image/png
|
Details | |
59 bytes,
text/x-review-board-request
|
mstange
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
mstange
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
mstange
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
mstange
:
review+
|
Details |
User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0
Build ID: 20160711192800
Steps to reproduce:
I inserted a inline SVG in a HTML file with a SVG group element in it that has a matrix transform applied to zoom in. On the SVG element itself i have a CSS invert filter to invert all the colors (see the attached file that reproduces the problem).
Actual results:
When the matrix transform zooms in past a certain point the SVG is not rendered anymore, this only happens when the CSS invert filter is applied.
Expected results:
The SVG should be rendered no matter how far you zoom in and even when you apply the CSS invert filter.
Updated•9 years ago
|
Component: Untriaged → SVG
Product: Firefox → Core
Wiebe, could you attach a screenshot of the correct rendering of your entire testcase, please.
Flags: needinfo?(wiebe)
I have added a screenshot of how it renders in Firefox and breaks and one in Chrome where is does work.
The patches in bug 1320036 can fix this bug too.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Attachment #8835365 -
Attachment is obsolete: true
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Attachment #8835379 -
Flags: review?(mstange)
Attachment #8835501 -
Flags: review?(mstange)
Attachment #8835380 -
Flags: review?(mstange)
Attachment #8835440 -
Flags: review?(mstange)
Comment hidden (typo) |
Assignee | ||
Comment 19•8 years ago
|
||
Although the patches in bug 1320036 can fix this bug as well, but the solution in that bug might be incorrect, depends on how we read spec[see bug 1320036 comment 23]
The patches in this bug are not relative to bounding box computation.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 22•8 years ago
|
||
mozreview-review |
Comment on attachment 8835379 [details]
Bug 1287492 - Part 1. Implement nsLayoutUtils::HasCSSBoxLayout.
https://reviewboard.mozilla.org/r/111064/#review112574
Attachment #8835379 -
Flags: review?(mstange) → review+
Comment 23•8 years ago
|
||
mozreview-review |
Comment on attachment 8835380 [details]
Bug 1287492 - Part 3. (Main) Shrink mTargetBBoxInFilterSpace
https://reviewboard.mozilla.org/r/111066/#review112606
::: layout/svg/nsFilterInstance.cpp:189
(Diff revision 5)
> MOZ_ASSERT(mTargetFrame, "Need to supply a frame when there's no aOverrideBBox");
> mTargetBBox = nsSVGUtils::GetBBox(mTargetFrame);
> }
>
> // Compute user space to filter space transforms.
> - nsresult rv = ComputeUserSpaceToFilterSpaceScale();
> + if(!ComputeUserSpaceToFilterSpaceScale()) {
missing space after "if"
Attachment #8835380 -
Flags: review?(mstange) → review+
Comment 24•8 years ago
|
||
mozreview-review |
Comment on attachment 8835440 [details]
Bug 1287492 - Part 4. Reftest
https://reviewboard.mozilla.org/r/111182/#review112610
Attachment #8835440 -
Flags: review?(mstange) → review+
Comment 25•8 years ago
|
||
mozreview-review |
Comment on attachment 8835501 [details]
Bug 1287492 - Part 2. Rewrite nsSVGUtils::GetNearestSVGViewport
https://reviewboard.mozilla.org/r/111234/#review112612
Attachment #8835501 -
Flags: review?(mstange) → review+
Comment 26•8 years ago
|
||
It would be really nice to have the coordinates in the FilterDescription be independent of the filter resolution (for example in float user space pixels) and then convert to actual pixels only during painting, when we create FilterNodes from the FilterDescription (in FilterSupport). At that point we'd be able to look at the DrawTarget to know what resolution we should use for the intermediate surfaces and the FilterNode coordinate attributes.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 29•8 years ago
|
||
Pushed by cku@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2dfa0badd7f4
Part 1. Implement nsLayoutUtils::HasCSSBoxLayout. r=mstange
https://hg.mozilla.org/integration/autoland/rev/158d2fb726da
Part 2. Rewrite nsSVGUtils::GetNearestSVGViewport r=mstange
https://hg.mozilla.org/integration/autoland/rev/c8fd0f9baf34
Part 3. (Main) Shrink mTargetBBoxInFilterSpace r=mstange
https://hg.mozilla.org/integration/autoland/rev/b209aadec564
Part 4. Reftest r=mstange
Comment 30•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/2dfa0badd7f4
https://hg.mozilla.org/mozilla-central/rev/158d2fb726da
https://hg.mozilla.org/mozilla-central/rev/c8fd0f9baf34
https://hg.mozilla.org/mozilla-central/rev/b209aadec564
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
status-firefox54:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
![]() |
||
Comment 31•8 years ago
|
||
C.J., GetNearestSVGParent is really not a good name. It sounds like the function gets the "nearest parent in the SVG namespace" (any svg parent) whereas what it really does is get the "nearest viewport establishing SVG element's frame". Can you rename it back to GetNearestSVGViewport please?
Flags: needinfo?(cku)
Comment 32•8 years ago
|
||
Pushed by cku@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/1330b7dba04a
(followup) Rename GetNearestSVGParent backto GetNearestSVGViewport. r=me
Assignee | ||
Comment 33•8 years ago
|
||
(In reply to Jonathan Watt [:jwatt] from comment #31)
> C.J., GetNearestSVGParent is really not a good name. It sounds like the
> function gets the "nearest parent in the SVG namespace" (any svg parent)
> whereas what it really does is get the "nearest viewport establishing SVG
> element's frame". Can you rename it back to GetNearestSVGViewport please?
Sure and done
Flags: needinfo?(cku)
Comment 34•8 years ago
|
||
bugherder |
You need to log in
before you can comment on or make changes to this bug.
Description
•