mirror of
https://github.com/servo/servo.git
synced 2025-06-19 14:48:59 +01:00
commit
20bbf6a859
2 changed files with 9 additions and 9 deletions
|
@ -650,7 +650,7 @@ impl Flow for BlockFlow {
|
|||
|
||||
/* find max width from child block contexts */
|
||||
for child_ctx in self.base.child_iter() {
|
||||
assert!(child_ctx.starts_block_flow() || child_ctx.starts_inline_flow());
|
||||
assert!(child_ctx.is_block_flow() || child_ctx.is_inline_flow());
|
||||
|
||||
let child_base = flow::mut_base(child_ctx);
|
||||
min_width = geometry::max(min_width, child_base.min_width);
|
||||
|
@ -781,7 +781,7 @@ impl Flow for BlockFlow {
|
|||
// FIXME(ksh8281): avoid copy
|
||||
let flags_info = self.base.flags_info.clone();
|
||||
for kid in self.base.child_iter() {
|
||||
assert!(kid.starts_block_flow() || kid.starts_inline_flow());
|
||||
assert!(kid.is_block_flow() || kid.is_inline_flow());
|
||||
|
||||
let child_base = flow::mut_base(kid);
|
||||
child_base.position.origin.x = x_offset;
|
||||
|
|
|
@ -171,11 +171,11 @@ pub trait ImmutableFlowUtils {
|
|||
/// Return true if this flow is a Block Container.
|
||||
fn is_block_container(self) -> bool;
|
||||
|
||||
/// Returns true if this flow is a block flow, an inline flow, or a float flow.
|
||||
fn starts_block_flow(self) -> bool;
|
||||
/// Returns true if this flow is a block flow.
|
||||
fn is_block_flow(self) -> bool;
|
||||
|
||||
/// Returns true if this flow is an inline flow.
|
||||
fn starts_inline_flow(self) -> bool;
|
||||
fn is_inline_flow(self) -> bool;
|
||||
|
||||
/// Dumps the flow tree for debugging.
|
||||
fn dump(self);
|
||||
|
@ -633,16 +633,16 @@ impl<'a> ImmutableFlowUtils for &'a Flow {
|
|||
}
|
||||
}
|
||||
|
||||
/// Returns true if this flow is a block flow, an inline-block flow, or a float flow.
|
||||
fn starts_block_flow(self) -> bool {
|
||||
/// Returns true if this flow is a block flow.
|
||||
fn is_block_flow(self) -> bool {
|
||||
match self.class() {
|
||||
BlockFlowClass => true,
|
||||
InlineFlowClass => false,
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns true if this flow is a block flow, an inline flow, or a float flow.
|
||||
fn starts_inline_flow(self) -> bool {
|
||||
/// Returns true if this flow is an inline flow.
|
||||
fn is_inline_flow(self) -> bool {
|
||||
match self.class() {
|
||||
InlineFlowClass => true,
|
||||
BlockFlowClass => false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue