mirror of
https://github.com/servo/servo.git
synced 2025-08-11 08:25:32 +01:00
style: Implement scroll-margin parser and serializer.
The reason why we use RelaxedAtomBool is that ScrollSnapUtils::GetSnapPointForDestination() is called both from the main and the compositor threads, and the function will have a branch depending on the pref value. Differential Revision: https://phabricator.services.mozilla.com/D20101
This commit is contained in:
parent
d6750de0c3
commit
79a5e97c13
3 changed files with 50 additions and 1 deletions
|
@ -1661,14 +1661,19 @@ fn static_assert() {
|
|||
}
|
||||
</%self:impl_trait>
|
||||
|
||||
<% skip_scroll_margin_longhands = " ".join(["scroll-margin-%s" % x.ident for x in SIDES]) %>
|
||||
<% skip_margin_longhands = " ".join(["margin-%s" % x.ident for x in SIDES]) %>
|
||||
<%self:impl_trait style_struct_name="Margin"
|
||||
skip_longhands="${skip_margin_longhands}">
|
||||
skip_longhands="${skip_margin_longhands}
|
||||
${skip_scroll_margin_longhands}">
|
||||
|
||||
% for side in SIDES:
|
||||
<% impl_split_style_coord("margin_%s" % side.ident,
|
||||
"mMargin",
|
||||
side.index) %>
|
||||
<% impl_split_style_coord("scroll_margin_%s" % side.ident,
|
||||
"mScrollMargin",
|
||||
side.index) %>
|
||||
% endfor
|
||||
</%self:impl_trait>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue