mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibWeb: Fix incorrect margin collapsing behavior [BFC]
This change removes premature reset of `block_container_y_position_update_callback`. Also makes callback private in `BlockMarginState`, because resetting it independently of currently accumulated margins is incorrect. Lots of test expectations are updated, but there is no visual difference. Fixes https://github.com/LadybirdBrowser/ladybird/issues/6074
This commit is contained in:
parent
01bfb5bc81
commit
e2eb8716e5
|
|
@ -662,7 +662,7 @@ CSSPixels BlockFormattingContext::compute_auto_height_for_block_level_element(Bo
|
|||
|
||||
auto margin_bottom = m_margin_state.current_collapsed_margin();
|
||||
if (box_state.padding_bottom == 0 && box_state.border_bottom == 0) {
|
||||
m_margin_state.box_last_in_flow_child_margin_bottom_collapsed = true;
|
||||
m_margin_state.set_box_last_in_flow_child_margin_bottom_collapsed(true);
|
||||
margin_bottom = 0;
|
||||
}
|
||||
|
||||
|
|
@ -855,12 +855,12 @@ void BlockFormattingContext::layout_block_level_box(Box const& box, BlockContain
|
|||
}
|
||||
|
||||
if (independent_formatting_context || !margins_collapse_through(box, m_state)) {
|
||||
if (!m_margin_state.box_last_in_flow_child_margin_bottom_collapsed) {
|
||||
if (!m_margin_state.box_last_in_flow_child_margin_bottom_collapsed()) {
|
||||
m_margin_state.reset();
|
||||
}
|
||||
m_y_offset_of_current_block_container = box_state.offset.y() + box_state.content_height() + box_state.border_box_bottom();
|
||||
}
|
||||
m_margin_state.box_last_in_flow_child_margin_bottom_collapsed = false;
|
||||
m_margin_state.set_box_last_in_flow_child_margin_bottom_collapsed(false);
|
||||
|
||||
m_margin_state.add_margin(box_state.margin_bottom);
|
||||
m_margin_state.update_block_waiting_for_final_y_position();
|
||||
|
|
@ -890,8 +890,6 @@ void BlockFormattingContext::layout_block_level_children(BlockContainer const& b
|
|||
return IterationDecision::Continue;
|
||||
});
|
||||
|
||||
m_margin_state.block_container_y_position_update_callback = {};
|
||||
|
||||
if (m_layout_mode == LayoutMode::IntrinsicSizing) {
|
||||
auto& block_container_state = m_state.get_mutable(block_container);
|
||||
if (!block_container_state.has_definite_width()) {
|
||||
|
|
@ -933,11 +931,6 @@ void BlockFormattingContext::resolve_vertical_box_model_metrics(Box const& box,
|
|||
box_state.padding_bottom = computed_values.padding().bottom().to_px_or_zero(box, width_of_containing_block);
|
||||
}
|
||||
|
||||
CSSPixels BlockFormattingContext::BlockMarginState::current_collapsed_margin() const
|
||||
{
|
||||
return current_positive_collapsible_margin + current_negative_collapsible_margin;
|
||||
}
|
||||
|
||||
BlockFormattingContext::DidIntroduceClearance BlockFormattingContext::clear_floating_boxes(Node const& child_box, Optional<InlineFormattingContext&> inline_formatting_context)
|
||||
{
|
||||
auto const& computed_values = child_box.computed_values();
|
||||
|
|
|
|||
|
|
@ -143,47 +143,55 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
struct BlockMarginState {
|
||||
CSSPixels current_positive_collapsible_margin;
|
||||
CSSPixels current_negative_collapsible_margin;
|
||||
Function<void(CSSPixels)> block_container_y_position_update_callback;
|
||||
bool box_last_in_flow_child_margin_bottom_collapsed { false };
|
||||
|
||||
class BlockMarginState {
|
||||
public:
|
||||
void add_margin(CSSPixels margin)
|
||||
{
|
||||
if (margin < 0) {
|
||||
current_negative_collapsible_margin = min(margin, current_negative_collapsible_margin);
|
||||
m_current_negative_collapsible_margin = min(margin, m_current_negative_collapsible_margin);
|
||||
} else {
|
||||
current_positive_collapsible_margin = max(margin, current_positive_collapsible_margin);
|
||||
m_current_positive_collapsible_margin = max(margin, m_current_positive_collapsible_margin);
|
||||
}
|
||||
}
|
||||
|
||||
void register_block_container_y_position_update_callback(ESCAPING Function<void(CSSPixels)> callback)
|
||||
{
|
||||
block_container_y_position_update_callback = move(callback);
|
||||
m_block_container_y_position_update_callback = move(callback);
|
||||
}
|
||||
|
||||
CSSPixels current_collapsed_margin() const;
|
||||
CSSPixels current_collapsed_margin() const
|
||||
{
|
||||
return m_current_positive_collapsible_margin + m_current_negative_collapsible_margin;
|
||||
}
|
||||
|
||||
bool has_block_container_waiting_for_final_y_position() const
|
||||
{
|
||||
return static_cast<bool>(block_container_y_position_update_callback);
|
||||
return static_cast<bool>(m_block_container_y_position_update_callback);
|
||||
}
|
||||
|
||||
void update_block_waiting_for_final_y_position() const
|
||||
{
|
||||
if (block_container_y_position_update_callback) {
|
||||
if (m_block_container_y_position_update_callback) {
|
||||
CSSPixels collapsed_margin = current_collapsed_margin();
|
||||
block_container_y_position_update_callback(collapsed_margin);
|
||||
m_block_container_y_position_update_callback(collapsed_margin);
|
||||
}
|
||||
}
|
||||
|
||||
void reset()
|
||||
{
|
||||
block_container_y_position_update_callback = {};
|
||||
current_negative_collapsible_margin = 0;
|
||||
current_positive_collapsible_margin = 0;
|
||||
m_block_container_y_position_update_callback = {};
|
||||
m_current_negative_collapsible_margin = 0;
|
||||
m_current_positive_collapsible_margin = 0;
|
||||
}
|
||||
|
||||
bool box_last_in_flow_child_margin_bottom_collapsed() const { return m_box_last_in_flow_child_margin_bottom_collapsed; }
|
||||
void set_box_last_in_flow_child_margin_bottom_collapsed(bool v) { m_box_last_in_flow_child_margin_bottom_collapsed = v; }
|
||||
|
||||
private:
|
||||
CSSPixels m_current_positive_collapsible_margin;
|
||||
CSSPixels m_current_negative_collapsible_margin;
|
||||
Function<void(CSSPixels)> m_block_container_y_position_update_callback;
|
||||
bool m_box_last_in_flow_child_margin_bottom_collapsed { false };
|
||||
};
|
||||
|
||||
Optional<CSSPixels> m_y_offset_of_current_block_container;
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] children: not-
|
|||
TextNode <#text> (not painted)
|
||||
BlockContainer <div.w220.right.blue> at [288,28] floating [0+0+0 220 0+0+0] [0+0+0 20 0+0+0] [BFC] children: not-inline
|
||||
TextNode <#text> (not painted)
|
||||
BlockContainer <(anonymous)> at [8,16] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: inline
|
||||
BlockContainer <(anonymous)> at [8,8] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: inline
|
||||
TextNode <#text> (not painted)
|
||||
|
||||
ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
||||
|
|
@ -27,7 +27,7 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
|||
PaintableWithLines (BlockContainer<DIV>.w200.right.red) [208,8 200x20]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [8,8 500x0] overflow: [288,28 220x20]
|
||||
PaintableWithLines (BlockContainer<DIV>.w220.right.blue) [288,28 220x20]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [8,16 784x0]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [8,8 784x0]
|
||||
|
||||
SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)
|
||||
SC for BlockContainer<HTML> [0,0 800x48] [children: 0] (z-index: auto)
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] children: not-
|
|||
BlockContainer <div.b> at [8,208] floating [0+0+0 784 0+0+0] [0+0+0 100 0+0+0] [BFC] children: not-inline
|
||||
BlockContainer <div.box.blue> at [8,208] [0+0+0 100 0+0+684] [0+0+0 100 0+0+0] children: not-inline
|
||||
TextNode <#text> (not painted)
|
||||
BlockContainer <div> at [8,112] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: not-inline
|
||||
BlockContainer <div> at [8,120] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: not-inline
|
||||
BlockContainer <(anonymous)> at [8,112] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: inline
|
||||
TextNode <#text> (not painted)
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
|||
PaintableWithLines (BlockContainer<DIV>.box.green) [116,8 100x100]
|
||||
PaintableWithLines (BlockContainer<DIV>.b) [8,208 784x100]
|
||||
PaintableWithLines (BlockContainer<DIV>.box.blue) [8,208 100x100]
|
||||
PaintableWithLines (BlockContainer<DIV>) [8,112 784x0]
|
||||
PaintableWithLines (BlockContainer<DIV>) [8,120 784x0]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [8,112 784x0]
|
||||
|
||||
SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] children: not-inline
|
||||
BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 300 0+0+0] [BFC] children: not-inline
|
||||
BlockContainer <body> at [0,200] [0+0+0 800 0+0+0] [0+0+0 100 0+0+0] children: not-inline
|
||||
BlockContainer <div.bump> at [0,200] [0+0+0 800 0+0+0] [100+0+0 0 0+0+0] children: not-inline
|
||||
BlockContainer <div.content> at [0,200] [0+0+0 100 0+0+700] [200+0+0 100 0+0+0] children: not-inline
|
||||
|
||||
ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
||||
PaintableWithLines (BlockContainer<HTML>) [0,0 800x300]
|
||||
PaintableWithLines (BlockContainer<BODY>) [0,200 800x100]
|
||||
PaintableWithLines (BlockContainer<DIV>.bump) [0,200 800x0]
|
||||
PaintableWithLines (BlockContainer<DIV>.content) [0,200 100x100]
|
||||
|
||||
SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)
|
||||
SC for BlockContainer<HTML> [0,0 800x300] [children: 0] (z-index: auto)
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] children: not-inline
|
||||
BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 82 0+0+0] [BFC] children: not-inline
|
||||
BlockContainer <body> at [0,64] [0+0+0 800 0+0+0] [0+0+0 18 0+0+0] children: not-inline
|
||||
BlockContainer <div.fixed> at [0,0] positioned [0+0+0 90.234375 0+0+0] [0+0+0 64 0+0+0] [BFC] children: inline
|
||||
frag 0 from TextNode start: 0, length: 11, rect: [0,0 90.234375x18] baseline: 13.796875
|
||||
"Fixed stuff"
|
||||
TextNode <#text> (not painted)
|
||||
BlockContainer <div.bump> at [0,64] [0+0+0 800 0+0+0] [64+0+0 0 0+0+0] children: not-inline
|
||||
BlockContainer <div.content> at [0,64] [0+0+0 800 0+0+0] [0+0+0 18 0+0+0] children: inline
|
||||
frag 0 from TextNode start: 0, length: 12, rect: [0,64 94.140625x18] baseline: 13.796875
|
||||
"Hello world!"
|
||||
TextNode <#text> (not painted)
|
||||
|
||||
ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
||||
PaintableWithLines (BlockContainer<HTML>) [0,0 800x82]
|
||||
PaintableWithLines (BlockContainer<BODY>) [0,64 800x18]
|
||||
PaintableWithLines (BlockContainer<DIV>.fixed) [0,0 90.234375x64]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableWithLines (BlockContainer<DIV>.bump) [0,64 800x0]
|
||||
PaintableWithLines (BlockContainer<DIV>.content) [0,64 800x18]
|
||||
TextPaintable (TextNode<#text>)
|
||||
|
||||
SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)
|
||||
SC for BlockContainer<HTML> [0,0 800x82] [children: 1] (z-index: auto)
|
||||
SC for BlockContainer<DIV>.fixed [0,0 90.234375x64] [children: 0] (z-index: auto)
|
||||
|
|
@ -17,7 +17,7 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] children: not-
|
|||
frag 5 from TextNode start: 181, length: 11, rect: [8,98 81.6875x18] baseline: 13.796875
|
||||
"hello hello"
|
||||
TextNode <#text> (not painted)
|
||||
BlockContainer <div> at [8,116] [0+0+0 270 0+0+0] [0+0+0 0 0+0+0] children: not-inline
|
||||
BlockContainer <div> at [8,124] [0+0+0 270 0+0+0] [0+0+0 0 0+0+0] children: not-inline
|
||||
|
||||
ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
||||
PaintableWithLines (BlockContainer<HTML>) [0,0 800x124]
|
||||
|
|
@ -26,7 +26,7 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
|||
PaintableWithLines (BlockContainer<DIV>.constrained) [8,8 270x108]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [8,8 270x108]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableWithLines (BlockContainer<DIV>) [8,116 270x0]
|
||||
PaintableWithLines (BlockContainer<DIV>) [8,124 270x0]
|
||||
|
||||
SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)
|
||||
SC for BlockContainer<HTML> [0,0 800x124] [children: 0] (z-index: auto)
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] children: not-
|
|||
BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 16 0+0+0] [BFC] children: not-inline
|
||||
BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 0 0+0+8] children: not-inline
|
||||
BlockContainer <div> at [8,8] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: not-inline
|
||||
BlockContainer <(anonymous)> at [8,16] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: inline
|
||||
BlockContainer <(anonymous)> at [8,8] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: inline
|
||||
TextNode <#text> (not painted)
|
||||
|
||||
ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
||||
PaintableWithLines (BlockContainer<HTML>) [0,0 800x16]
|
||||
PaintableWithLines (BlockContainer<BODY>) [8,8 784x0]
|
||||
PaintableWithLines (BlockContainer<DIV>) [8,8 784x0]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [8,16 784x0]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [8,8 784x0]
|
||||
|
||||
SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)
|
||||
SC for BlockContainer<HTML> [0,0 800x16] [children: 0] (z-index: auto)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] children: not-
|
|||
"I'm a summary"
|
||||
ListItemMarkerBox <(anonymous)> at [8,13] [0+0+0 8 0+0+0] [0+0+0 8 0+0+0] children: not-inline
|
||||
TextNode <#text> (not painted)
|
||||
BlockContainer <slot> at [8,26] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: not-inline
|
||||
BlockContainer <slot> at [8,34] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: not-inline
|
||||
BlockContainer <(anonymous)> at [8,26] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: inline
|
||||
TextNode <#text> (not painted)
|
||||
|
||||
|
|
@ -18,7 +18,7 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
|||
PaintableWithLines (ListItemBox<SUMMARY>) [24,8 776x18]
|
||||
MarkerPaintable (ListItemMarkerBox(anonymous)) [8,13 8x8]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableWithLines (BlockContainer<SLOT>) [8,26 784x0]
|
||||
PaintableWithLines (BlockContainer<SLOT>) [8,34 784x0]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [8,26 784x0]
|
||||
|
||||
SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] children: not-
|
|||
BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 16 0+0+0] [BFC] children: not-inline
|
||||
BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 0 0+0+8] children: not-inline
|
||||
BlockContainer <div> at [8,8] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: not-inline
|
||||
BlockContainer <(anonymous)> at [8,16] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: inline
|
||||
BlockContainer <(anonymous)> at [8,8] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: inline
|
||||
TextNode <#text> (not painted)
|
||||
|
||||
ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
||||
PaintableWithLines (BlockContainer<HTML>) [0,0 800x16]
|
||||
PaintableWithLines (BlockContainer<BODY>) [8,8 784x0]
|
||||
PaintableWithLines (BlockContainer<DIV>) [8,8 784x0]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [8,16 784x0]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [8,8 784x0]
|
||||
|
||||
SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)
|
||||
SC for BlockContainer<HTML> [0,0 800x16] [children: 0] (z-index: auto)
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] children: not-
|
|||
BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 16 0+0+0] [BFC] children: not-inline
|
||||
BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 0 0+0+8] children: not-inline
|
||||
BlockContainer <div> at [8,8] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: not-inline
|
||||
BlockContainer <(anonymous)> at [8,16] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: inline
|
||||
BlockContainer <(anonymous)> at [8,8] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: inline
|
||||
TextNode <#text> (not painted)
|
||||
|
||||
ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
||||
PaintableWithLines (BlockContainer<HTML>) [0,0 800x16]
|
||||
PaintableWithLines (BlockContainer<BODY>) [8,8 784x0]
|
||||
PaintableWithLines (BlockContainer<DIV>) [8,8 784x0]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [8,16 784x0]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [8,8 784x0]
|
||||
|
||||
SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)
|
||||
SC for BlockContainer<HTML> [0,0 800x16] [children: 0] (z-index: auto)
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] children: not-
|
|||
BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 16 0+0+0] [BFC] children: not-inline
|
||||
BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 0 0+0+8] children: not-inline
|
||||
BlockContainer <div> at [8,8] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: not-inline
|
||||
BlockContainer <(anonymous)> at [8,16] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: inline
|
||||
BlockContainer <(anonymous)> at [8,8] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: inline
|
||||
TextNode <#text> (not painted)
|
||||
|
||||
ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
||||
PaintableWithLines (BlockContainer<HTML>) [0,0 800x16]
|
||||
PaintableWithLines (BlockContainer<BODY>) [8,8 784x0]
|
||||
PaintableWithLines (BlockContainer<DIV>) [8,8 784x0]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [8,16 784x0]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [8,8 784x0]
|
||||
|
||||
SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)
|
||||
SC for BlockContainer<HTML> [0,0 800x16] [children: 0] (z-index: auto)
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] children: not-
|
|||
BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 16 0+0+0] [BFC] children: not-inline
|
||||
BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 0 0+0+8] children: not-inline
|
||||
BlockContainer <div> at [8,8] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: not-inline
|
||||
BlockContainer <(anonymous)> at [8,16] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: inline
|
||||
BlockContainer <(anonymous)> at [8,8] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: inline
|
||||
TextNode <#text> (not painted)
|
||||
|
||||
ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
||||
PaintableWithLines (BlockContainer<HTML>) [0,0 800x16]
|
||||
PaintableWithLines (BlockContainer<BODY>) [8,8 784x0]
|
||||
PaintableWithLines (BlockContainer<DIV>) [8,8 784x0]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [8,16 784x0]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [8,8 784x0]
|
||||
|
||||
SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)
|
||||
SC for BlockContainer<HTML> [0,0 800x16] [children: 0] (z-index: auto)
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] children: not-
|
|||
BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 16 0+0+0] [BFC] children: not-inline
|
||||
BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 0 0+0+8] children: not-inline
|
||||
BlockContainer <div> at [8,8] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: not-inline
|
||||
BlockContainer <(anonymous)> at [8,16] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: inline
|
||||
BlockContainer <(anonymous)> at [8,8] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: inline
|
||||
TextNode <#text> (not painted)
|
||||
|
||||
ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
||||
PaintableWithLines (BlockContainer<HTML>) [0,0 800x16]
|
||||
PaintableWithLines (BlockContainer<BODY>) [8,8 784x0]
|
||||
PaintableWithLines (BlockContainer<DIV>) [8,8 784x0]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [8,16 784x0]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [8,8 784x0]
|
||||
|
||||
SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)
|
||||
SC for BlockContainer<HTML> [0,0 800x16] [children: 0] (z-index: auto)
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] children: not-
|
|||
TextNode <#text> (not painted)
|
||||
TextNode <#text> (not painted)
|
||||
BlockContainer <pre#out> at [8,463] [0+0+0 784 0+0+0] [13+0+0 0 0+0+13] children: not-inline
|
||||
BlockContainer <(anonymous)> at [8,463] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: inline
|
||||
BlockContainer <(anonymous)> at [8,450] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: inline
|
||||
TextNode <#text> (not painted)
|
||||
|
||||
ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
||||
|
|
@ -43,7 +43,7 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
|||
PaintableWithLines (BlockContainer<DIV>#target4) [8,350 100x100]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [8,450 784x0]
|
||||
PaintableWithLines (BlockContainer<PRE>#out) [8,463 784x0]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [8,463 784x0]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [8,450 784x0]
|
||||
|
||||
SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)
|
||||
SC for BlockContainer<HTML> [0,0 800x463] [children: 0] (z-index: auto)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] children: not-
|
|||
BlockContainer <body> at [8,200] [8+0+0 784 0+0+8] [8+0+0 6 0+0+200] children: not-inline
|
||||
ListItemBox <span> at [222,200] [200+0+0 378 0+0+200] [200+0+0 6 0+0+200] children: not-inline
|
||||
ListItemMarkerBox <(anonymous)> at [208,206] [0+0+0 6 0+0+0] [0+0+0 6 0+0+0] children: not-inline
|
||||
BlockContainer <(anonymous)> at [8,400] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: inline
|
||||
BlockContainer <(anonymous)> at [8,200] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: inline
|
||||
TextNode <#text> (not painted)
|
||||
|
||||
ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
||||
|
|
@ -11,7 +11,7 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
|||
PaintableWithLines (BlockContainer<BODY>) [8,200 784x6] overflow: [8,200 784x12]
|
||||
PaintableWithLines (ListItemBox<SPAN>) [222,200 378x6] overflow: [222,200 378x12]
|
||||
MarkerPaintable (ListItemMarkerBox(anonymous)) [208,206 6x6]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [8,400 784x0]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [8,200 784x0]
|
||||
|
||||
SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)
|
||||
SC for BlockContainer<HTML> [0,0 800x406] [children: 0] (z-index: auto)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE html><style>
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
.bump {
|
||||
margin-top: 100px;
|
||||
}
|
||||
.content {
|
||||
background: green;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
margin-top: 200px;
|
||||
}
|
||||
</style><div class="bump"></div><div class="content"></div>
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html><style>
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
.fixed {
|
||||
background: blue;
|
||||
height: 64px;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
}
|
||||
.bump {
|
||||
margin-top: 64px;
|
||||
}
|
||||
.content {
|
||||
background: yellow;
|
||||
}
|
||||
</style><body><div class="fixed">Fixed stuff</div><div class="bump"></div><div class="content">Hello world!</div></body>
|
||||
|
|
@ -2,5 +2,5 @@ Harness status: OK
|
|||
|
||||
Found 1 tests
|
||||
|
||||
1 Fail
|
||||
Fail CSSOM View - 5 - extensions to the Document interface
|
||||
1 Pass
|
||||
Pass CSSOM View - 5 - extensions to the Document interface
|
||||
Loading…
Reference in New Issue
Block a user