mirror of
https://github.com/servo/servo.git
synced 2025-09-02 11:08:22 +01:00
Auto merge of #14104 - iamrohit7:scroll-snap-type, r=Manishearth,waffles
Adds scroll-snap-type shorthand property <!-- Please describe your changes on the following line: --> Follow up to #14017 --- r=Manishearth <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors <!-- Either: --> - [X] There are tests for these changes `scroll_snap_type::should_serialize_to_single_value_if_sub_types_are_equal`, `scroll_snap_type::should_serialize_to_empty_string_if_sub_types_not_equal` <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- 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/14104) <!-- Reviewable:end -->
This commit is contained in:
commit
3959817424
5 changed files with 103 additions and 16 deletions
|
@ -978,7 +978,8 @@ fn static_assert() {
|
|||
|
||||
<% skip_box_longhands= """display overflow-y vertical-align
|
||||
-moz-binding page-break-before page-break-after
|
||||
scroll-snap-points-x scroll-snap-points-y transform""" %>
|
||||
scroll-snap-points-x scroll-snap-points-y transform
|
||||
scroll-snap-type-y""" %>
|
||||
<%self:impl_trait style_struct_name="Box" skip_longhands="${skip_box_longhands}">
|
||||
|
||||
// We manually-implement the |display| property until we get general
|
||||
|
@ -1220,6 +1221,11 @@ fn static_assert() {
|
|||
pub fn copy_transform_from(&mut self, other: &Self) {
|
||||
unsafe { self.gecko.mSpecifiedTransform.set(&other.gecko.mSpecifiedTransform); }
|
||||
}
|
||||
|
||||
<% scroll_snap_type_keyword = Keyword("scroll-snap-type", "none mandatory proximity") %>
|
||||
|
||||
${impl_keyword('scroll_snap_type_y', 'mScrollSnapTypeY', scroll_snap_type_keyword, need_clone=False)}
|
||||
|
||||
</%self:impl_trait>
|
||||
|
||||
<%def name="simple_image_array_property(name, shorthand, field_name)">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue