Closed Bug 1358690 Opened 8 years ago Closed 8 years ago

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

Categories

(Core :: SVG, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: jwatt, Assigned: jwatt)

References

Details

Attachments

(3 files, 1 obsolete file)

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.
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)
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+
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.

Attachment

General

Created:
Updated:
Size: