Implement translate property styling

This commit is contained in:
CJ Ku 2018-01-25 12:47:27 +09:00 committed by Brian Birtles
parent 62c0c6feee
commit de3e8c9a8b
10 changed files with 83 additions and 19 deletions

View file

@ -3061,7 +3061,7 @@ fn static_assert() {
overscroll-behavior-x overscroll-behavior-y
overflow-clip-box-inline overflow-clip-box-block
perspective-origin -moz-binding will-change
shape-outside contain touch-action""" %>
shape-outside contain touch-action translate""" %>
<%self:impl_trait style_struct_name="Box" skip_longhands="${skip_box_longhands}">
// We manually-implement the |display| property until we get general
@ -3487,6 +3487,7 @@ fn static_assert() {
}
${impl_individual_transform('rotate', 'Rotate', 'mSpecifiedRotate')}
${impl_individual_transform('translate', 'Translate', 'mSpecifiedTranslate')}
pub fn set_will_change(&mut self, v: longhands::will_change::computed_value::T) {
use gecko_bindings::bindings::{Gecko_AppendWillChange, Gecko_ClearWillChange};

View file

@ -398,6 +398,14 @@ ${helpers.predefined_type("rotate", "Rotate",
gecko_pref="layout.css.individual-transform.enabled",
spec="https://drafts.csswg.org/css-transforms-2/#individual-transforms")}
${helpers.predefined_type("translate", "Translate",
"generics::transform::Translate::None",
animation_value_type="ComputedValue",
boxed=True,
flags="CREATES_STACKING_CONTEXT FIXPOS_CB",
gecko_pref="layout.css.individual-transform.enabled",
spec="https://drafts.csswg.org/css-transforms-2/#individual-transforms")}
// CSSOM View Module
// https://www.w3.org/TR/cssom-view-1/
${helpers.single_keyword("scroll-behavior",