Truly independent web browser
LibWeb: Support column-span: all for children of multicol containers
Aliaksandr Kalenik21e6951163cc
diff --git a/Libraries/LibWeb/Rust/src/css/computed_value_views.rs b/Libraries/LibWeb/Rust/src/css/computed_value_views.rsindex 62039824217..c36b541f3c7 100644--- a/Libraries/LibWeb/Rust/src/css/computed_value_views.rs+++ b/Libraries/LibWeb/Rust/src/css/computed_value_views.rs@@ -425,6 +425,7 @@ scalar_accessors! {misc_reset: {appearance: u8 => appearance,column_fill: u8 => column_fill,+ column_span: u8 => column_span,column_rule_style: u8 => column_rule_style,column_rule_width: CssPixels => column_rule_width,column_rule_color: u32 => column_rule_color,diff --git a/Libraries/LibWeb/Rust/src/css/style/layout_style.rs b/Libraries/LibWeb/Rust/src/css/style/layout_style.rsindex 4944e740436..0f6f5fe4246 100644--- a/Libraries/LibWeb/Rust/src/css/style/layout_style.rs+++ b/Libraries/LibWeb/Rust/src/css/style/layout_style.rs@@ -246,6 +246,13 @@ impl LayoutStyle {target.z_index = box_values.z_index;target.vertical_align = box_values.vertical_align.clone();});+ let misc_reset = source.group::<MiscResetValues>();+ self.edit::<MiscResetValues>(|target| {+ target.column_span = misc_reset.column_span;+ target.break_before = misc_reset.break_before;+ target.break_after = misc_reset.break_after;+ target.break_inside = misc_reset.break_inside;+ });self.copy_table_properties(source);}diff --git a/Libraries/LibWeb/Rust/src/layout/block_formatting_context.rs b/Libraries/LibWeb/Rust/src/layout/block_formatting_context.rsindex 4309e012d8e..858d11d9327 100644--- a/Libraries/LibWeb/Rust/src/layout/block_formatting_context.rs+++ b/Libraries/LibWeb/Rust/src/layout/block_formatting_context.rs@@ -22,6 +22,14 @@ struct ColumnLayout {consumed_block_size: CssPixels,baselines: formatting_context::DerivedBaselines,root_line_data: Option<std::sync::Arc<inline_content::InlineContent>>,+ root: Option<fragment_tree::UnplacedRootFragment>,+}++#[derive(Clone, Copy)]+enum ColumnExtent {+ BlockSize(CssPixels),+ UntilForcedBreak,+ AllRemainingContent,}struct FragmentationState {@@ -254,6 +262,7 @@ pub(crate) struct BlockFormattingContext<'pass> {break_mode: Cell<BreakMode>,column_inline_items: OnceCell<std::rc::Rc<inline_level_iterator::InlineItemCache>>,children_laid_out_in_fragmentainer: RefCell<HashMap<Node, (Node, Node)>>,+ column_early_breaks: RefCell<ColumnEarlyBreaks>,multicol_automatic_content_block_size: Cell<Option<CssPixels>>,discard_block_start_margin_of_next_child: Cell<bool>,fragmentainer_has_content: Cell<bool>,@@ -265,6 +274,56 @@ pub(crate) struct BlockFormattingContext<'pass> {break_before_child_is_avoided: Cell<Option<Node>>,}+#[derive(Default)]+struct ColumnEarlyBreaks {+ block_size: Option<CssPixels>,+ columns: Vec<Option<ColumnEarlyBreak>>,+}++#[derive(Clone)]+struct ColumnEarlyBreak {+ incoming: Option<std::rc::Rc<fragmentation::BlockBreakToken>>,+ early_break_before: Option<Node>,+ allows_early_break_requests: bool,+}++impl ColumnEarlyBreaks {+ fn seed(+ &self,+ block_size: Option<CssPixels>,+ column_index: usize,+ incoming: Option<&fragmentation::BlockBreakToken>,+ ) -> Option<(Option<Node>, bool)> {+ if self.block_size != block_size {+ return None;+ }+ let column = self.columns.get(column_index)?.as_ref()?;+ (column.incoming.as_deref() == incoming)+ .then_some((column.early_break_before, column.allows_early_break_requests))+ }++ fn record(+ &mut self,+ block_size: Option<CssPixels>,+ column_index: usize,+ incoming: Option<std::rc::Rc<fragmentation::BlockBreakToken>>,+ seed: (Option<Node>, bool),+ ) {+ if self.block_size != block_size {+ self.block_size = block_size;+ self.columns.clear();+ }+ if self.columns.len() <= column_index {+ self.columns.resize(column_index + 1, None);+ }+ self.columns[column_index] = Some(ColumnEarlyBreak {+ incoming,+ early_break_before: seed.0,+ allows_early_break_requests: seed.1,+ });+ }+}+impl<'pass> BlockFormattingContext<'pass> {pub(crate) fn new(run: &FormattingContextRun<'pass>) -> Self {let style = StyleValues::for_node(&run.callbacks, run.box_);@@ -318,6 +377,7 @@ impl<'pass> BlockFormattingContext<'pass> {break_mode: Cell::new(BreakMode::AllBreaks),column_inline_items: OnceCell::new(),children_laid_out_in_fragmentainer: RefCell::new(HashMap::default()),+ column_early_breaks: RefCell::new(ColumnEarlyBreaks::default()),multicol_automatic_content_block_size: Cell::new(None),discard_block_start_margin_of_next_child: Cell::new(false),fragmentainer_has_content: Cell::new(false),@@ -2725,13 +2785,7 @@ impl<'pass> BlockFormattingContext<'pass> {});let first_child = fragmentation_state.as_ref()- .and_then(|state| match &state.resume {- Some(- fragmentation::BlockResume::BeforeChild { child, .. }- | fragmentation::BlockResume::InsideChild { child, .. },- ) => Some(*child),- _ => None,- })+ .and_then(|state| state.resume.as_ref()?.resume_child()).unwrap_or_else(|| self.run.callbacks.first_child(block_container));let mut laid_out_children: Option<(Node, Node)> = None;for child in self@@ -2802,11 +2856,8 @@ impl<'pass> BlockFormattingContext<'pass> {Some(fragmentation::BlockResume::AfterChildren | fragmentation::BlockResume::AtLine(_)) => {return FragmentationStep::Stop;}- Some(fragmentation::BlockResume::InsideChild {- child: resume_child,- token,- }) => {- debug_assert_eq!(*resume_child, child);+ Some(fragmentation::BlockResume::InsideChild(token)) => {+ debug_assert_eq!(token.node, child);self.pending_continuation_token.replace(Some(token.clone()));state.resume = None;return FragmentationStep::LayOut;@@ -2816,6 +2867,9 @@ impl<'pass> BlockFormattingContext<'pass> {if !self.is_first_or_last_in_flow_candidate(child) {return FragmentationStep::LayOut;}+ if block_container == self.run.box_ && self.is_column_spanner(child) {+ return FragmentationStep::Stop;+ }if fragmentainer.early_break_before == Some(child) {if self.break_between_is_avoided(state, child) {if let Some(node) = state.last_child_allowing_break_before@@ -2828,9 +2882,10 @@ impl<'pass> BlockFormattingContext<'pass> {self.break_before_child(fragmentainer, state, block_container, child, false);return FragmentationStep::Stop;}- let forced = state.previous_in_flow_child_forces_break_after- || (fragmentation::is_forced_column_break(self.propagated_break_before(child))- && self.fragmentainer_has_content.get());+ let forced = fragmentainer.honors_forced_breaks+ && (state.previous_in_flow_child_forces_break_after+ || (fragmentation::is_forced_column_break(self.propagated_break_before(child))+ && self.fragmentainer_has_content.get()));if forced {self.break_before_child(fragmentainer, state, block_container, child, true);return FragmentationStep::Stop;@@ -2878,13 +2933,14 @@ impl<'pass> BlockFormattingContext<'pass> {{return FragmentationStep::Stop;}+ fragmentainer.outcome_mut().overflows = true;}}self.fragmentainer_has_content.set(true);self.stop_fragmentainer(fragmentainer,block_container,- fragmentation::BlockResume::InsideChild { child, token },+ fragmentation::BlockResume::InsideChild(token),);return FragmentationStep::Stop;}@@ -2916,6 +2972,7 @@ impl<'pass> BlockFormattingContext<'pass> {return FragmentationStep::Stop;}}+ fragmentainer.outcome_mut().overflows = true;}}let break_after = self.propagated_break_after(child);@@ -3122,6 +3179,13 @@ impl<'pass> BlockFormattingContext<'pass> {fragmentainer.note_unbreakable_block_size(lines_block_end_in_root);if fragmentainer.exceeds(lines_block_end_in_root) {fragmentainer.note_space_shortage(lines_block_end_in_root);+ fragmentainer.outcome_mut().overflows = true;+ }+ }++ pub(crate) fn note_overflowing_content(&self) {+ if let Some(fragmentainer) = self.run.fragmentainer.as_deref() {+ fragmentainer.outcome_mut().overflows = true;}}@@ -3264,7 +3328,14 @@ impl<'pass> BlockFormattingContext<'pass> {self.run.fragmentainer.is_none() && self.run.layout_mode == LayoutMode::Normal && self.is_multicol_container()}- fn layout_multicol_container(&self, input: LayoutInput) {+ fn layout_multicol_container(&self, run: &FormattingContextRun<'pass>, input: LayoutInput) {+ let scratch = self.run.callbacks.scratch();+ scratch.begin_measurement_memo();+ self.layout_multicol_container_rows(run, input);+ scratch.end_measurement_memo();+ }++ fn layout_multicol_container_rows(&self, run: &FormattingContextRun<'pass>, input: LayoutInput) {let root = self.run.box_;let root_used = self.used(root);let style = self.style(root);@@ -3287,90 +3358,198 @@ impl<'pass> BlockFormattingContext<'pass> {},participation: ParticipationInParentFormattingContext::Root,};+ let spanner_input = self.child_layout_input(+ root,+ LayoutInput {+ content_box_position_in_bfc_root: Some(FfiCssPixelPoint::default()),+ ..input+ },+ input.available_space,+ );let is_right_to_left = style.direction() == direction::RTL;- let column_origin = |index: usize| {- let offset = geometry.pitch() * index;- FfiCssPixelPoint {- x: if is_right_to_left {- content_inline_size - geometry.inline_size - offset- } else {- offset- },- y: CssPixels::default(),- }+ let column_origin = |index: usize, row_block_offset: CssPixels| FfiCssPixelPoint {+ x: geometry.column_inline_offset(index, content_inline_size, is_right_to_left),+ y: row_block_offset,};- let column_block_size = self.column_block_size(input, column_input, geometry, definite_block_size);let mut baselines = formatting_context::DerivedBaselines::default();+ let mut note_baselines = |first: Option<CssPixels>, last: Option<CssPixels>| {+ if let Some(first) = first {+ baselines.first = Some(baselines.first.map_or(first, |baseline| baseline.min(first)));+ }+ if let Some(last) = last {+ baselines.last = Some(baselines.last.map_or(last, |baseline| baseline.max(last)));+ }+ };let mut root_line_count = 0;let mut root_line_data_of_columns = Vec::new();+ let mut rows = Vec::new();+ let mut row_block_offset = CssPixels::default();let mut incoming = None;- let mut content_block_size = CssPixels::default();- let mut column_index = 0;+ let mut follows_spanner = false;+ let block_size_limit = self.column_block_size_limit(input, definite_block_size);loop {- let ColumnLayout {- outcome,- consumed_block_size,- baselines: column_baselines,- root_line_data,- } = self.layout_column(- self.run.purpose,- column_input,- Some(column_block_size),- incoming,- column_origin(column_index),- root_line_count,- );- content_block_size = content_block_size.max(consumed_block_size);- if let Some(line_data) = root_line_data {- root_line_count += line_data.lines.len();- root_line_data_of_columns.push((line_data, column_origin(column_index)));- }- if let Some(first) = column_baselines.first {- baselines.first = Some(baselines.first.map_or(first, |baseline| baseline.min(first)));- }- if let Some(last) = column_baselines.last {- baselines.last = Some(baselines.last.map_or(last, |baseline| baseline.max(last)));+ let next_spanner = self.next_column_spanner(incoming.as_deref());+ let remaining_definite_block_size =+ definite_block_size.map(|block_size| (block_size - row_block_offset).max(CssPixels::default()));+ let remaining_block_size_limit =+ block_size_limit.map(|block_size| (block_size - row_block_offset).max(CssPixels::default()));+ let column_block_size = if next_spanner.is_some() {+ self.balanced_column_block_size(column_input, geometry, incoming.clone(), remaining_block_size_limit)+ } else {+ self.column_block_size(column_input, geometry, remaining_block_size_limit, incoming.clone())+ };+ let mut content_block_size = CssPixels::default();+ let mut column_index = 0;+ loop {+ let origin = column_origin(column_index, row_block_offset);+ let is_last_allowed_column = column_index + 1 >= fragmentation::MAXIMUM_COLUMN_COUNT;+ let ColumnLayout {+ outcome,+ consumed_block_size,+ baselines: column_baselines,+ root_line_data,+ root,+ } = self.layout_column(+ self.run.purpose,+ column_input,+ if is_last_allowed_column {+ ColumnExtent::AllRemainingContent+ } else {+ ColumnExtent::BlockSize(column_block_size)+ },+ incoming.take(),+ column_index,+ );+ if let (Some(fragments), Some(root)) = (self.run.fragments.as_deref(), root) {+ fragments.adopt_fragmentainer_root(root, origin, root_line_count);+ }+ let filled_column = outcome+ .outgoing+ .as_deref()+ .is_some_and(|token| !token.follows_forced_break());+ content_block_size = content_block_size.max(if filled_column {+ column_block_size+ } else {+ consumed_block_size+ });+ if let Some(line_data) = root_line_data {+ root_line_count += line_data.lines.len();+ root_line_data_of_columns.push((line_data, origin));+ }+ note_baselines(+ column_baselines.first.map(|baseline| baseline + row_block_offset),+ column_baselines.last.map(|baseline| baseline + row_block_offset),+ );+ let Some(outgoing) = outcome.outgoing else {+ break;+ };+ incoming = Some(outgoing);+ column_index += 1;}- let Some(outgoing) = outcome.outgoing else {- break;+ let row_block_size = if style.column_fill() == column_fill::AUTO && next_spanner.is_none() {+ content_block_size+ } else {+ column_block_size};- if column_index + 1 >= fragmentation::MAXIMUM_COLUMN_COUNT {+ rows.push(fragmentation::ColumnRow {+ block_offset: row_block_offset,+ block_size: if next_spanner.is_none() {+ remaining_definite_block_size.unwrap_or(row_block_size)+ } else {+ row_block_size+ },+ column_count: column_index + 1,+ });+ row_block_offset += row_block_size;++ let Some(spanner) = next_spanner else {break;+ };+ if !follows_spanner || row_block_size != CssPixels::default() {+ self.margin_state.borrow_mut().reset();+ self.block_offset_of_current_block_container.set(Some(row_block_offset));}- incoming = Some(outgoing);- column_index += 1;+ follows_spanner = true;+ let mut bottom_of_spanner_margin_box = row_block_offset;+ self.layout_block_level_box(+ run,+ spanner,+ root,+ &mut bottom_of_spanner_margin_box,+ spanner_input,+ None,+ );+ note_baselines(+ formatting_context::baseline_of_child(+ self.run.records,+ &self.run.callbacks,+ spanner,+ formatting_context::BaselineSet::First,+ formatting_context::ChildBaselineSource::Own,+ ),+ formatting_context::baseline_of_child(+ self.run.records,+ &self.run.callbacks,+ spanner,+ formatting_context::BaselineSet::Last,+ formatting_context::ChildBaselineSource::Own,+ ),+ );+ row_block_offset = row_block_offset.max(bottom_of_spanner_margin_box);+ let Some(next) = self.sibling_boxes_from(self.next_sibling(spanner)).next() else {+ break;+ };+ incoming = Some(std::rc::Rc::new(fragmentation::BlockBreakToken {+ node: root,+ consumed_block_size: CssPixels::default(),+ resume: fragmentation::BlockResume::BeforeChild {+ child: next,+ after_forced_break: true,+ },+ }));}+ self.margin_state.borrow_mut().reset();if !root_line_data_of_columns.is_empty() {root_used.set_finished_line_data(inline_content::InlineContent::concatenate_translated(&root_line_data_of_columns,));}- let row_block_size = if style.column_fill() == column_fill::AUTO {- content_block_size- } else {- column_block_size- };root_used.rare_data_mut().multicol_layout_data = Some(std::sync::Arc::new(fragmentation::MulticolLayoutData {- column_inline_size: geometry.inline_size,- column_gap: geometry.gap,- rows: vec![fragmentation::ColumnRow {- block_offset: CssPixels::default(),- block_size: definite_block_size.unwrap_or(row_block_size),- column_count: column_index + 1,- }],+ geometry,+ rows,}));- self.multicol_automatic_content_block_size.set(Some(row_block_size));+ self.multicol_automatic_content_block_size.set(Some(row_block_offset));self.record_derived_baselines_of_root_box(baselines);}- fn column_block_size(- &self,- input: LayoutInput,- column_input: LayoutInput,- geometry: fragmentation::ColumnGeometry,- definite_block_size: Option<CssPixels>,- ) -> CssPixels {+ fn is_column_spanner(&self, node: Node) -> bool {+ let facts = self.facts(node);+ facts.is_flow_layout_participant()+ && !facts.is_floating()+ && facts.display().is_block_outside()+ && self.style(node).column_span() == column_span::ALL+ }++ fn sibling_boxes_from(&self, first: Node) -> impl Iterator<Item = Node> + '_ {+ self.run+ .callbacks+ .siblings_from(first, Node::INVALID)+ .filter(|&sibling| self.facts(sibling).is_box())+ }++ fn next_column_spanner(&self, incoming: Option<&fragmentation::BlockBreakToken>) -> Option<Node> {+ if self.facts(self.run.box_).children_are_inline() {+ return None;+ }+ let first = incoming+ .and_then(|token| token.resume.resume_child())+ .unwrap_or_else(|| self.run.callbacks.first_child(self.run.box_));+ self.sibling_boxes_from(first)+ .find(|&child| self.is_column_spanner(child))+ }++ fn column_block_size_limit(&self, input: LayoutInput, definite_block_size: Option<CssPixels>) -> Option<CssPixels> {let root = self.run.box_;let style = self.style(root);let sizing = self.sizing();@@ -3385,34 +3564,46 @@ impl<'pass> BlockFormattingContext<'pass> {&& !style.min_height().is_auto()&& !style.min_height().is_intrinsic_sizing_constraint()).then(|| sizing.calculate_inner_block_size(root, own_size_space, style.min_height(), constraints));- let maximum_block_size = definite_block_size.or_else(|| {+ definite_block_size.or_else(|| {(!sizing.should_treat_max_block_size_as_none(root, own_size_space.block_size, constraints)&& !style.max_height().is_intrinsic_sizing_constraint()).then(|| {let maximum = sizing.calculate_inner_block_size(root, own_size_space, style.max_height(), constraints);minimum_block_size.map_or(maximum, |minimum| maximum.max(minimum))})- });+ })+ }++ fn column_block_size(+ &self,+ column_input: LayoutInput,+ geometry: fragmentation::ColumnGeometry,+ maximum_block_size: Option<CssPixels>,+ incoming: Option<std::rc::Rc<fragmentation::BlockBreakToken>>,+ ) -> CssPixels {+ let style = self.style(self.run.box_);// https://drafts.csswg.org/css-multicol-1/#cf// auto: Fills columns sequentially.if style.column_fill() == column_fill::AUTO {return maximum_block_size.unwrap_or_else(|| {- let (runs, _) = self.measure_runs_between_forced_breaks(column_input);+ let (runs, _) = self.measure_runs_between_forced_breaks(column_input, incoming);runs.into_iter().max().unwrap_or_default()});}- self.balanced_column_block_size(column_input, geometry, maximum_block_size)+ self.balanced_column_block_size(column_input, geometry, incoming, maximum_block_size)}fn balanced_column_block_size(&self,column_input: LayoutInput,geometry: fragmentation::ColumnGeometry,+ row_incoming: Option<std::rc::Rc<fragmentation::BlockBreakToken>>,maximum_block_size: Option<CssPixels>,) -> CssPixels {let clamp = |block_size: CssPixels| maximum_block_size.map_or(block_size, |maximum| block_size.min(maximum));- let (runs, tallest_unbreakable_block_size) = self.measure_runs_between_forced_breaks(column_input);+ let (runs, tallest_unbreakable_block_size) =+ self.measure_runs_between_forced_breaks(column_input, row_incoming.clone());let mut implicit_breaks = vec![0usize; runs.len()];for _ in runs.len()..geometry.count {@@ -3434,38 +3625,33 @@ impl<'pass> BlockFormattingContext<'pass> {}for _ in 0..MAXIMUM_BALANCING_ROUNDS {- let mut incoming = None;+ let mut incoming = row_incoming.clone();let mut column_count = 0;- let mut forced_break_count = 0;let mut violates_break_avoidance = false;+ let mut overflows = false;let mut minimal_space_shortage: Option<CssPixels> = None;- loop {+ let finished = loop {let ColumnLayout { outcome, .. } = self.layout_column(formatting_context::LayoutPurpose::Measurement,column_input,- Some(block_size),+ ColumnExtent::BlockSize(block_size),incoming,- FfiCssPixelPoint::default(),- 0,+ column_count,);column_count += 1;- if outcome.ended_at_forced_break() {- forced_break_count += 1;- }violates_break_avoidance |= outcome.violates_break_avoidance;+ overflows |= outcome.overflows;if let Some(shortage) = outcome.minimal_space_shortage {minimal_space_shortage =Some(minimal_space_shortage.map_or(shortage, |minimal| minimal.min(shortage)));}+ let finished = outcome.outgoing.is_none();incoming = outcome.outgoing;- if incoming.is_none() || column_count > geometry.count {- break;+ if finished || column_count > geometry.count {+ break finished;}- }- if incoming.is_none() && column_count <= geometry.count && !violates_break_avoidance {- break;- }- if forced_break_count + 1 >= geometry.count {+ };+ if finished && column_count <= geometry.count && !violates_break_avoidance && !overflows {break;}let Some(shortage) = minimal_space_shortage else {@@ -3480,10 +3666,14 @@ impl<'pass> BlockFormattingContext<'pass> {block_size}- fn measure_runs_between_forced_breaks(&self, column_input: LayoutInput) -> (Vec<CssPixels>, CssPixels) {+ fn measure_runs_between_forced_breaks(+ &self,+ column_input: LayoutInput,+ row_incoming: Option<std::rc::Rc<fragmentation::BlockBreakToken>>,+ ) -> (Vec<CssPixels>, CssPixels) {let mut runs = Vec::new();let mut tallest_unbreakable_block_size = CssPixels::default();- let mut incoming = None;+ let mut incoming = row_incoming;loop {let ColumnLayout {outcome,@@ -3492,10 +3682,9 @@ impl<'pass> BlockFormattingContext<'pass> {} = self.layout_column(formatting_context::LayoutPurpose::Measurement,column_input,- None,+ ColumnExtent::UntilForcedBreak,incoming,- FfiCssPixelPoint::default(),- 0,+ runs.len(),);tallest_unbreakable_block_size = tallest_unbreakable_block_size.max(outcome.tallest_unbreakable_block_size);runs.push(consumed_block_size);@@ -3511,20 +3700,27 @@ impl<'pass> BlockFormattingContext<'pass> {&self,purpose: formatting_context::LayoutPurpose,input: LayoutInput,- block_size: Option<CssPixels>,+ extent: ColumnExtent,incoming: Option<std::rc::Rc<fragmentation::BlockBreakToken>>,- origin: FfiCssPixelPoint,- root_line_index_offset: usize,+ column_index: usize,) -> ColumnLayout {- let mut early_break_before = None;- let mut tried_early_breaks = Vec::new();- let mut allows_early_break_requests = true;+ let (block_size, honors_forced_breaks) = match extent {+ ColumnExtent::BlockSize(block_size) => (Some(block_size), true),+ ColumnExtent::UntilForcedBreak => (None, true),+ ColumnExtent::AllRemainingContent => (None, false),+ };+ let seed = self+ .column_early_breaks+ .borrow()+ .seed(block_size, column_index, incoming.as_deref());+ let (mut early_break_before, mut allows_early_break_requests) = seed.unwrap_or((None, true));+ let mut tried_early_breaks: Vec<Node> = early_break_before.into_iter().collect();let mut minimal_space_shortage_of_discarded_attempts = None;- let mut tallest_unbreakable_block_size_of_discarded_attempts = CssPixels::default();let inline_items = self.column_inline_items.get_or_init(Default::default);loop {let fragmentainer = std::rc::Rc::new(fragmentation::FragmentainerContext::new(block_size,+ honors_forced_breaks,incoming.clone(),inline_items.clone(),early_break_before,@@ -3552,9 +3748,6 @@ impl<'pass> BlockFormattingContext<'pass> {(Some(left), Some(right)) => Some(left.min(right)),(left, right) => left.or(right),};- outcome.tallest_unbreakable_block_size = outcome- .tallest_unbreakable_block_size- .max(tallest_unbreakable_block_size_of_discarded_attempts);if let Some(node) = outcome.needs_early_break_before {if tried_early_breaks.contains(&node) {allows_early_break_requests = false;@@ -3564,19 +3757,24 @@ impl<'pass> BlockFormattingContext<'pass> {allows_early_break_requests = tried_early_breaks.len() < MAXIMUM_EARLY_BREAK_ATTEMPTS;}minimal_space_shortage_of_discarded_attempts = outcome.minimal_space_shortage;- tallest_unbreakable_block_size_of_discarded_attempts = outcome.tallest_unbreakable_block_size;continue;}- if purpose == formatting_context::LayoutPurpose::Commit- && let (Some(fragments), Some(root)) = (self.run.fragments.as_deref(), outputs.root)- {- fragments.adopt_fragmentainer_root(root, origin, root_line_index_offset);+ if seed.is_none() && (early_break_before.is_some() || !allows_early_break_requests) {+ self.column_early_breaks.borrow_mut().record(+ block_size,+ column_index,+ incoming,+ (early_break_before, allows_early_break_requests),+ );}return ColumnLayout {outcome,consumed_block_size: outputs.result.automatic_content_block_size,baselines: outputs.result.baselines,root_line_data: outputs.root_outcome.line_data,+ root: (purpose == formatting_context::LayoutPurpose::Commit)+ .then_some(outputs.root)+ .flatten(),};}}@@ -3846,7 +4044,7 @@ impl<'pass> BlockFormattingContext<'pass> {}}if self.lays_out_multicol_container() {- self.layout_multicol_container(input);+ self.layout_multicol_container(run, input);if self.facts(self.run.box_).is_list_item_box() {self.layout_list_item_marker(run,@@ -4177,9 +4375,12 @@ impl<'pass> BlockFormattingContext<'pass> {if let Some(fragmentainer) = self.run.fragmentainer.as_deref()&& self.allows_unforced_breaks(){+ let bottom_margin_edge_in_column =+ bottom_margin_edge + self.block_offset_adjustment_from_pending_ancestor_block_start_margins(node);fragmentainer.note_unbreakable_block_size(margin_box_rect.height);- if fragmentainer.exceeds(bottom_margin_edge) {- fragmentainer.note_space_shortage(bottom_margin_edge);+ if fragmentainer.exceeds(bottom_margin_edge_in_column) {+ fragmentainer.note_space_shortage(bottom_margin_edge_in_column);+ fragmentainer.outcome_mut().overflows = true;}}self.lowest_floating_descendant_bottom_margin_edge.set(Some(diff --git a/Libraries/LibWeb/Rust/src/layout/fc_run_cache.rs b/Libraries/LibWeb/Rust/src/layout/fc_run_cache.rsindex 496983fe7ad..e7af7fb0a8f 100644--- a/Libraries/LibWeb/Rust/src/layout/fc_run_cache.rs+++ b/Libraries/LibWeb/Rust/src/layout/fc_run_cache.rs@@ -552,54 +552,22 @@ impl FcRunCacheAttempt {callbacks: &LayoutPass<'_>,key: &FcRunCacheKey,) -> Result<Self, std::sync::Arc<FcRunCacheEntry>> {- let fc_type = key.fc_type;- let input = &key.input;// A run this cache cannot describe still commits its subtree, so a stored entry would go on// describing paintables that run has replaced. Measurement runs commit nothing and leave it alone.let run_supersedes_stored_entry = layout_mode == LayoutMode::Normal && !purpose.is_measurement();- let drop_superseded_entry = || {+ if purpose.is_measurement()+ || !can_describe_run(+ box_,+ parent_grid_is_present,+ layout_mode,+ should_collect_devtools_layout_data,+ callbacks,+ key,+ )+ {if run_supersedes_stored_entry {callbacks.arena().fc_run_cache_store().remove_entry(box_.slot_index());}- };- if layout_mode != LayoutMode::Normal- || purpose.is_measurement()- || should_collect_devtools_layout_data- || input.participation == ParticipationInParentFormattingContext::Root- || matches!(- fc_type,- formatting_context::FormattingContextType::InternalReplaced | formatting_context::FormattingContextType::InternalDummy- )- // The direct normal-layout path for an empty atomic block only sizes and snapshots its root.- // Replaying a stored output costs more than rebuilding it and retains an entry needlessly.- || (fc_type == formatting_context::FormattingContextType::Block- && input.participation == ParticipationInParentFormattingContext::AtomicInline- && callbacks.first_child(box_).is_invalid())- {- drop_superseded_entry();- return Ok(Self::Bypass);- }- if fc_type == formatting_context::FormattingContextType::Grid- && parent_grid_is_present- && grid_formatting_context::grid_template_declares_a_subgrid_axis(callbacks, box_)- {- drop_superseded_entry();- return Ok(Self::Bypass);- }- // Structural invariants behind this root-flag check, to re-verify if it is ever- // narrowed: anchor() applies only to absolutely positioned boxes and every abspos- // box is the root of its own spawned run, so the flag on the run root covers every- // anchor consumer; anchor eligibility is resolved from used values of the same- // pass under the anchor lookup's containing-block guard, never from a previous- // pass; scroll compensation compares chains that converge at the run root and- // registers scroll-shift side effects a replay would skip; and anchor-size()- // resolves to None today, so inset properties are the only anchor dependency a- // run can have.- if node_facts::has_flag(- NodeFacts::new(callbacks, box_).data(),- NodeFlag::InsetsUseAnchorFunctions,- ) {- drop_superseded_entry();return Ok(Self::Bypass);}let store = callbacks.arena().fc_run_cache_store();@@ -700,6 +668,52 @@ impl FcRunCacheAttempt {}}+pub(super) fn can_describe_run(+ box_: Node,+ parent_grid_is_present: bool,+ layout_mode: LayoutMode,+ should_collect_devtools_layout_data: bool,+ callbacks: &LayoutPass<'_>,+ key: &FcRunCacheKey,+) -> bool {+ let fc_type = key.fc_type;+ let input = &key.input;+ if layout_mode != LayoutMode::Normal+ || should_collect_devtools_layout_data+ || input.participation == ParticipationInParentFormattingContext::Root+ || matches!(+ fc_type,+ formatting_context::FormattingContextType::InternalReplaced | formatting_context::FormattingContextType::InternalDummy+ )+ // The direct normal-layout path for an empty atomic block only sizes and snapshots its root.+ // Replaying a stored output costs more than rebuilding it and retains an entry needlessly.+ || (fc_type == formatting_context::FormattingContextType::Block+ && input.participation == ParticipationInParentFormattingContext::AtomicInline+ && callbacks.first_child(box_).is_invalid())+ {+ return false;+ }+ if fc_type == formatting_context::FormattingContextType::Grid+ && parent_grid_is_present+ && grid_formatting_context::grid_template_declares_a_subgrid_axis(callbacks, box_)+ {+ return false;+ }+ // Structural invariants behind this root-flag check, to re-verify if it is ever+ // narrowed: anchor() applies only to absolutely positioned boxes and every abspos+ // box is the root of its own spawned run, so the flag on the run root covers every+ // anchor consumer; anchor eligibility is resolved from used values of the same+ // pass under the anchor lookup's containing-block guard, never from a previous+ // pass; scroll compensation compares chains that converge at the run root and+ // registers scroll-shift side effects a replay would skip; and anchor-size()+ // resolves to None today, so inset properties are the only anchor dependency a+ // run can have.+ !node_facts::has_flag(+ NodeFacts::new(callbacks, box_).data(),+ NodeFlag::InsetsUseAnchorFunctions,+ )+}+/// Stores the entry a committing run replayed from an uncommitted one as an ordinary entry for the key it was probed/// with, now that the replayed subtree is committed with the run's parent.pub(super) fn store_replayed_uncommitted_entry(diff --git a/Libraries/LibWeb/Rust/src/layout/formatting_context.rs b/Libraries/LibWeb/Rust/src/layout/formatting_context.rsindex 20d63cc58d1..6cccdcf409d 100644--- a/Libraries/LibWeb/Rust/src/layout/formatting_context.rs+++ b/Libraries/LibWeb/Rust/src/layout/formatting_context.rs@@ -1698,6 +1698,19 @@ pub(super) fn run_formatting_context(}let root_cells = used_values::UsedValuesCellState::capture(parent_used);let cache_key = fc_run_cache::FcRunCacheKey::new(fc_type, input, root_cells);+ let memoizes_measurement = purpose.is_measurement()+ && callbacks.scratch().memoizes_measurements()+ && fc_run_cache::can_describe_run(+ box_,+ parent_grid.is_some(),+ layout_mode,+ should_collect_devtools_layout_data,+ &callbacks,+ &cache_key,+ );+ if memoizes_measurement && let Some(outputs) = callbacks.scratch().memoized_measurement(box_, purpose, &cache_key) {+ return absorb_run_outputs(parent_fragments, parent_used, box_, outputs, false);+ }let cache_attempt = match fc_run_cache::FcRunCacheAttempt::probe(purpose,box_,@@ -1759,6 +1772,11 @@ pub(super) fn run_formatting_context(table_inline_layout,None,);+ if memoizes_measurement {+ callbacks+ .scratch()+ .memoize_measurement(box_, purpose, cache_key, &outputs);+ }cache_attempt.conclude(&callbacks, box_, cache_key, &outputs);absorb_run_outputs(parent_fragments, parent_used, box_, outputs, false)}diff --git a/Libraries/LibWeb/Rust/src/layout/fragmentation.rs b/Libraries/LibWeb/Rust/src/layout/fragmentation.rsindex 0feb4d57f36..0df98feab4b 100644--- a/Libraries/LibWeb/Rust/src/layout/fragmentation.rs+++ b/Libraries/LibWeb/Rust/src/layout/fragmentation.rs@@ -19,6 +19,32 @@ impl ColumnGeometry {pub(crate) fn pitch(&self) -> CssPixels {self.inline_size + self.gap}++ pub(crate) fn column_inline_offset(+ &self,+ index: usize,+ content_inline_size: CssPixels,+ is_right_to_left: bool,+ ) -> CssPixels {+ let offset = self.pitch() * index;+ if is_right_to_left {+ content_inline_size - self.inline_size - offset+ } else {+ offset+ }+ }++ pub(crate) fn gap_center(+ &self,+ gap_index: usize,+ content_inline_size: CssPixels,+ is_right_to_left: bool,+ ) -> CssPixels {+ self.column_inline_offset(gap_index, content_inline_size, is_right_to_left)+ .min(self.column_inline_offset(gap_index + 1, content_inline_size, is_right_to_left))+ + self.inline_size+ + self.gap / 2usize+ }}pub(crate) fn used_column_gap(style: StyleValues<'_>, percentage_basis: CssPixels) -> CssPixels {@@ -105,15 +131,14 @@ pub(crate) struct ColumnRow {#[derive(Clone, Debug, PartialEq, Eq)]pub(crate) struct MulticolLayoutData {- pub(crate) column_inline_size: CssPixels,- pub(crate) column_gap: CssPixels,+ pub(crate) geometry: ColumnGeometry,pub(crate) rows: Vec<ColumnRow>,}#[derive(Clone, Debug, PartialEq, Eq)]pub(crate) enum BlockResume {BeforeChild { child: Node, after_forced_break: bool },- InsideChild { child: Node, token: Rc<BlockBreakToken> },+ InsideChild(Rc<BlockBreakToken>),AfterChildren,AtLine(LinePosition),}@@ -138,11 +163,21 @@ pub(crate) struct BlockBreakToken {pub(crate) resume: BlockResume,}+impl BlockResume {+ pub(crate) fn resume_child(&self) -> Option<Node> {+ match self {+ BlockResume::BeforeChild { child, .. } => Some(*child),+ BlockResume::InsideChild(token) => Some(token.node),+ BlockResume::AfterChildren | BlockResume::AtLine(_) => None,+ }+ }+}+impl BlockBreakToken {- pub(crate) fn ends_at_forced_break(&self) -> bool {+ pub(crate) fn follows_forced_break(&self) -> bool {match &self.resume {BlockResume::BeforeChild { after_forced_break, .. } => *after_forced_break,- BlockResume::InsideChild { token, .. } => token.ends_at_forced_break(),+ BlockResume::InsideChild(token) => token.follows_forced_break(),BlockResume::AfterChildren | BlockResume::AtLine(_) => false,}}@@ -163,16 +198,12 @@ pub(crate) struct FragmentainerOutcome {pub(crate) minimal_space_shortage: Option<CssPixels>,pub(crate) tallest_unbreakable_block_size: CssPixels,pub(crate) violates_break_avoidance: bool,-}--impl FragmentainerOutcome {- pub(crate) fn ended_at_forced_break(&self) -> bool {- self.outgoing.as_ref().is_some_and(|token| token.ends_at_forced_break())- }+ pub(crate) overflows: bool,}pub(crate) struct FragmentainerContext {pub(crate) block_size: Option<CssPixels>,+ pub(crate) honors_forced_breaks: bool,pub(crate) incoming: Option<Rc<BlockBreakToken>>,pub(crate) inline_items: Rc<inline_level_iterator::InlineItemCache>,pub(crate) early_break_before: Option<Node>,@@ -183,6 +214,7 @@ pub(crate) struct FragmentainerContext {impl FragmentainerContext {pub(crate) fn new(block_size: Option<CssPixels>,+ honors_forced_breaks: bool,incoming: Option<Rc<BlockBreakToken>>,inline_items: Rc<inline_level_iterator::InlineItemCache>,early_break_before: Option<Node>,@@ -190,6 +222,7 @@ impl FragmentainerContext {) -> Self {Self {block_size,+ honors_forced_breaks,incoming,inline_items,early_break_before,diff --git a/Libraries/LibWeb/Rust/src/layout/inline_formatting_context.rs b/Libraries/LibWeb/Rust/src/layout/inline_formatting_context.rsindex e62bf2ccdd3..61aad69cf11 100644--- a/Libraries/LibWeb/Rust/src/layout/inline_formatting_context.rs+++ b/Libraries/LibWeb/Rust/src/layout/inline_formatting_context.rs@@ -2466,8 +2466,11 @@ impl<'context> InlineFormattingContext<'context> {stop = index;break;}- if exceeds && is_first_fragment && fragmentation.fragmentainer_had_content {- self.parent.request_early_break_before(self.containing_block);+ if exceeds {+ if is_first_fragment && fragmentation.fragmentainer_had_content {+ self.parent.request_early_break_before(self.containing_block);+ }+ self.parent.note_overflowing_content();}self.parent.note_line_for_fragmentation(block_end - block_start, block_end, true);diff --git a/Libraries/LibWeb/Rust/src/layout/layout_node_arena.rs b/Libraries/LibWeb/Rust/src/layout/layout_node_arena.rsindex 05a6c673205..5baf102152e 100644--- a/Libraries/LibWeb/Rust/src/layout/layout_node_arena.rs+++ b/Libraries/LibWeb/Rust/src/layout/layout_node_arena.rs@@ -3903,6 +3903,25 @@ impl LayoutNodeArena {self.derive_containing_block_establishment_flags_of_children(slot);}self.refresh_ancestor_facts_of_anonymous_children(slot);+ let mut first_styled_child = self.data(slot).first_child.get();+ while !first_styled_child.is_invalid()+ && super::node_facts::has_flag(self.data(first_styled_child), NodeFlag::Anonymous)+ {+ first_styled_child = self.data(first_styled_child).next_sibling.get();+ }+ if !first_styled_child.is_invalid()+ && super::node_facts::has_ancestor_fact(self.data(first_styled_child), AncestorFact::ParentLaysOutInColumns)+ != super::node_facts::node_style_view(self.data(slot))+ .is_some_and(|style| super::node_facts::node_lays_out_in_columns(self.data(slot), style))+ {+ let mut child = first_styled_child;+ while !child.is_invalid() {+ if self.derive_ancestor_facts_for_node(child) {+ self.bump_fragment_cache_epoch_of_self_and_ancestors(child);+ }+ child = self.data(child).next_sibling.get();+ }+ }}pub(crate) fn enroll_text_node_for_content_sync(&self, node: NodeSlotId) {@@ -4554,6 +4573,9 @@ impl LayoutNodeArena {if super::node_facts::node_is_flex_or_grid_container(parent_style) {facts |= AncestorFact::ParentIsFlexOrGridContainer as u8;}+ if parent_style.is_some_and(|style| super::node_facts::node_lays_out_in_columns(parent_data, style)) {+ facts |= AncestorFact::ParentLaysOutInColumns as u8;+ }if parent_style.is_none_or(|style| {!style.is_floating() && (style.display().is_flow_inside() || style.display().is_flow_root_inside())}) {diff --git a/Libraries/LibWeb/Rust/src/layout/node_data.rs b/Libraries/LibWeb/Rust/src/layout/node_data.rsindex 32f4d46d70f..676cac30bb7 100644--- a/Libraries/LibWeb/Rust/src/layout/node_data.rs+++ b/Libraries/LibWeb/Rust/src/layout/node_data.rs@@ -234,6 +234,7 @@ pub(crate) enum AncestorFact {HasInlineLevelInclusiveAncestor = 1 << 4,/// An anonymous box whose nearest non-anonymous ancestor puts an ellipsis on overflowing lines.InheritsTextOverflowEllipsis = 1 << 5,+ ParentLaysOutInColumns = 1 << 6,}#[derive(Clone, Copy, Debug, Eq, PartialEq)]diff --git a/Libraries/LibWeb/Rust/src/layout/node_facts.rs b/Libraries/LibWeb/Rust/src/layout/node_facts.rsindex 6e4715abdd5..3f606b123b6 100644--- a/Libraries/LibWeb/Rust/src/layout/node_facts.rs+++ b/Libraries/LibWeb/Rust/src/layout/node_facts.rs@@ -450,6 +450,15 @@ pub(crate) fn node_creates_block_formatting_context({return true;}+ // https://drafts.csswg.org/css-multicol-1/#valdef-column-span-all+ // The element establishes an independent formatting context.+ if has_ancestor_fact(data, AncestorFact::ParentLaysOutInColumns)+ && style.column_span() == crate::css::css_enums::column_span::ALL+ && display.is_block_outside()+ && display.is_flow_inside()+ {+ return true;+ }}if has_flag(data, NodeFlag::IsHtmlHtmlElement)|| data.kind.get() == NodeKind::FieldSetBoxdiff --git a/Libraries/LibWeb/Rust/src/layout/run_records.rs b/Libraries/LibWeb/Rust/src/layout/run_records.rsindex 3a7eae74fef..801c8d90aac 100644--- a/Libraries/LibWeb/Rust/src/layout/run_records.rs+++ b/Libraries/LibWeb/Rust/src/layout/run_records.rs@@ -22,6 +22,19 @@ pub(crate) struct LayoutScratch {/// The inline items a block container generated, kept for its next run in the same pass. The/// items borrow fonts for the current pass, so the stashes are cleared when the pass ends.inline_item_stashes: RefCell<HashMap<NodeSlotId, super::inline_level_iterator::StashedInlineItems>>,+ measurement_memo: RefCell<MeasurementMemo>,+}++#[derive(Default)]+struct MeasurementMemo {+ depth: usize,+ runs: HashMap<NodeSlotId, Vec<MemoizedMeasurement>>,+}++struct MemoizedMeasurement {+ purpose: super::formatting_context::LayoutPurpose,+ key: super::fc_run_cache::FcRunCacheKey,+ outputs: super::formatting_context::RunOutputs,}// Between passes the scratch holds no record, so it can move to the thread a layout stage runs on.@@ -47,6 +60,7 @@ impl Default for LayoutScratch {run_record_stack: RunRecordStack::default(),intrinsic_size_caches: Default::default(),inline_item_stashes: RefCell::new(HashMap::default()),+ measurement_memo: RefCell::new(MeasurementMemo::default()),}}}@@ -67,6 +81,55 @@ impl LayoutScratch {self.inline_item_stashes.borrow_mut().remove(&block_container)}+ pub(crate) fn begin_measurement_memo(&self) {+ self.measurement_memo.borrow_mut().depth += 1;+ }++ pub(crate) fn end_measurement_memo(&self) {+ let mut memo = self.measurement_memo.borrow_mut();+ memo.depth -= 1;+ if memo.depth == 0 {+ memo.runs.clear();+ }+ }++ pub(crate) fn memoizes_measurements(&self) -> bool {+ self.measurement_memo.borrow().depth > 0+ }++ pub(super) fn memoized_measurement(+ &self,+ box_: NodeSlotId,+ purpose: super::formatting_context::LayoutPurpose,+ key: &super::fc_run_cache::FcRunCacheKey,+ ) -> Option<super::formatting_context::RunOutputs> {+ self.measurement_memo+ .borrow()+ .runs+ .get(&box_)?+ .iter()+ .find(|memoized| memoized.purpose == purpose && memoized.key == *key)+ .map(|memoized| memoized.outputs.clone())+ }++ pub(super) fn memoize_measurement(+ &self,+ box_: NodeSlotId,+ purpose: super::formatting_context::LayoutPurpose,+ key: super::fc_run_cache::FcRunCacheKey,+ outputs: &super::formatting_context::RunOutputs,+ ) {+ let mut memo = self.measurement_memo.borrow_mut();+ if memo.depth == 0 {+ return;+ }+ memo.runs.entry(box_).or_default().push(MemoizedMeasurement {+ purpose,+ key,+ outputs: outputs.clone(),+ });+ }+/// Lets go of what the pass that just committed kept for itself.pub(crate) fn end_layout_pass(&self) {self.inline_item_stashes.borrow_mut().clear();diff --git a/Libraries/LibWeb/Rust/src/painting/record/paint/column_rule.rs b/Libraries/LibWeb/Rust/src/painting/record/paint/column_rule.rsindex 132607dc43c..a2f6951fee8 100644--- a/Libraries/LibWeb/Rust/src/painting/record/paint/column_rule.rs+++ b/Libraries/LibWeb/Rust/src/painting/record/paint/column_rule.rs@@ -52,13 +52,7 @@ pub(crate) fn paint_column_rules<O: Observer>(recorder: &mut PaintRecorder<'_, O};for row in &data.rows {for gap_index in 0..row.column_count.saturating_sub(1) {- let gap_center =- data.column_inline_size * (gap_index + 1) + data.column_gap * gap_index + data.column_gap / 2usize;- let gap_center = if is_right_to_left {- content_box.width - gap_center- } else {- gap_center- };+ let gap_center = data.geometry.gap_center(gap_index, content_box.width, is_right_to_left);let rule_rect = CssPixelRect::new(content_box.x + gap_center - rule_width / 2usize,content_box.y + row.block_offset,diff --git a/Tests/LibWeb/Ref/expected/multicol-column-span-all-ref.html b/Tests/LibWeb/Ref/expected/multicol-column-span-all-ref.htmlnew file mode 100644index 00000000000..86a134e25ba--- /dev/null+++ b/Tests/LibWeb/Ref/expected/multicol-column-span-all-ref.html@@ -0,0 +1,13 @@+<!DOCTYPE html>+<style>+body { margin: 0; }+.container { position: relative; width: 220px; height: 110px; background: lightgray; }+.container > div { position: absolute; width: 100px; height: 30px; background: green; }+</style>+<div class="container">+ <div style="left: 0; top: 0; height: 60px"></div>+ <div style="left: 120px; top: 0; height: 60px"></div>+ <div style="left: 0; top: 60px; width: 220px; height: 20px; background: blue"></div>+ <div style="left: 0; top: 80px"></div>+ <div style="left: 120px; top: 80px"></div>+</div>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-000-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-000-ref.xhtnew file mode 100644index 00000000000..7c076f4e301--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-000-ref.xht@@ -0,0 +1,36 @@+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">+<html xmlns="http://www.w3.org/1999/xhtml">+ <head>+ <title>CSS Reftest Reference</title>+ <link rel="author" title="Hakon Wium Lie" href="mailto:[email protected]" />+ <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-08-27 -->+ <meta name="flags" content="image" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: yellow;+ font-size: 1.25em;+ line-height: 1;+ margin-bottom: 0.5em;+ width: 10em;+ }++ img+ {+ padding-right: 4em;+ vertical-align: top;+ }+ ]]></style>+ </head>+ <body>++ <p>Test passes if the 3 rectangles are <strong>identical</strong>.</p>++ <div><img src="support/swatch-lime.png" width="20" height="20" alt="Image download support must be enabled" /><img src="support/swatch-lime.png" width="20" height="20" alt="Image download support must be enabled" /><br /><img src="support/swatch-lime.png" width="120" height="20" alt="Image download support must be enabled" /><br /><img src="support/swatch-lime.png" width="20" height="20" alt="Image download support must be enabled" /><img src="support/swatch-lime.png" width="20" height="20" alt="Image download support must be enabled" /></div>++ <div><img src="support/swatch-lime.png" width="20" height="20" alt="Image download support must be enabled" /><img src="support/swatch-lime.png" width="20" height="20" alt="Image download support must be enabled" /><br /><img src="support/swatch-lime.png" width="120" height="20" alt="Image download support must be enabled" /><br /><img src="support/swatch-lime.png" width="20" height="20" alt="Image download support must be enabled" /><img src="support/swatch-lime.png" width="20" height="20" alt="Image download support must be enabled" /></div>++ <div><img src="support/swatch-lime.png" width="20" height="20" alt="Image download support must be enabled" /><img src="support/swatch-lime.png" width="20" height="20" alt="Image download support must be enabled" /><br /><img src="support/swatch-lime.png" width="120" height="20" alt="Image download support must be enabled" /><br /><img src="support/swatch-lime.png" width="20" height="20" alt="Image download support must be enabled" /><img src="support/swatch-lime.png" width="20" height="20" alt="Image download support must be enabled" /></div>++ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-001-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-001-ref.xhtnew file mode 100644index 00000000000..f00eb944e31--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-001-ref.xht@@ -0,0 +1,39 @@+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">+<html xmlns="http://www.w3.org/1999/xhtml">+<head>+ <title>CSS Reftest Reference</title>+ <link rel="author" title="Opera Software ASA" href="http://www.opera.com/" />+ <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-08-16 -->+ <meta name="flags" content="image" />+ <style type="text/css"><![CDATA[+ div#inline-block+ {+ background-color: yellow;+ border: gray solid 1em;+ display: inline-block;+ font-size: 1.25em;+ }++ div + div {line-height: 1;}++ img {vertical-align: top;}++ img.padding-left {padding-left: 1em;}++ img.padding-left-right {padding: 0em 1em;}+ ]]></style>+ </head>+ <body>++ <div id="inline-block">++ <div><img src="support/swatch-blue.png" width="40" height="40" alt="Image download support must be enabled" /><img class="padding-left" src="support/swatch-blue.png" width="40" height="40" alt="Image download support must be enabled" /><img class="padding-left-right" src="support/swatch-pink.png" width="40" height="40" alt="Image download support must be enabled" /><img src="support/swatch-pink.png" width="40" height="40" alt="Image download support must be enabled" /></div>++ <div><img src="support/black20x20.png" width="220" height="20" alt="Image download support must be enabled" /></div>++ <div><img src="support/swatch-navy.png" width="40" height="40" alt="Image download support must be enabled" /><img class="padding-left" src="support/swatch-navy.png" width="40" height="40" alt="Image download support must be enabled" /><img class="padding-left-right" src="support/swatch-navy.png" width="40" height="40" alt="Image download support must be enabled" /><img src="support/swatch-navy.png" width="40" height="40" alt="Image download support must be enabled" /></div>++ </div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-002-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-002-ref.xhtnew file mode 100644index 00000000000..b046cfaf49f--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-002-ref.xht@@ -0,0 +1,35 @@+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">+<html xmlns="http://www.w3.org/1999/xhtml">+<head>+ <title>CSS Reftest Reference</title>+ <link rel="author" title="Opera Software ASA" href="http://www.opera.com/" />+ <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-08-16 -->+ <meta name="flags" content="image" />+ <style type="text/css"><![CDATA[+ div#inline-block+ {+ background-color: yellow;+ border: gray solid 1em;+ display: inline-block;+ font-size: 1.25em;+ }++ div + div {line-height: 1;}++ img {vertical-align: top;}+ ]]></style>+ </head>+ <body>++ <div id="inline-block">++ <div><img src="support/swatch-blue.png" width="80" height="40" alt="Image download support must be enabled" /><img src="support/swatch-pink.png" width="80" height="40" alt="Image download support must be enabled" /></div>++ <div><img src="support/swatch-yellow.png" width="160" height="60" alt="Image download support must be enabled" /></div>++ <div><img src="support/swatch-navy.png" width="160" height="40" alt="Image download support must be enabled" /></div>++ </div>++ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-004-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-004-ref.htmlnew file mode 100644index 00000000000..0d936efb5db--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-004-ref.html@@ -0,0 +1,52 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test Reference: column-span:all should act like column-span:none in different block formatting context</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">++ <style>+ #column {+ column-count: 3;+ column-rule: 6px solid;+ width: 500px;+ outline: 1px solid black;+ }+ h3 {+ column-span: none;+ outline: 1px solid blue;+ }+ </style>++ <body>+ <article id="column">+ <div>block1</div>+ <div style="display: inline-block;">+ <h3>non-spanner</h3>+ </div>+ <div style="overflow: hidden;">+ <h3>non-spanner</h3>+ </div>+ <table>+ <caption>+ <h3>non-spanner in caption</h3>+ </caption>+ </table>+ <div style="display: grid;">+ <div>+ <h3>non-spanner in grid</h3>+ </div>+ </div>+ <div style="display: flex;">+ <div>+ <h3>non-spanner in flex</h3>+ </div>+ </div>+ <div style="column-span: all; outline: 1px solid green;">+ Spanner+ <h3>non-spanner in a spanner</h3>+ </div>+ <div>block2</div>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-008-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-008-ref.htmlnew file mode 100644index 00000000000..efd26b73e84--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-008-ref.html@@ -0,0 +1,26 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test Reference: Test a bidi-override multi-column container with a dir=rtl column-span:all child</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">++ <style>+ body {+ column-count: 1;+ column-rule: 6px solid;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ /* "column-count: 1" makes this behave like a real spanner. */+ outline: 1px solid blue;+ }+ </style>++ <body>+ <div>block1</div>+ <h3 dir="rtl">spanner</h3>+ <div>block2</div>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-009-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-009-ref.htmlnew file mode 100644index 00000000000..d58ed3bd5bc--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-009-ref.html@@ -0,0 +1,33 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test Reference: Test the multicol element is the containing block of absolute elements</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">++ <style>+ body {+ column-count: 1;+ column-rule: 6px solid;+ width: 400px;+ outline: 1px solid black;+ transform: scale(1);+ }+ h3 {+ /* "column-count: 1" makes this behave like a real spanner. */+ outline: 1px solid blue;+ }+ .out-of-flow {+ position: absolute;+ top: 0;+ right: 0;+ }+ </style>++ <body>+ <article id="column">+ <h3>spanner</h3>+ <div class="out-of-flow">out-of-flow</div>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-010-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-010-ref.htmlnew file mode 100644index 00000000000..5a1f1d56533--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-010-ref.html@@ -0,0 +1,54 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test Reference: column-span:all does not create a spanner, inside an element establishing a containing block for fixed-position descendants</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="David Shin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">++ <style>+ article {+ column-count: 3;+ column-rule: 6px solid;+ width: 500px;+ border: 1px solid black;+ margin-bottom: 3px;+ }+ h3 {+ outline: 1px solid blue;+ }+ </style>++ <body>+ <article>+ <div style="transform: scale(1)">+ <h3>non-spanner</h3>+ </div>+ </article>+ <article>+ <div style="filter: contrast(100%)">+ <h3>non-spanner</h3>+ </div>+ </article>+ <article>+ <div style="contain: paint">+ <h3>non-spanner</h3>+ </div>+ </article>+ <article>+ <div style="contain: layout">+ <h3>non-spanner</h3>+ </div>+ </article>+ <article>+ <div style="contain: content">+ <h3>non-spanner</h3>+ </div>+ </article>+ <article>+ <div style="contain: strict; width: 50px; height: 50px;">+ <h3>n</h3>+ </div>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-020-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-020-ref.htmlnew file mode 100644index 00000000000..53e9ff359dd--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-020-ref.html@@ -0,0 +1,13 @@+<!DOCTYPE html>+<link rel="author" title="Morten Stenshorne" href="mailto:[email protected]">+<style>+ .bar {+ width: 100px;+ height: 25px;+ background: blue;+ }+</style>+<p>There should be three identical blue bars below.</p>+<div class="bar"></div>+<div class="bar" style="margin:10px 0;"></div>+<div class="bar"></div>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-children-height-001-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-children-height-001-ref.htmlnew file mode 100644index 00000000000..4d20361efa8--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-children-height-001-ref.html@@ -0,0 +1,28 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test Reference: Test a multi-column container with percentage height children</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">++ <style>+ article {+ width: 400px;+ height: 200px;+ outline: 1px solid black;+ }+ div {+ height: 25%;+ }+ div.spanner {+ outline: 1px solid blue;+ height: 50%;+ }+ </style>++ <article>+ <div>block1</div>+ <div class="spanner">spanner</div>+ <div>block2</div>+ </article>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-children-height-002-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-children-height-002-ref.htmlnew file mode 100644index 00000000000..3785f947d15--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-children-height-002-ref.html@@ -0,0 +1,41 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test Reference: Test a multi-column container with percentage height children</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">++ <style>+ article {+ width: 400px;+ height: 200px;+ background-color: lightgreen;+ border: 5px solid purple;+ }+ div.columns {+ column-count: 2;+ }+ div.block1 {+ background-color: yellow;+ height: 200px;+ }+ div.spanner {+ height: 50px;+ background-color: lightblue;+ }+ div.block2 {+ background-color: yellow;+ height: 200px;+ }+ </style>++ <article>+ <div class="columns" style="height: 100px;">+ <div class="block1">block1</div>+ </div>+ <div class="spanner">spanner</div>+ <div class="columns" style="height: 50px;">+ <div class="block2">block2</div>+ </div>+ </article>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-children-height-003-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-children-height-003-ref.htmlnew file mode 100644index 00000000000..407ded1a749--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-children-height-003-ref.html@@ -0,0 +1,41 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test Reference: Test a multi-column container with percentage height children</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">++ <style>+ article {+ width: 400px;+ height: 200px;+ background-color: lightgreen;+ border: 5px solid purple;+ }+ div.columns {+ column-count: 2;+ }+ div.block1 {+ background-color: yellow;+ height: 600px;+ }+ div.spanner {+ height: 50px;+ background-color: lightblue;+ }+ div.block2 {+ background-color: yellow;+ height: 200px;+ }+ </style>++ <article>+ <div class="columns" style="height: 200px;">+ <div class="block1">block1</div>+ </div>+ <div class="spanner">spanner</div>+ <div class="columns" style="height: 1px;">+ <div class="block2">block2</div>+ </div>+ </article>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-001-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-001-ref.htmlnew file mode 100644index 00000000000..5f2c28e79ea--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-001-ref.html@@ -0,0 +1,28 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test Reference: Add the spanner as the first child of the columns</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">++ <style>+ #column {+ column-count: 3;+ column-rule: 6px solid;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body>+ <article id="column">+ <h3>spanner</h3>+ <div>block1</div>+ <div>block2</div>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-002-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-002-ref.htmlnew file mode 100644index 00000000000..f0c66a609dd--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-002-ref.html@@ -0,0 +1,28 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test Reference: Add the spanner as the second child of the columns</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">++ <style>+ #column {+ column-count: 3;+ column-rule: 6px solid;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body>+ <article id="column">+ <div>block1</div>+ <h3>spanner</h3>+ <div>block2</div>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-003-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-003-ref.htmlnew file mode 100644index 00000000000..c87e2372ffe--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-003-ref.html@@ -0,0 +1,27 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test Reference: Add the spanner in block1. It should correctly span across all columns</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">++ <style>+ #column {+ column-count: 3;+ column-rule: 6px solid;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body>+ <article id="column">+ <div>block1<h3>spanner</h3></div>+ <div>block2</div>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-004-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-004-ref.htmlnew file mode 100644index 00000000000..be0fa59bf19--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-004-ref.html@@ -0,0 +1,37 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test Reference: Add the spanner to the inner column</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">++ <style>+ body {+ width: 400px;+ }+ article {+ column-count: 2;+ column-rule: 6px solid;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body>+ <article>+ <article>+ <div>inner block1</div>+ <h3>spanner</h3>+ <div>inner block2</div>+ </article>+ <article>+ <div>inner block3</div>+ <h3>static spanner</h3>+ <div>inner block4</div>+ </article>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-007-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-007-ref.htmlnew file mode 100644index 00000000000..91b1cd89c84--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-007-ref.html@@ -0,0 +1,32 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test Reference: Append the block to the inline element which contains "column-span"</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">++ <style>+ #column {+ column-count: 3;+ column-rule: 6px solid;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body>+ <article id="column">+ <span id="span">+ inline1+ <h3>spanner</h3>+ <div>block1</div>+ inline2+ <div>block2</div>+ </span>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-008-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-008-ref.htmlnew file mode 100644index 00000000000..4c13d64edfd--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-008-ref.html@@ -0,0 +1,30 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test Reference: Add a nested multi-column spanner to the outer column</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">++ <style>+ #column {+ column-count: 3;+ column-rule: 6px solid;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ column-count: 2;+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body>+ <article id="column">+ <div>block1</div>+ <h3>multi-column spanner</h3>+ <h3>spanner</h3>+ <div>block2</div>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-010-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-010-ref.htmlnew file mode 100644index 00000000000..c12e11c3fd6--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-010-ref.html@@ -0,0 +1,27 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test Reference: Append a block containing a spanner kid. The spanner kid should correctly span across all columns.</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">++ <style>+ #column {+ column-count: 3;+ column-rule: 6px solid;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body>+ <article id="column">+ <div>block1</div>+ <div><h3>spanner</h3>block2</div>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-012-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-012-ref.htmlnew file mode 100644index 00000000000..6abf0195ef2--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-012-ref.html@@ -0,0 +1,31 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test Reference: Append a block containing a spanner kid. The spanner kid should correctly span across all columns</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">++ <style>+ #column {+ column-count: 3;+ column-rule: 6px solid;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body>+ <article id="column">+ <div>block1+ <div>+ <h3>spanner</h3>+ block2+ </div>+ </div>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-013-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-013-ref.htmlnew file mode 100644index 00000000000..e92ad474817--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-013-ref.html@@ -0,0 +1,29 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: Insert a block into a multicol details containing column-span:all</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">++ <style>+ #details {+ column-count: 3;+ column-rule: 6px solid;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body>+ <details open id="details">+ <div>block1</div>+ <summary>Summary</summary>+ <h3>spanner</h3>+ <div>block2</div>+ </details>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-014-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-014-ref.htmlnew file mode 100644index 00000000000..93d0c3162a6--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-014-ref.html@@ -0,0 +1,34 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Reference: Append a block with column-span descendants to multicol</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">++ <style>+ #column {+ column-count: 3;+ column-rule: 6px solid;+ column-fill: auto;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body onload="runTest();">+ <article id="column">+ <div>block1</div>+ <h3>spanner</h3>+ <div>block2</div>+ <div>+ <div>block3</div>+ <h3>spanner2</h3>+ <div>block4</div>+ </div>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-001-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-001-ref.htmlnew file mode 100644index 00000000000..a68fe7ea71a--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-001-ref.html@@ -0,0 +1,27 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test Reference: Remove the spanner as the first child</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">++ <style>+ #column {+ column-count: 3;+ column-rule: 6px solid;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body>+ <article id="column">+ <div>block1</div>+ <div>block2</div>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-002-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-002-ref.htmlnew file mode 100644index 00000000000..dcebfd21437--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-002-ref.html@@ -0,0 +1,28 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test Reference: Remove the spanner in nested blocks</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">++ <style>+ #column {+ column-count: 3;+ column-rule: 6px solid;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body>+ <article id="column">+ <div>block1</div>+ <div><div></div></div>+ <div>block2</div>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-004-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-004-ref.htmlnew file mode 100644index 00000000000..e77b4fa1f39--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-004-ref.html@@ -0,0 +1,31 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test Reference: Remove the spanner with block siblings in an inline element</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">++ <style>+ #column {+ column-count: 3;+ column-rule: 6px solid;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body>+ <article id="column">+ <span>+ inline1+ <div>block1</div>+ inline2+ <div>block2</div>+ </span>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-005-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-005-ref.htmlnew file mode 100644index 00000000000..b1b69189e71--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-005-ref.html@@ -0,0 +1,27 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test Reference: Remove a block with spanner siblings</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">++ <style>+ #column {+ column-count: 3;+ column-rule: 6px solid;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body>+ <article id="column">+ <h3>spanner1</h3>+ <h3>spanner2</h3>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-margin-001-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-margin-001-ref.xhtnew file mode 100644index 00000000000..e03f0b3af5e--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-margin-001-ref.xht@@ -0,0 +1,25 @@+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">+<html xmlns="http://www.w3.org/1999/xhtml">+<head>+ <title>CSS Reftest Reference</title>+ <link rel="author" title="Opera Software ASA" href="http://www.opera.com/" />+ <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-08-18 -->+ <meta name="flags" content="image ahem" />+ <link rel="stylesheet" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ font: 1.25em/1 Ahem;+ border: gray solid 1em;+ width: 160px;+ }++ img {vertical-align: top;}+ ]]></style>+ </head>+ <body>++ <div><img src="support/swatch-blue.png" width="80" height="40" alt="Image download support must be enabled" /><img src="support/swatch-pink.png" width="80" height="40" alt="Image download support must be enabled" /> <img src="support/swatch-yellow.png" width="160" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="160" height="20" alt="Image download support must be enabled" /> <img src="support/swatch-yellow.png" width="160" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="160" height="20" alt="Image download support must be enabled" /> <img src="support/swatch-yellow.png" width="160" height="20" alt="Image download support must be enabled" /> <img src="support/swatch-navy.png" width="160" height="40" alt="Image download support must be enabled" /></div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-margin-002-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-margin-002-ref.xhtnew file mode 100644index 00000000000..835592e531b--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-margin-002-ref.xht@@ -0,0 +1,42 @@+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">+<html xmlns="http://www.w3.org/1999/xhtml">+<head>+ <title>CSS Reftest Reference</title>+ <link rel="author" title="Opera Software ASA" href="http://www.opera.com/" />+ <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-08-19 -->+ <meta name="flags" content="image ahem" />+ <link rel="stylesheet" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ body {font: 1.25em/1 Ahem;}++ div {width: 240px;}++ img {vertical-align: top;}+ ]]></style>+ </head>+ <body>++ <div>+ <img src="support/swatch-gray.png" width="200" height="20" alt="Image download support must be enabled" /><br />++ <img src="support/swatch-gray.png" width="20" height="20" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" width="80" height="20" alt="Image download support must be enabled" /><img src="support/swatch-pink.png" width="40" height="20" alt="Image download support must be enabled" /><img src="support/swatch-orange.png" width="100" height="20" alt="Image download support must be enabled" />++ <img src="support/swatch-gray.png" width="20" height="20" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" width="40" height="20" alt="Image download support must be enabled" /><img src="support/swatch-pink.png" width="80" height="20" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="40" height="20" alt="Image download support must be enabled" /><img src="support/swatch-gray.png" width="20" height="20" alt="Image download support must be enabled" /><br />++ <img src="support/swatch-gray.png" width="20" height="20" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" width="40" height="20" alt="Image download support must be enabled" /><img src="support/swatch-pink.png" width="40" height="20"+alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="80" height="20" alt="Image download support must be enabled" /><img src="support/swatch-gray.png" width="20" height="20" alt="Image download support must be enabled" /><br />++ <img src="support/swatch-gray.png" width="20" height="20" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="160" height="20" alt="Image download support must be enabled" /><img src="support/swatch-gray.png" width="20" height="20" alt="Image download support must be enabled" /><br />++ <img src="support/swatch-gray.png" width="20" height="20" alt="Image download support must be enabled" /><img src="support/black20x20.png" width="160" height="20" alt="Image download support must be enabled" /><img src="support/swatch-gray.png" width="20" height="20" alt="Image download support must be enabled" /><br />++ <img src="support/swatch-gray.png" width="20" height="20" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="160" height="20" alt="Image download support must be enabled" /><img src="support/swatch-gray.png" width="20" height="20" alt="Image download support must be enabled" /><br />++ <img src="support/swatch-gray.png" width="20" height="40" alt="Image download support must be enabled" /><img src="support/swatch-navy.png" width="160" height="40" alt="Image download support must be enabled" /><img src="support/swatch-gray.png" width="20" height="40" alt="Image download support must be enabled" /><br />++ <img src="support/swatch-gray.png" width="200" height="20" alt="Image download support must be enabled" />++</div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-margin-bottom-001-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-margin-bottom-001-ref.xhtnew file mode 100644index 00000000000..48d4e367ed6--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-margin-bottom-001-ref.xht@@ -0,0 +1,33 @@+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">+<html xmlns="http://www.w3.org/1999/xhtml">+<head>+ <title>CSS Reftest Reference</title>+ <link rel="author" title="Opera Software ASA" href="http://www.opera.com/" />+ <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-08-19 -->+ <meta name="flags" content="image ahem" />+ <link rel="stylesheet" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ font: 1.25em/1 Ahem;+ border: gray solid 1em;+ width: 160px;+ }++ img {vertical-align: top;}+ ]]></style>+ </head>+ <body>++ <div>+ <img src="support/swatch-navy.png" width="160" height="40" alt="Image download support must be enabled" />+ <img src="support/swatch-yellow.png" width="160" height="20" alt="Image download support must be enabled" />+ <img src="support/black20x20.png" width="160" height="20" alt="Image download support must be enabled" />+ <img src="support/swatch-yellow.png" width="160" height="20" alt="Image download support must be enabled" />+ <img src="support/swatch-yellow.png" width="40" height="20" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" width="80" height="20" alt="Image download support must be enabled" /><img src="support/swatch-pink.png" width="40" height="20" alt="Image download support must be enabled" />+ <img src="support/swatch-orange.png" width="40" height="20" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" width="40" height="20" alt="Image download support must be enabled" /><img src="support/swatch-pink.png" width="80" height="20" alt="Image download support must be enabled" />+ <img src="support/swatch-yellow.png" width="40" height="20" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" width="40" height="20" alt="Image download support must be enabled" /><img src="support/swatch-pink.png" width="40" height="20" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="40" height="20" alt="Image download support must be enabled" />+ </div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-restyle-001-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-restyle-001-ref.htmlnew file mode 100644index 00000000000..ae1adcd30df--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-restyle-001-ref.html@@ -0,0 +1,31 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test Reference: Restyle column-span's parent that is a block</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">++ <style>+ #column {+ column-count: 1;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ }+ #div {+ background-color: yellow;+ }+ </style>++ <body>+ <article id="column">+ <div id="div">+ <div>yellow block1</div>+ <h3>spanner (no background-color)</h3>+ <div>yellow block2</div>+ </div>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-restyle-002-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-restyle-002-ref.htmlnew file mode 100644index 00000000000..e3a8c65d745--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-restyle-002-ref.html@@ -0,0 +1,33 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test Reference: Restyle column-span's parent that is an inline</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">++ <style>+ html {+ overflow: hidden;+ }+ #column {+ column-count: 1;+ }+ #span {+ position: relative;+ left: 200px;+ }+ h3 {+ column-span: all;+ }+ </style>++ <body>+ <article id="column">+ <span id="span">+ All text should be offset 200px, except the spanner+ <h3>Spanner</h3>+ <div>Some more text</div>+ </span>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-restyle-003-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-restyle-003-ref.htmlnew file mode 100644index 00000000000..94870b1ee9b--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-restyle-003-ref.html@@ -0,0 +1,32 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test Reference: Restyle column-span's multi-column container</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">++ <style>+ #column {+ column-count: 1;+ width: 400px;+ outline: 1px solid black;+ background-color: yellow;+ }+ h3 {+ column-span: all;+ }+ #div {+ background-color: yellow;+ }+ </style>++ <body>+ <article id="column">+ <div>+ <div>block1</div>+ <h3>spanner</h3>+ <div>block2</div>+ </div>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-restyle-004-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-restyle-004-ref.htmlnew file mode 100644index 00000000000..bba78ba0826--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-restyle-004-ref.html@@ -0,0 +1,29 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test Reference: Restyle the column-span itself</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">++ <style>+ #column {+ column-count: 1;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ background-color: yellow;+ }+ </style>++ <body>+ <article id="column">+ <div>+ <div>block1</div>+ <h3>yellow spanner</h3>+ <div>block2</div>+ </div>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-rule-001-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-rule-001-ref.htmlnew file mode 100644index 00000000000..56a49fcc287--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-all-rule-001-ref.html@@ -0,0 +1,36 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: Test the column-rule's block-size</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="https://www.mozilla.org/">++ <style>+ article {+ column-count: 2;+ column-rule: 6px solid;+ width: 400px;+ height: 500px;+ background-color: lightgreen;+ border: 2em solid purple;+ padding: 2em;+ }+ div.block {+ width: 100px;+ height: 200px;+ }+ div.column-span {+ column-span: all;+ height: 50px;+ background-color: lightblue;+ }+ </style>++ <article>+ <div class="block">block1</div>+ <div class="column-span">column-span1</div>+ <div class="block">block2</div>+ <div class="column-span">column-span2</div>+ <div class="block" style="height: 400px;">block3</div>+ </article>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-float-002-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-float-002-ref.htmlnew file mode 100644index 00000000000..745eded0a4c--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-float-002-ref.html@@ -0,0 +1,37 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Reference: Test floats in a multi-column container with column-span</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">+ <link rel="stylesheet" href="../../fonts/ahem.css">++ <style>+ article {+ width: 300px;+ font: 1.25em/1 Ahem;+ }+ .float-left {+ float: left;+ color: black;+ }+ .float-right {+ float: right;+ color: navy;+ }+ .column-span {+ clear: both;+ color: pink;+ }+ </style>++ <article>+ <div class="float-left">black</div>+ <div class="float-right">navvy</div>++ <div class="column-span">Pink</div>++ <div class="float-left">black</div>+ <div class="float-right">navyy</div>+ </article>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-none-001-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-none-001-ref.xhtnew file mode 100644index 00000000000..4fcc57a6588--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-span-none-001-ref.xht@@ -0,0 +1,54 @@+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">+<html xmlns="http://www.w3.org/1999/xhtml">+ <head>+ <title>CSS Reftest Reference</title>+ <link rel="author" title="Opera Software ASA" href="http://www.opera.com/" />+ <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-08-22 -->+ <meta name="flags" content="image" />+ <style type="text/css"><![CDATA[+ div+ {+ font: 1.25em/1 serif;+ border: 1em solid gray;+ width: 11em;+ height: 5em;+ position: relative;+ }++ img {position: absolute;}++ img#first-blue {left: 0em; top: 0em;}++ img#second-blue {left: 3em; top: 0em;}++ img#first-pink {left: 6em; top: 0em;}++ img#second-pink {left: 9em; top: 0em;}++ img#black {left: 0em; top: 2em;}++ img#first-yellow {left: 6em; top: 2em;}++ img#second-yellow {left: 9em; top: 2em;}++ img#first-orange {left: 0em; top: 3em;}++ img#second-orange {left: 3em; top: 3em;}+ ]]></style>+ </head>+ <body>++ <div>+ <img id="first-blue" src="support/swatch-blue.png" width="40" height="40" alt="Image download support must be enabled" /> <img id="second-blue" src="support/swatch-blue.png" width="40" height="40" alt="Image download support must be enabled" /> <img id="first-pink" src="support/swatch-pink.png" width="40" height="40" alt="Image download support must be enabled" /> <img id="second-pink" src="support/swatch-pink.png" width="40" height="40" alt="Image download support must be enabled" />++ <img id="black" src="support/black20x20.png" width="260" height="20" alt="Image download support must be enabled" />++ <img id="first-yellow" src="support/swatch-yellow.png" width="40" height="40" alt="Image download support must be enabled" />+ <img id="second-yellow" src="support/swatch-yellow.png" width="40" height="40" alt="Image download support must be enabled" />++ <img id="first-orange" src="support/swatch-orange.png" width="40" height="40" alt="Image download support must be enabled" />+ <img id="second-orange" src="support/swatch-orange.png" width="40" height="40" alt="Image download support must be enabled" />+ </div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/support/swatch-navy.png b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/support/swatch-navy.pngnew file mode 100644index 00000000000..28dae8a3e12Binary files /dev/null and b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/support/swatch-navy.png differdiff --git a/Tests/LibWeb/Ref/input/multicol-column-span-all.html b/Tests/LibWeb/Ref/input/multicol-column-span-all.htmlnew file mode 100644index 00000000000..26249d3bb4b--- /dev/null+++ b/Tests/LibWeb/Ref/input/multicol-column-span-all.html@@ -0,0 +1,13 @@+<!DOCTYPE html>+<link rel="match" href="../expected/multicol-column-span-all-ref.html">+<style>+body { margin: 0; }+.multicol { columns: 2; column-gap: 20px; width: 220px; background: lightgray; }+.multicol > div { height: 30px; background: green; overflow: hidden; }+.multicol > .spanner { column-span: all; height: 20px; background: blue; }+</style>+<div class="multicol">+ <div></div><div></div><div></div><div></div>+ <div class="spanner"></div>+ <div></div><div></div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/intrinsic-size-002.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/intrinsic-size-002.htmlnew file mode 100644index 00000000000..388b67b72e5--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/intrinsic-size-002.html@@ -0,0 +1,12 @@+<!DOCTYPE html>+<link rel="author" title="Morten Stenshorne" href="mailto:[email protected]">+<link rel="help" href="https://www.w3.org/TR/css-multicol-1/#spanning-columns">+<link rel="match" href="../../../../expected/wpt-import/css/css-multicol/../reference/ref-filled-green-100px-square.xht">+<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>+<div style="width:100px; height:100px; background:red;">+ <div style="width:fit-content; columns:3; background:green;">+ <div style="column-span:all;">+ <div style="width:100px; height:100px;"></div>+ </div>+ </div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/intrinsic-size-005.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/intrinsic-size-005.htmlnew file mode 100644index 00000000000..ebf3ceeb5d8--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/intrinsic-size-005.html@@ -0,0 +1,10 @@+<!DOCTYPE html>+<link rel="author" title="Morten Stenshorne" href="mailto:[email protected]">+<link rel="help" href="https://www.w3.org/TR/css-multicol-1/#spanning-columns">+<link rel="match" href="../../../../expected/wpt-import/css/css-multicol/../reference/ref-filled-green-100px-square.xht">+<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>+<div style="width:100px; height:100px; background:red;">+ <div style="width:fit-content; columns:4; column-gap:0; height:100%; background:green;">+ <div style="column-span:all; height:100%; aspect-ratio:1/1;"></div>+ </div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-000.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-000.xhtnew file mode 100644index 00000000000..1c1181c57c5--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-000.xht@@ -0,0 +1,66 @@+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">+<html xmlns="http://www.w3.org/1999/xhtml">+ <head>+ <title>CSS Multi-column Layout Test: column-span (basic)</title>+ <link rel="author" title="Hakon Wium Lie" href="mailto:[email protected]" />+ <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-08-27 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#column-rule" title="4.5 'column-rule'" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-000-ref.xht" />+ <meta name="flags" content="ahem image" />+ <meta name="assert" content="Tests that the element with an id of 'column-span' spans across all columns." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: yellow;+ color: lime;+ font: 1.25em/1 Ahem;+ orphans: 1;+ widows: 1;+ width: 10em;+ }++ div#test, div.test2+ {+ columns: 2;+ column-fill: balance;+ column-gap: 0em;++ /*++ N == 2;++ W == 5em;++ */+ }++ div#test, div#reference {margin-bottom: 0.5em;}++ div#column-span+ {+ column-span: all;+ font: inherit;+ }++ img+ {+ padding-right: 4em;+ vertical-align: top;+ }+ ]]></style>+ </head>+ <body>++ <p>Test passes if the 3 rectangles are <strong>identical</strong>.</p>++ <div id="test">A<br />B<div id="column-span">123456</div>C<br />D</div>++ <div id="reference"><img src="support/swatch-lime.png" width="20" height="20" alt="Image download support must be enabled" /><img src="support/swatch-lime.png" width="20" height="20" alt="Image download support must be enabled" /><br /><img src="support/swatch-lime.png" width="120" height="20" alt="Image download support must be enabled" /><br /><img src="support/swatch-lime.png" width="20" height="20" alt="Image download support must be enabled" /><img src="support/swatch-lime.png" width="20" height="20" alt="Image download support must be enabled" /></div>++ <div class="test2">A<br />B</div>+ <div>123456</div>+ <div class="test2">C<br />D</div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-001.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-001.xhtnew file mode 100644index 00000000000..27c96cb2575--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-001.xht@@ -0,0 +1,63 @@+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">+<html xmlns="http://www.w3.org/1999/xhtml">+ <head>+ <title>CSS Multi-column Layout Test: 'column-span' element (basic)</title>+ <link rel="author" title="Opera Software ASA" href="http://www.opera.com/" />+ <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-08-16 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#column-span" title="6.1. 'column-span'" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-001-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="Tests that the h4 set to 'column-span: all' spans across all columns resulting in a black bar across the multicol container." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: yellow;+ border: gray solid 1em;+ color: navy;+ font: 1.25em/1 Ahem;+ orphans: 1;+ widows: 1;+ width: 11em;++ column-count: 4;+ column-gap: 1em;++ /*++ N == 4;++ W == 2em;++ */++ }++ span {color: blue;}++ span + span {color: pink;}++ h4+ {+ background-color: black;+ color: black;+ font: inherit;+ margin: 0;++ column-span: all;+ }+ ]]></style>+ </head>++ <body>++ <div>+ <span id="top-first-and-second-columns"> bl ue bl ue </span>+ <span id="top-third-and-fourth-columns"> Pi nk Pi nk </span>+ <h4> sPana </h4>+ ab cd ef gh+ ij kl mn oq+ </div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-002.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-002.xhtnew file mode 100644index 00000000000..4d93253c0a9--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-002.xht@@ -0,0 +1,71 @@+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">+<html xmlns="http://www.w3.org/1999/xhtml">+ <head>+ <title>CSS Multi-column Layout Test: 'column-span' element - large margin-left and 'overflow: hidden'</title>+ <link rel="author" title="Opera Software ASA" href="http://www.opera.com/" />+ <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-08-16 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#column-span" title="6.1. 'column-span'" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-002-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="Test of the situation where there is not sufficient space for the spanning element, UA may treat the element as 'column-span: none'; in which case, 'overflow: hidden' will take care of overflowed content out of multi-column box." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: yellow;+ border: gray solid 1em;+ color: navy;+ font: 1.25em/1 Ahem;+ orphans: 1;+ overflow: hidden;+ widows: 1;+ width: 8em;++ column-count: 4;+ column-gap: 0em;++ /*++ N == 4;++ W == 2em;++ */++ }++ span {color: blue;}++ span + span {color: pink;}++ h4+ {+ background-color: black;+ color: black;+ font: inherit;+ margin: 1em 0 1em 8em;++ column-span: all;+ /*+ Since there is not sufficient space for the+ spanning element, UA may treat the element as+ 'column-span: none'; in which case,+ 'overflow: hidden' will take care of+ overflowed content out of multi-column box.+ */+ }+ ]]></style>+ </head>++ <body>++ <div>+ <span id="top-first-and-second-columns"> bl ue bl ue </span>+ <span id="top-third-and-fourth-columns"> Pi nk Pi nk </span>+ <h4> sPana </h4>+ ab cd ef gh+ ij kl mn oq+ </div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-003.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-003.xhtnew file mode 100644index 00000000000..798d460a0bd--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-003.xht@@ -0,0 +1,51 @@+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">+<html xmlns="http://www.w3.org/1999/xhtml">+ <head>+ <title>CSS Multi-column Layout Test: 'column-span: all' (basic)</title>+ <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-08-03 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#column-span" title="6.1. 'column-span'" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-count-002-ref.xht"/>+ <meta name="flags" content="ahem" />+ <meta name="assert" content="This test checks that 'column-span: all' spans across all column boxes and that content in the normal flow (in this test, the '55555 55555 55555 55555') that appears before the element is automatically balanced across all columns before the element appears." />++ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ html {background-color: white;}++ body+ {+ background-color: black;+ font: 1.25em/1 Ahem;+ padding-right: 1em;+ width: 20em;+ }++ div+ {+ background-color: yellow;+ color: black;++ column-count: 4;+ column-gap: 0;+ orphans: 1;+ widows: 1;+ }++ h4+ {+ background-color: black;+ column-span: all;+ color: yellow;+ font: 1em/1 Ahem;+ margin: 0em;+ }+ ]]></style>+ </head>+ <body>+ <div>+ 55555 55555 55555 55555+ <h4> 4444 4444 4444 4444</h4>+ 1 22 1 22 1 1 333 1 333 1 333 55555 1 22 1 22 1 1 22 1 22 1 22 55555 1 333 1 333 1 4444 4444 1 55555 1 333 1 333 1 4444 4444 1 55555+ </div>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-004.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-004.htmlnew file mode 100644index 00000000000..733aafc5008--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-004.html@@ -0,0 +1,55 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: column-span:all should act like column-span:none in different block formatting context</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-004-ref.html">+ <meta name="assert" content="This test checks a column-span:all element should act like column-span: none if it's under different block formatting context.">++ <style>+ #column {+ column-count: 3;+ column-rule: 6px solid;+ width: 500px;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body>+ <article id="column">+ <div>block1</div>+ <div style="display: inline-block;">+ <h3>non-spanner</h3>+ </div>+ <div style="overflow: hidden;">+ <h3>non-spanner</h3>+ </div>+ <table>+ <caption>+ <h3>non-spanner in caption</h3>+ </caption>+ </table>+ <div style="display: grid;">+ <div>+ <h3>non-spanner in grid</h3>+ </div>+ </div>+ <div style="display: flex;">+ <div>+ <h3>non-spanner in flex</h3>+ </div>+ </div>+ <div style="column-span: all; outline: 1px solid green;">+ Spanner+ <h3>non-spanner in a spanner</h3>+ </div>+ <div>block2</div>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-008.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-008.htmlnew file mode 100644index 00000000000..a7a1a99e58f--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-008.html@@ -0,0 +1,30 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: Test a bidi-override multi-column container with a dir=rtl column-span:all child</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-008-ref.html">+ <meta name="assert" content="This test checks the page is rendered correctly for a bidi-override multi-column container with a dir=rtl column-span:all child.">++ <style>+ article {+ column-count: 3;+ column-rule: 6px solid;+ width: 400px;+ outline: 1px solid black;+ unicode-bidi: bidi-override; /* Needed to trigger bidi resolution. */+ }+ h3 {+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <article>+ <div>block1</div>+ <h3 dir="rtl">spanner</h3>+ <div>block2</div>+ </article>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-009.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-009.htmlnew file mode 100644index 00000000000..08c16072b16--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-009.html@@ -0,0 +1,37 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: Test the multicol element is the containing block of absolute elements</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#the-multi-column-model">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-009-ref.html">+ <meta name="assert" content="This test checks the multicol element, not the column boxes divided by column-span, is the containing block of absolute elements.">++ <style>+ article {+ column-count: 3;+ column-rule: 6px solid;+ width: 400px;+ outline: 1px solid black;+ transform: scale(1);+ }+ h3 {+ column-span: all;+ outline: 1px solid blue;+ }+ .out-of-flow {+ position: absolute;+ top: 0;+ right: 0;+ }+ </style>++ <body>+ <article id="column">+ <h3>spanner</h3>+ <div class="out-of-flow">out-of-flow</div>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-010.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-010.htmlnew file mode 100644index 00000000000..a2461ab6b64--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-010.html@@ -0,0 +1,59 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: column-span:all does not create a spanner, inside an element establishing a containing block for fixed-position descendants</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="David Shin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#the-multi-column-model">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-010-ref.html">+ <meta name="assert" content="This test checks that column-span:all does not create a spanner, inside an element establishing a containing block for fixed-position descendants.">++ <style>+ article {+ column-count: 3;+ column-rule: 6px solid;+ width: 500px;+ border: 1px solid black;+ margin-bottom: 3px;+ }+ h3 {+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body>+ <article>+ <div style="transform: scale(1)">+ <h3>non-spanner</h3>+ </div>+ </article>+ <article>+ <div style="filter: contrast(100%)">+ <h3>non-spanner</h3>+ </div>+ </article>+ <article>+ <div style="contain: paint">+ <h3>non-spanner</h3>+ </div>+ </article>+ <article>+ <div style="contain: layout">+ <h3>non-spanner</h3>+ </div>+ </article>+ <article>+ <div style="contain: content">+ <h3>non-spanner</h3>+ </div>+ </article>+ <article>+ <div style="contain: strict; width: 50px; height: 50px;">+ <h3>n</h3>+ </div>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-012.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-012.htmlnew file mode 100644index 00000000000..71fe03d9bce--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-012.html@@ -0,0 +1,11 @@+<!DOCTYPE html>+<link rel="author" title="Morten Stenshorne" href="mailto:[email protected]">+<link rel="help" href="https://www.w3.org/TR/css-multicol-1/#filling-columns">+<link rel="match" href="../../../../expected/wpt-import/css/css-multicol/../reference/ref-filled-green-100px-square.xht">+<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>+<div style="width:100px; height:100px; background:red;">+ <div style="columns:3; width:75px; height:100px; column-gap:0;">+ <div style="column-span:all; width:100px; height:70px; background:green;"></div>+ <div style="height:120px; background:green;"></div>+ </div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-017.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-017.htmlnew file mode 100644index 00000000000..9a5ec18d093--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-017.html@@ -0,0 +1,11 @@+<!DOCTYPE html>+<link rel="author" title="Morten Stenshorne" href="mailto:[email protected]">+<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/6805">+<link rel="match" href="../../../../expected/wpt-import/css/css-multicol/../reference/ref-filled-green-100px-square.xht">+<meta name="assert" content="Test that column-span all inside a transform doesn't create a spanner">+<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>+<div style="columns:2; column-fill:auto; column-gap:0; width:100px; height:100px; background:red;">+ <div style="transform:scale(1);">+ <div style="column-span:all; width:50px; height:200px; background:green;"></div>+ </div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-020.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-020.htmlnew file mode 100644index 00000000000..b37b5ac6ca2--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-020.html@@ -0,0 +1,12 @@+<!DOCTYPE html>+<title>Column rules before and after spanner with margins</title>+<link rel="author" title="Morten Stenshorne" href="mailto:[email protected]">+<link rel="help" href="https://drafts.csswg.org/css-multicol/#column-gaps-and-rules">+<link rel="help" href="https://drafts.csswg.org/css-multicol/#column-span">+<link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-020-ref.html">+<p>There should be three identical blue bars below.</p>+<div style="columns:2; width:100px; column-gap:20px; column-rule:20px solid blue;">+ <div style="height:50px; background:blue;"></div>+ <div style="column-span:all; margin:10px 0; height:25px; background:blue;"></div>+ <div style="height:50px; background:blue;"></div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-children-height-001.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-children-height-001.htmlnew file mode 100644index 00000000000..ca8a1784e85--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-children-height-001.html@@ -0,0 +1,33 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: Test a multi-column container with percentage height children</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-children-height-001-ref.html">+ <meta name="assert" content="This test checks the percentage height children under multicol container is rendered correctly.">++ <style>+ article {+ column-count: 2;+ width: 400px;+ height: 200px;+ outline: 1px solid black;+ }+ div {+ height: 50%; /* Spread evenly into two colums, each 25%. */+ }+ div.spanner {+ column-span: all;+ outline: 1px solid blue;+ height: 50%;+ }+ </style>++ <article>+ <div>block1</div>+ <div class="spanner">spanner</div>+ <div>block2</div>+ </article>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-children-height-002.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-children-height-002.htmlnew file mode 100644index 00000000000..a580c4da4a3--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-children-height-002.html@@ -0,0 +1,41 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: Test a multi-column container with percentage height children</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-children-height-002-ref.html">+ <meta name="assert" content="This test checks the percentage height children under multicol container compute the percentage relative to the entire multicol, not just the part after the column-span.">++ <style>+ article {+ column-count: 2;+ width: 400px;+ height: 200px;+ background-color: lightgreen;+ border: 5px solid purple;+ }+ div.block1 {+ background-color: yellow;+ height: 100%; /* Spread evenly into two columns, each 100px. */+ }+ div.spanner {+ column-span: all;+ height: 25%;+ background-color: lightblue;+ }+ div.block2 {+ background-color: yellow;+ /* Column container has only 25% height left, so two extra overflow columns+ are created. Total 4 columns, each 50px. */+ height: 100%;+ }+ </style>++ <article>+ <div class="block1">block1</div>+ <div class="spanner">spanner</div>+ <div class="block2">block2</div>+ </article>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-children-height-003.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-children-height-003.htmlnew file mode 100644index 00000000000..bc438d00b93--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-children-height-003.html@@ -0,0 +1,43 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: Test a multi-column container with percentage height children</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">+ <link rel="help" href="https://drafts.csswg.org/css-break/#breaking-rules">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-children-height-003-ref.html">+ <meta name="assert" content="This test checks the percentage height children under multicol container compute the percentage relative to the entire multicol, not just the part after the column-span.">++ <style>+ article {+ column-count: 2;+ width: 400px;+ height: 200px;+ background-color: lightgreen;+ border: 5px solid purple;+ }+ div.block1 {+ background-color: yellow;+ /* This overflows the column container, so one extra column is created. */+ height: 300%;+ }+ div.spanner {+ column-span: all;+ height: 25%;+ background-color: lightblue;+ }+ div.block2 {+ background-color: yellow;+ /* No height left for this block. According to the breaking rules, the+ column container creates 1px column boxes for it. */+ height: 100%;+ }+ </style>++ <article>+ <div class="block1">block1</div>+ <div class="spanner">spanner</div>+ <div class="block2">block2</div>+ </article>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-001.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-001.htmlnew file mode 100644index 00000000000..c62f71995e0--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-001.html@@ -0,0 +1,46 @@+<!DOCTYPE html>+<html class="reftest-wait">+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: Add the spanner as the first child of the columns</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-001-ref.html">+ <meta name="assert" content="This test checks a dynamically added 'column-span' element should be rendered correctly.">++ <script>+ function runTest() {+ document.body.offsetHeight;++ /* Add the spanner as the first child of the columns. */+ var spanner = document.createElement("h3");+ var text = document.createTextNode("spanner");+ spanner.appendChild(text);++ var column = document.getElementById("column");+ column.insertBefore(spanner, column.children[0]);++ document.documentElement.removeAttribute("class");+ }+ </script>++ <style>+ #column {+ column-count: 3;+ column-rule: 6px solid;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body onload="runTest();">+ <article id="column">+ <div>block1</div>+ <div>block2</div>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-002.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-002.htmlnew file mode 100644index 00000000000..30119768716--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-002.html@@ -0,0 +1,46 @@+<!DOCTYPE html>+<html class="reftest-wait">+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: Add the spanner as the second child of the columns</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-002-ref.html">+ <meta name="assert" content="This test checks a dynamically added 'column-span' element should be rendered correctly.">++ <script>+ function runTest() {+ document.body.offsetHeight;++ /* Add the spanner as the second child of the columns. */+ var spanner = document.createElement("h3");+ var text = document.createTextNode("spanner");+ spanner.appendChild(text);++ var column = document.getElementById("column");+ column.insertBefore(spanner, column.children[1]);++ document.documentElement.removeAttribute("class");+ }+ </script>++ <style>+ #column {+ column-count: 3;+ column-rule: 6px solid;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body onload="runTest();">+ <article id="column">+ <div>block1</div>+ <div>block2</div>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-003.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-003.htmlnew file mode 100644index 00000000000..10da29c0ce0--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-003.html@@ -0,0 +1,46 @@+<!DOCTYPE html>+<html class="reftest-wait">+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: Add the spanner in block1. It should correctly span across all columns</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-003-ref.html">+ <meta name="assert" content="This test checks a dynamically added 'column-span' element should be rendered correctly.">++ <script>+ function runTest() {+ document.body.offsetHeight;++ /* Add the spanner in block1. It should correctly span across all columns. */+ var spanner = document.createElement("h3");+ var text = document.createTextNode("spanner");+ spanner.appendChild(text);++ var block1 = document.getElementById("block1");+ block1.appendChild(spanner);++ document.documentElement.removeAttribute("class");+ }+ </script>++ <style>+ #column {+ column-count: 3;+ column-rule: 6px solid;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body onload="runTest();">+ <article id="column">+ <div id="block1">block1</div>+ <div>block2</div>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-004.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-004.htmlnew file mode 100644index 00000000000..b0a59782a17--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-004.html@@ -0,0 +1,55 @@+<!DOCTYPE html>+<html class="reftest-wait">+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: Add the spanner to the inner column</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-004-ref.html">+ <meta name="assert" content="This test checks a dynamically added 'column-span' element should be rendered correctly.">++ <script>+ function runTest() {+ document.body.offsetHeight;++ /* Add the spanner to the inner column. */+ var spanner = document.createElement("h3");+ var text = document.createTextNode("spanner");+ spanner.appendChild(text);++ var innerColumn = document.getElementById("inner-column");+ innerColumn.insertBefore(spanner, innerColumn.children[1]);++ document.documentElement.removeAttribute("class");+ }+ </script>++ <style>+ body {+ width: 400px;+ }+ article {+ column-count: 2;+ column-rule: 6px solid;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body onload="runTest();">+ <article id="column">+ <article id="inner-column">+ <div>inner block1</div>+ <div>inner block2</div>+ </article>+ <article>+ <div>inner block3</div>+ <h3>static spanner</h3>+ <div>inner block4</div>+ </article>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-005.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-005.htmlnew file mode 100644index 00000000000..2023113d25c--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-005.html@@ -0,0 +1,48 @@+<!DOCTYPE html>+<html class="reftest-wait">+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: Add block1 before block2. It should join the column content box with+ block2, not with the spanner</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-001-ref.html">+ <meta name="assert" content="This test checks a dynamically added block element should be rendered correctly in a column hierarchy containing a column-span.">++ <script>+ function runTest() {+ document.body.offsetHeight;++ /* Add block1 before block2. It should join the column content box with+ block2, not with the spanner. */+ var block = document.createElement("div");+ var text = document.createTextNode("block1");+ block.appendChild(text);++ var column = document.getElementById("column");+ column.insertBefore(block, column.children[1]);++ document.documentElement.removeAttribute("class");+ }+ </script>++ <style>+ #column {+ column-count: 3;+ column-rule: 6px solid;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body onload="runTest();">+ <article id="column">+ <h3>spanner</h3>+ <div>block2</div>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-006.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-006.htmlnew file mode 100644index 00000000000..2bcaab1ee67--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-006.html@@ -0,0 +1,44 @@+<!DOCTYPE html>+<html class="reftest-wait">+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: Append a text in column-span</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-002-ref.html">+ <meta name="assert" content="This test checks adding a text in column-span should be rendered correctly.">++ <script>+ function runTest() {+ document.body.offsetHeight;++ /* Append a text in column-span */+ var text = document.createTextNode("spanner");+ var spanner = document.getElementById("spanner");+ spanner.appendChild(text)++ document.documentElement.removeAttribute("class");+ }+ </script>++ <style>+ #column {+ column-count: 3;+ column-rule: 6px solid;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body onload="runTest();">+ <article id="column">+ <div>block1</div>+ <h3 id="spanner"></h3>+ <div>block2</div>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-007.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-007.htmlnew file mode 100644index 00000000000..eccdca90f54--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-007.html@@ -0,0 +1,50 @@+<!DOCTYPE html>+<html class="reftest-wait">+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: Append the block to the inline element which contains "column-span"</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-007-ref.html">+ <meta name="assert" content="This test checks a dynamically added block element should be rendered correctly.">++ <script>+ function runTest() {+ document.body.offsetHeight;++ /* Append the block to the inline element which contains "column-span". */+ var block = document.createElement("div");+ var text = document.createTextNode("block2");+ block.appendChild(text);++ var span = document.getElementById("span");+ span.appendChild(block);++ document.documentElement.removeAttribute("class");+ }+ </script>++ <style>+ #column {+ column-count: 3;+ column-rule: 6px solid;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body onload="runTest();">+ <article id="column">+ <span id="span">+ inline1+ <h3>spanner</h3>+ <div>block1</div>+ inline2+ </span>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-008.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-008.htmlnew file mode 100644index 00000000000..90fc76df4c2--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-008.html@@ -0,0 +1,48 @@+<!DOCTYPE html>+<html class="reftest-wait">+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: Add a nested multi-column spanner to the outer column</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-008-ref.html">+ <meta name="assert" content="This test checks a dynamically added 'column-span' element should be rendered correctly.">++ <script>+ function runTest() {+ document.body.offsetHeight;++ /* Add a nested multi-column spanner to the outer column. */+ var spanner = document.createElement("h3");+ var text = document.createTextNode("multi-column spanner");+ spanner.appendChild(text);++ var column = document.getElementById("column");+ column.insertBefore(spanner, column.children[1]);++ document.documentElement.removeAttribute("class");+ }+ </script>++ <style>+ #column {+ column-count: 3;+ column-rule: 6px solid;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ column-count: 2;+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body onload="runTest();">+ <article id="column">+ <div>block1</div>+ <h3>spanner</h3>+ <div>block2</div>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-009.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-009.htmlnew file mode 100644index 00000000000..713ce0c5ce8--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-009.html@@ -0,0 +1,46 @@+<!DOCTYPE html>+<html class="reftest-wait">+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: Add a simple block to columns which already contains a column-span</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-002-ref.html">+ <meta name="assert" content="This test checks a dynamically added block element should be rendered correctly.">++ <script>+ function runTest() {+ document.body.offsetHeight;++ /* Add a simple block to columns which already contains a column-span. */+ var block2 = document.createElement("div");+ var text = document.createTextNode("block2");+ block2.appendChild(text);++ var column = document.getElementById("column");+ column.appendChild(block2);++ document.documentElement.removeAttribute("class");+ }+ </script>++ <style>+ #column {+ column-count: 3;+ column-rule: 6px solid;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body onload="runTest();">+ <article id="column">+ <div>block1</div>+ <h3>spanner</h3>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-010.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-010.htmlnew file mode 100644index 00000000000..180f46af72f--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-010.html@@ -0,0 +1,54 @@+<!DOCTYPE html>+<html class="reftest-wait">+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: Append a block containing a spanner kid. The spanner kid should correctly span across all columns.</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-010-ref.html">+ <meta name="assert" content="This test checks appending a block containing 'column-span' element should be rendered correctly.">++ <script>+ function runTest() {+ document.body.offsetHeight;++ // Create a subtree like the following, and append it to columns.+ // <div>+ // <h3>spanner</h3>+ // block2+ // </div>+ var spanner = document.createElement("h3");+ var spannerText = document.createTextNode("spanner");+ spanner.appendChild(spannerText);++ var block2 = document.createElement("div");+ var block2Text = document.createTextNode("block2");+ block2.appendChild(spanner);+ block2.appendChild(block2Text)++ var column = document.getElementById("column");+ column.appendChild(block2);++ document.documentElement.removeAttribute("class");+ }+ </script>++ <style>+ #column {+ column-count: 3;+ column-rule: 6px solid;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body onload="runTest();">+ <article id="column">+ <div>block1</div>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-011.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-011.htmlnew file mode 100644index 00000000000..6f34ddb095f--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-011.html@@ -0,0 +1,55 @@+<!DOCTYPE html>+<html class="reftest-wait">+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: Insert a block containing a spanner kid. The spanner kid should correctly span across all columns</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-003-ref.html">+ <meta name="assert" content="This test checks that an inserted block containing 'column-span' element should be rendered correctly.">++ <script>+ function runTest() {+ document.body.offsetHeight;++ // Create a subtree like the following, and insert it into column as the+ // first child.+ // <div>+ // block1+ // <h3>spanner</h3>+ // </div>+ var spanner = document.createElement("h3");+ var spannerText = document.createTextNode("spanner");+ spanner.appendChild(spannerText);++ var block1 = document.createElement("div");+ var block1Text = document.createTextNode("block1");+ block1.appendChild(block1Text)+ block1.appendChild(spanner);++ var column = document.getElementById("column");+ column.insertBefore(block1, column.children[0]);++ document.documentElement.removeAttribute("class");+ }+ </script>++ <style>+ #column {+ column-count: 3;+ column-rule: 6px solid;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body onload="runTest();">+ <article id="column">+ <div>block2</div>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-012.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-012.htmlnew file mode 100644index 00000000000..83653eac149--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-012.html@@ -0,0 +1,54 @@+<!DOCTYPE html>+<html class="reftest-wait">+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: Append a block containing a spanner kid. The spanner kid should correctly span across all columns</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-012-ref.html">+ <meta name="assert" content="This test checks that an appended block containing 'column-span' element should be rendered correctly.">++ <script>+ function runTest() {+ document.body.offsetHeight;++ // Create a subtree like the following, and append it to block1.+ // <div>+ // <h3>spanner</h3>+ // block2+ // </div>+ var spanner = document.createElement("h3");+ var spannerText = document.createTextNode("spanner");+ spanner.appendChild(spannerText);++ var block2 = document.createElement("div");+ var block2Text = document.createTextNode("block2");+ block2.appendChild(spanner);+ block2.appendChild(block2Text)++ var block1 = document.getElementById("block1");+ block1.appendChild(block2);++ document.documentElement.removeAttribute("class");+ }+ </script>++ <style>+ #column {+ column-count: 3;+ column-rule: 6px solid;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body onload="runTest();">+ <article id="column">+ <div id="block1">block1</div>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-013.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-013.htmlnew file mode 100644index 00000000000..955e737f76c--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-013.html@@ -0,0 +1,48 @@+<!DOCTYPE html>+<html class="reftest-wait">+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: Insert a block into a multicol details containing column-span:all</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-013-ref.html">+ <meta name="assert" content="This test checks that <summary> is still rendered as the first element after inserting a block into multicol <details>, at the place before <summary>.">++ <script>+ function runTest() {+ document.body.offsetHeight;++ // Create a div, and insert it as the first child of <details>,+ // just before <summary>.+ var block1 = document.createElement("div");+ var block1Text = document.createTextNode("block1");+ block1.appendChild(block1Text);++ var details = document.getElementById("details");+ details.insertBefore(block1, details.children[0]);++ document.documentElement.removeAttribute("class");+ }+ </script>++ <style>+ #details {+ column-count: 3;+ column-rule: 6px solid;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body onload="runTest();">+ <details open id="details">+ <summary>Summary</summary>+ <h3>spanner</h3>+ <div>block2</div>+ </details>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-014.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-014.htmlnew file mode 100644index 00000000000..84275d388ef--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-014.html@@ -0,0 +1,43 @@+<!DOCTYPE html>+<html class="reftest-wait">+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: Append a block with column-span descendants to multicol</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-add-014-ref.html">++ <script>+ function runTest() {+ document.body.offsetHeight;++ var block3 = document.createElement("div");+ block3.innerHTML = "<div>block3</div><h3>spanner2</h3><div>block4</div>";+ column.appendChild(block3);++ document.documentElement.removeAttribute("class");+ }+ </script>++ <style>+ #column {+ column-count: 3;+ column-rule: 6px solid;+ column-fill: auto;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body onload="runTest();">+ <article id="column">+ <div>block1</div>+ <h3>spanner</h3>+ <div>block2</div>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-001.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-001.htmlnew file mode 100644index 00000000000..f14f06874b1--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-001.html@@ -0,0 +1,41 @@+<!DOCTYPE html>+<html class="reftest-wait">+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: Remove the spanner as the first child</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-001-ref.html">+ <meta name="assert" content="This test checks removing a 'column-span' element should be rendered correctly.">++ <script>+ function runTest() {+ document.body.offsetHeight;++ document.getElementById("spanner").remove();++ document.documentElement.removeAttribute("class");+ }+ </script>++ <style>+ #column {+ column-count: 3;+ column-rule: 6px solid;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body onload="runTest();">+ <article id="column">+ <h3 id="spanner">spanner</h3>+ <div>block1</div>+ <div>block2</div>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-002.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-002.htmlnew file mode 100644index 00000000000..851602b0a50--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-002.html@@ -0,0 +1,41 @@+<!DOCTYPE html>+<html class="reftest-wait">+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: Remove the spanner in nested blocks</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-002-ref.html">+ <meta name="assert" content="This test checks removing a 'column-span' element should be rendered correctly.">++ <script>+ function runTest() {+ document.body.offsetHeight;++ document.getElementById("spanner").remove();++ document.documentElement.removeAttribute("class");+ }+ </script>++ <style>+ #column {+ column-count: 3;+ column-rule: 6px solid;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body onload="runTest();">+ <article id="column">+ <div>block1</div>+ <div><div><h3 id="spanner">spanner</h3></div></div>+ <div>block2</div>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-003.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-003.htmlnew file mode 100644index 00000000000..675065f59b1--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-003.html@@ -0,0 +1,40 @@+<!DOCTYPE html>+<html class="reftest-wait">+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: Remove the spanner in a block</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-001-ref.html">+ <meta name="assert" content="This test checks removing a 'column-span' element should be rendered correctly.">++ <script>+ function runTest() {+ document.body.offsetHeight;++ document.getElementById("spanner").remove();++ document.documentElement.removeAttribute("class");+ }+ </script>++ <style>+ #column {+ column-count: 3;+ column-rule: 6px solid;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body onload="runTest();">+ <article id="column">+ <div id="block1">block1<h3 id="spanner">spanner</h3></div>+ <div>block2</div>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-004.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-004.htmlnew file mode 100644index 00000000000..bfb7314ed94--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-004.html@@ -0,0 +1,45 @@+<!DOCTYPE html>+<html class="reftest-wait">+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: Remove the spanner with a block sibling in an inline element</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-004-ref.html">+ <meta name="assert" content="This test checks removing a 'column-span' element should be rendered correctly.">++ <script>+ function runTest() {+ document.body.offsetHeight;++ document.getElementById("spanner").remove();++ document.documentElement.removeAttribute("class");+ }+ </script>++ <style>+ #column {+ column-count: 3;+ column-rule: 6px solid;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body onload="runTest();">+ <article id="column">+ <span>+ inline1+ <h3 id="spanner">spanner</h3>+ <div>block1</div>+ inline2+ <div>block2</div>+ </span>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-005.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-005.htmlnew file mode 100644index 00000000000..ec1db3a213d--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-005.html@@ -0,0 +1,44 @@+<!DOCTYPE html>+<html class="reftest-wait">+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: Remove a tall block (spliting across the three columns) with spanner siblings</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-005-ref.html">+ <meta name="assert" content="This test checks removing a non-'column-span' element should be rendered correctly.">++ <script>+ function runTest() {+ document.body.offsetHeight;++ document.getElementById("block").remove();++ document.documentElement.removeAttribute("class");+ }+ </script>++ <style>+ #column {+ column-count: 3;+ column-rule: 6px solid;+ width: 400px;+ outline: 1px solid black;+ }+ #block {+ height: 400px;+ }+ h3 {+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body onload="runTest();">+ <article id="column">+ <h3>spanner1</h3>+ <div id="block">block</div>+ <h3>spanner2</h3>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-006.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-006.htmlnew file mode 100644index 00000000000..4ee00c578be--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-006.html@@ -0,0 +1,44 @@+<!DOCTYPE html>+<html class="reftest-wait">+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: Remove the parent of a column-spanner</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-001-ref.html">+ <meta name="assert" content="This test checks removing the parent of a column-spanner should be rendered correctly.">++ <script>+ function runTest() {+ document.body.offsetHeight;++ document.getElementById("block").remove();++ document.documentElement.removeAttribute("class");+ }+ </script>++ <style>+ #column {+ column-count: 3;+ column-rule: 6px solid;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body onload="runTest();">+ <article id="column">+ <div>block1</div>+ <div id="block">+ <h3>inner spanner</h3>+ <div>inner block</div>+ </div>+ <div>block2</div>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-007.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-007.htmlnew file mode 100644index 00000000000..877b1ed2c56--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-007.html@@ -0,0 +1,42 @@+<!DOCTYPE html>+<html class="reftest-wait">+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: Remove the position:fixed spanner as the first child</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-dynamic-remove-001-ref.html">+ <meta name="assert" content="This test checks removing a position:fixed 'column-span:all' element (which doesn't actually span columns) should be rendered correctly.">++ <script>+ function runTest() {+ document.body.offsetHeight;++ document.getElementById("spanner").remove();++ document.documentElement.removeAttribute("class");+ }+ </script>++ <style>+ #column {+ column-count: 3;+ column-rule: 6px solid;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ position: fixed;+ column-span: all;+ outline: 1px solid blue;+ }+ </style>++ <body onload="runTest();">+ <article id="column">+ <h3 id="spanner">spanner</h3>+ <div>block1</div>+ <div>block2</div>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-margin-001.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-margin-001.xhtnew file mode 100644index 00000000000..4590eb9f743--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-margin-001.xht@@ -0,0 +1,72 @@+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">+<html xmlns="http://www.w3.org/1999/xhtml">+ <head>+ <title>CSS Multi-column Layout Test: 'column-span: all' element and width exceeding available multi-column width (complex)</title>+ <link rel="author" title="Opera Software ASA" href="http://www.opera.com/" />+ <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-08-18 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#column-span" title="6.1. 'column-span'" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-margin-001-ref.xht" />+ <meta name="flags" content="ahem may" />+ <meta name="assert" content="This test checks that when 'overflow' is set to 'hidden' on a multi-column element, then any spanning ('column-span: all') element exceeding the available width of the multi-column should be clipped accordingly." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: yellow;+ border: gray solid 1em;+ color: navy;+ font: 1.25em/1 Ahem;+ orphans: 1;+ overflow: hidden;+ widows: 1;+ width: 8em;++ column-count: 4;+ column-gap: 0em;++ /*++ N == 4;++ W == 2;++ */+ }++ h4+ {+ background: black;+ color: black;+ font: inherit;+ margin: 1em 0;+ width: 11em;++ column-span: all;++ /*+ This is the target of the test: the spanning element's+ width (11em) exceeds the available width of the+ multi-column element. The 3em exceeding such+ width is first clipped at column box boundary.+ */+ }++ span {color: blue;}++ span + span {color: pink;}+ ]]></style>+ </head>++ <body>++ <div>+ <span> bl ue bl ue </span>+ <span> Pi nk Pi nk </span>+ <h4> black </h4>+ <h4> black </h4>+ na vy na vy+ na vy na vy+ </div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-margin-002.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-margin-002.xhtnew file mode 100644index 00000000000..d6c9dc614ad--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-margin-002.xht@@ -0,0 +1,77 @@+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">+<html xmlns="http://www.w3.org/1999/xhtml">+ <head>+ <title>CSS Multi-column Layout Test: 'column-span: all' element</title>+ <link rel="author" title="Opera Software ASA" href="http://www.opera.com/" />+ <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-08-19 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#column-span" title="6.1. 'column-span'" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-margin-002-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="The spanning element extends only to the width of the multicol element, despite an item in the fourth column extending into the overflow area." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: yellow;+ border: gray solid 1em;+ color: navy;+ font: 1.25em/1 Ahem;+ orphans: 1;+ widows: 1;+ width: 8em;++ column-count: 4;+ column-gap: 0em;++ /*++ N == 4;++ W == 2;++ */+ }++ h4+ {+ font: inherit;+ margin: 1em 0;+ }++ h4#orange+ {+ background: orange;+ color: orange;+ /*+ In this test, the glyphs "or" are painted into 4th column box+ and the glyphs "ang" are painted in the overflow area.+ */+ }++ h4#black+ {+ background: black;+ color: black;++ column-span: all;+ }++ span {color: blue;}++ span + span {color: pink;}+ ]]></style>+ </head>++ <body>++ <div>+ <span> bl ue bl ue </span>+ <span> Pi nk Pi nk </span>+ <h4 id="orange"> orang </h4>+ <h4 id="black"> black </h4>+ na vy na vy+ na vy na vy+ </div>++ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-margin-bottom-001.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-margin-bottom-001.xhtnew file mode 100644index 00000000000..4efa6142822--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-margin-bottom-001.xht@@ -0,0 +1,80 @@+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">+<html xmlns="http://www.w3.org/1999/xhtml">+ <head>+ <title>CSS Multi-column Layout Test: 'column-span: all' element with vertical margins and width exceeding available multi-colum width (complex)</title>+ <link rel="author" title="Opera Software ASA" href="http://www.opera.com/" />+ <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-08-19 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#column-span" title="6.1. 'column-span'" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-margin-bottom-001-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="In this test, the glyphs 'or' are painted into 1st column box, the glyphs 'ang' extend outside the box, and should not be clipped. In this test they are overwritten by spans so are not visible." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: yellow;+ border: gray solid 1em;+ color: navy;+ font: 1.25em/1 Ahem;+ orphans: 1;+ widows: 1;+ width: 8em;++ column-count: 4;+ column-gap: 0em;++ /*++ N == 4;++ W == 2em;++ */+ }++ h4+ {+ font: inherit;+ margin: 1em 0;+ }++ h4#black+ {+ background: black;+ color: black;++ column-span: all;+ }++ h4#orange+ {+ background: orange;+ color: orange;+ /*+ In this test, the glyphs "or" are painted into 1st column box.+ Per spec, content in the normal flow that extends into column+ gaps (e.g., long words or images) is not clipped to the column+ box. However, the glyphs "ang" are overwritten by <span>s, so+ they're not visible.+ */+ }++ span {color: blue;}++ span + span {color: pink;}+ ]]></style>+ </head>++ <body>++ <div>+ na vy na vy+ na vy na vy+ <h4 id="black"> black </h4>+ <h4 id="orange"> orang </h4>+ <span> bl ue bl ue </span>+ <span> Pi nk Pi nk </span>+ </div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-restyle-001.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-restyle-001.htmlnew file mode 100644index 00000000000..41757c30e7f--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-restyle-001.html@@ -0,0 +1,43 @@+<!DOCTYPE html>+<html class="reftest-wait">+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: Restyle column-span's parent that is a block</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">+ <link rel="help" href="https://github.com/w3c/csswg-drafts/issues/1072">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-restyle-001-ref.html">+ <meta name="assert" content="This test checks change the style of the spanner's parent should not affect the spanner.">++ <script>+ function runTest() {+ document.body.offsetHeight; // flush layout++ var div = document.getElementById("div");+ div.style.backgroundColor = "yellow";++ document.documentElement.removeAttribute("class");+ }+ </script>++ <style>+ #column {+ column-count: 1;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ }+ </style>++ <body onload="runTest();">+ <article id="column">+ <div id="div">+ <div>yellow block1</div>+ <h3>spanner (no background-color)</h3>+ <div>yellow block2</div>+ </div>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-restyle-002.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-restyle-002.htmlnew file mode 100644index 00000000000..001f049acac--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-restyle-002.html@@ -0,0 +1,49 @@+<!DOCTYPE html>+<html class="reftest-wait">+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: Restyle column-span's parent that is an inline</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">+ <link rel="help" href="https://github.com/w3c/csswg-drafts/issues/1072">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-restyle-002-ref.html">+ <meta name="assert" content="This test checks change the style of the spanner's parent should not affect the spanner.">++ <script>+ function runTest() {+ document.body.offsetHeight; // flush layout++ var span = document.getElementById("span");+ span.offsetWidth;+ span.style.left = "200px";++ document.documentElement.removeAttribute("class");+ }+ </script>++ <style>+ html {+ overflow: hidden;+ }+ #column {+ column-count: 1;+ }+ #span {+ position: relative;+ left: 100px;+ }+ h3 {+ column-span: all;+ }+ </style>++ <body onload="runTest();">+ <article id="column">+ <span id="span">+ All text should be offset 200px, except the spanner+ <h3>Spanner</h3>+ <div>Some more text</div>+ </span>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-restyle-003.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-restyle-003.htmlnew file mode 100644index 00000000000..9b42329e066--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-restyle-003.html@@ -0,0 +1,43 @@+<!DOCTYPE html>+<html class="reftest-wait">+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: Restyle column-span's multi-column container</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">+ <link rel="help" href="https://github.com/w3c/csswg-drafts/issues/1072">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-restyle-003-ref.html">+ <meta name="assert" content="This test checks change the style of the spanner's multi-column container should not affect the spanner.">++ <script>+ function runTest() {+ document.body.offsetHeight; // flush layout++ var column = document.getElementById("column");+ column.style.backgroundColor = "yellow";++ document.documentElement.removeAttribute("class");+ }+ </script>++ <style>+ #column {+ column-count: 1;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ }+ </style>++ <body onload="runTest();">+ <article id="column">+ <div>+ <div>block1</div>+ <h3>spanner</h3>+ <div>block2</div>+ </div>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-restyle-004.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-restyle-004.htmlnew file mode 100644index 00000000000..1ac7eb62bcc--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-restyle-004.html@@ -0,0 +1,43 @@+<!DOCTYPE html>+<html class="reftest-wait">+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: Restyle the column-span itself</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">+ <link rel="help" href="https://github.com/w3c/csswg-drafts/issues/1072">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-restyle-004-ref.html">+ <meta name="assert" content="This test checks change the style of the spanner itself.">++ <script>+ function runTest() {+ document.body.offsetHeight; // flush layout++ var spanner = document.getElementById("spanner");+ spanner.style.backgroundColor = "yellow";++ document.documentElement.removeAttribute("class");+ }+ </script>++ <style>+ #column {+ column-count: 1;+ width: 400px;+ outline: 1px solid black;+ }+ h3 {+ column-span: all;+ }+ </style>++ <body onload="runTest();">+ <article id="column">+ <div>+ <div>block1</div>+ <h3 id="spanner">yellow spanner</h3>+ <div>block2</div>+ </div>+ </article>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-rule-001.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-rule-001.htmlnew file mode 100644index 00000000000..645e94cc026--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-all-rule-001.html@@ -0,0 +1,45 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: Test the column rule's block-size</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="https://www.mozilla.org/">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-gaps-and-rules">+ <link rel="help" href="https://github.com/w3c/csswg-drafts/issues/2309">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-all-rule-001-ref.html">+ <meta name="assert" content="This test verifies that the column-rule after the last column-span is extended to the content block-end edge of the multicol container.">++ <style>+ article {+ column-count: 2;+ column-rule: 6px solid;+ width: 400px;+ height: 500px;+ background-color: lightgreen;+ border: 2em solid purple;+ padding: 2em;+ }+ div.block {+ width: 100px;+ height: 200px;+ }+ div.column-span {+ column-span: all;+ height: 50px;+ background-color: lightblue;+ }+ </style>++ <article>+ <!-- Each block spreads its height evenly into two columns, and+ each column contains 100px height. -->+ <div class="block">block1</div>+ <div class="column-span">column-span1</div>+ <div class="block">block2</div>+ <div class="column-span">column-span2</div>+ <!-- The column rule after column-span2 should extend to the content edge+ of the multicol container as if block3 has "height: 400px;" -->+ <div class="block">block3</div>+ </article>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-float-002.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-float-002.htmlnew file mode 100644index 00000000000..3865b123102--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-float-002.html@@ -0,0 +1,42 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: Test floats in a multi-column container with column-span</title>+ <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+ <link rel="author" title="Mozilla" href="http://www.mozilla.org/">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#the-multi-column-model">+ <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">+ <link rel="stylesheet" href="../../fonts/ahem.css">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-float-002-ref.html">+ <meta name="assert" content="This test verifies the floats, which are inside the mulitcol layout with column-span, are positioned with regard to the column box where the float appears.">++ <style>+ article {+ column-count: 1;+ width: 300px;+ font: 1.25em/1 Ahem;+ }+ .float-left {+ float: left;+ color: black;+ }+ .float-right {+ float: right;+ color: navy;+ }+ .column-span {+ column-span: all;+ color: pink;+ }+ </style>++ <article>+ <div class="float-left">black</div>+ <div class="float-right">navyy</div>++ <div class="column-span">Pink</div>++ <div class="float-left">black</div>+ <div class="float-right">navyy</div>+ </article>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-none-001.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-none-001.xhtnew file mode 100644index 00000000000..7ffcc02a447--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-span-none-001.xht@@ -0,0 +1,62 @@+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">+<html xmlns="http://www.w3.org/1999/xhtml">+ <head>+ <title>CSS Multi-column Layout Test: column-span: none (basic)</title>+ <link rel="author" title="Opera Software ASA" href="http://www.opera.com/" />+ <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-08-22 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#spanning-columns" title="6.1. 'column-span'" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-span-none-001-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="This test checks how a 'column-span: none' element is rendered: it should not span across all column boxes." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ border: gray solid 1em;+ font: 1.25em/1 Ahem;+ orphans: 1;+ widows: 1;+ width: 11em;++ column-count: 2;+ column-gap: 1em;++ /*++ N == 2;++ W == 5em;++ */+ }++ h4+ {+ background: black;+ color: black;+ font: inherit;+ margin: 0;+ width: 11em;++ column-span: none;+ }++ #column1-top {color: blue;}++ #column1-bottom {color: orange;}++ #column2-top {color: pink;}++ #column2-bottom {color: yellow;}+ ]]></style>+ </head>+ <body>+ <div>+ <span id="column1-top"> ab cd ef gh </span>+ <h4> 1234567890123 </h4>+ <span id="column1-bottom"> ij kl mn oq </span>+ <span id="column2-top"> ab cd ef gh </span>+ <span id="column2-bottom"> rs tu vw xy </span>+ </div>+ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/support/swatch-lime.png b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/support/swatch-lime.pngnew file mode 100644index 00000000000..55fd7fdaedfBinary files /dev/null and b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/support/swatch-lime.png differdiff --git a/Tests/LibWeb/Text/expected/multicol-balance-heights.txt b/Tests/LibWeb/Text/expected/multicol-balance-heights.txtnew file mode 100644index 00000000000..8477f0d47c7--- /dev/null+++ b/Tests/LibWeb/Text/expected/multicol-balance-heights.txt@@ -0,0 +1,6 @@+paragraph: 36+list: 20+min-height: 100, scroll width 400, last 200,60 200x20+tall-min-height: 200, scroll width 400, last 200,60 200x20+min-over-max: 100, scroll width 400, last 200,40 200x20+percentage-max: 100, scroll width 400, last 200,40 200x20diff --git a/Tests/LibWeb/Text/expected/multicol-break-after-padding.txt b/Tests/LibWeb/Text/expected/multicol-break-after-padding.txtnew file mode 100644index 00000000000..b51a1137be4--- /dev/null+++ b/Tests/LibWeb/Text/expected/multicol-break-after-padding.txt@@ -0,0 +1,2 @@+padding-reaches-column-end: 0,0 30 | 206.65625,0 30 | 413.3125,0 30+small-box: 0,0 6 | 206.65625,0 6 | 413.3125,0 4diff --git a/Tests/LibWeb/Text/expected/multicol-break-avoidance.txt b/Tests/LibWeb/Text/expected/multicol-break-avoidance.txtnew file mode 100644index 00000000000..0052ef433be--- /dev/null+++ b/Tests/LibWeb/Text/expected/multicol-break-avoidance.txt@@ -0,0 +1,23 @@+grid: 418+ 0,0 189.328125x100+ 0,116 189.328125x140+ 0,272 189.328125x80+ 205.328125,0 189.328125x120+ 205.328125,136 189.328125x90+ 205.328125,242 189.328125x150+ 410.65625,0 189.328125x70+ 410.65625,86 189.328125x130+ 410.65625,232 189.328125x110+ 410.65625,358 189.328125x60+avoid box after a collapsed margin: 200,0 200x60+forced-balanced: 60+ 0,0 200x20+ 0,20 200x20+ 210,0 200x20+ 210,20 200x20+ 210,40 200x20+forced-fixed: 100+ 0,0 200x20+ 0,20 200x20+ 210,0 200x20+ 210,20 200x20diff --git a/Tests/LibWeb/Text/expected/multicol-break-edges.txt b/Tests/LibWeb/Text/expected/multicol-break-edges.txtnew file mode 100644index 00000000000..b333bc915a2--- /dev/null+++ b/Tests/LibWeb/Text/expected/multicol-break-edges.txt@@ -0,0 +1,14 @@+padding-bottom: height 100+float: height 90+forced-in-avoid-balanced: height 80+bottom-edge: height 20+bottom-edge-fill: height 20+float box: 0,0 50x90+forced-in-avoid box: 100,0 100x80+forced-in-avoid-balanced box: 100,0 100x80+collapse-through box: 200,0 200x10+block-in-inline box: 200,70 200x10+aspect-ratio box: 0,0 200x100 220,0 200x100 440,0 200x30+top-edge box: 0,0 200x100 200,0 200x50+aspect-ratio after: 440,30 200x10+top-edge inner: 200,30 200x20diff --git a/Tests/LibWeb/Text/expected/multicol-float-below-pending-margin.txt b/Tests/LibWeb/Text/expected/multicol-float-below-pending-margin.txtnew file mode 100644index 00000000000..95249b6335b--- /dev/null+++ b/Tests/LibWeb/Text/expected/multicol-float-below-pending-margin.txt@@ -0,0 +1,2 @@+float bottom inside multicol: true+next element below float: truediff --git a/Tests/LibWeb/Text/expected/multicol-list-item-columns.txt b/Tests/LibWeb/Text/expected/multicol-list-item-columns.txtnew file mode 100644index 00000000000..0f6ee732c1e--- /dev/null+++ b/Tests/LibWeb/Text/expected/multicol-list-item-columns.txt@@ -0,0 +1,3 @@+spanner: height 47, children 0,0 0,15 0,45+tall-line-height: height 30, children 0,0 0,10 0,20 150,0 150,10 150,20+empty: height 0, childrendiff --git a/Tests/LibWeb/Text/expected/multicol-max-height-rows.txt b/Tests/LibWeb/Text/expected/multicol-max-height-rows.txtnew file mode 100644index 00000000000..9c6e3a561af--- /dev/null+++ b/Tests/LibWeb/Text/expected/multicol-max-height-rows.txt@@ -0,0 +1,4 @@+spanner-after-capped-row: height 60, children 0,0 0,20 0,40 200,0 200,20 200,40 400,0 400,20 0,60 0,80+last-row-gets-remainder: height 100, children 0,0 0,20 200,0 200,20 0,40 0,60 0,80 200,60 200,80 400,60 400,80 600,60 600,80 800,60 800,80+filled-columns: height 100, children 0,0 133.328125,0 266.65625,0+forced-break: height 20, children 0,0 200,0diff --git a/Tests/LibWeb/Text/expected/multicol-spanner-formatting-context.txt b/Tests/LibWeb/Text/expected/multicol-spanner-formatting-context.txtnew file mode 100644index 00000000000..62c0d7b3e7f--- /dev/null+++ b/Tests/LibWeb/Text/expected/multicol-spanner-formatting-context.txt@@ -0,0 +1,5 @@+margins: 90, spanner 0,20 400x50+float: 70, spanner 0,20 400x30+after-spanner: 70, block 0,60 200x10+after-whitespace: 70, block 0,60 200x10+not-a-spanner: 30, box 0,0 200x30 200,0 200x30diff --git a/Tests/LibWeb/Text/expected/multicol-spanner-margins-and-dynamic-columns.txt b/Tests/LibWeb/Text/expected/multicol-spanner-margins-and-dynamic-columns.txtnew file mode 100644index 00000000000..67bcc412721--- /dev/null+++ b/Tests/LibWeb/Text/expected/multicol-spanner-margins-and-dynamic-columns.txt@@ -0,0 +1,4 @@+adjacent: container 80, second spanner 60+before: container 130, spanner 60 400x10+columns on: container 90, spanner 20 400x50+columns off: container 130, spanner 60 400x10diff --git a/Tests/LibWeb/Text/expected/multicol-table-wrapper-breaks.txt b/Tests/LibWeb/Text/expected/multicol-table-wrapper-breaks.txtnew file mode 100644index 00000000000..a4b041bcc31--- /dev/null+++ b/Tests/LibWeb/Text/expected/multicol-table-wrapper-breaks.txt@@ -0,0 +1,3 @@+spanner-table: 0,30 420x20+after-table: 220,0 200x30+display-table: 220,0 20x20diff --git a/Tests/LibWeb/Text/expected/multicol-unbreakable-own-line-root.txt b/Tests/LibWeb/Text/expected/multicol-unbreakable-own-line-root.txtnew file mode 100644index 00000000000..dfdbc7a2375--- /dev/null+++ b/Tests/LibWeb/Text/expected/multicol-unbreakable-own-line-root.txt@@ -0,0 +1,7 @@+container: 530+block: 0,0+block: 0,90+block: 0,180+block: 0,270+block: 0,360+block: 0,450diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-flexbox/alignment/flex-align-baseline-multicol-001.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-flexbox/alignment/flex-align-baseline-multicol-001.txtindex 1e3444c918e..9ce33da9aac 100644--- a/Tests/LibWeb/Text/expected/wpt-import/css/css-flexbox/alignment/flex-align-baseline-multicol-001.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-flexbox/alignment/flex-align-baseline-multicol-001.txt@@ -2,13 +2,13 @@ Harness status: OKFound 12 tests-8 Pass-4 Fail+9 Pass+3 FailPass .target > * 1Pass .target > * 2Fail .target > * 3Pass .target > * 4-Fail .target > * 5+Pass .target > * 5Pass .target > * 6Fail .target > * 7Pass .target > * 8diff --git a/Tests/LibWeb/Text/input/multicol-balance-heights.html b/Tests/LibWeb/Text/input/multicol-balance-heights.htmlnew file mode 100644index 00000000000..ac42f3da95a--- /dev/null+++ b/Tests/LibWeb/Text/input/multicol-balance-heights.html@@ -0,0 +1,36 @@+<!DOCTYPE html>+<script src="include.js"></script>+<style>+ @font-face {+ font-family: Ahem;+ src: url("../../Ref/data/fonts/Ahem.ttf");+ }+ body { margin: 0; font: 20px/20px Ahem; }+ .case { width: 400px; column-gap: 0; margin-bottom: 20px; }+ .block { height: 20px; }+</style>+<div class="case" id="paragraph" style="columns: 3"><p style="margin: 16px 0">Hello</p></div>+<div class="case" id="list" style="columns: 3"><ul style="margin: 0"><li>one</li><li>two</li><li>three</li></ul></div>+<div class="case" id="min-height" style="columns: 2; min-height: 100px"><div class="block"></div><div class="block"></div><div class="block"></div><div class="block"></div><div class="block"></div><div class="block"></div><div class="block"></div><div class="block" id="min-height-last"></div></div>+<div class="case" id="tall-min-height" style="columns: 2; min-height: 200px"><div class="block"></div><div class="block"></div><div class="block"></div><div class="block"></div><div class="block"></div><div class="block"></div><div class="block"></div><div class="block" id="tall-min-height-last"></div></div>+<div class="case" id="min-over-max" style="columns: 2; column-fill: auto; max-height: 50px; min-height: 100px"><div class="block"></div><div class="block"></div><div class="block"></div><div class="block"></div><div class="block"></div><div class="block"></div><div class="block"></div><div class="block" id="min-over-max-last"></div></div>+<div style="height: 200px"><div class="case" id="percentage-max" style="columns: 2; column-fill: auto; max-height: 25%; min-height: 100px"><div class="block"></div><div class="block"></div><div class="block"></div><div class="block"></div><div class="block"></div><div class="block"></div><div class="block"></div><div class="block" id="percentage-max-last"></div></div></div>+<script>+ function rectsIn(element, container) {+ const origin = container.getBoundingClientRect();+ return [...element.getClientRects()]+ .map(rect => `${rect.x - origin.x},${rect.y - origin.y} ${rect.width}x${rect.height}`)+ .join(" ");+ }++ asyncTest(async done => {+ await document.fonts.load("20px Ahem");+ for (const id of ["paragraph", "list"])+ println(`${id}: ${document.getElementById(id).offsetHeight}`);+ for (const id of ["min-height", "tall-min-height", "min-over-max", "percentage-max"]) {+ const container = document.getElementById(id);+ println(`${id}: ${container.offsetHeight}, scroll width ${container.scrollWidth}, last ${rectsIn(document.getElementById(`${id}-last`), container)}`);+ }+ done();+ });+</script>diff --git a/Tests/LibWeb/Text/input/multicol-break-after-padding.html b/Tests/LibWeb/Text/input/multicol-break-after-padding.htmlnew file mode 100644index 00000000000..c27f9166d31--- /dev/null+++ b/Tests/LibWeb/Text/input/multicol-break-after-padding.html@@ -0,0 +1,18 @@+<!DOCTYPE html>+<script src="include.js"></script>+<style>+ body { margin: 0; }+ .multicol { columns: 3; column-gap: 20px; width: 600px; height: 100px; margin-bottom: 10px; }+</style>+<div class="multicol"><div id="padding-reaches-column-end" style="height: 60px; padding-top: 30px"></div></div>+<div class="multicol"><div id="small-box" style="height: 10px; padding-top: 6px"></div></div>+<script>+ test(() => {+ for (const id of ["padding-reaches-column-end", "small-box"]) {+ const element = document.getElementById(id);+ const origin = element.parentElement.getBoundingClientRect();+ const fragments = Array.from(element.getClientRects()).map(rect => `${rect.x - origin.x},${rect.y - origin.y} ${rect.height}`);+ println(`${id}: ${fragments.join(" | ")}`);+ }+ });+</script>diff --git a/Tests/LibWeb/Text/input/multicol-break-avoidance.html b/Tests/LibWeb/Text/input/multicol-break-avoidance.htmlnew file mode 100644index 00000000000..a2e9809a2cb--- /dev/null+++ b/Tests/LibWeb/Text/input/multicol-break-avoidance.html@@ -0,0 +1,47 @@+<!DOCTYPE html>+<script src="include.js"></script>+<style>+ body { margin: 0; }+ .grid { columns: 3; column-gap: 16px; width: 600px; margin-bottom: 20px; }+ .card { break-inside: avoid; margin-bottom: 16px; }+ .block { height: 20px; }+ .case { margin-bottom: 20px; }+</style>+<div class="grid" id="grid">+<div class="card" style="height: 100px"></div>+<div class="card" style="height: 140px"></div>+<div class="card" style="height: 80px"></div>+<div class="card" style="height: 120px"></div>+<div class="card" style="height: 90px"></div>+<div class="card" style="height: 150px"></div>+<div class="card" style="height: 70px"></div>+<div class="card" style="height: 130px"></div>+<div class="card" style="height: 110px"></div>+<div class="card" style="height: 60px"></div>+</div>+<div class="case" id="collapsed" style="columns: 2; column-fill: auto; height: 100px; width: 400px; column-gap: 0"><div><div style="margin-top: 50px; height: 10px"></div><div id="collapsed-avoid" style="break-inside: avoid; height: 60px"></div></div></div>+<div class="case" id="forced-balanced" style="columns: 2; width: 410px; column-gap: 10px"><div class="block"></div><div style="break-inside: avoid"><div class="block"></div><div class="block" style="break-before: column"></div><div class="block"></div></div><div class="block"></div></div>+<div class="case" id="forced-fixed" style="columns: 2; width: 410px; column-gap: 10px; column-fill: auto; height: 100px"><div class="block"></div><div style="break-inside: avoid"><div class="block"></div><div class="block" style="break-before: column"></div><div class="block"></div></div></div>+<script>+ function rectsIn(element, container) {+ const origin = container.getBoundingClientRect();+ return [...element.getClientRects()]+ .map(rect => `${rect.x - origin.x},${rect.y - origin.y} ${rect.width}x${rect.height}`)+ .join(" ");+ }++ test(() => {+ const grid = document.getElementById("grid");+ println(`grid: ${grid.offsetHeight}`);+ for (const card of grid.querySelectorAll(".card"))+ println(` ${rectsIn(card, grid)}`);+ const collapsed = document.getElementById("collapsed");+ println(`avoid box after a collapsed margin: ${rectsIn(document.getElementById("collapsed-avoid"), collapsed)}`);+ for (const id of ["forced-balanced", "forced-fixed"]) {+ const container = document.getElementById(id);+ println(`${id}: ${container.offsetHeight}`);+ for (const block of container.querySelectorAll(".block"))+ println(` ${rectsIn(block, container)}`);+ }+ });+</script>diff --git a/Tests/LibWeb/Text/input/multicol-break-edges.html b/Tests/LibWeb/Text/input/multicol-break-edges.htmlnew file mode 100644index 00000000000..2563e2de9a5--- /dev/null+++ b/Tests/LibWeb/Text/input/multicol-break-edges.html@@ -0,0 +1,31 @@+<!DOCTYPE html>+<script src="include.js"></script>+<style>+ body { margin: 0; }+ .mc { column-gap: 0; margin-bottom: 20px; }+</style>+<div class="mc" id="padding-bottom" style="columns: 2; width: 400px"><div style="padding-bottom: 100px"></div></div>+<div class="mc" id="float" style="columns: 3; width: 300px"><div id="float-box" style="float: left; width: 50px; height: 90px"></div></div>+<div class="mc" id="forced-in-avoid" style="columns: 2; column-fill: auto; height: 100px; width: 200px"><div style="height: 60px"></div><div style="break-inside: avoid"><div id="forced-in-avoid-box" style="height: 80px"></div><div style="break-before: column; height: 20px"></div></div></div>+<div class="mc" id="forced-in-avoid-balanced" style="columns: 3; width: 300px"><div style="height: 60px"></div><div style="break-inside: avoid"><div id="forced-in-avoid-balanced-box" style="height: 80px"></div><div style="break-before: column; height: 20px"></div></div></div>+<div class="mc" id="collapse-through" style="columns: 2; column-fill: auto; height: 100px; width: 400px"><div style="height: 100px"></div><div style="margin-top: 20px; height: 0"></div><div id="collapse-through-box" style="margin-top: 30px; height: 10px"></div></div>+<div class="mc" id="block-in-inline" style="columns: 2; column-fill: auto; height: 200px; width: 400px; line-height: 20px"><div style="height: 150px"></div><div><span style="display: inline-block; width: 10px; height: 10px"></span><span><div id="block-in-inline-box" style="margin-top: 50px; height: 10px"></div></span></div></div>+<div class="mc" id="aspect-ratio" style="columns: 3; column-fill: auto; height: 100px; width: 640px; column-gap: 20px"><div id="aspect-ratio-box" style="box-sizing: border-box; padding-top: 30px; aspect-ratio: auto 1 / 1"></div><div id="aspect-ratio-after" style="height: 10px"></div></div>+<div class="mc" id="top-edge" style="columns: 2; column-fill: auto; height: 100px; width: 400px"><div id="top-edge-box"><div style="height: 50px"></div><div id="top-edge-inner" style="break-before: column; margin-top: 30px; height: 20px"></div></div></div>+<div class="mc" id="bottom-edge" style="columns: 2; width: 400px"><div><div style="height: 20px; margin-bottom: 30px; break-after: column"></div><div style="height: 20px"></div></div></div>+<div class="mc" id="bottom-edge-fill" style="columns: 2; column-fill: auto; width: 400px"><div><div style="height: 20px; margin-bottom: 30px; break-after: column"></div><div style="height: 20px"></div></div></div>+<script>+ function rects(id, containerId) {+ const origin = document.getElementById(containerId).getBoundingClientRect();+ return [...document.getElementById(id).getClientRects()].map(rect => `${rect.x - origin.x},${rect.y - origin.y} ${rect.width}x${rect.height}`).join(" ");+ }+ test(() => {+ for (const id of ["padding-bottom", "float", "forced-in-avoid-balanced", "bottom-edge", "bottom-edge-fill"])+ println(`${id}: height ${document.getElementById(id).offsetHeight}`);+ println(`float box: ${rects("float-box", "float")}`);+ for (const id of ["forced-in-avoid", "forced-in-avoid-balanced", "collapse-through", "block-in-inline", "aspect-ratio", "top-edge"])+ println(`${id} box: ${rects(`${id}-box`, id)}`);+ println(`aspect-ratio after: ${rects("aspect-ratio-after", "aspect-ratio")}`);+ println(`top-edge inner: ${rects("top-edge-inner", "top-edge")}`);+ });+</script>diff --git a/Tests/LibWeb/Text/input/multicol-float-below-pending-margin.html b/Tests/LibWeb/Text/input/multicol-float-below-pending-margin.htmlnew file mode 100644index 00000000000..a214b0c8668--- /dev/null+++ b/Tests/LibWeb/Text/input/multicol-float-below-pending-margin.html@@ -0,0 +1,18 @@+<!DOCTYPE html>+<script src="include.js"></script>+<style>+ body { margin: 0; }+ .multicol { columns: 2; column-gap: 20px; width: 420px; }+ .float { float: left; width: 50px; height: 100px; }+</style>+<div class="multicol" id="multicol"><article><p><span class="float" id="float"></span>text</p></article></div>+<div id="next" style="height: 10px"></div>+<script>+ test(() => {+ const multicol = document.getElementById("multicol").getBoundingClientRect();+ const float = document.getElementById("float").getBoundingClientRect();+ const next = document.getElementById("next").getBoundingClientRect();+ println(`float bottom inside multicol: ${float.bottom <= multicol.bottom}`);+ println(`next element below float: ${next.top >= float.bottom}`);+ });+</script>diff --git a/Tests/LibWeb/Text/input/multicol-list-item-columns.html b/Tests/LibWeb/Text/input/multicol-list-item-columns.htmlnew file mode 100644index 00000000000..920acc3789f--- /dev/null+++ b/Tests/LibWeb/Text/input/multicol-list-item-columns.html@@ -0,0 +1,23 @@+<!DOCTYPE html>+<script src="include.js"></script>+<style>+ body { margin: 0; font: 20px/20px monospace; }+ li { columns: 2; width: 300px; column-gap: 0; margin-bottom: 10px; }+</style>+<ul>+<li id="spanner"><div style="height: 30px"></div><div style="height: 30px; column-span: all"></div><div style="height: 4px"></div></li>+<li id="tall-line-height" style="line-height: 100px"><div style="height: 10px"></div><div style="height: 10px"></div><div style="height: 10px"></div><div style="height: 10px"></div><div style="height: 10px"></div><div style="height: 10px"></div></li>+<li id="empty"></li>+</ul>+<script>+ test(() => {+ for (const item of document.querySelectorAll("li")) {+ const origin = item.getBoundingClientRect();+ const children = Array.from(item.children).map(child => {+ const rect = child.getBoundingClientRect();+ return `${rect.x - origin.x},${rect.y - origin.y}`;+ });+ println(`${item.id}: height ${origin.height}, children ${children.join(" ")}`);+ }+ });+</script>diff --git a/Tests/LibWeb/Text/input/multicol-max-height-rows.html b/Tests/LibWeb/Text/input/multicol-max-height-rows.htmlnew file mode 100644index 00000000000..c7d4aa9fa8a--- /dev/null+++ b/Tests/LibWeb/Text/input/multicol-max-height-rows.html@@ -0,0 +1,25 @@+<!DOCTYPE html>+<script src="include.js"></script>+<style>+ body { margin: 0; }+ .multicol { columns: 2; column-gap: 0; width: 400px; margin-bottom: 10px; }+ .block { height: 20px; width: 50px; }+ .monolithic { height: 60px; width: 50px; display: flow-root; contain: size; }+ .spanner { column-span: all; height: 20px; }+</style>+<div class="multicol" id="spanner-after-capped-row" style="max-height: 60px"><div class="block"></div><div class="block"></div><div class="block"></div><div class="block"></div><div class="block"></div><div class="block"></div><div class="block"></div><div class="block"></div><div class="spanner"></div><div class="block"></div></div>+<div class="multicol" id="last-row-gets-remainder" style="max-height: 100px"><div class="block"></div><div class="block"></div><div class="block"></div><div class="block"></div><div class="spanner"></div><div class="block"></div><div class="block"></div><div class="block"></div><div class="block"></div><div class="block"></div><div class="block"></div><div class="block"></div><div class="block"></div><div class="block"></div><div class="block"></div></div>+<div class="multicol" id="filled-columns" style="columns: 3; column-fill: auto; max-height: 100px"><div class="monolithic"></div><div class="monolithic"></div><div class="monolithic"></div></div>+<div class="multicol" id="forced-break" style="column-fill: auto; max-height: 100px"><div class="block"></div><div class="block" style="break-before: column"></div></div>+<script>+ test(() => {+ for (const multicol of document.querySelectorAll(".multicol")) {+ const origin = multicol.getBoundingClientRect();+ const children = Array.from(multicol.children).map(child => {+ const rect = child.getBoundingClientRect();+ return `${rect.x - origin.x},${rect.y - origin.y}`;+ });+ println(`${multicol.id}: height ${origin.height}, children ${children.join(" ")}`);+ }+ });+</script>diff --git a/Tests/LibWeb/Text/input/multicol-spanner-formatting-context.html b/Tests/LibWeb/Text/input/multicol-spanner-formatting-context.htmlnew file mode 100644index 00000000000..6a2845d0ba5--- /dev/null+++ b/Tests/LibWeb/Text/input/multicol-spanner-formatting-context.html@@ -0,0 +1,28 @@+<!DOCTYPE html>+<script src="include.js"></script>+<style>+ body { margin: 0; }+ .case { columns: 2; column-gap: 0; width: 400px; margin-bottom: 20px; }+</style>+<div class="case" id="margins"><div style="height: 40px"></div><div id="margins-spanner" style="column-span: all"><p style="margin: 20px 0; height: 10px"></p></div><div style="height: 40px"></div></div>+<div class="case" id="float"><div style="height: 40px"></div><div id="float-spanner" style="column-span: all"><div style="float: left; width: 50px; height: 30px"></div></div><div style="height: 40px"></div></div>+<div class="case" id="after-spanner"><div style="height: 20px"></div><div style="column-span: all; height: 20px"></div><div id="after-spanner-block" style="margin-top: 30px; height: 10px"></div></div>+<div class="case" id="after-whitespace"><div style="height: 20px"></div>+<div style="column-span: all; height: 20px"></div>+<div id="after-whitespace-block" style="margin-top: 30px; height: 10px"></div></div>+<div class="case" id="not-a-spanner"><div style="transform: scale(1)"><div id="not-a-spanner-box" style="column-span: all; height: 60px"></div></div></div>+<script>+ function rectsIn(element, container) {+ const origin = container.getBoundingClientRect();+ return [...element.getClientRects()]+ .map(rect => `${rect.x - origin.x},${rect.y - origin.y} ${rect.width}x${rect.height}`)+ .join(" ");+ }++ test(() => {+ for (const [id, part] of [["margins", "spanner"], ["float", "spanner"], ["after-spanner", "block"], ["after-whitespace", "block"], ["not-a-spanner", "box"]]) {+ const container = document.getElementById(id);+ println(`${id}: ${container.offsetHeight}, ${part} ${rectsIn(document.getElementById(`${id}-${part}`), container)}`);+ }+ });+</script>diff --git a/Tests/LibWeb/Text/input/multicol-spanner-margins-and-dynamic-columns.html b/Tests/LibWeb/Text/input/multicol-spanner-margins-and-dynamic-columns.htmlnew file mode 100644index 00000000000..77f7342ae48--- /dev/null+++ b/Tests/LibWeb/Text/input/multicol-spanner-margins-and-dynamic-columns.html@@ -0,0 +1,25 @@+<!DOCTYPE html>+<script src="include.js"></script>+<style>+ body { margin: 0; }+</style>+<div id="adjacent" style="columns: 2; width: 400px"><div style="column-span: all; height: 20px; margin-bottom: 40px"></div><div id="second-spanner" style="column-span: all; height: 20px; margin-top: 40px"></div></div>+<div id="dynamic" style="width: 400px"> <div style="height: 40px"></div><div id="spanner" style="column-span: all"><p style="margin: 20px 0; height: 10px"></p></div><div style="height: 40px"></div></div>+<script>+ function spannerRect() {+ const container = document.getElementById("dynamic");+ const origin = container.getBoundingClientRect();+ const rect = document.getElementById("spanner").getBoundingClientRect();+ return `container ${container.offsetHeight}, spanner ${rect.y - origin.y} ${rect.width}x${rect.height}`;+ }+ test(() => {+ const adjacent = document.getElementById("adjacent");+ println(`adjacent: container ${adjacent.offsetHeight}, second spanner ${document.getElementById("second-spanner").offsetTop - adjacent.offsetTop}`);+ const dynamic = document.getElementById("dynamic");+ println(`before: ${spannerRect()}`);+ dynamic.style.columns = "2";+ println(`columns on: ${spannerRect()}`);+ dynamic.style.columns = "auto";+ println(`columns off: ${spannerRect()}`);+ });+</script>diff --git a/Tests/LibWeb/Text/input/multicol-table-wrapper-breaks.html b/Tests/LibWeb/Text/input/multicol-table-wrapper-breaks.htmlnew file mode 100644index 00000000000..60d65b2131d--- /dev/null+++ b/Tests/LibWeb/Text/input/multicol-table-wrapper-breaks.html@@ -0,0 +1,24 @@+<!DOCTYPE html>+<script src="include.js"></script>+<style>+ @font-face { font-family: Ahem; src: url(../../Ref/data/fonts/Ahem.ttf); }+ body { margin: 0; font: 20px/20px Ahem; }+ .block { height: 30px; }+ table { border-spacing: 0; }+ td { padding: 0; height: 20px; }+</style>+<div class="multicol" id="spanner" style="columns: 2; column-gap: 20px; width: 420px"><div class="block"></div><div class="block"></div><table id="spanner-table" style="column-span: all; width: 100%"><tr><td>T</td></tr></table><div class="block"></div><div class="block"></div></div>+<div class="multicol" id="break-after" style="columns: 3; column-gap: 20px; column-fill: auto; height: 100px; width: 640px"><div class="block"></div><table style="break-after: column"><tr><td>T</td></tr></table><div class="block" id="after-table"></div></div>+<div class="multicol" id="break-before" style="columns: 3; column-gap: 20px; column-fill: auto; height: 100px; width: 640px"><div class="block"></div><div style="display: table; break-before: column" id="display-table"><div style="display: table-cell">T</div></div></div>+<script>+ asyncTest(async done => {+ await document.fonts.load("20px Ahem");+ for (const id of ["spanner-table", "after-table", "display-table"]) {+ const element = document.getElementById(id);+ const origin = element.closest(".multicol").getBoundingClientRect();+ const rect = element.getBoundingClientRect();+ println(`${id}: ${rect.x - origin.x},${rect.y - origin.y} ${rect.width}x${rect.height}`);+ }+ done();+ });+</script>diff --git a/Tests/LibWeb/Text/input/multicol-unbreakable-own-line-root.html b/Tests/LibWeb/Text/input/multicol-unbreakable-own-line-root.htmlnew file mode 100644index 00000000000..b716c823bd8--- /dev/null+++ b/Tests/LibWeb/Text/input/multicol-unbreakable-own-line-root.html@@ -0,0 +1,18 @@+<!DOCTYPE html>+<script src="include.js"></script>+<style>+ body { margin: 0; }+ .block { height: 80px; margin-bottom: 10px; }+</style>+<div id="container" style="columns: 3; column-gap: 0; width: 600px"><a href="#"><div class="block"></div></a><a href="#"><div class="block"></div></a><a href="#"><div class="block"></div></a><a href="#"><div class="block"></div></a><a href="#"><div class="block"></div></a><a href="#"><div class="block"></div></a></div>+<script>+ test(() => {+ const container = document.getElementById("container");+ const origin = container.getBoundingClientRect();+ println(`container: ${container.offsetHeight}`);+ for (const block of container.querySelectorAll(".block")) {+ const rect = block.getBoundingClientRect();+ println(`block: ${rect.x - origin.x},${rect.y - origin.y}`);+ }+ });+</script>