mirror of
https://github.com/servo/servo.git
synced 2025-08-08 23:15:33 +01:00
stylo: Implement scroll-snap-coordinate
MozReview-Commit-ID: 6mr4ktfeEGT
This commit is contained in:
parent
a095565a8c
commit
20796ee94e
4 changed files with 62 additions and 4 deletions
|
@ -93,4 +93,13 @@ impl<T> nsTArray<T> {
|
|||
let mut header = self.header_mut();
|
||||
header.mLength = len;
|
||||
}
|
||||
|
||||
/// Resizes an array containing only POD elements
|
||||
///
|
||||
/// This will not leak since it only works on POD types (and thus doesn't assert)
|
||||
pub unsafe fn set_len_pod(&mut self, len: u32) where T: Copy {
|
||||
self.ensure_capacity(len as usize);
|
||||
let mut header = unsafe { self.header_mut() };
|
||||
header.mLength = len;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue