Closed Bug 1359787 Opened 6 years ago Closed 6 years ago

Stylo: Unite the implementation of background-image/ mask-image and border-image-source in {background|svg|border}.mako.rs

Categories

(Core :: CSS Parsing and Computation, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED

People

(Reporter: u459114, Assigned: u459114)

References

Details

Attachments

(1 file)

After bug 1352096 landed, the implementation of these three object should be totally the same.
1. Copy background-image mako into mask-image and border-image
2. In gecko.mako.rs, remove all "if shorthadn == "background"" stuff, we only need one implementation.
Blocks: stylo
Priority: -- → P3
Or, is there any place that I can put a XXX-image mako into, and use this template in {background|svg|border}.mako.rs?
For duplication between background.mako.rs, svg.mako.rs, etc., you can move the specified and computed value types to values/{specified,computed}/image.rs (call the types, say, ImageLayer), and then use helpers:predefined_type to define background-image, mask-image, etc. by reference to those types.  (See there are a couple of uses of predefined_type in properties/longhand/background.mako.rs.)
Attachment #8862353 - Flags: review?(manishearth)
Comment on attachment 8862353 [details]
Bug 1359787 - Implement {specified|computed}::LayerImage.

https://reviewboard.mozilla.org/r/134276/#review138702
Attachment #8862353 - Flags: review?(manishearth) → review+
Looks good, any reason layout/reftests/w3c-css/submitted/will-change/will-change-stacking-context-mask-1.html  fails?
(In reply to Manish Goregaokar [:manishearth] from comment #8)
> Looks good, any reason
> layout/reftests/w3c-css/submitted/will-change/will-change-stacking-context-
> mask-1.html  fails?

Oh, that failure had already been fix. That is because I forget to add 'flags="CREATES_STACKING_CONTEXT"' in ${helpers.predefined_type("mask-image"
Cool. Please land!
Landed.
https://github.com/servo/servo/pull/16707
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.