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:
Martin Robinson 2016-09-20 11:51:51 +02:00
parent 821797d6f7
commit 68ae97fd0e
14 changed files with 193 additions and 105 deletions

View file

@ -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),
};

View file

@ -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)}

View file

@ -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)}