mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
layout: Refactor Flow::from_fragment
-style constructors to be
consistent.
This commit is contained in:
parent
e888b76534
commit
be252371ea
11 changed files with 35 additions and 15 deletions
|
@ -533,7 +533,12 @@ impl Encodable for BlockFlowFlags {
|
|||
}
|
||||
|
||||
impl BlockFlow {
|
||||
pub fn from_fragment(fragment: Fragment, float_kind: Option<FloatKind>) -> BlockFlow {
|
||||
pub fn from_fragment(fragment: Fragment) -> BlockFlow {
|
||||
BlockFlow::from_fragment_and_float_kind(fragment, None)
|
||||
}
|
||||
|
||||
pub fn from_fragment_and_float_kind(fragment: Fragment, float_kind: Option<FloatKind>)
|
||||
-> BlockFlow {
|
||||
let writing_mode = fragment.style().writing_mode;
|
||||
BlockFlow {
|
||||
base: BaseFlow::new(Some(fragment.style()), writing_mode, match float_kind {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue