mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
layout: Eliminate the virtual is_float()
in favor of the flow flags
This commit is contained in:
parent
f5c6146de0
commit
be36fcd3b1
4 changed files with 20 additions and 26 deletions
|
@ -241,10 +241,6 @@ pub trait Flow: fmt::Show + ToString + Sync {
|
|||
false
|
||||
}
|
||||
|
||||
fn is_float(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
/// The 'position' property of this flow.
|
||||
fn positioning(&self) -> position::T {
|
||||
position::static_
|
||||
|
@ -570,6 +566,11 @@ impl FlowFlags {
|
|||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn is_float(&self) -> bool {
|
||||
self.floats_left() || self.floats_right()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn clears_floats(&self) -> bool {
|
||||
self.contains(CLEARS_LEFT) || self.contains(CLEARS_RIGHT)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue