mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Auto merge of #15576 - mbrubeck:align, r=Manishearth
stylo: Implement 'align-self' and 'justify-self' Stylo-only patch to match Gecko property support. Part of #15001. r? @Manishearth <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15576) <!-- Reviewable:end -->
This commit is contained in:
commit
11396b4dd3
5 changed files with 124 additions and 11 deletions
|
@ -864,7 +864,7 @@ fn static_assert() {
|
|||
<% skip_position_longhands = " ".join(x.ident for x in SIDES + GRID_LINES) %>
|
||||
<%self:impl_trait style_struct_name="Position"
|
||||
skip_longhands="${skip_position_longhands} z-index box-sizing order align-content
|
||||
justify-content">
|
||||
justify-content align-self justify-self">
|
||||
% for side in SIDES:
|
||||
<% impl_split_style_coord("%s" % side.ident,
|
||||
"mOffset",
|
||||
|
@ -914,6 +914,18 @@ fn static_assert() {
|
|||
|
||||
${impl_simple_copy('justify_content', 'mJustifyContent')}
|
||||
|
||||
pub fn set_align_self(&mut self, v: longhands::align_self::computed_value::T) {
|
||||
self.gecko.mAlignSelf = v.0.bits()
|
||||
}
|
||||
|
||||
${impl_simple_copy('align_self', 'mAlignSelf')}
|
||||
|
||||
pub fn set_justify_self(&mut self, v: longhands::justify_self::computed_value::T) {
|
||||
self.gecko.mJustifySelf = v.0.bits()
|
||||
}
|
||||
|
||||
${impl_simple_copy('justify_self', 'mJustifySelf')}
|
||||
|
||||
pub fn set_box_sizing(&mut self, v: longhands::box_sizing::computed_value::T) {
|
||||
use computed_values::box_sizing::T;
|
||||
use gecko_bindings::structs::StyleBoxSizing;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue