mirror of
https://github.com/servo/servo.git
synced 2025-08-08 15:05:35 +01:00
Add Multicolumn support block fragmentation.
This commit is contained in:
parent
359b984348
commit
5498b54347
10 changed files with 373 additions and 51 deletions
|
@ -29,6 +29,17 @@ impl FlowList {
|
|||
self.flows.push_back(new_tail);
|
||||
}
|
||||
|
||||
/// Add an element first in the list
|
||||
///
|
||||
/// O(1)
|
||||
pub fn push_front(&mut self, new_head: FlowRef) {
|
||||
self.flows.push_front(new_head);
|
||||
}
|
||||
|
||||
pub fn pop_front(&mut self) -> Option<FlowRef> {
|
||||
self.flows.pop_front()
|
||||
}
|
||||
|
||||
/// Create an empty list
|
||||
#[inline]
|
||||
pub fn new() -> FlowList {
|
||||
|
@ -64,6 +75,13 @@ impl FlowList {
|
|||
pub fn len(&self) -> usize {
|
||||
self.flows.len()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn split_off(&mut self, i: usize) -> Self {
|
||||
FlowList {
|
||||
flows: self.flows.split_off(i)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Iterator for FlowListIterator<'a> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue