Closed
Bug 1370797
Opened 8 years ago
Closed 8 years ago
stylo: context-fill / context-stroke are not working when using SVG as an image on stylo
Categories
(Core :: SVG, defect, P1)
Core
SVG
Tracking
()
RESOLVED
FIXED
mozilla56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: tommykuo, Assigned: tommykuo)
References
Details
Attachments
(2 files, 1 obsolete file)
I try to open the following test cases with enabling `svg.context-properties.content.enabled`.
- layout/reftests/svg/as-image/context-fill-01.html
- layout/reftests/svg/as-image/context-stroke-01.html
The result color w/ stylo is blue (the fallback color), and the color w/o stylo is lime.
Assignee | ||
Comment 1•8 years ago
|
||
I found we get the correct color (lime) in [1]. So, I think the problem doesn't happen when cascading.
[1]: https://searchfox.org/mozilla-central/source/servo/components/style/properties/gecko.mako.rs#441-446
Assignee | ||
Comment 2•8 years ago
|
||
I open this SVG directly, and `context-fill` works. I think this bug happens only using SVG as an image.
Assignee | ||
Updated•8 years ago
|
Summary: stylo: context-fill / context-stroke are not working on stylo → stylo: context-fill / context-stroke are not working when using SVG as an image on stylo
Comment 3•8 years ago
|
||
`-moz-context-propreties` was marked as "internal=True" at [1], which doesn't get parsed in normal document. You should see
INFO:style::error_reporting: Url: (stylo: not supported)
19:3 Unsupported property declaration: '-moz-context-properties: fill;', found unexpected identifier fill
when running `RUST_LOG=style::error_reporting ./mach run file:///Users/tlin/Projects/gecko-dev/layout/reftests/svg/as-image/context-fill-01.html`
heycam, does stylo support property parsing by fliping gecko pref? Gecko flips "svg.context-properties.content.enabled" to true to parse "-moz-context-propreties" in reftests [2].
[1] http://searchfox.org/mozilla-central/rev/c49a70b53f67dd5550eec8a08793805f2aca8d42/servo/components/style/properties/longhand/inherited_svg.mako.rs#271
[2] http://searchfox.org/mozilla-central/rev/c49a70b53f67dd5550eec8a08793805f2aca8d42/layout/reftests/svg/as-image/reftest.list#60
Flags: needinfo?(cam)
Comment 4•8 years ago
|
||
I think stylo does respond to those prefs being flipped. It looks like the implementation of -moz-context-properties in inherited_svg.mako.rs doesn't understand the "fill" keyword, though...
Flags: needinfo?(cam)
Assignee | ||
Comment 5•8 years ago
|
||
The value list pass into `CustomIdent::from_ident` is an exclusive list[1], so it doesn't mean we don't support "fill", "stroke", "fill-opacity" and "stroke-opacity". The value what we support is defined in [2], and we can see stylo already support "fill" and "stroke".
We still need to figure out why "context-fill" and "context-stroke" not working when SVG as an image.
[1]: http://searchfox.org/mozilla-central/rev/7cc377ce3f0a569c5c9b362d589705cd4fecc0ac/servo/components/style/properties/longhand/inherited_svg.mako.rs#290
[2]: http://searchfox.org/mozilla-central/rev/7cc377ce3f0a569c5c9b362d589705cd4fecc0ac/servo/components/style/properties/gecko.mako.rs#4110-4114
Assignee | ||
Comment 6•8 years ago
|
||
I think the bug is caused by [1]. It made author can not use `-moz-context-properties`. I tent to remove this line to fix it.
[1]: http://searchfox.org/mozilla-central/rev/c49a70b53f67dd5550eec8a08793805f2aca8d42/servo/components/style/properties/longhand/inherited_svg.mako.rs#271
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Updated•8 years ago
|
Attachment #8879092 -
Flags: review?(cam)
Attachment #8879093 -
Flags: review?(cam)
Assignee | ||
Comment 9•8 years ago
|
||
Comment 10•8 years ago
|
||
mozreview-review |
Comment on attachment 8879092 [details]
Bug 1370797 - Expose -moz-context-properties on stylo
https://reviewboard.mozilla.org/r/150432/#review155442
Attachment #8879092 -
Flags: review?(cam) → review+
Comment 11•8 years ago
|
||
mozreview-review |
Comment on attachment 8879093 [details]
Bug 1370797 - Enable reftests of context-fill and context-stroke
https://reviewboard.mozilla.org/r/150434/#review155444
Attachment #8879093 -
Flags: review?(cam) → review+
Comment hidden (mozreview-request) |
Assignee | ||
Updated•8 years ago
|
Attachment #8879092 -
Attachment is obsolete: true
Comment 13•8 years ago
|
||
Pushed by ecoal95@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/49f8263e9220
Enable reftests of context-fill and context-stroke r=heycam
Comment 14•8 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in
before you can comment on or make changes to this bug.
Description
•