mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Add support for background-repeat: space and round
This adds support for more background-repeat modes using the legacy rendering backend.
This commit is contained in:
parent
821797d6f7
commit
68ae97fd0e
14 changed files with 193 additions and 105 deletions
|
@ -1011,14 +1011,20 @@ fn static_assert() {
|
|||
use gecko_bindings::structs::nsStyleImageLayers_Repeat;
|
||||
use gecko_bindings::structs::NS_STYLE_IMAGELAYER_REPEAT_REPEAT;
|
||||
use gecko_bindings::structs::NS_STYLE_IMAGELAYER_REPEAT_NO_REPEAT;
|
||||
use gecko_bindings::structs::NS_STYLE_IMAGELAYER_REPEAT_SPACE;
|
||||
use gecko_bindings::structs::NS_STYLE_IMAGELAYER_REPEAT_ROUND;
|
||||
|
||||
let (repeat_x, repeat_y) = match servo {
|
||||
T::repeat_x => (NS_STYLE_IMAGELAYER_REPEAT_REPEAT,
|
||||
NS_STYLE_IMAGELAYER_REPEAT_NO_REPEAT),
|
||||
T::repeat_y => (NS_STYLE_IMAGELAYER_REPEAT_NO_REPEAT,
|
||||
NS_STYLE_IMAGELAYER_REPEAT_REPEAT),
|
||||
T::repeat => (NS_STYLE_IMAGELAYER_REPEAT_REPEAT,
|
||||
NS_STYLE_IMAGELAYER_REPEAT_REPEAT),
|
||||
T::repeat => (NS_STYLE_IMAGELAYER_REPEAT_REPEAT,
|
||||
NS_STYLE_IMAGELAYER_REPEAT_REPEAT),
|
||||
T::space => (NS_STYLE_IMAGELAYER_REPEAT_SPACE,
|
||||
NS_STYLE_IMAGELAYER_REPEAT_SPACE),
|
||||
T::round => (NS_STYLE_IMAGELAYER_REPEAT_ROUND,
|
||||
NS_STYLE_IMAGELAYER_REPEAT_ROUND),
|
||||
T::no_repeat => (NS_STYLE_IMAGELAYER_REPEAT_NO_REPEAT,
|
||||
NS_STYLE_IMAGELAYER_REPEAT_NO_REPEAT),
|
||||
};
|
||||
|
|
|
@ -119,7 +119,7 @@ ${helpers.predefined_type("background-color", "CSSColor",
|
|||
</%helpers:vector_longhand>
|
||||
|
||||
${helpers.single_keyword("background-repeat",
|
||||
"repeat repeat-x repeat-y no-repeat",
|
||||
"repeat repeat-x repeat-y space round no-repeat",
|
||||
vector=True,
|
||||
animatable=False)}
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ ${helpers.single_keyword("mask-mode",
|
|||
// TODO implement all of repeat-style for background and mask
|
||||
// https://drafts.csswg.org/css-backgrounds-3/#repeat-style
|
||||
${helpers.single_keyword("mask-repeat",
|
||||
"repeat repeat-x repeat-y no-repeat",
|
||||
"repeat repeat-x repeat-y space round no-repeat",
|
||||
vector=True,
|
||||
products="gecko",
|
||||
animatable=False)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue