Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate valid form for {background|mask}-position from their longhands.
If there is any longhand consisting of both keyword and position, we should attach both keyword and position for both longhands when serialize them. 1. To generate a serialized result with keyword, we add a macro function `to_css_with_keyword` accepted HorizontalPosition and VerticalPosition as the parameter to finish that. For the longhands which missing keyword, we use the default keyword. (`left` for `*-position-x` and `top` for `*-position-y`) 2. Update `Position::to_css` to generate the valid format by calling `to_css_with_keyword` with HorizontalPosition and VerticalPosition. 3. Update `to_css` to use new `Position::to_css` in background, background-position, mask and mask-position. MozReview-Commit-ID: 5Bnhdsi5yeM
- Loading branch information
Showing
3 changed files
with
54 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters