Support SVG context-fill/context-stroke in SVG images used as CSS backgrounds

RESOLVED FIXED in Firefox 55

Status

()

enhancement
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: jwatt, Assigned: jwatt)

Tracking

Trunk
mozilla55
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox55 fixed)

Details

Attachments

(3 attachments, 1 obsolete attachment)

Assignee

Description

2 years ago
As per bug 1347543 comment 23, we don't currently support context-fill/context-stroke in SVG images used as CSS backgrounds, but Photon needs that now.
Assignee

Comment 4

2 years ago
Given that we have decent coverage of the internals of how context paint is handled in an SVG image via the <img> tests, I think for background-image we just need basic tests to test that the context paint is passed in correctly.
Attachment #8860612 - Flags: review?(dholbert)
Assignee

Updated

2 years ago
Blocks: 1347543
Comment on attachment 8860608 [details] [diff] [review]
part 1 - Allow SVGImageContext::MaybeInitAndStoreContextPaint to be passed an existing SVGImageContext

Review of attachment 8860608 [details] [diff] [review]:
-----------------------------------------------------------------

r=me
Attachment #8860608 - Flags: review?(dholbert) → review+
Comment on attachment 8860609 [details] [diff] [review]
part 2 - Support context paint in SVG used as a CSS backgrounds image

Review of attachment 8860609 [details] [diff] [review]:
-----------------------------------------------------------------

Commit message nit:
> Bug 1358690, part 2 - Support context paint in SVG used as a CSS backgrounds image. r=dholbert

s/backgrounds/background/

::: layout/base/nsLayoutUtils.h
@@ +1797,5 @@
>     *   @param aImageFlags       Image flags of the imgIContainer::FLAG_* variety.
>     *   @param aExtendMode       How to extend the image over the dest rect.
>     */
>    static DrawResult DrawBackgroundImage(gfxContext&         aContext,
> +                                        nsIFrame*           aForFrame,

Please update the documentation for this method (right above this line), to mention @param aForFrame amongst all the other params.
Attachment #8860609 - Flags: review?(dholbert) → review+
Comment on attachment 8860612 [details] [diff] [review]
part 3 - Add reftests for context paint in SVG used as a CSS backgrounds image

Review of attachment 8860612 [details] [diff] [review]:
-----------------------------------------------------------------

r=me
Attachment #8860612 - Flags: review?(dholbert) → review+

Comment 8

2 years ago
Pushed by jwatt@jwatt.org:
https://hg.mozilla.org/integration/mozilla-inbound/rev/7fac9e40baed
part 1 - Allow SVGImageContext::MaybeInitAndStoreContextPaint to be passed an existing SVGImageContext. r=dholbert
https://hg.mozilla.org/integration/mozilla-inbound/rev/09e2135b234e
part 2 - Support context paint in SVG when drawn as a CSS background image. r=dholbert
https://hg.mozilla.org/integration/mozilla-inbound/rev/efa84330c487
part 3 - Add reftests for context paint in SVG drawn as a CSS backgrounds image. r=dholbert
You need to log in before you can comment on or make changes to this bug.