mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
layout: Float table wrappers directly instead of generating a block
wrapper around them. Fixes Wikipedia tables leaking out. Along the way, I refactored tables' width calculation significantly. This was necessary in order to properly handle floated tables, as some of the logic had to be ported over from block flows.
This commit is contained in:
parent
e9a7b44f68
commit
62bb9093d7
9 changed files with 270 additions and 217 deletions
|
@ -228,12 +228,6 @@ pub trait Flow: fmt::Show + ToString + Sync {
|
|||
float::none
|
||||
}
|
||||
|
||||
/// Returns true if this float is a block formatting context and false otherwise. The default
|
||||
/// implementation returns false.
|
||||
fn is_block_formatting_context(&self, _only_impactable_by_floats: bool) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
fn compute_collapsible_block_start_margin(&mut self,
|
||||
_layout_context: &mut LayoutContext,
|
||||
_margin_collapse_info: &mut MarginCollapseInfo) {
|
||||
|
@ -837,7 +831,7 @@ impl BaseFlow {
|
|||
}
|
||||
|
||||
impl<'a> ImmutableFlowUtils for &'a Flow + 'a {
|
||||
/// Returns true if this flow is a block or a float flow.
|
||||
/// Returns true if this flow is a block flow.
|
||||
fn is_block_like(self) -> bool {
|
||||
match self.class() {
|
||||
BlockFlowClass => true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue