Truly independent web browser
LibWeb: Break lines across the columns of a multicol container
Aliaksandr Kalenikd52b545c5392
diff --git a/Libraries/LibWeb/Rust/src/layout/block_formatting_context.rs b/Libraries/LibWeb/Rust/src/layout/block_formatting_context.rsindex 614a4f03162..fcc198b9014 100644--- a/Libraries/LibWeb/Rust/src/layout/block_formatting_context.rs+++ b/Libraries/LibWeb/Rust/src/layout/block_formatting_context.rs@@ -16,6 +16,13 @@ enum FragmentationStep {Stop,}+struct ColumnLayout {+ outcome: fragmentation::FragmentainerOutcome,+ consumed_block_size: CssPixels,+ baselines: formatting_context::DerivedBaselines,+ root_line_data: Option<std::sync::Arc<inline_content::InlineContent>>,+}+struct FragmentationState {container_block_offset_in_root: CssPixels,resume: Option<fragmentation::BlockResume>,@@ -234,6 +241,7 @@ pub(crate) struct BlockFormattingContext<'pass> {automatic_line_clamp_max_lines: Cell<Option<usize>>,automatic_line_clamp_block_size_exceeded: Cell<bool>,laying_out_invisible_line_clamp_content: Cell<bool>,+ column_inline_items: OnceCell<std::rc::Rc<inline_level_iterator::InlineItemCache>>,children_laid_out_in_fragmentainer: RefCell<HashMap<Node, (Node, Node)>>,multicol_automatic_content_block_size: Cell<Option<CssPixels>>,discard_block_start_margin_of_next_child: Cell<bool>,@@ -241,6 +249,7 @@ pub(crate) struct BlockFormattingContext<'pass> {pending_continuation_token: RefCell<Option<std::rc::Rc<fragmentation::BlockBreakToken>>>,incoming_container_token: RefCell<Option<std::rc::Rc<fragmentation::BlockBreakToken>>>,broken_child_token: RefCell<Option<std::rc::Rc<fragmentation::BlockBreakToken>>>,+ unbreakable_line_roots: RefCell<HashSet<Node>>,}impl<'pass> BlockFormattingContext<'pass> {@@ -293,6 +302,7 @@ impl<'pass> BlockFormattingContext<'pass> {automatic_line_clamp_max_lines: Cell::new(None),automatic_line_clamp_block_size_exceeded: Cell::new(false),laying_out_invisible_line_clamp_content: Cell::new(false),+ column_inline_items: OnceCell::new(),children_laid_out_in_fragmentainer: RefCell::new(HashMap::default()),multicol_automatic_content_block_size: Cell::new(None),discard_block_start_margin_of_next_child: Cell::new(false),@@ -300,6 +310,7 @@ impl<'pass> BlockFormattingContext<'pass> {pending_continuation_token: RefCell::new(None),incoming_container_token: RefCell::new(None),broken_child_token: RefCell::new(None),+ unbreakable_line_roots: RefCell::new(HashSet::default()),}}@@ -2183,10 +2194,10 @@ impl<'pass> BlockFormattingContext<'pass> {}),..input};+ self.incoming_container_token.replace(continuation.clone());if facts.children_are_inline() {self.layout_inline_children(run, node, inside_layout_input, space_available_for_children);} else {- self.incoming_container_token.replace(continuation.clone());self.layout_block_level_children(run, node, inside_layout_input, space_available_for_children);}if box_opens_top_margin_group {@@ -2711,7 +2722,9 @@ impl<'pass> BlockFormattingContext<'pass> {debug_assert_eq!(*resume_child, child);state.resume = None;}- Some(fragmentation::BlockResume::AfterChildren) => return FragmentationStep::Stop,+ Some(fragmentation::BlockResume::AfterChildren | fragmentation::BlockResume::AtLine(_)) => {+ return FragmentationStep::Stop;+ }Some(fragmentation::BlockResume::InsideChild {child: resume_child,token,@@ -2802,11 +2815,78 @@ impl<'pass> BlockFormattingContext<'pass> {FragmentationStep::LayOut}+ pub(crate) fn line_root_fragmentation(&self, line_root: Node) -> Option<fragmentation::LineRootFragmentation> {+ let fragmentainer = self.run.fragmentainer.as_deref()?;+ let incoming = if line_root == self.run.box_ {+ fragmentainer.incoming.clone()+ } else {+ self.incoming_container_token+ .borrow_mut()+ .take_if(|token| token.node == line_root)+ };+ let resume = match incoming.as_deref().map(|token| &token.resume) {+ Some(fragmentation::BlockResume::AtLine(position)) => Some(*position),+ _ => None,+ };+ Some(fragmentation::LineRootFragmentation {+ block_size: fragmentainer.block_size,+ resume,+ fragmentainer_had_content: self.fragmentainer_has_content.get(),+ })+ }++ pub(crate) fn note_line_for_fragmentation(+ &self,+ line_block_size: CssPixels,+ line_block_end_in_root: CssPixels,+ is_kept: bool,+ ) {+ let Some(fragmentainer) = self.run.fragmentainer.as_deref() else {+ return;+ };+ fragmentainer.note_unbreakable_block_size(line_block_size);+ if fragmentainer.exceeds(line_block_end_in_root) {+ fragmentainer.note_space_shortage(line_block_end_in_root);+ }+ if is_kept {+ self.fragmentainer_has_content.set(true);+ }+ }++ pub(crate) fn note_unbreakable_line_root(&self, line_root: Node, lines_block_end_in_root: CssPixels) {+ self.unbreakable_line_roots.borrow_mut().insert(line_root);+ if line_root != self.run.box_ {+ return;+ }+ let Some(fragmentainer) = self.run.fragmentainer.as_deref() else {+ return;+ };+ 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);+ }+ }++ pub(crate) fn request_early_break_before(&self, node: Node) {+ if let Some(fragmentainer) = self.run.fragmentainer.as_deref() {+ fragmentainer.outcome_mut().needs_early_break_before = Some(node);+ }+ }++ pub(crate) fn break_line_root_before_line(&self, line_root: Node, line_start: fragmentation::LinePosition) {+ let Some(fragmentainer) = self.run.fragmentainer.as_deref() else {+ return;+ };+ self.stop_fragmentainer(fragmentainer, line_root, fragmentation::BlockResume::AtLine(line_start));+ }+fn child_is_breakable(&self, child: Node) -> bool {let facts = self.facts(child);facts.is_block_container()&& formatting_context::formatting_context_type_created_by_box(facts).is_none()- && (!facts.children_are_inline() || !self.has_lines(child))+ && (!facts.children_are_inline()+ || !self.has_lines(child)+ || !self.unbreakable_line_roots.borrow().contains(&child))&& !facts.is_fieldset_box()&& !facts.is_table_wrapper()}@@ -2910,18 +2990,30 @@ impl<'pass> BlockFormattingContext<'pass> {let column_block_size = self.column_block_size(input, column_input, geometry, definite_block_size);let mut baselines = formatting_context::DerivedBaselines::default();+ let mut root_line_count = 0;+ let mut root_line_data_of_columns = Vec::new();let mut incoming = None;let mut content_block_size = CssPixels::default();let mut column_index = 0;loop {- let (outcome, consumed_block_size, column_baselines) = self.layout_column(+ let ColumnLayout {+ outcome,+ consumed_block_size,+ baselines: column_baselines,+ root_line_data,+ } = self.layout_column(self.run.purpose,column_input,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)));}@@ -2937,6 +3029,11 @@ impl<'pass> BlockFormattingContext<'pass> {incoming = Some(outgoing);column_index += 1;}+ 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 = column_block_size.unwrap_or(content_block_size);root_used.rare_data_mut().multicol_layout_data = Some(std::sync::Arc::new(fragmentation::MulticolLayoutData {column_inline_size: geometry.inline_size,@@ -2996,24 +3093,7 @@ impl<'pass> BlockFormattingContext<'pass> {) -> CssPixels {let clamp = |block_size: CssPixels| maximum_block_size.map_or(block_size, |maximum| block_size.min(maximum));- let mut runs = Vec::new();- let mut tallest_unbreakable_block_size = CssPixels::default();- let mut incoming = None;- loop {- let (outcome, consumed_block_size, _) = self.layout_column(- formatting_context::LayoutPurpose::Measurement,- column_input,- None,- incoming,- FfiCssPixelPoint::default(),- );- tallest_unbreakable_block_size = tallest_unbreakable_block_size.max(outcome.tallest_unbreakable_block_size);- runs.push(consumed_block_size);- incoming = outcome.outgoing;- if incoming.is_none() || runs.len() >= fragmentation::MAXIMUM_COLUMN_COUNT {- break;- }- }+ let (runs, tallest_unbreakable_block_size) = self.measure_runs_between_forced_breaks(column_input);let mut implicit_breaks = vec![0usize; runs.len()];for _ in runs.len()..geometry.count {@@ -3040,12 +3120,13 @@ impl<'pass> BlockFormattingContext<'pass> {let mut forced_break_count = 0;let mut minimal_space_shortage: Option<CssPixels> = None;loop {- let (outcome, _, _) = self.layout_column(+ let ColumnLayout { outcome, .. } = self.layout_column(formatting_context::LayoutPurpose::Measurement,column_input,Some(block_size),incoming,FfiCssPixelPoint::default(),+ 0,);column_count += 1;if outcome.ended_at_forced_break() {@@ -3078,6 +3159,33 @@ impl<'pass> BlockFormattingContext<'pass> {block_size}+ fn measure_runs_between_forced_breaks(&self, column_input: LayoutInput) -> (Vec<CssPixels>, CssPixels) {+ let mut runs = Vec::new();+ let mut tallest_unbreakable_block_size = CssPixels::default();+ let mut incoming = None;+ loop {+ let ColumnLayout {+ outcome,+ consumed_block_size,+ ..+ } = self.layout_column(+ formatting_context::LayoutPurpose::Measurement,+ column_input,+ None,+ incoming,+ FfiCssPixelPoint::default(),+ 0,+ );+ tallest_unbreakable_block_size = tallest_unbreakable_block_size.max(outcome.tallest_unbreakable_block_size);+ runs.push(consumed_block_size);+ incoming = outcome.outgoing;+ if incoming.is_none() || runs.len() >= fragmentation::MAXIMUM_COLUMN_COUNT {+ break;+ }+ }+ (runs, tallest_unbreakable_block_size)+ }+fn layout_column(&self,purpose: formatting_context::LayoutPurpose,@@ -3085,18 +3193,17 @@ impl<'pass> BlockFormattingContext<'pass> {block_size: Option<CssPixels>,incoming: Option<std::rc::Rc<fragmentation::BlockBreakToken>>,origin: FfiCssPixelPoint,- ) -> (- fragmentation::FragmentainerOutcome,- CssPixels,- formatting_context::DerivedBaselines,- ) {+ root_line_index_offset: usize,+ ) -> ColumnLayout {let mut early_break_before = None;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,incoming.clone(),+ inline_items.clone(),early_break_before,));let journals_stored_entries = self.run.fragments.is_some();@@ -3138,13 +3245,14 @@ impl<'pass> BlockFormattingContext<'pass> {if purpose == formatting_context::LayoutPurpose::Commit&& let (Some(fragments), Some(root)) = (self.run.fragments.as_deref(), outputs.root){- fragments.adopt_fragmentainer_root(root, origin);+ fragments.adopt_fragmentainer_root(root, origin, root_line_index_offset);}- return (+ return ColumnLayout {outcome,- outputs.result.automatic_content_block_size,- outputs.result.baselines,- );+ consumed_block_size: outputs.result.automatic_content_block_size,+ baselines: outputs.result.baselines,+ root_line_data: outputs.root_outcome.line_data,+ };}}diff --git a/Libraries/LibWeb/Rust/src/layout/fc_run_cache.rs b/Libraries/LibWeb/Rust/src/layout/fc_run_cache.rsindex be138aca632..496983fe7ad 100644--- a/Libraries/LibWeb/Rust/src/layout/fc_run_cache.rs+++ b/Libraries/LibWeb/Rust/src/layout/fc_run_cache.rs@@ -328,6 +328,18 @@ impl FcRunCacheArenaStore {}}+ pub(crate) fn remove_entries_stored_in_open_journal(&self, slots: impl IntoIterator<Item = u32>) {+ let stored: HashSet<u32> = match self.store_journals.borrow().last() {+ Some(journal) if !journal.is_empty() => journal.iter().copied().collect(),+ _ => return,+ };+ for slot in slots {+ if stored.contains(&slot) {+ self.remove_entry(slot);+ }+ }+ }+fn enqueue_for_sweep(&self, slot: u32) {let mut enrolled = self.enrolled_for_sweep.borrow_mut();if enrolled.len() <= slot as usize {diff --git a/Libraries/LibWeb/Rust/src/layout/fragment_tree.rs b/Libraries/LibWeb/Rust/src/layout/fragment_tree.rsindex d5967b5ec31..337a6e108d8 100644--- a/Libraries/LibWeb/Rust/src/layout/fragment_tree.rs+++ b/Libraries/LibWeb/Rust/src/layout/fragment_tree.rs@@ -1059,7 +1059,12 @@ impl RunFragmentBuilder {);}- pub(crate) fn adopt_fragmentainer_root(&self, root: UnplacedRootFragment, offset: FfiCssPixelPoint) {+ pub(crate) fn adopt_fragmentainer_root(+ &self,+ root: UnplacedRootFragment,+ offset: FfiCssPixelPoint,+ root_line_index_offset: usize,+ ) {debug_assert!(root.node == self.root_node,"a fragmentainer run's root is the box of the run that adopts it"@@ -1068,6 +1073,11 @@ impl RunFragmentBuilder {inner.reused_subtree_roots.extend(root.reused_subtree_roots);for mut link in root.scoped_descendants {link.committed_offset = formatting_context::point_add(link.committed_offset, offset);+ if link.containing_block == self.root_node+ && let Some(line_index) = link.containing_line_box_index.as_mut()+ {+ *line_index += root_line_index_offset;+ }inner.top_scope_links.push(link);}for mut entry in root.propagated_pending_abspos {diff --git a/Libraries/LibWeb/Rust/src/layout/fragmentation.rs b/Libraries/LibWeb/Rust/src/layout/fragmentation.rsindex e32b3b24aa5..1b5be28fa08 100644--- a/Libraries/LibWeb/Rust/src/layout/fragmentation.rs+++ b/Libraries/LibWeb/Rust/src/layout/fragmentation.rs@@ -101,6 +101,13 @@ pub(crate) enum BlockResume {BeforeChild { child: Node, after_forced_break: bool },InsideChild { child: Node, token: Rc<BlockBreakToken> },AfterChildren,+ AtLine(LinePosition),+}++#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]+pub(crate) struct LinePosition {+ pub(crate) item_index: usize,+ pub(crate) offset_in_node: usize,}#[derive(Clone, Debug, PartialEq, Eq)]@@ -115,11 +122,18 @@ impl BlockBreakToken {match &self.resume {BlockResume::BeforeChild { after_forced_break, .. } => *after_forced_break,BlockResume::InsideChild { token, .. } => token.ends_at_forced_break(),- BlockResume::AfterChildren => false,+ BlockResume::AfterChildren | BlockResume::AtLine(_) => false,}}}+#[derive(Clone, Copy, Debug)]+pub(crate) struct LineRootFragmentation {+ pub(crate) block_size: Option<CssPixels>,+ pub(crate) resume: Option<LinePosition>,+ pub(crate) fragmentainer_had_content: bool,+}+#[derive(Clone, Debug, Default)]pub(crate) struct FragmentainerOutcome {pub(crate) outgoing: Option<Rc<BlockBreakToken>>,@@ -137,6 +151,7 @@ impl FragmentainerOutcome {pub(crate) struct FragmentainerContext {pub(crate) block_size: Option<CssPixels>,pub(crate) incoming: Option<Rc<BlockBreakToken>>,+ pub(crate) inline_items: Rc<inline_level_iterator::InlineItemCache>,pub(crate) early_break_before: Option<Node>,outcome: RefCell<FragmentainerOutcome>,}@@ -145,11 +160,13 @@ impl FragmentainerContext {pub(crate) fn new(block_size: Option<CssPixels>,incoming: Option<Rc<BlockBreakToken>>,+ inline_items: Rc<inline_level_iterator::InlineItemCache>,early_break_before: Option<Node>,) -> Self {Self {block_size,incoming,+ inline_items,early_break_before,outcome: RefCell::new(FragmentainerOutcome::default()),}diff --git a/Libraries/LibWeb/Rust/src/layout/inline_content.rs b/Libraries/LibWeb/Rust/src/layout/inline_content.rsindex 7496c739792..9e1b0cc1dc6 100644--- a/Libraries/LibWeb/Rust/src/layout/inline_content.rs+++ b/Libraries/LibWeb/Rust/src/layout/inline_content.rs@@ -9,6 +9,7 @@ use super::geometry::AvailableSize;use super::layout_node_arena::LayoutNodeArena;use super::node_data::NodeSlotId;use super::{formatting_context, inline_formatting_context, used_values};+use crate::css::style::fast_hash::FastSet as HashSet;// Finalized inline output shared by committed fragments, formatting-context caches and painting.// Glyph buffers move here from the line builder and own their fonts. No borrowed text or mutable@@ -226,30 +227,91 @@ impl InlineContent {pub(crate) fn merge_box_fragments<'content>(contents: impl Iterator<Item = Option<&'content InlineContent>>,) -> Option<std::sync::Arc<InlineContent>> {- let contents: Vec<(u32, &InlineContent)> = contents+ let contents: Vec<(&InlineContent, u32, used_values::FfiCssPixelPoint)> = contents.enumerate()- .filter_map(|(index, content)| content.map(|content| (index as u32, content)))+ .filter_map(|(index, content)| {+ content.map(|content| (content, index as u32, used_values::FfiCssPixelPoint::default()))+ }).collect();if contents.is_empty() {return None;}- let interleaves = contents.iter().any(|(_, content)| !content.items.is_empty());- let mut merged = InlineContent::default();- for (box_fragment, content) in contents {- merged.append(content, interleaves, box_fragment);+ Some(Self::combine(&contents))+ }++ pub(crate) fn concatenate_translated(+ contents: &[(std::sync::Arc<InlineContent>, used_values::FfiCssPixelPoint)],+ ) -> std::sync::Arc<InlineContent> {+ let contents: Vec<(&InlineContent, u32, used_values::FfiCssPixelPoint)> = contents+ .iter()+ .map(|(content, offset)| (&**content, 0, *offset))+ .collect();+ Self::combine(&contents)+ }++ fn combine(contents: &[(&InlineContent, u32, used_values::FfiCssPixelPoint)]) -> std::sync::Arc<InlineContent> {+ let interleaves = contents.iter().any(|(content, ..)| !content.items.is_empty());+ let mut combined = InlineContent::default();+ for (content, box_fragment, offset) in contents {+ combined.append_translated(content, interleaves, *box_fragment, *offset);+ }+ combined.drop_repeated_placeholder_pieces();+ std::sync::Arc::new(combined)+ }++ fn drop_repeated_placeholder_pieces(&mut self) {+ let is_placeholder =+ |piece: &InlineBoxPieceRecord| piece.is_geometry_only_placeholder && piece.fragment_count == 0;+ if !self.inline_box_pieces.iter().any(is_placeholder) {+ return;+ }+ let mut nodes_with_pieces: HashSet<NodeSlotId> = self+ .inline_box_pieces+ .iter()+ .filter(|piece| !is_placeholder(piece))+ .map(|piece| piece.node)+ .collect();+ let mut new_indices = Vec::with_capacity(self.inline_box_pieces.len());+ let mut kept_count = 0u32;+ self.inline_box_pieces.retain(|piece| {+ let keep = !is_placeholder(piece) || nodes_with_pieces.insert(piece.node);+ new_indices.push(kept_count);+ kept_count += u32::from(keep);+ keep+ });+ for item in &mut self.items {+ if let InlineItem::BoxPiece(index) = item {+ *index = new_indices[*index as usize];+ }}- Some(std::sync::Arc::new(merged))}- fn append(&mut self, content: &InlineContent, interleaves: bool, box_fragment: u32) {+ fn append_translated(+ &mut self,+ content: &InlineContent,+ interleaves: bool,+ box_fragment: u32,+ offset: used_values::FfiCssPixelPoint,+ ) {let line_offset = self.lines.len() as u32;let fragment_offset = self.fragments.len() as u32;let piece_offset = self.inline_box_pieces.len() as u32;- self.lines- .extend(content.lines.iter().map(|line| LineRecord { box_fragment, ..*line }));+ self.lines.extend(content.lines.iter().map(|line| {+ let mut line = LineRecord { box_fragment, ..*line };+ line.rect.x += offset.x;+ line.rect.y += offset.y;+ line.block_start += offset.y;+ line.block_end += offset.y;+ line.next_line_block_offset += offset.y;+ line+ }));self.fragments.extend(content.fragments.iter().cloned().map(|mut fragment| {fragment.line_index += line_offset;+ let (inline_delta, block_delta) =+ super::geometry::to_physical(fragment.writing_mode, offset.x, offset.y);+ fragment.inline_offset += inline_delta;+ fragment.block_offset += block_delta;fragment}));self.inline_box_pieces@@ -257,6 +319,9 @@ impl InlineContent {let mut piece = *piece;piece.line_index += line_offset;piece.first_fragment_index += fragment_offset;+ piece.border_box_rect.x += offset.x;+ piece.border_box_rect.y += offset.y;+ piece.baseline += offset.y;piece}));if !interleaves {diff --git a/Libraries/LibWeb/Rust/src/layout/inline_formatting_context.rs b/Libraries/LibWeb/Rust/src/layout/inline_formatting_context.rsindex 202e75ce077..be0a6ed9adb 100644--- a/Libraries/LibWeb/Rust/src/layout/inline_formatting_context.rs+++ b/Libraries/LibWeb/Rust/src/layout/inline_formatting_context.rs@@ -716,8 +716,10 @@ pub(crate) fn compute(}continue;};- let first = first_line_with_content == Some(line.line_index);- let last = last_line_with_content == Some(line.line_index);+ let first = first_line_with_content == Some(line.line_index)+ && !context.inline_boxes_continued_from_previous_fragment.contains(&node);+ let last = last_line_with_content == Some(line.line_index)+ && !context.inline_boxes_continued_in_next_fragment.borrow().contains(&node);let has_low_edge = if reversed { last } else { first };let has_high_edge = if reversed { first } else { last };let content_block_start = line@@ -972,6 +974,46 @@ pub(crate) fn accumulated_relative_insets_from_inline_ancestor_chain(result}+struct FragmentainerLineLimit {+ block_size: CssPixels,+ widows: usize,+ checked_line_count: usize,+ lines_past_end: usize,+ minimum_line_block_size: Option<CssPixels>,+}++impl FragmentainerLineLimit {+ fn is_reached(&mut self, context: &InlineFormattingContext<'_>) -> bool {+ let data = context.line_data();+ let finished_line_count = data.line_boxes.len().saturating_sub(1);+ if finished_line_count <= self.checked_line_count {+ return false;+ }+ let root_block_offset = context.content_box_position_in_bfc_root().y;+ for line in data.line_boxes[self.checked_line_count..finished_line_count]+ .iter()+ .filter(|line| !line.is_empty())+ {+ let line_block_size = line.block_end - line.block_start;+ self.minimum_line_block_size = Some(+ self.minimum_line_block_size+ .map_or(line_block_size, |minimum| minimum.min(line_block_size)),+ );+ if root_block_offset + line.block_end > self.block_size {+ self.lines_past_end += 1;+ }+ }+ self.checked_line_count = finished_line_count;+ let lines_per_fragmentainer = self+ .minimum_line_block_size+ .filter(|minimum| *minimum > CssPixels::default())+ .map_or(usize::MAX, |minimum| {+ (self.block_size.to_double() / minimum.to_double()) as usize + 1+ });+ self.lines_past_end > self.widows.min(lines_per_fragmentainer)+ }+}+pub(crate) struct InlineFormattingContext<'context> {pub(crate) run: &'context FormattingContextRun<'context>,pub(crate) containing_block: Node,@@ -984,6 +1026,9 @@ pub(crate) struct InlineFormattingContext<'context> {pub(crate) automatic_content_inline_size: CssPixels,pub(crate) min_content_inline_size_from_max_content_layout: Option<CssPixels>,pub(crate) automatic_content_block_size: CssPixels,+ pub(crate) current_line_start: Cell<fragmentation::LinePosition>,+ inline_boxes_continued_from_previous_fragment: Vec<Node>,+ inline_boxes_continued_in_next_fragment: RefCell<Vec<Node>>,block_axis_float_clearance: Cell<CssPixels>,}@@ -1010,6 +1055,9 @@ impl<'context> InlineFormattingContext<'context> {automatic_content_inline_size: CssPixels::default(),min_content_inline_size_from_max_content_layout: None,automatic_content_block_size: CssPixels::default(),+ current_line_start: Cell::new(fragmentation::LinePosition::default()),+ inline_boxes_continued_from_previous_fragment: Vec::new(),+ inline_boxes_continued_in_next_fragment: RefCell::new(Vec::new()),block_axis_float_clearance: Cell::new(CssPixels::default()),}}@@ -1022,6 +1070,13 @@ impl<'context> InlineFormattingContext<'context> {self.block_axis_float_clearance.set(clearance);}+ fn forget_cached_runs_of_subtree(&self, node: Node) {+ let arena = self.callbacks.arena();+ let mut slots = Vec::new();+ arena.for_each_node_in_layout_subtree_in_pre_order(node, |node| slots.push(node.slot_index()));+ arena.fc_run_cache_store().remove_entries_stored_in_open_journal(slots);+ }+fn hide_atomic_inline_for_line_clamp(&self, node: Node) {if let Some(fragments) = self.run.fragments.as_deref() {fragments.discard_unplaced_subtree(node, self.used(node));@@ -1064,14 +1119,7 @@ impl<'context> InlineFormattingContext<'context> {has_immediate_continuation: bool,line_block_end: CssPixels,) {- let content_box_position_in_bfc_root = self- .input- .content_box_position_in_bfc_root- .expect("line clamping requires the containing block position in the BFC root");- let block_offset_adjustment = self- .parent- .block_offset_adjustment_from_pending_ancestor_block_start_margins(self.containing_block);- let line_block_end_in_bfc_root = content_box_position_in_bfc_root.y + block_offset_adjustment + line_block_end;+ let line_block_end_in_bfc_root = self.content_box_position_in_bfc_root().y + line_block_end;let mut line_data = self.line_data_mut();let line = &mut line_data.line_boxes[line_index];if self.parent.register_line_for_line_clamp(@@ -1160,6 +1208,23 @@ impl<'context> InlineFormattingContext<'context> {self.callbacks.next_sibling(node)}+ fn fragmented_inline_ancestors(&self, node: Node) -> Vec<Node> {+ let mut ancestors = Vec::new();+ let mut ancestor = self.nearest_fragmented_inline_ancestor(node);+ while !ancestor.is_invalid() {+ ancestors.push(ancestor);+ ancestor = self.nearest_fragmented_inline_ancestor(ancestor);+ }+ ancestors+ }++ fn fragmented_inline_ancestors_spanning(&self, before: Node, after: Node) -> Vec<Node> {+ let after_ancestors = self.fragmented_inline_ancestors(after);+ let mut ancestors = self.fragmented_inline_ancestors(before);+ ancestors.retain(|ancestor| after_ancestors.contains(ancestor));+ ancestors+ }+pub(crate) fn nearest_fragmented_inline_ancestor(&self, node: Node) -> Node {let mut ancestor = self.parent_node(node);while !ancestor.is_invalid() {@@ -1200,21 +1265,29 @@ impl<'context> InlineFormattingContext<'context> {self.parent.commit_pending_margin_before_inline_content()}+ fn content_box_position_in_bfc_root(&self) -> FfiCssPixelPoint {+ let position = self+ .input+ .content_box_position_in_bfc_root+ .expect("inline layout requires the containing block position in the BFC root");+ FfiCssPixelPoint {+ x: position.x,+ y: position.y+ + self+ .parent+ .block_offset_adjustment_from_pending_ancestor_block_start_margins(self.containing_block),+ }+ }+pub(crate) fn intrusion_by_floats_into_containing_block(&self,block_start: CssPixels,block_end: CssPixels,) -> SpaceUsedByFloats {- let content_box_position_in_bfc_root = self- .input- .content_box_position_in_bfc_root- .expect("float intrusion requires the containing block position in the BFC root");- let adjustment = self- .parent- .block_offset_adjustment_from_pending_ancestor_block_start_margins(self.containing_block);+ let content_box_position_in_bfc_root = self.content_box_position_in_bfc_root();let rect = FfiCssPixelRect {x: content_box_position_in_bfc_root.x,- y: content_box_position_in_bfc_root.y + adjustment,+ y: content_box_position_in_bfc_root.y,width: self.containing_used().content_inline_size.get(),height: self.containing_used().content_block_size.get(),};@@ -1255,21 +1328,14 @@ impl<'context> InlineFormattingContext<'context> {}pub(crate) fn next_float_band_block_start_after(&self, block_offset: CssPixels) -> Option<CssPixels> {- let content_box_position_in_bfc_root = self- .input- .content_box_position_in_bfc_root- .expect("float-band lookup requires the containing block position in the BFC root");- let adjustment = self- .parent- .block_offset_adjustment_from_pending_ancestor_block_start_margins(self.containing_block);- let containing_block_offset_in_root = content_box_position_in_bfc_root.y + adjustment;+ let containing_block_offset_in_root = self.content_box_position_in_bfc_root().y;let next = self.parent.next_float_band_block_start_after(containing_block_offset_in_root + block_offset);next.map(|next| next - containing_block_offset_in_root)}- fn layout_inside(&mut self, node: Node, available_space: AvailableSpace) -> DerivedBaselines {+ fn layout_inside(&self, node: Node, available_space: AvailableSpace) -> DerivedBaselines {let input = LayoutInput::new(available_space,self.input.containing_block_constraints,@@ -1293,7 +1359,7 @@ impl<'context> InlineFormattingContext<'context> {}}- pub(crate) fn dimension_box_on_line(&mut self, node: Node) -> DerivedBaselines {+ pub(crate) fn dimension_box_on_line(&self, node: Node) -> DerivedBaselines {let available_space = self.input.available_space;let facts = self.facts(node);// Any fragmented inline box should have generated line box fragments already.@@ -1373,6 +1439,7 @@ impl<'context> InlineFormattingContext<'context> {}let fragment_end = fragment_start + retained_line.fragment_count as usize;let line = line_box::LineBoxData {+ start: fragmentation::LinePosition::default(),record: *retained_line,fragments: previous.fragments[fragment_start..fragment_end].iter()@@ -1608,29 +1675,42 @@ impl<'context> InlineFormattingContext<'context> {&& self.input.available_space.inline_size != AvailableSize::MinContent)}+ fn set_current_line_start_offset(&self, item_index: usize, offset_in_node: usize) {+ self.current_line_start.set(fragmentation::LinePosition {+ item_index,+ offset_in_node,+ });+ }+fn break_overflowing_text_item(&self,line_builder: &mut line_builder::LineBuilder<'_, '_>,item: &mut inline_level_iterator::Item,- ) {+ item_index: usize,+ mut line_limit: Option<&mut FragmentainerLineLimit>,+ ) -> bool {if line_builder.remaining_inline_size_for_overflow_break().is_none_or(|remaining_inline_size| item.border_box_inline_size() <= remaining_inline_size){- return;+ return false;}let style = self.style(self.parent_node(item.node));let text_content = self.callbacks.text_content(item.node);let letter_spacing = style.letter_spacing().to_double() as f32;let word_spacing = style.word_spacing().to_double() as f32;loop {+ if line_limit.as_deref_mut().is_some_and(|limit| limit.is_reached(self)) {+ return true;+ }let Some(remaining_inline_size) = line_builder.remaining_inline_size_for_overflow_break() else {- return;+ return false;};if item.border_box_inline_size() <= remaining_inline_size {- return;+ return false;}let line_is_empty = self.line_data().line_boxes.last().is_some_and(|line| line.is_empty());+ self.set_current_line_start_offset(item_index, item.offset_in_node);if line_is_empty && line_builder.current_line_has_no_space_left_by_floats() {line_builder.break_line(line_builder::ForcedBreak::No, NodeSlotId::INVALID, None);continue;@@ -1645,7 +1725,7 @@ impl<'context> InlineFormattingContext<'context> {);let Some(mut prefix) = split_item else {if line_is_empty {- return;+ return false;}line_builder.break_line(line_builder::ForcedBreak::No,@@ -1655,6 +1735,7 @@ impl<'context> InlineFormattingContext<'context> {continue;};line_builder.append_text_item(&mut prefix, style.line_height());+ self.set_current_line_start_offset(item_index, item.offset_in_node);line_builder.break_line(line_builder::ForcedBreak::No, NodeSlotId::INVALID, None);}}@@ -1663,7 +1744,9 @@ impl<'context> InlineFormattingContext<'context> {self.min_content_inline_size_from_max_content_layout =self.min_content_inline_size_from_max_content_items(iterator.items());self.fragmented_inlines_in_pre_order = iterator.fragmented_inlines_in_pre_order(self);- let (reused_lines, reused_item_count) = if self.parent.has_line_clamp() {+ let fragmentation = self.parent.line_root_fragmentation(self.containing_block);+ let resume = fragmentation.and_then(|fragmentation| fragmentation.resume);+ let (reused_lines, reused_item_count) = if self.parent.has_line_clamp() || resume.is_some() {Default::default()} else {self.run@@ -1678,9 +1761,51 @@ impl<'context> InlineFormattingContext<'context> {data.inline_box_pieces.clear();data.lines_after_clamp_point_rect = None;}- iterator.skip_items(reused_item_count);+ let item_count = iterator.items().len();+ let start_item_index = resume.map_or(reused_item_count, |resume| resume.item_index.min(item_count));+ let shares_items = iterator.shares_items();+ let skipped_atomic_inlines: Vec<Node> = if resume.is_some() && !shares_items {+ iterator.items()[..start_item_index]+ .iter()+ .filter(|item| item.type_ == inline_level_iterator::ItemType::Element)+ .map(|item| item.node)+ .collect()+ } else {+ Vec::new()+ };+ let mut pending_resume_offset = resume.map(|resume| resume.offset_in_node);+ self.inline_boxes_continued_from_previous_fragment = {+ let (before, after) = iterator.items().split_at(start_item_index.min(item_count));+ let has_node = |item: &&inline_level_iterator::Item| !item.node.is_invalid();+ let left_fragment = |item: &&inline_level_iterator::Item| {+ has_node(item)+ && item.type_ != inline_level_iterator::ItemType::ForcedBreak+ && item.type_ != inline_level_iterator::ItemType::AbsolutelyPositionedElement+ && !item.is_collapsible_whitespace+ };+ match after.first() {+ Some(item) if pending_resume_offset.is_some_and(|offset| offset > item.offset_in_node) => {+ self.fragmented_inline_ancestors(item.node)+ }+ _ if resume.is_some() => match (before.iter().rev().find(left_fragment), after.iter().find(has_node)) {+ (Some(before), Some(after)) => self.fragmented_inline_ancestors_spanning(before.node, after.node),+ _ => Vec::new(),+ },+ _ => Vec::new(),+ }+ };+ let resumes_after_forced_break = resume.is_some()+ && start_item_index > 0+ && iterator.items()[start_item_index - 1].type_ == inline_level_iterator::ItemType::ForcedBreak;+ iterator.skip_items(start_item_index);+ self.current_line_start.set(fragmentation::LinePosition {+ item_index: start_item_index,+ offset_in_node: pending_resume_offset.unwrap_or_default(),+ });let reused_line_count = self.line_data().line_boxes.len();- let mut line_builder = if reused_line_count == 0 {+ let mut line_builder = if resume.is_some() {+ line_builder::LineBuilder::new_for_continuation(self, resumes_after_forced_break)+ } else if reused_line_count == 0 {line_builder::LineBuilder::new(self)} else {line_builder::LineBuilder::new_after_reused_lines(self)@@ -1695,13 +1820,71 @@ impl<'context> InlineFormattingContext<'context> {let mut state_at_clamp_point = None;let mut items_after_clamp_point = Vec::new();let mut floating_boxes_after_clamp_point = Vec::new();+ let floating_box_count_before_lines = self.parent.floating_box_count();+ let mut line_limit = fragmentation+ .filter(|_| !self.parent.has_line_clamp())+ .and_then(|fragmentation| fragmentation.block_size)+ .filter(|_| {+ shares_items+ || iterator.items().iter().all(|item| {+ matches!(+ item.type_,+ inline_level_iterator::ItemType::Text+ | inline_level_iterator::ItemType::Element+ | inline_level_iterator::ItemType::ForcedBreak+ | inline_level_iterator::ItemType::AbsolutelyPositionedElement+ )+ })+ })+ .map(|block_size| FragmentainerLineLimit {+ block_size,+ widows: 1,+ checked_line_count: 0,+ lines_past_end: 0,+ minimum_line_block_size: None,+ });+ let mut stopped_at_line_limit = false;+ let mut consumed_item_nodes = (self.run.fragmentainer.is_some()+ && self.run.fragments.is_some()+ && !iterator.entered_inline_boxes().is_empty())+ .then(Vec::new);loop {if self.stops_at_line_clamp_point(&line_builder, &mut state_at_clamp_point) {break;}+ if line_limit.as_mut().is_some_and(|limit| limit.is_reached(self)) {+ stopped_at_line_limit = true;+ break;+ }let Some(mut item) = iterator.next() else {break;};+ let item_index = item_count - iterator.items().len() - 1;+ if let Some(consumed_item_nodes) = consumed_item_nodes.as_mut() {+ consumed_item_nodes.push((item_index, item.node));+ }+ if let Some(offset_in_node) = pending_resume_offset.take()+ && item.type_ == inline_level_iterator::ItemType::Text+ && offset_in_node > item.offset_in_node+ {+ let style = self.style(self.parent_node(item.node));+ let text_content = self.callbacks.text_content(item.node);+ item.drop_prefix_before(+ offset_in_node,+ &text_content.text,+ style.letter_spacing().to_double() as f32,+ style.word_spacing().to_double() as f32,+ );+ }+ let has_leading_edges = leading_margin != CssPixels::default()+ || leading_border != CssPixels::default()+ || leading_padding != CssPixels::default();+ if !has_leading_edges {+ self.current_line_start.set(fragmentation::LinePosition {+ item_index,+ offset_in_node: item.offset_in_node,+ });+ }let can_break_after_previous_overflow_item =std::mem::take(&mut previous_text_item_allows_overflow_break_after);let line_starts_with_whitespace = self@@ -1732,6 +1915,10 @@ impl<'context> InlineFormattingContext<'context> {match item.type_ {inline_level_iterator::ItemType::ForcedBreak => {+ self.current_line_start.set(fragmentation::LinePosition {+ item_index: item_index + 1,+ offset_in_node: 0,+ });let continuation = iterator.next_inline_run_size(self);line_builder.break_line(line_builder::ForcedBreak::Yes, item.node, continuation);if !item.node.is_invalid() && self.clear_floating_boxes(item.node) {@@ -1741,6 +1928,10 @@ impl<'context> InlineFormattingContext<'context> {}inline_level_iterator::ItemType::Element => {line_builder.prepare_to_append_inline_content();+ if shares_items && self.run.records.used_values_if_owned(item.node).is_none() {+ self.create_used_values(item.node, self.input.containing_block_constraints);+ self.dimension_box_on_line(item.node);+ }self.compute_inset(item.node);if self.style(self.containing_block).text_wrap_mode() == text_wrap_mode::WRAP {let mut minimum = item.border_box_inline_size();@@ -1843,6 +2034,14 @@ impl<'context> InlineFormattingContext<'context> {};if broke_line {line_builder.set_trailing_whitespace_on_previous_line();+ let next_line_start = fragmentation::LinePosition {+ item_index: item_index + 1,+ offset_in_node: 0,+ };+ self.current_line_start.set(next_line_start);+ if let Some(line) = self.line_data_mut().line_boxes.last_mut() {+ line.start = next_line_start;+ }continue;}}@@ -1857,7 +2056,15 @@ impl<'context> InlineFormattingContext<'context> {TextItemWrapOpportunity::None => {}}if overflow_break_allowed {- self.break_overflowing_text_item(&mut line_builder, &mut item);+ if self.break_overflowing_text_item(+ &mut line_builder,+ &mut item,+ item_index,+ line_limit.as_mut(),+ ) {+ stopped_at_line_limit = true;+ break;+ }previous_text_item_allows_overflow_break_after = true;}}@@ -1981,6 +2188,68 @@ impl<'context> InlineFormattingContext<'context> {line_builder.update_last_line(false);}+ let mut lines_are_fragmented = false;+ let mut kept_lines_end = None;+ if let Some(fragmentation) = fragmentation {+ let breakable = !self.parent.has_line_clamp()+ && self.parent.floating_box_count() == floating_box_count_before_lines+ && !self.line_data().line_boxes.iter().any(|line| line.has_block_level_box);+ let dropped_atomic_inlines = if breakable {+ lines_are_fragmented = true;+ let (dropped_atomic_inlines, next_line_start) = self.keep_lines_of_fragmentainer(fragmentation);+ kept_lines_end = next_line_start;+ dropped_atomic_inlines+ } else {+ let lines_block_end_in_root = self.content_box_position_in_bfc_root().y+ + self+ .line_data()+ .line_boxes+ .iter()+ .rfind(|line| !line.is_empty())+ .map_or(CssPixels::default(), |line| line.block_end);+ self.parent+ .note_unbreakable_line_root(self.containing_block, lines_block_end_in_root);+ Vec::new()+ };+ let unconsumed_atomic_inlines: Vec<Node> = if stopped_at_line_limit && !shares_items {+ iterator+ .items()+ .iter()+ .filter(|item| item.type_ == inline_level_iterator::ItemType::Element)+ .map(|item| item.node)+ .collect()+ } else {+ Vec::new()+ };+ if let Some(fragments) = self.run.fragments.as_deref() {+ for node in &skipped_atomic_inlines {+ fragments.discard_unplaced_subtree(*node, self.used(*node));+ }+ for node in dropped_atomic_inlines.into_iter().chain(unconsumed_atomic_inlines) {+ fragments.discard_unplaced_subtree(node, self.used(node));+ self.forget_cached_runs_of_subtree(node);+ }+ }+ }+ if let Some(consumed_item_nodes) = consumed_item_nodes {+ let present_inline_boxes = lines_are_fragmented.then(|| {+ self.inline_boxes_present_in_lines(+ iterator.entered_inline_boxes(),+ &consumed_item_nodes,+ kept_lines_end,+ resume.is_none(),+ )+ });+ for &node in iterator.entered_inline_boxes() {+ if present_inline_boxes+ .as_ref()+ .is_none_or(|present| present.contains(&node))+ {+ formatting_context::place_child(self.run, node, FfiCssPixelPoint::default(), None);+ }+ }+ }+for line_index in 0..self.line_data().line_boxes.len() {if self.line_data().line_boxes[line_index].has_block_level_box {continue;@@ -2017,6 +2286,15 @@ impl<'context> InlineFormattingContext<'context> {if self.layout_mode == LayoutMode::Normal {for box_ in absolute_boxes {+ if lines_are_fragmented+ && !self+ .line_data()+ .line_boxes+ .iter()+ .any(|line| line.static_position_markers.iter().any(|marker| marker.box_ == box_))+ {+ continue;+ }let mut static_position = abspos_inputs::StaticPositionRect {rect: Default::default(),inline_alignment: StaticPositionAlignment::Start,@@ -2069,7 +2347,13 @@ impl<'context> InlineFormattingContext<'context> {pub(crate) fn run(&mut self) {assert!(self.facts(self.containing_block).children_are_inline());- let iterator = inline_level_iterator::InlineLevelIterator::new(self);+ let run = self.run;+ let iterator = match run.fragmentainer.as_deref() {+ Some(fragmentainer) => {+ inline_level_iterator::InlineLevelIterator::new_sharing_items(self, &fragmentainer.inline_items)+ }+ None => inline_level_iterator::InlineLevelIterator::new(self),+ };// OPTIMIZATION: Under a min-content or max-content constraint every soft wrap opportunity breaks the line or// none does, so eligible content is measured from its items without building line boxes.// Earlier floats would shorten lines by an amount that depends on block positions the@@ -2151,6 +2435,124 @@ impl<'context> InlineFormattingContext<'context> {}}+ fn keep_lines_of_fragmentainer(+ &self,+ fragmentation: fragmentation::LineRootFragmentation,+ ) -> (Vec<Node>, Option<fragmentation::LinePosition>) {+ let line_count = self.line_data().line_boxes.len();+ let is_first_fragment = fragmentation.resume.is_none();+ let root_block_offset = self.content_box_position_in_bfc_root().y;+ let mut stop = line_count;+ for index in 0..line_count {+ let (block_start, block_end, is_empty) = {+ let line = &self.line_data().line_boxes[index];+ (+ root_block_offset + line.block_start,+ root_block_offset + line.block_end,+ line.is_empty(),+ )+ };+ if is_empty {+ continue;+ }+ let exceeds = fragmentation+ .block_size+ .is_some_and(|block_size| block_end > block_size);+ if exceeds && index > 0 {+ self.parent+ .note_line_for_fragmentation(block_end - block_start, block_end, false);+ stop = index;+ break;+ }+ if exceeds && is_first_fragment && fragmentation.fragmentainer_had_content {+ self.parent.request_early_break_before(self.containing_block);+ }+ self.parent+ .note_line_for_fragmentation(block_end - block_start, block_end, true);+ }++ *self.inline_boxes_continued_in_next_fragment.borrow_mut() = {+ let data = self.line_data();+ let last_kept = data.line_boxes[..stop]+ .iter()+ .flat_map(|line| line.fragments.iter())+ .rfind(|fragment| !fragment.layout_node.is_invalid());+ let first_dropped = data.line_boxes[stop..]+ .iter()+ .flat_map(|line| line.fragments.iter())+ .find(|fragment| !fragment.layout_node.is_invalid());+ match (last_kept, first_dropped) {+ (Some(last_kept), Some(first_dropped)) => {+ self.fragmented_inline_ancestors_spanning(last_kept.layout_node, first_dropped.layout_node)+ }+ _ => Vec::new(),+ }+ };+ let mut data = self.line_data_mut();+ let dropped_atomic_inlines = data.line_boxes[stop..]+ .iter()+ .flat_map(|line| line.fragments.iter())+ .filter(|fragment| fragment.is_atomic_inline)+ .map(|fragment| fragment.layout_node)+ .collect();+ let next_line_start = data.line_boxes.get(stop).map(|line| line.start);+ data.line_boxes.truncate(stop);+ drop(data);+ if let Some(next_line_start) = next_line_start {+ self.parent+ .break_line_root_before_line(self.containing_block, next_line_start);+ }+ (dropped_atomic_inlines, next_line_start)+ }++ fn inline_boxes_present_in_lines(+ &self,+ entered_inline_boxes: &[Node],+ consumed_item_nodes: &[(usize, Node)],+ kept_lines_end: Option<fragmentation::LinePosition>,+ is_first_fragment: bool,+ ) -> HashSet<Node> {+ let mut present: HashSet<Node> = self+ .inline_boxes_continued_from_previous_fragment+ .iter()+ .chain(self.inline_boxes_continued_in_next_fragment.borrow().iter())+ .copied()+ .collect();+ let kept_item_nodes = consumed_item_nodes+ .iter()+ .filter(|(item_index, _)| {+ kept_lines_end.is_none_or(|end| {+ *item_index < end.item_index || (*item_index == end.item_index && end.offset_in_node > 0)+ })+ })+ .map(|(_, node)| *node);+ let data = self.line_data();+ let nodes_on_lines = data.line_boxes.iter().flat_map(|line| {+ line.fragments+ .iter()+ .map(|fragment| fragment.layout_node)+ .chain(line.static_position_markers.iter().map(|marker| marker.box_))+ });+ let childless_inline_boxes = entered_inline_boxes+ .iter()+ .copied()+ .filter(|node| is_first_fragment && self.callbacks.first_child(*node).is_invalid());+ present.extend(childless_inline_boxes.clone());+ let mut walked = HashSet::<Node>::default();+ for node in kept_item_nodes+ .chain(nodes_on_lines)+ .chain(childless_inline_boxes)+ .filter(|node| !node.is_invalid())+ {+ let mut ancestor = self.callbacks.parent(node);+ while !ancestor.is_invalid() && ancestor != self.containing_block && walked.insert(ancestor) {+ present.insert(ancestor);+ ancestor = self.callbacks.parent(ancestor);+ }+ }+ present+ }+/// Runs after all line post-processing and after atomic-inline placement,/// so everything that reads static offsets has already read them.fn fold_inline_ancestor_relative_insets_into_line_data(&self) {diff --git a/Libraries/LibWeb/Rust/src/layout/inline_level_iterator.rs b/Libraries/LibWeb/Rust/src/layout/inline_level_iterator.rsindex c9db2bd6fbe..2976899afd7 100644--- a/Libraries/LibWeb/Rust/src/layout/inline_level_iterator.rs+++ b/Libraries/LibWeb/Rust/src/layout/inline_level_iterator.rs@@ -150,6 +150,70 @@ impl Item {})}+ pub(crate) fn drop_prefix_before(+ &mut self,+ split_offset_in_node: usize,+ text: &[u16],+ letter_spacing: f32,+ word_spacing: f32,+ ) {+ let end = self.offset_in_node + self.length_in_node;+ if split_offset_in_node <= self.offset_in_node || split_offset_in_node >= end {+ return;+ }+ let Some(glyph_data) = self.glyphs.as_ref() else {+ return;+ };+ let remainder_glyphs = self+ .shaped_glyphs_after(split_offset_in_node - self.offset_in_node)+ .unwrap_or_else(|| {+ shape_glyph_data(+ &text[split_offset_in_node..end],+ glyph_data.font.clone(),+ glyph_data.text_type,+ 0.0,+ letter_spacing,+ word_spacing,+ )+ .0+ });+ self.drop_prefix(split_offset_in_node, remainder_glyphs);+ }++ fn shaped_glyphs_after(&self, code_units: usize) -> Option<line_box_fragment::GlyphData> {+ let glyph_data = self.glyphs.as_ref()?;+ if glyph_data.text_type == line_box_fragment::GLYPH_TEXT_TYPE_RTL+ || glyph_data+ .glyphs+ .iter()+ .map(|glyph| glyph.length_in_code_units)+ .sum::<usize>()+ != self.length_in_node+ {+ return None;+ }+ let mut consumed = 0;+ let split_glyph_index = glyph_data.glyphs.iter().position(|glyph| {+ let at_split = consumed == code_units && glyph.length_in_code_units != 0;+ consumed += glyph.length_in_code_units;+ at_split+ })?;+ let split_x = glyph_data.glyphs[split_glyph_index].x;+ let glyphs: Vec<_> = glyph_data.glyphs[split_glyph_index..]+ .iter()+ .map(|glyph| libgfx_rust::text_layout::DrawGlyph {+ x: glyph.x - split_x,+ ..*glyph+ })+ .collect();+ Some(line_box_fragment::GlyphData {+ glyphs: glyphs.into(),+ font: glyph_data.font.clone(),+ text_type: glyph_data.text_type,+ width: glyph_data.width - split_x,+ })+ }+fn take_prefix_before(&mut self,split_offset_in_node: usize,@@ -165,8 +229,12 @@ impl Item {prefix.padding_start = self.padding_start;prefix.can_break_before = self.can_break_before;prefix.glyphs = Some(prefix_glyphs);+ self.drop_prefix(split_offset_in_node, remainder_glyphs);+ prefix+ }- self.length_in_node -= prefix.length_in_node;+ fn drop_prefix(&mut self, split_offset_in_node: usize, remainder_glyphs: line_box_fragment::GlyphData) {+ self.length_in_node -= split_offset_in_node - self.offset_in_node;self.offset_in_node = split_offset_in_node;self.inline_size = CssPixels::nearest_value_for_f32(remainder_glyphs.width);self.glyphs = Some(remainder_glyphs);@@ -174,8 +242,6 @@ impl Item {self.border_start = CssPixels::default();self.padding_start = CssPixels::default();self.can_break_before = false;-- prefix}fn split_at_shaped_glyph(@@ -350,7 +416,7 @@ impl<'iterator, 'context> InlineLevelIteratorGenerator<'iterator, 'context> {iterator.generate_all_items();Some(InlineLevelIterator {entered_box_model_nodes: iterator.entered_box_model_nodes,- items: iterator.items.into_iter(),+ items: ItemQueue::Owned(iterator.items.into_iter()),})}@@ -849,7 +915,7 @@ fn record_entered_inline_box<'context>(let basis = constraints.inline_basis();used.resolve_box_model(&style, basis);context.compute_inset(node);- if context.run.fragments.is_some() {+ if context.run.fragments.is_some() && context.run.fragmentainer.is_none() {formatting_context::place_child(context.run, node, FfiCssPixelPoint::default(), None);}used@@ -860,9 +926,59 @@ pub(crate) struct StashedInlineItems {entered_box_model_nodes: Vec<Node>,}+struct SharedInlineItems {+ items: std::rc::Rc<[Item]>,+ entered_box_model_nodes: std::rc::Rc<[Node]>,+}++#[derive(Default)]+pub(crate) struct InlineItemCache {+ items_by_block_container: RefCell<HashMap<Node, SharedInlineItems>>,+}++enum ItemQueue {+ Owned(std::vec::IntoIter<Item>),+ Shared { items: std::rc::Rc<[Item]>, next: usize },+}++impl ItemQueue {+ fn as_slice(&self) -> &[Item] {+ match self {+ Self::Owned(items) => items.as_slice(),+ Self::Shared { items, next } => &items[*next..],+ }+ }++ fn next(&mut self) -> Option<Item> {+ match self {+ Self::Owned(items) => items.next(),+ Self::Shared { items, next } => {+ let item = items.get(*next).cloned();+ *next += usize::from(item.is_some());+ item+ }+ }+ }++ fn skip(&mut self, count: usize) {+ assert!(count <= self.as_slice().len());+ match self {+ Self::Owned(items) => items.by_ref().take(count).for_each(drop),+ Self::Shared { next, .. } => *next += count,+ }+ }++ fn into_vec(self) -> Vec<Item> {+ match self {+ Self::Owned(items) => items.collect(),+ Self::Shared { items, next } => items[next..].to_vec(),+ }+ }+}+pub(crate) struct InlineLevelIterator {entered_box_model_nodes: Vec<Node>,- items: std::vec::IntoIter<Item>,+ items: ItemQueue,}impl InlineLevelIterator {@@ -871,6 +987,57 @@ impl InlineLevelIterator {.expect("normal inline item generation always succeeds")}+ pub(crate) fn new_sharing_items(+ context: &mut inline_formatting_context::InlineFormattingContext<'_>,+ cache: &InlineItemCache,+ ) -> Self {+ let containing_block = context.containing_block;+ let shared = cache+ .items_by_block_container+ .borrow()+ .get(&containing_block)+ .map(|shared| (shared.items.clone(), shared.entered_box_model_nodes.clone()));+ if let Some((items, entered_box_model_nodes)) = shared {+ for node in entered_box_model_nodes.iter() {+ record_entered_inline_box(context, *node);+ }+ return Self {+ entered_box_model_nodes: entered_box_model_nodes.to_vec(),+ items: ItemQueue::Shared { items, next: 0 },+ };+ }+ let iterator = Self::new(context);+ if !iterator.items.as_slice().iter().all(|item| {+ matches!(+ item.type_,+ ItemType::Text | ItemType::ForcedBreak | ItemType::Element | ItemType::AbsolutelyPositionedElement+ )+ }) {+ return iterator;+ }+ let items = iterator.items.into_vec();+ let shared_items: std::rc::Rc<[Item]> = items.as_slice().into();+ cache.items_by_block_container.borrow_mut().insert(+ containing_block,+ SharedInlineItems {+ items: shared_items.clone(),+ entered_box_model_nodes: iterator.entered_box_model_nodes.as_slice().into(),+ },+ );+ let laid_out_atomic_inlines = items.iter().any(|item| item.type_ == ItemType::Element);+ Self {+ entered_box_model_nodes: iterator.entered_box_model_nodes,+ items: if laid_out_atomic_inlines {+ ItemQueue::Owned(items.into_iter())+ } else {+ ItemQueue::Shared {+ items: shared_items,+ next: 0,+ }+ },+ }+ }+pub(crate) fn for_intrinsic_inline_size(context: &mut inline_formatting_context::InlineFormattingContext<'_>,) -> Option<Self> {@@ -894,34 +1061,36 @@ impl InlineLevelIterator {}Self {entered_box_model_nodes: stash.entered_box_model_nodes,- items: stash.items.into_iter(),+ items: ItemQueue::Owned(stash.items.into_iter()),}}/// Element items and percentage inline-box margins and paddings depend on the run's available space.- pub(crate) fn stash_for_reuse(self, context: &inline_formatting_context::InlineFormattingContext<'_>) {- if self- .items+ fn is_independent_of_available_space(+ &self,+ context: &inline_formatting_context::InlineFormattingContext<'_>,+ ) -> bool {+ self.items.as_slice().iter()- .any(|item| !matches!(item.type_, ItemType::Text | ItemType::ForcedBreak))- {+ .all(|item| matches!(item.type_, ItemType::Text | ItemType::ForcedBreak))+ && self.entered_box_model_nodes.iter().all(|node| {+ let style = context.style(*node);+ !style.margin_left().contains_percentage()+ && !style.margin_right().contains_percentage()+ && !style.padding_left().contains_percentage()+ && !style.padding_right().contains_percentage()+ })+ }++ pub(crate) fn stash_for_reuse(self, context: &inline_formatting_context::InlineFormattingContext<'_>) {+ if !self.is_independent_of_available_space(context) {return;}- for node in &self.entered_box_model_nodes {- let style = context.style(*node);- if style.margin_left().contains_percentage()- || style.margin_right().contains_percentage()- || style.padding_left().contains_percentage()- || style.padding_right().contains_percentage()- {- return;- }- }context.callbacks.scratch().store_inline_item_stash(context.containing_block,StashedInlineItems {- items: self.items.collect(),+ items: self.items.into_vec(),entered_box_model_nodes: self.entered_box_model_nodes,},);@@ -931,13 +1100,20 @@ impl InlineLevelIterator {self.items.next()}+ pub(crate) fn entered_inline_boxes(&self) -> &[Node] {+ &self.entered_box_model_nodes+ }++ pub(crate) fn shares_items(&self) -> bool {+ matches!(self.items, ItemQueue::Shared { .. })+ }+pub(crate) fn items(&self) -> &[Item] {self.items.as_slice()}pub(crate) fn skip_items(&mut self, count: usize) {- assert!(count <= self.items.len());- self.items.by_ref().take(count).for_each(drop);+ self.items.skip(count);}pub(crate) fn next_inline_run_size(diff --git a/Libraries/LibWeb/Rust/src/layout/line_box.rs b/Libraries/LibWeb/Rust/src/layout/line_box.rsindex 04a7457a93b..c61cce67e8b 100644--- a/Libraries/LibWeb/Rust/src/layout/line_box.rs+++ b/Libraries/LibWeb/Rust/src/layout/line_box.rs@@ -41,6 +41,7 @@ pub(crate) struct InlineBoxBaseline {#[derive(Clone, PartialEq)]pub(crate) struct LineBoxData {+ pub(crate) start: super::fragmentation::LinePosition,pub(crate) fragments: Vec<line_box_fragment::LineBoxFragmentData>,pub(crate) static_position_markers: Vec<StaticPositionMarker>,pub(crate) inline_box_baselines: Vec<InlineBoxBaseline>,@@ -61,8 +62,9 @@ impl std::ops::DerefMut for LineBoxData {}impl LineBoxData {- pub(crate) fn new(direction: u8, writing_mode: u8) -> Self {+ pub(crate) fn new(direction: u8, writing_mode: u8, start: super::fragmentation::LinePosition) -> Self {Self {+ start,fragments: Vec::new(),static_position_markers: Vec::new(),inline_box_baselines: Vec::new(),diff --git a/Libraries/LibWeb/Rust/src/layout/line_builder.rs b/Libraries/LibWeb/Rust/src/layout/line_builder.rsindex 0013af63f72..d79c9bc423c 100644--- a/Libraries/LibWeb/Rust/src/layout/line_builder.rs+++ b/Libraries/LibWeb/Rust/src/layout/line_builder.rs@@ -63,6 +63,7 @@ pub(crate) struct LineBuilder<'builder, 'context> {direction: u8,writing_mode: u8,last_line_needs_update: bool,+ is_continuation: bool,should_advance_to_last_line_box_block_end: bool,current_line_committed_pending_margin: bool,pending_margin_follows_block_level_box: bool,@@ -81,6 +82,24 @@ impl<'builder, 'context> LineBuilder<'builder, 'context> {builder}+ pub(crate) fn new_for_continuation(+ context: &'builder inline_formatting_context::InlineFormattingContext<'context>,+ after_forced_break: bool,+ ) -> Self {+ let mut builder = Self::initialized(context);+ builder.is_continuation = true;+ builder.begin_new_line(+ false,+ true,+ if after_forced_break {+ ForcedBreak::Yes+ } else {+ ForcedBreak::No+ },+ );+ builder+ }+fn initialized(context: &'builder inline_formatting_context::InlineFormattingContext<'context>) -> Self {let style = context.style(context.containing_block);let containing_inline_size = context.input.containing_block_constraints.inline_basis();@@ -96,6 +115,7 @@ impl<'builder, 'context> LineBuilder<'builder, 'context> {direction: style.direction(),writing_mode: style.writing_mode(),last_line_needs_update: false,+ is_continuation: false,should_advance_to_last_line_box_block_end: false,current_line_committed_pending_margin: false,pending_margin_follows_block_level_box: false,@@ -113,10 +133,7 @@ impl<'builder, 'context> LineBuilder<'builder, 'context> {let current_block_offset = context.line_data().line_boxes.last().unwrap().next_line_block_offset;let mut builder = Self::initialized(context);builder.current_block_offset = current_block_offset;- context- .line_data_mut()- .line_boxes- .push(line_box::LineBoxData::new(builder.direction, builder.writing_mode));+ builder.push_line_box();builder.begin_new_line(false, true, ForcedBreak::No);builder.current_line_committed_pending_margin = true;builder@@ -130,14 +147,20 @@ impl<'builder, 'context> LineBuilder<'builder, 'context> {self.context().line_data().line_boxes.len()}+ fn push_line_box(&self) {+ self.context()+ .line_data_mut()+ .line_boxes+ .push(line_box::LineBoxData::new(+ self.direction,+ self.writing_mode,+ self.context().current_line_start.get(),+ ));+ }+fn ensure_last_line_index(&mut self) -> usize {if self.line_count() == 0 {- let direction = self.direction;- let writing_mode = self.writing_mode;- self.context()- .line_data_mut()- .line_boxes- .push(line_box::LineBoxData::new(direction, writing_mode));+ self.push_line_box();}self.line_count() - 1}@@ -227,7 +250,8 @@ impl<'builder, 'context> LineBuilder<'builder, 'context> {self.max_block_size_on_current_line = CssPixels::default();self.last_line_needs_update = true;self.should_advance_to_last_line_box_block_end = false;- let mut should_indent = self.line_count() <= 1 || (self.text_indent_each_line && forced == ForcedBreak::Yes);+ let mut should_indent = (self.line_count() <= 1 && !self.is_continuation)+ || (self.text_indent_each_line && forced == ForcedBreak::Yes);if self.text_indent_hanging {should_indent = !should_indent;}@@ -258,10 +282,7 @@ impl<'builder, 'context> LineBuilder<'builder, 'context> {let mut break_count = 0usize;loop {- self.context()- .line_data_mut()- .line_boxes- .push(line_box::LineBoxData::new(self.direction, self.writing_mode));+ self.push_line_box();self.begin_new_line(true, break_count == 0, forced);break_count += 1;let line_height = self.containing_style().line_height();@@ -498,10 +519,7 @@ impl<'builder, 'context> LineBuilder<'builder, 'context> {self.line_mut(line_index).has_forced_break = true;self.last_line_needs_update = true;self.update_last_line(false);- self.context()- .line_data_mut()- .line_boxes- .push(line_box::LineBoxData::new(self.direction, self.writing_mode));+ self.push_line_box();self.begin_new_line(true, true, ForcedBreak::No);}@@ -576,10 +594,7 @@ impl<'builder, 'context> LineBuilder<'builder, 'context> {self.max_block_size_on_current_line = CssPixels::default();self.last_line_needs_update = false;self.should_advance_to_last_line_box_block_end = false;- self.context()- .line_data_mut()- .line_boxes- .push(line_box::LineBoxData::new(self.direction, self.writing_mode));+ self.push_line_box();self.begin_new_line(false, true, ForcedBreak::No);}diff --git a/Libraries/LibWeb/Rust/src/painting/hit_test/caret.rs b/Libraries/LibWeb/Rust/src/painting/hit_test/caret.rsindex b5a37c18f2f..bd6d54f6fbf 100644--- a/Libraries/LibWeb/Rust/src/painting/hit_test/caret.rs+++ b/Libraries/LibWeb/Rust/src/painting/hit_test/caret.rs@@ -125,6 +125,8 @@ pub struct ClosestLine {pub block_start_distance: CssPixels,pub inline_distance: CssPixels,pub block_container: NodeSlotId,+ pub box_fragment: u32,+ pub fragment_inline_distance: CssPixels,pub is_before_point: bool,pub contains_point_in_block_axis: bool,}@@ -138,6 +140,8 @@ impl Default for ClosestLine {block_start_distance: CssPixels::from_raw(i32::MAX),inline_distance: CssPixels::from_raw(i32::MAX),block_container: NodeSlotId::INVALID,+ box_fragment: 0,+ fragment_inline_distance: CssPixels::default(),is_before_point: false,contains_point_in_block_axis: false,}@@ -512,9 +516,33 @@ impl HitTestList {let inline_distance = inline_axis_distance_to_rect(line.rect, local_point, writing_mode);let contains_point_in_block_axis = block_coordinate >= block_axis_start(line.rect, writing_mode)&& block_coordinate < block_axis_end(line.rect, writing_mode);+ let fragment_inline_distance = if line.block_container.is_invalid()+ || !rows.paintable_row_is_populated(line.block_container)+ || crate::painting::paintable_geometry::fragment_count(rows, line.block_container) == 1+ {+ CssPixels::default()+ } else {+ inline_axis_distance_to_rect(+ crate::painting::paintable_geometry::absolute_fragment_rect(+ rows,+ line.block_container,+ line.box_fragment as usize,+ ),+ local_point,+ writing_mode,+ )+ };+ let in_other_fragment_of_same_block_container = |closest: &ClosestLine| {+ !line.block_container.is_invalid()+ && line.block_container == closest.block_container+ && line.box_fragment != closest.box_fragment+ && fragment_inline_distance != closest.fragment_inline_distance+ };let is_better_candidate = {if closest_line.index.is_none() {true+ } else if in_other_fragment_of_same_block_container(&closest_line) {+ fragment_inline_distance < closest_line.fragment_inline_distance} else {// Between lines of the same block container, a line whose block-axis range// contains the point always beats lines that do not.@@ -540,25 +568,33 @@ impl HitTestList {closest_line.block_distance = block_distance;closest_line.inline_distance = inline_distance;closest_line.block_container = line.block_container;+ closest_line.box_fragment = line.box_fragment;+ closest_line.fragment_inline_distance = fragment_inline_distance;closest_line.is_before_point = block_axis_end(line.rect, writing_mode) < block_coordinate;closest_line.contains_point_in_block_axis = contains_point_in_block_axis;}if block_axis_end(line.rect, writing_mode) < block_coordinate&& (closest_line_before_point.index.is_none()- || caret_line_is_better_candidate(- block_distance,- inline_distance,- closest_line_before_point.block_distance,- closest_line_before_point.inline_distance,- px(CARET_LINE_BLOCK_AXIS_COMPARE_SLOP),- ))+ || if in_other_fragment_of_same_block_container(&closest_line_before_point) {+ fragment_inline_distance < closest_line_before_point.fragment_inline_distance+ } else {+ caret_line_is_better_candidate(+ block_distance,+ inline_distance,+ closest_line_before_point.block_distance,+ closest_line_before_point.inline_distance,+ px(CARET_LINE_BLOCK_AXIS_COMPARE_SLOP),+ )+ }){closest_line_before_point.index = Some(line_index);closest_line_before_point.local_point = local_point;closest_line_before_point.block_distance = block_distance;closest_line_before_point.inline_distance = inline_distance;closest_line_before_point.block_container = line.block_container;+ closest_line_before_point.box_fragment = line.box_fragment;+ closest_line_before_point.fragment_inline_distance = fragment_inline_distance;closest_line_before_point.is_before_point = true;}@@ -603,9 +639,12 @@ impl HitTestList {let line = &self.caret_lines[closest_index];let writing_mode = self.first_item_of_line(line).writing_mode;let block_coordinate = block_axis_coordinate(closest_line.local_point, writing_mode);- let point_is_in_closest_line_block_container_margin =- super::geometry::block_container_margin_rect(rows, closest_line.block_container)- .is_some_and(|rect| block_coordinate < block_axis_end(rect, writing_mode));+ let point_is_in_closest_line_block_container_margin = super::geometry::block_container_margin_rect(+ rows,+ closest_line.block_container,+ closest_line.box_fragment,+ )+ .is_some_and(|rect| block_coordinate < block_axis_end(rect, writing_mode));let lines_share_block_container = !closest_line.block_container.is_invalid()&& closest_line.block_container == closest_line_after_point.block_container;// A point still inside the previous block container's margin box should not jump to@@ -644,15 +683,55 @@ impl HitTestList {let current_line_context = current_first_item.paintable;let current_block_coordinate = line_block_middle(current_line.rect, writing_mode);+ let fragment_rects: smallvec::SmallVec<[CssPixelRect; 2]> = if current_line.block_container.is_invalid()+ || !arena.paintable_row_is_populated(current_line.block_container)+ {+ smallvec::SmallVec::new()+ } else {+ (0..crate::painting::paintable_geometry::fragment_count(arena, current_line.block_container))+ .map(|index| {+ crate::painting::paintable_geometry::absolute_fragment_rect(+ arena,+ current_line.block_container,+ index,+ )+ })+ .collect()+ };+ let fragment_inline_start = |box_fragment: u32| {+ fragment_rects+ .get(box_fragment as usize)+ .map(|rect| inline_axis_start(*rect, writing_mode))+ };+ let mut inline_coordinate = inline_coordinate;+ if fragment_rects.len() > 1+ && let Some(source_fragment) = fragment_rects.iter().position(|rect| {+ inline_coordinate >= inline_axis_start(*rect, writing_mode)+ && inline_coordinate < inline_axis_end(*rect, writing_mode)+ })+ && let (Some(current_start), Some(source_start)) = (+ fragment_inline_start(current_line.box_fragment),+ fragment_inline_start(source_fragment as u32),+ )+ {+ inline_coordinate += current_start - source_start;+ }let mut closest_line_index: Option<usize> = None;let mut closest_line_shares_context = false;let mut closest_block_distance = CssPixels::from_raw(i32::MAX);let mut closest_inline_distance = CssPixels::from_raw(i32::MAX);+ let is_in_other_fragment_of_current_block_container = |line: &CaretLine| {+ !current_line.block_container.is_invalid()+ && line.block_container == current_line.block_container+ && line.box_fragment != current_line.box_fragment+ };for line_index in 0..self.caret_lines.len() {let line = &self.caret_lines[line_index];// INTEROP: Keyboard navigation follows layout geometry across clips, effects, and transforms.// Separate paint contexts inside one editing host must not isolate its editable lines.- if line_index == current_line_index || !self.line_in_scope(main_thread, arena, callbacks, line_index, scope)+ if line_index == current_line_index+ || is_in_other_fragment_of_current_block_container(line)+ || !self.line_in_scope(main_thread, arena, callbacks, line_index, scope){continue;}@@ -684,6 +763,39 @@ impl HitTestList {closest_inline_distance = inline_distance;}}+ let adjacent_fragment = if direction == CaretLineDirection::Next {+ current_line.box_fragment.checked_add(1)+ } else {+ current_line.box_fragment.checked_sub(1)+ };+ let continues_in_adjacent_fragment = closest_line_index+ .is_none_or(|index| self.caret_lines[index].block_container != current_line.block_container);+ if continues_in_adjacent_fragment+ && let Some(adjacent_fragment) = adjacent_fragment+ && let Some(line_index) = (0..self.caret_lines.len())+ .filter(|&line_index| {+ let line = &self.caret_lines[line_index];+ is_in_other_fragment_of_current_block_container(line)+ && line.box_fragment == adjacent_fragment+ && self.line_in_scope(main_thread, arena, callbacks, line_index, scope)+ })+ .min_by_key(|&line_index| {+ let block_coordinate = line_block_middle(self.caret_lines[line_index].rect, writing_mode);+ if physically_after {+ block_coordinate+ } else {+ -block_coordinate+ }+ })+ {+ if let (Some(target_start), Some(current_start)) = (+ fragment_inline_start(self.caret_lines[line_index].box_fragment),+ fragment_inline_start(current_line.box_fragment),+ ) {+ inline_coordinate += target_start - current_start;+ }+ closest_line_index = Some(line_index);+ }let closest_line_index = closest_line_index?;let closest_line = &self.caret_lines[closest_line_index];let block_coordinate = line_block_middle(closest_line.rect, writing_mode);@@ -846,7 +958,11 @@ impl HitTestList {let find_closest_line =|scope| self.find_closest_line(main_thread, arena, tree, callbacks, point, mode, scope, respect_clip);let mut closest_line = find_closest_line(line_scope);- if !line_scope.is_none() && !constrained {+ let point_is_in_column_of_closest_line = closest_line.index.is_some()+ && closest_line.fragment_inline_distance == CssPixels::default()+ && arena.paintable_row_is_populated(closest_line.block_container)+ && crate::painting::paintable_geometry::fragment_count(arena, closest_line.block_container) > 1;+ if !line_scope.is_none() && !constrained && !point_is_in_column_of_closest_line {// The scoped search is only a guard against unrelated nearby content. If there is a plainly closer line// outside the scope, use it instead.let unscoped_closest_line = find_closest_line(FfiNodeIdentity::default());diff --git a/Libraries/LibWeb/Rust/src/painting/hit_test/geometry.rs b/Libraries/LibWeb/Rust/src/painting/hit_test/geometry.rsindex d048fbcd724..c9781f0ede3 100644--- a/Libraries/LibWeb/Rust/src/painting/hit_test/geometry.rs+++ b/Libraries/LibWeb/Rust/src/painting/hit_test/geometry.rs@@ -10,7 +10,7 @@//! block or line root changes without the item's own row changing.use super::{HitTestItem, HitTestItemKind};-use crate::css::css_pixels::CssPixelRect;+use crate::css::css_pixels::{CssPixelRect, CssPixels};use crate::layout::node_data::NodeSlotId;use crate::painting::paint_read::PaintRead;use crate::painting::{node_painting, paintable_geometry, text_fragment};@@ -22,10 +22,31 @@ pub(crate) fn populated_block_container(rows: &impl PaintRead, block_container:block_container}-pub(crate) fn block_container_margin_rect(rows: &impl PaintRead, block_container: NodeSlotId) -> Option<CssPixelRect> {+pub(crate) fn block_container_margin_rect(+ rows: &impl PaintRead,+ block_container: NodeSlotId,+ box_fragment: u32,+) -> Option<CssPixelRect> {if populated_block_container(rows, block_container).is_invalid() {return None;}+ if box_fragment != 0 {+ let margin = paintable_geometry::unbroken_box_model(rows, block_container).0;+ let is_last_fragment = box_fragment as usize + 1 == paintable_geometry::fragment_count(rows, block_container);+ return Some(+ paintable_geometry::absolute_fragment_border_box_rect(rows, block_container, box_fragment as usize)+ .inflated(+ CssPixels::default(),+ margin.right,+ if is_last_fragment {+ margin.bottom+ } else {+ CssPixels::default()+ },+ margin.left,+ ),+ );+ }let absolute = paintable_geometry::absolute_rect(rows, block_container);let margin = paintable_geometry::committed_margin(rows, block_container);let border = paintable_geometry::committed_border(rows, block_container);diff --git a/Libraries/LibWeb/Rust/src/painting/hit_test/mod.rs b/Libraries/LibWeb/Rust/src/painting/hit_test/mod.rsindex e5737279c16..97c20219180 100644--- a/Libraries/LibWeb/Rust/src/painting/hit_test/mod.rs+++ b/Libraries/LibWeb/Rust/src/painting/hit_test/mod.rs@@ -82,6 +82,7 @@ pub struct SpatialIndex {pub struct CaretLine {pub rect: CssPixelRect,pub block_container: NodeSlotId,+ pub box_fragment: u32,pub context: ContextRef,pub first_caret_item_index: usize,pub last_caret_item_index: usize,@@ -166,6 +167,24 @@ impl HitTestList {items.extend_from_slice(source);}+ fn box_fragment_of_caret_item(rows: &impl PaintRead, item: &HitTestItem) -> u32 {+ let Some(line_index) = item.caret_line_index else {+ return 0;+ };+ let line_root = match item.kind {+ HitTestItemKind::TextFragment | HitTestItemKind::EmptyLine => item.paintable,+ HitTestItemKind::Box => rows.paintable_data(item.paintable).containing_block,+ HitTestItemKind::SvgPath | HitTestItemKind::EmptyEditable | HitTestItemKind::ChromeWidget => return 0,+ };+ if line_root.is_invalid() || !rows.paintable_row_is_populated(line_root) {+ return 0;+ }+ rows.committed_side_data(line_root)+ .lines()+ .get(line_index)+ .map_or(0, |line| line.box_fragment)+ }+pub(crate) fn caret_line_rect_for_item(rows: &impl PaintRead, item: &HitTestItem) -> CssPixelRect {let Some(line_rect) = geometry::containing_line_box_rect(rows, item) else {return item.caret_rect;@@ -310,6 +329,7 @@ impl HitTestList {self.caret_lines.push(CaretLine {rect: item_line_rect,block_container: item_block_container,+ box_fragment: Self::box_fragment_of_caret_item(rows, item),context: item.context,first_caret_item_index: caret_item_index,last_caret_item_index: caret_item_index,diff --git a/Tests/LibWeb/Ref/expected/multicol-text-change-in-later-column-ref.html b/Tests/LibWeb/Ref/expected/multicol-text-change-in-later-column-ref.htmlnew file mode 100644index 00000000000..4364d18f708--- /dev/null+++ b/Tests/LibWeb/Ref/expected/multicol-text-change-in-later-column-ref.html@@ -0,0 +1,11 @@+<!DOCTYPE html>+<style>+ @font-face {+ font-family: Ahem;+ src: url("../data/fonts/Ahem.ttf");+ }+ body { margin: 0; }+ div { columns: 2; column-fill: auto; height: 40px; width: 220px; column-gap: 20px; font: 20px/20px Ahem; }+ p { margin: 0; }+</style>+<div><p>aaaa bbbb cccc yy</p></div>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/column-rule-002-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/column-rule-002-ref.htmlnew file mode 100644index 00000000000..aaea157da26--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/column-rule-002-ref.html@@ -0,0 +1,25 @@+<!DOCTYPE html>+<link rel="author" title="Morten Stenshorne" href="mailto:[email protected]">+<style>+ .square {+ position: absolute;+ width: 30px;+ height: 30px;+ background: black;+ }+ .left {+ margin-left: 40px;+ }+ .right {+ margin-left: 110px;+ }+ .bottom {+ margin-top: 70px;+ }+</style>+<p>There should be four squares below, on a yellow background.</p>+<div class="square top left"></div>+<div class="square top right"></div>+<div class="square bottom left"></div>+<div class="square bottom right"></div>+<div style="width:180px; height:100px; background:yellow;"></div>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-break-000-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-break-000-ref.xhtnew file mode 100644index 00000000000..9b9fc6ae711--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-break-000-ref.xht@@ -0,0 +1,31 @@+<!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-25 -->+ <meta name="flags" content="ahem image" />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: yellow;+ margin-bottom: 0.5em;+ font: 1.25em/1 Ahem;+ height: 3em;+ width: 10em;+ }++ img {vertical-align: top;}+ ]]></style>+ </head>+ <body>++ <p>Test passes if the 2 horizontal bars are <strong>identical</strong>.</p>++ <div><img src="support/black20x20.png" alt="Image download support must be enabled" /> <img src="support/black20x20.png" alt="Image download support must be enabled" /> <img src="support/black20x20.png" alt="Image download support must be enabled" /></div>++ <div><img src="support/black20x20.png" alt="Image download support must be enabled" /> <img src="support/black20x20.png" alt="Image download support must be enabled" /> <img src="support/black20x20.png" alt="Image download support must be enabled" /></div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-collapsing-001-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-collapsing-001-ref.xhtnew file mode 100644index 00000000000..b5cd90c4704--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-collapsing-001-ref.xht@@ -0,0 +1,31 @@+<!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-07-25 -->+ <meta name="flags" content="image" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: black;+ border: black solid 1px;+ font: 1.25em/1 serif;+ padding: 1em;+ width: 8em;+ }++ img+ {+ position: relative;+ vertical-align: top;+ }++ img + img + img {left: 2em;}+ ]]></style>+ </head>+ <body>+ <div><img src="support/swatch-yellow.png" width="40" height="20" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="20" height="60" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="20" height="60" alt="Image download support must be enabled" />+ </div>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-columns-001-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-columns-001-ref.xhtnew file mode 100644index 00000000000..0a234214bf8--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-columns-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-07-25 -->+ <meta name="flags" content="ahem" />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ body {width: 600px;}++ div+ {+ background-color: yellow;+ color: black;+ font: 1.25em/1 Ahem;+ orphans: 1;+ widows: 1;+ }+ ]]></style>+ </head>+ <body>+ <div>x xx x xx x xx x xx x xx x xx xxx xxx xxx xxx xxx xxx xxxx xxxx xxxx xxxx xxxx xxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx<br />x xx x xx x xx x xx x xx xxx xxx xxx xxx xxx xxxx xxxx xxxx xxxx xxxx xxxxxxxxxxxxxxxxxxxxxxxxx </div>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-columns-invalid-001-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-columns-invalid-001-ref.xhtnew file mode 100644index 00000000000..5c8470bd4a0--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-columns-invalid-001-ref.xht@@ -0,0 +1,32 @@+<!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-07-26 -->+ <meta name="flags" content="image" />+ <style type="text/css"><![CDATA[+ table+ {+ background-color: yellow;+ border-spacing: 0px;+ border: gray solid 1em;+ font: 1.25em/1 serif;+ }++ td {padding: 0 1em 0 0;}++ img, td {vertical-align: top;}+ ]]></style>+ </head>+ <body>+ <table>+ <tr>+ <td><img src="support/black20x20.png" width="40" height="40" alt="Image download support must be enabled" /></td>+ <td><img src="support/swatch-blue.png" width="40" height="40" alt="Image download support must be enabled" /></td>+ <td><img src="support/swatch-blue.png" width="40" height="40" alt="Image download support must be enabled" /></td>+ <td><img src="support/black20x20.png" width="40" height="40" alt="Image download support must be enabled" /></td>+ </tr>+ </table>+ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-containing-002-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-containing-002-ref.xhtnew file mode 100644index 00000000000..6345a093a90--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-containing-002-ref.xht@@ -0,0 +1,32 @@+<!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="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />+ <meta name="flags" content="ahem" />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div#inline-block+ {+ color: green;+ display: inline-block;+ font: 1.25em/1 Ahem;+ }+ ]]></style>+ </head>+ <body>++ <div id="inline-block">++ <div>4444 4444 4444 4444</div>+ <div>1 1 1 1 1 1 </div>+ <div>1 1 1 1 1 1 </div>+ <div>4444 4444 4444 4444</div>+ <div>1 1 1 1 1</div>+ <div>1 1 1 1 1</div>+ <div>1 1 1 4444 4444</div>++ </div>++ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-count-002-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-count-002-ref.xhtnew file mode 100644index 00000000000..bccb3c10862--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-count-002-ref.xht@@ -0,0 +1,41 @@+<!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="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-07-27 -->+ <meta name="flags" content="image" />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: yellow;+ font: 1.25em/1 Ahem;+ width: 21em;+ }++ img {vertical-align: top;}+ ]]></style>+ </head>+ <body>++ <div><img src="support/black20x20.png" width="420" height="20" alt="Image download support must be enabled" />++ <img src="support/black20x20.png" width="20" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="20" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="20" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="20" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="20" height="20" alt="Image download support must be enabled" />++ <img src="support/black20x20.png" width="20" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="40" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="20" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="40" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="20" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="80" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="80" height="20" alt="Image download support must be enabled" />++ <img src="support/black20x20.png" width="20" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="40" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="20" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="40" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="20" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="80" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="80" height="20" alt="Image download support must be enabled" />++ <img src="support/black20x20.png" width="20" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="20" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="20" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="20" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="20" height="20" alt="Image download support must be enabled" />++ <img src="support/black20x20.png" width="20" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="80" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="40" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="80" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="80" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="20" height="20" alt="Image download support must be enabled" />++ <img src="support/black20x20.png" width="20" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="80" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="40" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="80" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="80" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="20" height="20" alt="Image download support must be enabled" />++ <img src="support/black20x20.png" width="20" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="80" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="40" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="20" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="20" height="20" alt="Image download support must be enabled" /> <img src="support/black20x20.png" width="20" height="20" alt="Image download support must be enabled" />++ <img src="support/black20x20.png" width="420" 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-count-computed-004-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-count-computed-004-ref.xhtnew file mode 100644index 00000000000..a2021e6aa9f--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-count-computed-004-ref.xht@@ -0,0 +1,27 @@+<!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-07-29 -->+ <meta name="flags" content="image ahem" />+ <link rel="stylesheet" href="../../fonts/ahem.css" />++ <style type="text/css"><![CDATA[+ body {font: 1.25em/1 Ahem;}+ img {vertical-align: top;}+ ]]></style>+ </head>++ <body>++ <div><img src="support/swatch-gray.png" width="280" height="20" alt="Image download support must be enabled" /></div>++ <div><img src="support/swatch-gray.png" width="20" 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="20" height="20" alt="Image download support must be enabled" /><img src="support/swatch-orange.png" width="80" height="20" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="60" 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" /></div>++ <div><img src="support/swatch-gray.png" width="20" height="20" alt="Image download support must be enabled" /><img src="support/swatch-purple.png" width="80" height="20" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="20" height="20" alt="Image download support must be enabled" /><img src="support/swatch-gray.png" width="80" height="20" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="60" 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" /></div>++ <div><img src="support/swatch-gray.png" width="280" 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-fill-000-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-fill-000-ref.xhtnew file mode 100644index 00000000000..c8bdfac9844--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-fill-000-ref.xht@@ -0,0 +1,53 @@+<!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-25 -->+ <meta name="flags" content="ahem" />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ table+ {+ background-color: yellow;+ border-spacing: 0em;+ color: lime;+ margin: 1em 0em;+ font: 1.25em/1 Ahem;+ table-layout: fixed;+ width: 18em;+ }++ td {padding: 0em;}+ ]]></style>+ </head>+ <body>++ <p>Test passes if the 3 horizontal bars are <strong>identical</strong>.</p>++ <table>+ <tr>+ <td>G</td>+ <td>H</td>+ <td>I</td>+ </tr>+ </table>++ <table>+ <tr>+ <td>G</td>+ <td>H</td>+ <td>I</td>+ </tr>+ </table>++ <table>+ <tr>+ <td>G</td>+ <td>H</td>+ <td>I</td>+ </tr>+ </table>++ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-fill-001-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-fill-001-ref.xhtnew file mode 100644index 00000000000..0b0e4777064--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-fill-001-ref.xht@@ -0,0 +1,48 @@+<!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-25 -->+ <meta name="flags" content="ahem" />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ table+ {+ background-color: yellow;+ border-spacing: 0em;+ color: lime;+ font: 1.25em/1 Ahem;+ height: 5em;+ margin: 1em 0em;+ table-layout: fixed;+ width: 20em;+ }++ td+ {+ padding: 0em;+ vertical-align: top;+ }+ ]]></style>+ </head>+ <body>++ <p>Test passes if the 2 rectangles are <strong>identical</strong>.</p>++ <table>+ <tr>+ <td>G<br />H<br />I</td>+ <td>J<br />K<br />L</td>+ </tr>+ </table>++ <table>+ <tr>+ <td>G<br />H<br />I</td>+ <td>J<br />K<br />L</td>+ </tr>+ </table>++ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-fill-auto-001-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-fill-auto-001-ref.xhtnew file mode 100644index 00000000000..952c2e6a3fd--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-fill-auto-001-ref.xht@@ -0,0 +1,40 @@+<!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-07-30 -->+ <meta name="flags" content="ahem" />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ color: black;+ font: 1.25em/1 Ahem;+ float: left;+ width: 10em;+ margin-right: 1em;+ }+ ]]></style>+ </head>+ <body>++ <div>1 22 333+ 4444 55555+ 666666+ 7777777+ 999999999+ 1 22 333+ 4444 55555+ 666666+ 7777777+ 999999999</div>++ <div>1 22 333+ 4444 55555+ 666666+ 7777777+ 999999999</div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-fill-auto-003-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-fill-auto-003-ref.xhtnew file mode 100644index 00000000000..a0ab7cdf06f--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-fill-auto-003-ref.xht@@ -0,0 +1,34 @@+<!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="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-08-01 -->+ <meta name="flags" content="ahem image" />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div {font: 1.25em/1 Ahem;}+ img {vertical-align: top;}+ ]]></style>+ </head>+ <body>++ <p>Test passes if there is <strong>no red</strong>.</p>++ <div><img src="support/swatch-green.png" width="460" height="20" alt="Image download support must be enabled" /></div>++ <div><img src="support/swatch-green.png" width="220" height="20" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="20" height="20" alt="Image download support must be enabled" /><img src="support/swatch-green.png" width="60" height="20" alt="Image download support must be enabled" /> <img src="support/swatch-green.png" width="40" height="20" alt="Image download support must be enabled" /> <img src="support/swatch-green.png" width="80" height="20" alt="Image download support must be enabled" /></div>++ <div><img src="support/swatch-green.png" width="60" height="20" alt="Image download support must be enabled" /> <img src="support/swatch-green.png" width="80" height="20" alt="Image download support must be enabled" /> <img src="support/swatch-green.png" width="40" height="20" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="20" height="20" alt="Image download support must be enabled" /><img src="support/swatch-green.png" width="60" height="20" alt="Image download support must be enabled" /> <img src="support/swatch-green.png" width="40" height="20" alt="Image download support must be enabled" /> <img src="support/swatch-green.png" width="20" height="20" alt="Image download support must be enabled" /></div>++ <div><img src="support/swatch-green.png" width="80" height="20" alt="Image download support must be enabled" /> <img src="support/swatch-green.png" width="40" height="20" alt="Image download support must be enabled" /> <img src="support/swatch-green.png" width="60" height="20" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="20" height="20" alt="Image download support must be enabled" /> <img src="support/swatch-green.png" width="20" height="20" alt="Image download support must be enabled" /></div>++ <div><img src="support/swatch-green.png" width="80" height="20" alt="Image download support must be enabled" /> <img src="support/swatch-green.png" width="100" height="20" alt="Image download support must be enabled" /> <img src="support/swatch-yellow.png" width="20" height="20" alt="Image download support must be enabled" /> <img src="support/swatch-green.png" width="20" height="20" alt="Image download support must be enabled" /></div>++ <div><img src="support/swatch-green.png" width="40" height="20" alt="Image download support must be enabled" /> <img src="support/swatch-green.png" width="100" height="20" alt="Image download support must be enabled" /> <img src="support/swatch-green.png" width="40" height="20" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="20" height="20" alt="Image download support must be enabled" /> <img src="support/swatch-green.png" width="20" height="20" alt="Image download support must be enabled" /></div>++ <div><img src="support/swatch-green.png" width="60" height="20" alt="Image download support must be enabled" /> <img src="support/swatch-green.png" width="80" height="20" alt="Image download support must be enabled" /> <img src="support/swatch-green.png" width="40" height="20" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="20" height="20" alt="Image download support must be enabled" /> <img src="support/swatch-green.png" width="20" height="20" alt="Image download support must be enabled" /></div>++ <div><img src="support/swatch-green.png" width="460" 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-gap-000-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-gap-000-ref.xhtnew file mode 100644index 00000000000..c9bde93d88f--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-gap-000-ref.xht@@ -0,0 +1,29 @@+<!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-25 -->+ <meta name="flags" content="ahem" />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ font: 1.25em/1 Ahem;+ margin: 1em 0;+ width: 30em;+ }++ span {color: yellow;}+ ]]></style>+ </head>+ <body>++ <p>Test passes if the 2 horizontal bars are <strong>identical</strong>.</p>++ <div>1234567890<span>1234567890</span>1234567890</div>++ <div>1234567890<span>1234567890</span>1234567890</div>++ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-gap-001-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-gap-001-ref.xhtnew file mode 100644index 00000000000..adbb689de4d--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-gap-001-ref.xht@@ -0,0 +1,22 @@+<!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-05 -->+ <meta name="flags" content="image" />+ <style type="text/css"><![CDATA[+ div {margin: 1.25em; line-height: 1;}++ img {vertical-align: top;}+ ]]></style>+ </head>+ <body>+ <p>Test passes if the 2 stripes are <strong>identical</strong>.</p>++ <div><img src="support/black20x20.png" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="20" height="20" alt="Image download support must be enabled" /><img src="support/black20x20.png" alt="Image download support must be enabled" /></div>++ <div><img src="support/black20x20.png" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="20" height="20" alt="Image download support must be enabled" /><img src="support/black20x20.png" 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-gap-002-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-gap-002-ref.xhtnew file mode 100644index 00000000000..afecc0cda5c--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-gap-002-ref.xht@@ -0,0 +1,31 @@+<!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-05 -->+ <meta name="flags" content="image" />+ <style type="text/css"><![CDATA[+ table+ {+ background-color: yellow;+ border-spacing: 0px;+ border: gray solid 1em;+ font: 1.25em/1 serif;+ }++ td {padding: 0 1em 0 0;}++ img, td {vertical-align: top;}++ td#last-cell {padding-right: 0;}+ ]]></style>+ </head>+ <body>+ <table>+ <tr>+ <td><img src="support/black20x20.png" width="40" height="40" alt="Image download support must be enabled" /></td><td><img src="support/swatch-blue.png" width="40" height="40" alt="Image download support must be enabled" /></td><td><img src="support/swatch-blue.png" width="40" height="40" alt="Image download support must be enabled" /></td><td id="last-cell"><img src="support/black20x20.png" width="40" height="40" alt="Image download support must be enabled" /></td>+ </tr>+ </table>+ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-gap-fraction-001-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-gap-fraction-001-ref.xhtnew file mode 100644index 00000000000..aaae145885b--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-gap-fraction-001-ref.xht@@ -0,0 +1,68 @@+<!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-05 -->+ <meta name="flags" content="ahem" />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ body > div+ {+ background-color: gray;+ font: 1.25em/1 Ahem;+ height: 4em;+ position: relative;+ width: 14.5em;+ }++ p, div > div+ {+ background-color: blue;+ height: 1em;+ left: 0;+ margin: 0;+ position: absolute;+ top: 0;+ width: 4em;+ }++ div > div+ {+ background-color: black;+ height: 4em;+ }++ p {left: 7.5em;}++ p + p+ {+ left: 8.5em;+ top: 1em;+ }++ p + p + p+ {+ left: 9.5em;+ top: 2em;+ }++ p + p + p + p+ {+ left: 10.5em;+ top: 3em;+ }+ ]]></style>+ </head>+ <body>++ <div>+ <div></div>+ <p></p>+ <p></p>+ <p></p>+ <p></p>+ </div>++ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-gap-large-001-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-gap-large-001-ref.xhtnew file mode 100644index 00000000000..ab11444ac26--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-gap-large-001-ref.xht@@ -0,0 +1,23 @@+<!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-06 -->+ <meta name="flags" content="image ahem" />+ <link rel="stylesheet" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ body {font: 1.25em/1 Ahem;}+ img {vertical-align: top;}+ ]]></style>+ </head>+ <body>+ <div><img src="support/swatch-gray.png" width="260" height="20" alt="Image download support must be enabled" /></div>++ <div><img src="support/swatch-gray.png" width="20" height="40" alt="Image download support must be enabled" /><img src="support/black20x20.png" width="40" height="40" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="40" height="40" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" width="40" height="40" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="40" height="40" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" width="40" height="40" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="20" 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" /><img src="support/black20x20.png" width="40" height="40" alt="Image download support must be enabled" /></div>++ <div><img src="support/swatch-gray.png" width="260" 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-gap-large-002-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-gap-large-002-ref.xhtnew file mode 100644index 00000000000..ce17abb717f--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-gap-large-002-ref.xht@@ -0,0 +1,24 @@+<!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-06 -->+ <meta name="flags" content="image" />+ <style type="text/css"><![CDATA[+ div {font: 1.25em/1 serif;}++ img {vertical-align: top;}+ ]]></style>+ </head>+ <body>+ <div><img src="support/swatch-gray.png" width="260" height="20" alt="Image download support must be enabled" /></div>++ <div><img src="support/swatch-gray.png" width="20" height="40" alt="Image download support must be enabled" /><img src="support/black20x20.png" width="40" height="40" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="110" height="40" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" width="40" height="40" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="30" 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" /></div>++ <div><img src="support/swatch-gray.png" width="20" height="40" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" width="40" height="40" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="110" height="40" alt="Image download support must be enabled" /><img src="support/black20x20.png" width="40" height="40" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="30" 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" /></div>++ <div><img src="support/swatch-gray.png" width="260" 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-height-001-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-height-001-ref.xhtnew file mode 100644index 00000000000..d55aa7aa946--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-height-001-ref.xht@@ -0,0 +1,28 @@+<!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-06 -->+ <meta name="flags" content="image" />+ <style type="text/css"><![CDATA[+ img+ {+ left: 135px;+ /* 6em + (2em/2) - (10px/2) == 135px */+ position: relative;+ vertical-align: top;+ }++ img + img {left: 285px;}+ /* 6em + 2em + 6em + (2em/2) - (10px/2) - 10px == 285px */+ ]]></style>+ </head>+ <body>++ <p>Test passes if there are 2 blue vertical stripes of equal height.</p>++ <div><img src="support/swatch-blue.png" width="10" height="160" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" width="10" height="160" 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-inherit-001-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-inherit-001-ref.xhtnew file mode 100644index 00000000000..20510d0a9a7--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-inherit-001-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-08 -->+ <meta name="flags" content="image" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: yellow;+ font: 1.25em/1 serif;+ margin: 0em 1em;+ padding: 0em 1em 1em;+ width: 30em;+ }++ img+ {+ padding-right: 1em;+ vertical-align: top;+ }++ img.column-gap {margin-right: 2em;}++ img#last {padding-right: 0em;}+ ]]></style>+ </head>+ <body>++ <div><img src="support/black20x20.png" width="40" height="60" alt="Image download support must be enabled" /><img src="support/black20x20.png" width="40" height="60" alt="Image download support must be enabled" /><img class="column-gap" src="support/black20x20.png" width="40" height="40" alt="Image download support must be enabled" /><img src="support/black20x20.png" width="40" height="60" alt="Image download support must be enabled" /><img src="support/black20x20.png" width="40" height="60" alt="Image download support must be enabled" /><img class="column-gap" src="support/black20x20.png" width="40" height="40" alt="Image download support must be enabled" /><img src="support/black20x20.png" width="40" height="60" alt="Image download support must be enabled" /><img src="support/black20x20.png"+width="40" height="60" alt="Image download support must be enabled" /><img id="last" src="support/black20x20.png" width="40" height="40" 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-inherit-002-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-inherit-002-ref.xhtnew file mode 100644index 00000000000..2be3fd9e32f--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-inherit-002-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-08 -->+ <meta name="flags" content="image" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: blue;+ font: 1.25em/1 serif;+ margin: 1em;+ padding: 0em 1em 1em;+ width: 30em;+ }++ img {vertical-align: top;}++ img.column-gap+ {+ margin-left: -2em;+ margin-right: 3em;+ vertical-align: bottom;+ }++ img#last+ {+ margin-left: -2em;+ vertical-align: bottom;+ }+ ]]></style>+ </head>+ <body>++ <div><img src="support/black20x20.png" width="40" height="60" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="20" height="60" alt="Image download support must be enabled" /><img src="support/black20x20.png" width="40" height="60" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="20" height="60" alt="Image download support must be enabled" /><img src="support/black20x20.png" width="40" height="40" alt="Image download support must be enabled" /><img class="column-gap" src="support/swatch-yellow.png" width="40" height="20" alt="Image download support must be enabled" /><img src="support/black20x20.png" width="40" height="60" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="20" height="60" alt="Image download support must be enabled" /><img src="support/black20x20.png" width="40" height="60" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="20" height="60" alt="Image download support must be enabled" /><img src="support/black20x20.png" width="40" height="40" alt="Image download support must be enabled" /><img class="column-gap" src="support/swatch-yellow.png" width="40" height="20" alt="Image download support must be enabled" /><img src="support/black20x20.png" width="40" height="60" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="20" height="60" alt="Image download support must be enabled" /><img src="support/black20x20.png" width="40" height="60" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="20" height="60" alt="Image download support must be enabled" /><img src="support/black20x20.png" width="40" height="40" alt="Image download support must be enabled" /><img id="last" src="support/swatch-yellow.png" width="40" 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-list-item-001-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-list-item-001-ref.xhtnew file mode 100644index 00000000000..582b735988f--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-list-item-001-ref.xht@@ -0,0 +1,21 @@+<!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-10 -->+ <style type="text/css"><![CDATA[+ div+ {+ background-color: black;+ height: 100px;+ width: 200px;+ }+ ]]></style>+ </head>+ <body>++ <div></div>++ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-margin-child-001-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-margin-child-001-ref.xhtnew file mode 100644index 00000000000..49f93d63063--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-margin-child-001-ref.xht@@ -0,0 +1,44 @@+<!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-10 -->+ <style type="text/css"><![CDATA[+ body > div+ {+ background-color: blue;+ border: gray solid 1em;+ font-size: 1.25em;+ height: 8em;+ position: relative;+ width: 10em;+ }++ div > div+ {+ background-color: yellow;+ height: 1em;+ left: 0;+ position: absolute;+ top: 3em;+ width: 5em;+ }++ #second-stripe {top: 5em;}++ #third-stripe {top: 7em;}+ ]]></style>++ </head>++ <body>++ <div>+ <div></div>+ <div id="second-stripe"></div>+ <div id="third-stripe"></div>+ </div>++ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-reduce-000-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-reduce-000-ref.xhtnew file mode 100644index 00000000000..82c9ddd228e--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-reduce-000-ref.xht@@ -0,0 +1,38 @@+<!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-25 -->+ <meta name="flags" content="ahem" />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: yellow;+ border: black solid thin;+ color: orange;+ font: 1.25em/1 Ahem;+ margin-bottom: 0.5em;+ width: 30em;+ }++ span {color: blue;}+ ]]></style>+ </head>+ <body>++ <p>Test passes if the 2 rectangles with orange and blue vertical stripes are <strong>identical</strong>.</p>++ <div>+ 1 2 3 4 5 6 7 8<span>A B C D E F G H </span><br />+ 9 0 1 2 3 4 5 6<span>I J K L M N O P </span>+ </div>++ <div>+ 1 2 3 4 5 6 7 8<span>A B C D E F G H </span><br />+ 9 0 1 2 3 4 5 6<span>I J K L M N O P </span>+ </div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-000-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-000-ref.xhtnew file mode 100644index 00000000000..c62c6b0dcf1--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-000-ref.xht@@ -0,0 +1,38 @@+<!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="ahem" />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ color: black;+ font: 1.25em/1 Ahem;+ margin-bottom: 0.5em;+ width: 602px;+ }++ span+ {+ border-left: lime solid 1px;+ border-right: lime solid 1px;+ }+ ]]></style>+ </head>+ <body>++ <p>Test passes if the 2 horizontal bars are <strong>identical</strong>.</p>++ <div>+ 1234567890<span>ABCDEFGHIJ</span>1234567890+ </div>++ <div>+ 1234567890<span>ABCDEFGHIJ</span>1234567890+ </div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-001-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-001-ref.xhtnew file mode 100644index 00000000000..fceb51b98ad--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-001-ref.xht@@ -0,0 +1,28 @@+<!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="ahem" />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ color: green;+ font: 1.25em/1 Ahem;+ margin-bottom: 0.5em;+ width: 20em;+ }+ ]]></style>+ </head>+ <body>++ <p>Test passes if there are 2 green bars and <strong>no red</strong>.</p>++ <div>12345678901234567890</div>++ <div>12345678901234567890</div>++ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-003-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-003-ref.xhtnew file mode 100644index 00000000000..3474589ddd2--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-003-ref.xht@@ -0,0 +1,27 @@+<!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-14 -->+ <meta name="flags" content="image" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: black;+ border: gray solid 1em;+ font: 1.25em/1 serif;+ width: 15em;+ }++ img {vertical-align: top;}++ img.yellow {padding-left: 2em;}+ ]]></style>+ </head>+ <body>++ <div><img class="yellow" src="support/swatch-yellow.png" width="20" height="40" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" width="20" height="40" alt="Image download support must be enabled" /><img class="yellow" src="support/swatch-yellow.png" width="20" height="40" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" width="20" height="40" alt="Image download support must be enabled" /><img class="yellow" src="support/swatch-yellow.png" width="20" height="40" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" width="20" height="40" alt="Image download support must be enabled" /><img class="yellow" src="support/swatch-yellow.png" width="20" height="40" 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-rule-color-001-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-color-001-ref.xhtnew file mode 100644index 00000000000..aac462164a0--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-color-001-ref.xht@@ -0,0 +1,27 @@+<!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-14 -->+ <meta name="flags" content="image" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: black;+ border: gray solid 1em;+ font: 1.25em/1 serif;+ width: 14em;+ }++ img {vertical-align: top;}++ img.white {padding-left: 2em;}+ ]]></style>+ </head>+ <body>++ <div><img class="white" src="support/swatch-white.png" width="15" height="40" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" width="20" height="40" alt="Image download support must be enabled" /><img class="white" src="support/swatch-white.png" width="15" height="40" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" width="20" height="40" alt="Image download support must be enabled" /><img class="white" src="support/swatch-white.png" width="15" height="40" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" width="20" height="40" alt="Image download support must be enabled" /><img class="white" src="support/swatch-white.png" width="15" height="40" 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-rule-color-inherit-001-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-color-inherit-001-ref.xhtnew file mode 100644index 00000000000..8bf2d7d2da0--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-color-inherit-001-ref.xht@@ -0,0 +1,22 @@+<!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-09-03 -->+ <meta name="flags" content="image" />+ <style type="text/css"><![CDATA[+ div {font-size: 1.25em;}+ img {padding-left: 1em;}+ ]]></style>+ </head>+ <body>++ <p>Test passes if there are 6 vertical green stripes and <strong>no red</strong>.</p>++ <div>+ <img src="support/swatch-green.png" width="20" height="120" alt="Image download support must be enabled" /><img src="support/swatch-green.png" width="20" height="120" alt="Image download support must be enabled" /><img src="support/swatch-white.png" width="20" height="120" alt="Image download support must be enabled" /><img src="support/swatch-green.png" width="20" height="120" alt="Image download support must be enabled" /><img src="support/swatch-green.png" width="20" height="120" alt="Image download support must be enabled" /><img src="support/swatch-white.png" width="20" height="120" alt="Image download support must be enabled" /><img src="support/swatch-green.png" width="20" height="120" alt="Image download support must be enabled" /><img src="support/swatch-green.png" width="20" height="120" 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-rule-dashed-000-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-dashed-000-ref.xhtnew file mode 100644index 00000000000..d6509185720--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-dashed-000-ref.xht@@ -0,0 +1,31 @@+<!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="ahem" />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: black;+ color: black;+ font: 3.125em/1 Ahem;+ margin-bottom: 0.2em;+ width: 8.2em;+ }++ span {border-left: lime dashed 0.2em;}+ ]]></style>+ </head>+ <body>++ <p>Test passes if the 2 black stripes with vertical green bars are <strong>identical</strong>.</p>++ <div>1234<span>5678</span></div>++ <div>1234<span>5678</span></div>++ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-dotted-000-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-dotted-000-ref.xhtnew file mode 100644index 00000000000..2ec3f430194--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-dotted-000-ref.xht@@ -0,0 +1,31 @@+<!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="ahem" />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: black;+ color: black;+ font: 3.125em/1 Ahem;+ margin-bottom: 0.2em;+ width: 8.2em;+ }++ span {border-left: lime dotted 0.2em;}+ ]]></style>+ </head>+ <body>++ <p>Test passes if the 2 black stripes with green dots in their center are <strong>identical</strong>.</p>++ <div>1234<span>5678</span></div>++ <div>1234<span>5678</span></div>++ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-double-000-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-double-000-ref.xhtnew file mode 100644index 00000000000..eba0dc86b79--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-double-000-ref.xht@@ -0,0 +1,31 @@+<!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="ahem" />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: black;+ color: black;+ font: 3.125em/1 Ahem;+ margin-bottom: 0.2em;+ width: 8.2em;+ }++ span {border-left: lime double 0.2em;}+ ]]></style>+ </head>+ <body>++ <p>Test passes if the 2 black stripes with vertical green bars are <strong>identical</strong>.</p>++ <div>1234<span>5678</span></div>++ <div>1234<span>5678</span></div>++ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-fraction-001-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-fraction-001-ref.xhtnew file mode 100644index 00000000000..29ab6de4aff--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-fraction-001-ref.xht@@ -0,0 +1,28 @@+<!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-14 -->+ <meta name="flags" content="image" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: black;+ border: gray solid 1em;+ font: 1.25em/1 serif;+ width: 14em;+ }++ img {vertical-align: top;}++ img.yellow {padding-left: 2em;}+ ]]></style>+ </head>+ <body>++ <div><img class="yellow" src="support/swatch-yellow.png" width="16" height="40" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" width="18" height="40" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="1" height="40" alt="Image download support must be enabled" /><img class="yellow" src="support/swatch-yellow.png" width="16" height="40" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" width="18" height="40" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="1" height="40" alt="Image download support must be enabled" /><img class="yellow" src="support/swatch-yellow.png" width="16" height="40" alt="Image download support must be enabled" /><img src="support/swatch-blue.png"+width="18" height="40" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="1" height="40" alt="Image download support must be enabled" /><img class="yellow" src="support/swatch-yellow.png" width="15" height="40" 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-rule-fraction-002-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-fraction-002-ref.xhtnew file mode 100644index 00000000000..ca395f2a379--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-fraction-002-ref.xht@@ -0,0 +1,24 @@+<!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-14 -->+ <meta name="flags" content="image" />+ <style type="text/css"><![CDATA[+ div+ {+ border: gray solid 1em;+ font: 1.25em/1 serif;+ width: 14em;+ }++ img {vertical-align: top;}+ ]]></style>+ </head>+ <body>++ <div><img src="support/black20x20.png" width="40" height="40" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="6" height="40" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" width="29" height="40" alt="Image download support must be enabled" /><img src="support/black20x20.png" width="40" height="40" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="6" height="40" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" width="29" height="40" alt="Image download support must be enabled" /><img src="support/black20x20.png" width="40" height="40" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="6" height="40" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" width="29" height="40" alt="Image download support must be enabled" /><img src="support/black20x20.png" width="40" height="40" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="15" height="40" 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-rule-groove-000-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-groove-000-ref.xhtnew file mode 100644index 00000000000..d501a088067--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-groove-000-ref.xht@@ -0,0 +1,31 @@+<!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="ahem" />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: black;+ color: black;+ font: 3.125em/1 Ahem;+ margin-bottom: 0.2em;+ width: 8.2em;+ }++ span {border-left: lime groove 0.2em;}+ ]]></style>+ </head>+ <body>++ <p>Test passes if the 2 black stripes with vertical green bars are <strong>identical</strong>.</p>++ <div>1234<span>5678</span></div>++ <div>1234<span>5678</span></div>++ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-hidden-000-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-hidden-000-ref.xhtnew file mode 100644index 00000000000..ae97353882a--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-hidden-000-ref.xht@@ -0,0 +1,28 @@+<!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="ahem" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: black;+ font: 3.125em/1 serif;+ height: 1em;+ margin-bottom: 0.2em;+ width: 8.2em;+ }+ ]]></style>+ </head>+ <body>++ <p>Test passes if the 2 black stripes are <strong>identical</strong>.</p>++ <div></div>++ <div></div>++ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-large-001-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-large-001-ref.xhtnew file mode 100644index 00000000000..d478fe264fb--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-large-001-ref.xht@@ -0,0 +1,29 @@+<!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-09-03 -->+ <meta name="flags" content="image" />+ <style type="text/css"><![CDATA[+ body+ {+ font: 1.25em/1 serif;+ margin-left: 0em;+ }++ div:first-child, div + div + div {margin-left: 1em;}++ img {vertical-align: top;}+ ]]></style>+ </head>+ <body>++ <div><img src="support/swatch-gray.png" width="340" height="20" alt="Image download support must be enabled" /></div>++ <div><img src="support/swatch-blue.png" width="40" height="40" alt="Image download support must be enabled" /><img src="support/swatch-lime.png" width="40" height="40" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" width="40" height="40" alt="Image download support must be enabled" /><img src="support/swatch-lime.png" width="40" height="40" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" width="40" height="40" alt="Image download support must be enabled" /><img src="support/swatch-lime.png" width="40" height="40" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" width="40" height="40" alt="Image download support must be enabled" /><img src="support/swatch-lime.png" width="40" height="40" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" width="120" height="40" alt="Image download support must be enabled" /></div>++ <div><img src="support/swatch-gray.png" width="340" 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-rule-ridge-000-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-ridge-000-ref.xhtnew file mode 100644index 00000000000..f75d5c34b20--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-ridge-000-ref.xht@@ -0,0 +1,31 @@+<!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="ahem" />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: black;+ color: black;+ font: 3.125em/1 Ahem;+ margin-bottom: 0.2em;+ width: 8.2em;+ }++ span {border-left: lime ridge 0.2em;}+ ]]></style>+ </head>+ <body>++ <p>Test passes if the 2 black stripes with vertical green bars are <strong>identical</strong>.</p>++ <div>1234<span>5678</span></div>++ <div>1234<span>5678</span></div>++ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-samelength-001-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-samelength-001-ref.xhtnew file mode 100644index 00000000000..4955db421f7--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-samelength-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-15 -->+ <style type="text/css"><![CDATA[+ body {margin: 8px;}++ p+ {+ line-height: 1.25em;+ margin: 1em 0em;+ }++ strong {line-height: 1;}++ div+ {+ background-color: green;+ height: 100px;+ width: 100px;+ }+ ]]></style>+ </head>+ <body>++ <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>++ <div></div>++ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-solid-000-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-solid-000-ref.xhtnew file mode 100644index 00000000000..61225697e92--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-rule-solid-000-ref.xht@@ -0,0 +1,31 @@+<!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="ahem" />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: black;+ color: black;+ font: 3.125em/1 Ahem;+ margin-bottom: 0.2em;+ width: 8.2em;+ }++ span {border-left: lime solid 0.2em;}+ ]]></style>+ </head>+ <body>++ <p>Test passes if the 2 black stripes with vertical green bars are <strong>identical</strong>.</p>++ <div>1234<span>5678</span></div>++ <div>1234<span>5678</span></div>++ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-width-001-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-width-001-ref.xhtnew file mode 100644index 00000000000..f71fdc9de82--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-width-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-23 -->+ <meta name="flags" content="ahem" />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ font: 1.25em/1 Ahem;+ width: 30em;+ background-color: yellow;+ color: black;+ }+ ]]></style>+ </head>+ <body>+ <p>Test passes if it is identical to the reference.</p>+ <div>x xx x xx x xx x xx x xx <br />++ xxx xxx xxx xxx xxx <br />++ xxxx xxxx xxxx xxxx xxxx <br />++ xxxxx xxxxx xxxxx xxxxx xxxxx <br />++ x xx x xx x xx x xx <br />++ xxx xxx xxx xxx <br />++ xxxx xxxx xxxx xxxx <br />++ xxxxx xxxxx xxxxx xxxxx+ </div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-width-002-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-width-002-ref.xhtnew file mode 100644index 00000000000..68e10339a1c--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-width-002-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-23 -->+ <meta name="flags" content="image" />+ <style type="text/css"><![CDATA[+ table+ {+ background-color: yellow;+ border-spacing: 0px;+ border: gray solid 1em;+ font: 1.25em/1 serif;+ }++ td {padding: 0 1em 0 0;}++ img, td {vertical-align: top;}+ ]]></style>+ </head>+ <body>+ <p>Test passes if there are two black bars and two blue bars with a yellow stripe to the right of each bar, matching reference.</p>+ <table>+ <tr>+ <td><img src="support/black20x20.png" width="40" height="40" alt="Image download support must be enabled" /></td>+ <td><img src="support/black20x20.png" width="40" height="40" alt="Image download support must be enabled" /></td>+ <td><img src="support/swatch-blue.png" width="40" height="40" alt="Image download support must be enabled" /></td>+ <td><img src="support/swatch-blue.png" width="40" height="40" alt="Image download support must be enabled" /></td>+ </tr>+ </table>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-width-ch-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-width-ch-ref.htmlnew file mode 100644index 00000000000..f91fa33c3ce--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-width-ch-ref.html@@ -0,0 +1,40 @@+<!DOCTYPE html>+<title>multicolumn | column-width</title>+<link rel="author" title="Opera Software ASA" href="http://www.opera.com/">+<link rel="stylesheet" type="text/css" href="../../fonts/ahem.css">+<style>+ .multicol-ref {+ font: 10px ahem;+ display: grid;+ grid-template-columns: 1fr 1ch 1fr 1ch 1fr 1ch 1fr 1ch 1fr;+ width: 69ch;+ background: yellow;+ }+</style>++<div class="multicol-ref">+ <span>+ one two three four+ five six seven eight+ </span>+ <span></span>+ <span>+ nineten eleven twelve+ thirtn+ </span>+ <span></span>+ <span>+ fourtnfiftn sixtn+ seventn eightn ninetn+ </span>+ <span></span>+ <span>+ twenty+ hundred thousand+ </span>+ <span></span>+ <span>+ million billionx+ trillionsopp+ </span>+</div>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-width-invalid-001-ref.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-width-invalid-001-ref.xhtnew file mode 100644index 00000000000..8664fc38253--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/multicol-width-invalid-001-ref.xht@@ -0,0 +1,40 @@+<!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-23 -->+ <meta name="flags" content="image" />+ <style type="text/css"><![CDATA[+ table+ {+ background-color: yellow;+ border-spacing: 0px;+ border: gray solid 1em;+ font: 1.25em/1 serif;+ }++ td {padding: 0 1em 0 0;}++ img, td {vertical-align: top;}+ ]]></style>+ </head>+ <body>+ <p>This test passes is it is idential to the reference.</p>+ <table>+ <tr>+ <td><img src="support/black20x20.png" width="40" height="20" alt="Image download support must be enabled" /></td>+ <td><img src="support/black20x20.png" width="40" height="20" alt="Image download support must be enabled" /></td>+ <td><img src="support/swatch-blue.png" width="40" height="20" alt="Image download support must be enabled" /></td>+ <td><img src="support/swatch-blue.png" width="40" height="20" alt="Image download support must be enabled" /></td>+ </tr>++ <tr>+ <td><img src="support/swatch-blue.png" width="40" height="20" alt="Image download support must be enabled" /></td>+ <td><img src="support/swatch-blue.png" width="40" height="20" alt="Image download support must be enabled" /></td>+ <td><img src="support/black20x20.png" width="40" height="20" alt="Image download support must be enabled" /></td>+ <td><img src="support/black20x20.png" width="40" height="20" alt="Image download support must be enabled" /></td>+ </tr>+ </table>+ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/reference/multicol-basic-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/reference/multicol-basic-ref.htmlnew file mode 100644index 00000000000..a2a323f6dce--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/reference/multicol-basic-ref.html@@ -0,0 +1,72 @@+<!DOCTYPE html>+<html>+<!-- Submitted from TestTWF Paris -->+<head>+ <title>CSS Test reference</title>+ <link rel="author" title="Anselm Hannemann" href="mailto:[email protected]"/>+ <link rel="reviewer" title="Elika J Etemad" href="http://fantasai.inkedblade.net/contact">+ <meta name="flags" content="ahem"/>++ <link rel="stylesheet" type="text/css" href="../../../fonts/ahem.css" />+ <style type="text/css">+ .multicol-wrapper>*{+ font: 20px/1 Ahem;+ }++ div.multicol-wrapper{+ border: thin solid black;+ display: inline-block;+ margin: 1em auto;+ width: 360px;+ }++ .multicol-basic-ref{+ background: yellow;+ width: 360px;+ border-spacing: 0;+ border-collapse: collapse;+ padding: 0;+ }++ .multicol-basic-ref td{+ padding: 0;+ }+ .multicol-basic-ref-item{+ padding: 0;+ width: 120px;+ background: #000;+ border-spacing: 0;+ border-collapse: collapse;+ display: inline;+ border: none;+ }++ .item-1{+ background: purple;+ color: purple;+ }++ .item-2{+ background: orange;+ color: orange;+ }++ .item-3{+ background: blue;+ color: blue;+ }+ </style>+</head>+<body>+<p>Test passes if there are three vertical stripes in the yellow box below: 1st purple, 2nd orange, 3rd blue.</p>+<div class="multicol-wrapper">+ <table class="multicol-basic-ref">+ <tr>+ <td><div class="multicol-basic-ref-item item-1">XXXX XXXX XXXX XXXX XXXX XXXX XXXX</div></td>+ <td><div class="multicol-basic-ref-item item-2">XXXX XXXX XXXX XXXX XXXX XXXX XXXX</div></td>+ <td><div class="multicol-basic-ref-item item-3">XXXX XXXX XXXX XXXX XXXX XXXX XXXX</div></td>+ </tr>+ </table>+</div>+</body>+</html>diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/support/black20x20.png b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/support/black20x20.pngnew file mode 100644index 00000000000..ebf7027ee78Binary files /dev/null and b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/support/black20x20.png differdiff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/support/swatch-blue.png b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/support/swatch-blue.pngnew file mode 100644index 00000000000..bf2759634d4Binary files /dev/null and b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/support/swatch-blue.png differdiff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/support/swatch-gray.png b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/support/swatch-gray.pngnew file mode 100644index 00000000000..92c73561f3aBinary files /dev/null and b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/support/swatch-gray.png differdiff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/support/swatch-green.png b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/support/swatch-green.pngnew file mode 100644index 00000000000..0aa79b0c86bBinary files /dev/null and b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/support/swatch-green.png differdiff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/support/swatch-lime.png b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/support/swatch-lime.pngnew file mode 100644index 00000000000..55fd7fdaedfBinary files /dev/null and b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/support/swatch-lime.png differdiff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/support/swatch-orange.png b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/support/swatch-orange.pngnew file mode 100644index 00000000000..d3cd498b52bBinary files /dev/null and b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/support/swatch-orange.png differdiff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/support/swatch-pink.png b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/support/swatch-pink.pngnew file mode 100644index 00000000000..95b84499a3dBinary files /dev/null and b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/support/swatch-pink.png differdiff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/support/swatch-purple.png b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/support/swatch-purple.pngnew file mode 100644index 00000000000..73bea775175Binary files /dev/null and b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/support/swatch-purple.png differdiff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/support/swatch-white.png b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/support/swatch-white.pngnew file mode 100644index 00000000000..1a7d4323d77Binary files /dev/null and b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/support/swatch-white.png differdiff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/support/swatch-yellow.png b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/support/swatch-yellow.pngnew file mode 100644index 00000000000..1591aa0e2e2Binary files /dev/null and b/Tests/LibWeb/Ref/expected/wpt-import/css/css-multicol/support/swatch-yellow.png differdiff --git a/Tests/LibWeb/Ref/input/multicol-text-change-in-later-column.html b/Tests/LibWeb/Ref/input/multicol-text-change-in-later-column.htmlnew file mode 100644index 00000000000..df4b58418d9--- /dev/null+++ b/Tests/LibWeb/Ref/input/multicol-text-change-in-later-column.html@@ -0,0 +1,20 @@+<!DOCTYPE html>+<html class="reftest-wait">+<link rel="match" href="../expected/multicol-text-change-in-later-column-ref.html">+<style>+ @font-face {+ font-family: Ahem;+ src: url("../data/fonts/Ahem.ttf");+ }+ body { margin: 0; }+ div { columns: 2; column-fill: auto; height: 40px; width: 220px; column-gap: 20px; font: 20px/20px Ahem; }+ p { margin: 0; }+</style>+<div><p id="paragraph">aaaa bbbb cccc dddd</p></div>+<script>+ requestAnimationFrame(() => requestAnimationFrame(() => {+ document.getElementById("paragraph").textContent = "aaaa bbbb cccc yy";+ requestAnimationFrame(() => document.documentElement.classList.remove("reftest-wait"));+ }));+</script>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/column-count-used-001.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/column-count-used-001.htmlnew file mode 100644index 00000000000..97e36ac2fed--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/column-count-used-001.html@@ -0,0 +1,26 @@+<!doctype html>+<title>column-count used value when neither column-count nor column-width are auto</title>+<link rel=help href=https://www.w3.org/TR/css-multicol-1/#pseudo-algorithm>+<link rel=match href=../../../../expected/wpt-import/css/css-multicol/../reference/ref-filled-green-100px-square.xht>+<style>+div {+ position: absolute;+}+.bg {+ background: red;+ width: 100px;+ height: 100px;+}+.test {+ line-height: 50px;+ width: 100px;+ background: green;+ columns: 2 20px;+ column-gap: 0;+ orphans: 1;+ widows: 1;+}+</style>+<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>+<div class=bg></div>+<div class=test><br><br><br><br></div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/column-rule-002.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/column-rule-002.htmlnew file mode 100644index 00000000000..56796e974d5--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/column-rule-002.html@@ -0,0 +1,12 @@+<!DOCTYPE html>+<title>Column rule paint order test</title>+<link rel="author" title="Morten Stenshorne" href="mailto:[email protected]">+<link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-gaps-and-rules">+<link rel="match" href="../../../../expected/wpt-import/css/css-multicol/column-rule-002-ref.html">+<p>There should be four squares below, on a yellow background.</p>+<div style="columns:3; column-gap:30px; column-rule:30px solid; column-fill:auto; width:180px; height:100px; background:yellow;">+ <div style="height:250px;">+ <div style="height:30px;"></div>+ <div style="width:180px; height:40px; background:yellow;"></div>+ </div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/columnfill-auto-max-height-001.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/columnfill-auto-max-height-001.htmlnew file mode 100644index 00000000000..95a28aab235--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/columnfill-auto-max-height-001.html@@ -0,0 +1,45 @@+<!DOCTYPE html>++ <meta charset="UTF-8">++ <title>CSS Multi-column Layout Test: 'column-fill: auto' and height constrained of a multi-column container</title>++ <!--++ See also++ Bug 1348839: 'column-fill: auto' does not fill as expected, content ends up in one column+ https://bugzilla.mozilla.org/show_bug.cgi?id=1348839++ -->++ <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">+ <link rel="help" href="https://www.w3.org/TR/css-multicol-1/#cf" title="7.1 column-fill">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/../reference/ref-filled-green-100px-square.xht">++ <meta content="This test verifies how content is distributed among columns when the height of a multi-column container is constrained and when 'column-fill' is set to 'auto'. In this test, the line box height is exactly 25px. So, content should fill 4 lines of the first column and should only fill up the first column. Since column rules are only drawn between two columns that both have content and since the test expects only 1 column filled with content, therefore the column rule should not be painted, thus the 'no red' test success condition." name="assert">++ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style>+ div+ {+ color: green;+ column-count: 2;+ column-fill: auto; /* fill columns sequentially */+ column-gap: 4em; /* computes to 100px */+ column-rule: red solid 4em;+ font-family: Ahem;+ /*+ To download Ahem font:+ http://www.w3.org/Style/CSS/Test/Fonts/Ahem/+ */+ font-size: 25px;+ line-height: 1;+ max-height: 100px;+ width: 300px;+ }+ </style>++ <p>Test passes if there is a filled green square and <strong>no red</strong>.++ <div>Abcd efgh ijkl mno.</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/columnfill-auto-max-height-002.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/columnfill-auto-max-height-002.htmlnew file mode 100644index 00000000000..6f11910a3ff--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/columnfill-auto-max-height-002.html@@ -0,0 +1,59 @@+<!DOCTYPE html>++ <meta charset="UTF-8">++ <title>CSS Multi-column Layout Test: 'column-fill: auto' and height constrained of a multi-column container</title>++ <!--++ See also++ Bug 1348839: 'column-fill: auto' does not fill as expected, content ends up in one column+ https://bugzilla.mozilla.org/show_bug.cgi?id=1348839++ -->++ <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">+ <link rel="help" href="https://www.w3.org/TR/css-multicol-1/#cf" title="7.1 column-fill">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/../reference/ref-filled-green-100px-square.xht">++ <meta content="This test verifies how content is distributed among columns when the height of a multi-column container is constrained and when 'column-fill' is set to 'auto'. In this test, the line box height is exactly 25px. So, content should fill 4 lines of the first column and should only fill up the first column. Since column rules are only drawn between two columns that both have content and since the test expects only 1 column filled with content, therefore the column rule should not be painted, thus the 'no red' test success condition." name="assert">++ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style>+ div+ {+ color: green;+ column-count: 4;+ column-fill: auto; /* fill columns sequentially */+ column-gap: 4em; /* computes to 100px */+ column-rule: red solid 4em;+ font-family: Ahem;+ /*+ To download Ahem font:+ http://www.w3.org/Style/CSS/Test/Fonts/Ahem/+ */+ font-size: 25px;+ line-height: 1;+ max-height: 100px;+ orphans: 1;+ /*+ In this test, the orphans property specifies the+ minimum number of line boxes that must be left+ in a column box before a column break, that must+ be left at the bottom of a column box.+ */+ widows: 1;+ /*+ In this test, the widows property specifies the+ minimum number of line boxes that must be left+ in a column box after a column break, that must+ be left at the top of a column box.+ */+ width: 700px;+ }+ </style>++ <p>Test passes if there is a filled green square and <strong>no red</strong>.++ <div>Abcd efgh ijkl mno.</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/equal-gap-and-rule.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/equal-gap-and-rule.htmlnew file mode 100644index 00000000000..14842d00d84--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/equal-gap-and-rule.html@@ -0,0 +1,8 @@+<!DOCTYPE html>+<link rel="author" title="Morten Stenshorne" href="mailto:[email protected]">+<link rel="help" href="https://www.w3.org/TR/css-multicol-1/#column-gaps-and-rules">+<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="columns:8; column-fill:auto; column-gap:5px; column-rule:5px solid green; width:100px; height:100px; background:red;">+ <div style="height:800px; background:green;"></div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-basic-001.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-basic-001.htmlnew file mode 100644index 00000000000..9594d8f41f5--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-basic-001.html@@ -0,0 +1,65 @@+<!DOCTYPE html>+<html>+<!-- Submitted from TestTWF Paris -->+<head>+ <meta charset="utf-8">+ <title>CSS Test: Multi-column element via columns: [integer]</title>+ <link rel="author" title="Anselm Hannemann" href="mailto:[email protected]"/>+ <link rel="author" title="Håkon Wium Lie" href="mailto:[email protected]"/>+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#columns"/>+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/reference/multicol-basic-ref.html"/>+ <meta name="flags" content="ahem"/>+ <link rel="reviewer" title="Elika J Etemad" href="http://fantasai.inkedblade.net/contact">++ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css">+ .multicol-wrapper>*{+ font: 20px/1 Ahem;+ }++ div.multicol-wrapper{+ border: thin solid black;+ display: inline-block;+ margin: 1em auto;+ width: 360px;+ }++ .multicol-basic-ref{+ background: yellow;+ width: 360px;+ columns: 3;+ column-gap: 0;+ column-rule: none;+ }++ .multicol-basic-ref-item{+ background: #000;+ }++ .item-1{+ background: purple;+ color: purple;+ }++ .item-2{+ background: orange;+ color: orange;+ }++ .item-3{+ background: blue;+ color: blue;+ }+ </style>+</head>+<body>+<p>Test passes if there are three vertical stripes in the yellow box below: 1st purple, 2nd orange, 3rd blue.</p>+<div class="multicol-wrapper">+ <div class="multicol-basic-ref">+ <span class="multicol-basic-ref-item item-1">XXXX XXXX XXXX XXXX XXXX XXXX XXXX</span>+ <span class="multicol-basic-ref-item item-2">XXXX XXXX XXXX XXXX XXXX XXXX XXXX</span>+ <span class="multicol-basic-ref-item item-3">XXXX XXXX XXXX XXXX XXXX XXXX XXXX</span>+ </div>+</div>+</body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-basic-002.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-basic-002.htmlnew file mode 100644index 00000000000..48ad88cb93a--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-basic-002.html@@ -0,0 +1,65 @@+<!DOCTYPE html>+<html>+<!-- Submitted from TestTWF Paris -->+<head>+ <meta charset="utf-8">+ <title>CSS Test: Multi-column element via column-count: [integer]</title>+ <link rel="author" title="Anselm Hannemann" href="mailto:[email protected]"/>+ <link rel="author" title="Håkon Wium Lie" href="mailto:[email protected]"/>+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#columns"/>+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/reference/multicol-basic-ref.html"/>+ <meta name="flags" content="ahem"/>+ <link rel="reviewer" title="Elika J Etemad" href="http://fantasai.inkedblade.net/contact">++ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css">+ .multicol-wrapper>*{+ font: 20px/1 Ahem;+ }++ div.multicol-wrapper{+ border: thin solid black;+ display: inline-block;+ margin: 1em auto;+ width: 360px;+ }++ .multicol-basic-ref{+ background: yellow;+ width: 360px;+ column-count: 3;+ column-gap: 0;+ column-rule: none;+ }++ .multicol-basic-ref-item{+ background: #000;+ }++ .item-1{+ background: purple;+ color: purple;+ }++ .item-2{+ background: orange;+ color: orange;+ }++ .item-3{+ background: blue;+ color: blue;+ }+ </style>+</head>+<body>+<p>Test passes if there are three vertical stripes in the yellow box below: 1st purple, 2nd orange, 3rd blue.</p>+<div class="multicol-wrapper">+ <div class="multicol-basic-ref">+ <span class="multicol-basic-ref-item item-1">XXXX XXXX XXXX XXXX XXXX XXXX XXXX</span>+ <span class="multicol-basic-ref-item item-2">XXXX XXXX XXXX XXXX XXXX XXXX XXXX</span>+ <span class="multicol-basic-ref-item item-3">XXXX XXXX XXXX XXXX XXXX XXXX XXXX</span>+ </div>+</div>+</body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-basic-003.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-basic-003.htmlnew file mode 100644index 00000000000..59180223073--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-basic-003.html@@ -0,0 +1,65 @@+<!DOCTYPE html>+<html>+<!-- Submitted from TestTWF Paris -->+<head>+ <meta charset="utf-8">+ <title>CSS Test: Multi-column element via columns: [width]</title>+ <link rel="author" title="Anselm Hannemann" href="mailto:[email protected]"/>+ <link rel="author" title="Håkon Wium Lie" href="mailto:[email protected]"/>+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#columns"/>+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/reference/multicol-basic-ref.html"/>+ <meta name="flags" content="ahem"/>+ <link rel="reviewer" title="Elika J Etemad" href="http://fantasai.inkedblade.net/contact">++ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css">+ .multicol-wrapper>*{+ font: 20px/1 Ahem;+ }++ div.multicol-wrapper{+ border: thin solid black;+ display: inline-block;+ margin: 1em auto;+ width: 360px;+ }++ .multicol-basic-ref{+ background: yellow;+ width: 360px;+ columns: 120px;+ column-gap: 0;+ column-rule: none;+ }++ .multicol-basic-ref-item{+ background: #000;+ }++ .item-1{+ background: purple;+ color: purple;+ }++ .item-2{+ background: orange;+ color: orange;+ }++ .item-3{+ background: blue;+ color: blue;+ }+ </style>+</head>+<body>+<p>Test passes if there are three vertical stripes in the yellow box below: 1st purple, 2nd orange, 3rd blue.</p>+<div class="multicol-wrapper">+ <div class="multicol-basic-ref">+ <span class="multicol-basic-ref-item item-1">XXXX XXXX XXXX XXXX XXXX XXXX XXXX</span>+ <span class="multicol-basic-ref-item item-2">XXXX XXXX XXXX XXXX XXXX XXXX XXXX</span>+ <span class="multicol-basic-ref-item item-3">XXXX XXXX XXXX XXXX XXXX XXXX XXXX</span>+ </div>+</div>+</body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-basic-004.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-basic-004.htmlnew file mode 100644index 00000000000..b9caf6c82b8--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-basic-004.html@@ -0,0 +1,65 @@+<!DOCTYPE html>+<html>+<!-- Submitted from TestTWF Paris -->+<head>+ <meta charset="utf-8">+ <title>CSS Test: Multi-column element via column-width: [width]</title>+ <link rel="author" title="Anselm Hannemann" href="mailto:[email protected]"/>+ <link rel="author" title="Håkon Wium Lie" href="mailto:[email protected]"/>+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#columns"/>+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/reference/multicol-basic-ref.html"/>+ <meta name="flags" content="ahem"/>+ <link rel="reviewer" title="Elika J Etemad" href="http://fantasai.inkedblade.net/contact">++ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css">+ .multicol-wrapper>*{+ font: 20px/1 Ahem;+ }++ div.multicol-wrapper{+ border: thin solid black;+ display: inline-block;+ margin: 1em auto;+ width: 360px;+ }++ .multicol-basic-ref{+ background: yellow;+ width: 360px;+ column-width: 120px;+ column-gap: 0;+ column-rule: none;+ }++ .multicol-basic-ref-item{+ background: #000;+ }++ .item-1{+ background: purple;+ color: purple;+ }++ .item-2{+ background: orange;+ color: orange;+ }++ .item-3{+ background: blue;+ color: blue;+ }+ </style>+</head>+<body>+<p>Test passes if there are three vertical stripes in the yellow box below: 1st purple, 2nd orange, 3rd blue.</p>+<div class="multicol-wrapper">+ <div class="multicol-basic-ref">+ <span class="multicol-basic-ref-item item-1">XXXX XXXX XXXX XXXX XXXX XXXX XXXX</span>+ <span class="multicol-basic-ref-item item-2">XXXX XXXX XXXX XXXX XXXX XXXX XXXX</span>+ <span class="multicol-basic-ref-item item-3">XXXX XXXX XXXX XXXX XXXX XXXX XXXX</span>+ </div>+</div>+</body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-break-000.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-break-000.xhtnew file mode 100644index 00000000000..a8e84d4507d--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-break-000.xht@@ -0,0 +1,55 @@+<!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: break-after: column (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-25 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#break-before-break-after-break-inside" title="5.1. 'break-before', 'break-after', 'break-inside'" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-break-000-ref.xht" />+ <meta name="flags" content="ahem image" />+ <meta name="assert" content="This test checks that basic support of 'break-after: column'." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div#test, div#reference+ {+ background-color: yellow;+ margin-bottom: 0.5em;+ font: 1.25em/1 Ahem;+ height: 3em;+ width: 10em;+ }++ div#test+ {+ column-fill: auto;+ column-gap: 0;+ column-width: 2em;++ /*++ N == 5;++ W == 2em;++ */+ }++ div#test > div {break-after: column;}++ img {vertical-align: top;}+ ]]></style>+ </head>+ <body>++ <p>Test passes if the 2 horizontal bars are <strong>identical</strong>.</p>++ <div id="test">+ <div>A</div>+ <div>B</div>+ <div>C</div>+ </div>++ <div id="reference"><img src="support/black20x20.png" alt="Image download support must be enabled" /> <img src="support/black20x20.png" alt="Image download support must be enabled" /> <img src="support/black20x20.png" alt="Image download support must be enabled" /></div>++ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-collapsing-001.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-collapsing-001.xhtnew file mode 100644index 00000000000..238e1455187--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-collapsing-001.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: no margin collapsing with its first child block box</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-07-25 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#the-multi-column-model" title="2. The multi-column model" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-collapsing-001-ref.xht"/>+ <meta name="flags" content="ahem" />+ <meta name="assert" content="This test checks that the top margin of the first child block box of a multicol element does not collapse with the margin top of such multicol element." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ body > div+ {+ background-color: black;+ border: black solid 1px;+ font: 1.25em/1 Ahem;+ width: 10em;+ }++ div > div+ {+ background-color: yellow;+ color: black;+ margin: 1em;+ width: 8em;+ orphans: 1;+ widows: 1;++ column-count: 3;+ column-gap: 1em;+ }++ h4+ {+ font: inherit;+ margin: 1em 0 0;+ }+ ]]></style>+ </head>+ <body>+ <div>+ <div>+ <h4>ab cd</h4>+ ef gh+ ij kl+ mn oq+ </div>+ </div>+ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-columns-001.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-columns-001.xhtnew file mode 100644index 00000000000..3d2dbfe18b1--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-columns-001.xht@@ -0,0 +1,43 @@+<!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: columns shorthand (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-07-25 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#the-number-and-width-of-columns" title="3. The number and width of columns" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-columns-001-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="This test checks that 'columns: 100px 6' shorthand correctly set 'column-width' and 'column-count' properties." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ body {width: 600px;}++ div+ {+ background-color: yellow;+ color: black;+ font: 1.25em/1 Ahem;+ orphans: 1;+ widows: 1;++ columns: 100px 6;+ column-gap: 0;+ }+ ]]></style>+ </head>+ <body>+ <div>+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ </div>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-columns-002.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-columns-002.xhtnew file mode 100644index 00000000000..1d25efc4655--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-columns-002.xht@@ -0,0 +1,43 @@+<!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: columns shorthand (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-07-25 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#the-number-and-width-of-columns" title="3. The number and width of columns" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-columns-001-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="This test checks that 'columns: 6 100px' shorthand correctly set 'column-width' and 'column-count' properties." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ body {width: 600px;}++ div+ {+ background-color: yellow;+ color: black;+ font: 1.25em/1 Ahem;+ orphans: 1;+ widows: 1;++ columns: 6 100px;+ column-gap: 0;+ }+ ]]></style>+ </head>+ <body>+ <div>+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ </div>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-columns-003.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-columns-003.xhtnew file mode 100644index 00000000000..026c13975cc--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-columns-003.xht@@ -0,0 +1,43 @@+<!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: columns shorthand (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-07-25 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#the-number-and-width-of-columns" title="3. The number and width of columns" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-columns-001-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="This test checks that 'columns: 100px auto' shorthand correctly set 'column-width' and 'column-count' properties." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ body {width: 600px;}++ div+ {+ background-color: yellow;+ color: black;+ font: 1.25em/1 Ahem;+ orphans: 1;+ widows: 1;++ columns: 100px auto;+ column-gap: 0;+ }+ ]]></style>+ </head>+ <body>+ <div>+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ </div>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-columns-004.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-columns-004.xhtnew file mode 100644index 00000000000..f37faacc1b9--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-columns-004.xht@@ -0,0 +1,43 @@+<!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: columns shorthand (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-07-25 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#the-number-and-width-of-columns" title="3. The number and width of columns" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-columns-001-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="This test checks that 'columns: auto 100px' shorthand correctly set 'column-width' and 'column-count' properties." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ body {width: 600px;}++ div+ {+ background-color: yellow;+ color: black;+ font: 1.25em/1 Ahem;+ orphans: 1;+ widows: 1;++ columns: auto 100px;+ column-gap: 0;+ }+ ]]></style>+ </head>+ <body>+ <div>+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ </div>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-columns-005.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-columns-005.xhtnew file mode 100644index 00000000000..622709dfc3b--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-columns-005.xht@@ -0,0 +1,43 @@+<!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: columns shorthand (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-07-25 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#the-number-and-width-of-columns" title="3. The number and width of columns" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-columns-001-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="This test checks that 'columns: 6' shorthand correctly set 'column-width' and 'column-count' properties. 'columns: 6' is equivalent to 'column-width: auto' and 'column-count: 6'." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ body {width: 600px;}++ div+ {+ background-color: yellow;+ color: black;+ font: 1.25em/1 Ahem;+ orphans: 1;+ widows: 1;++ columns: 6;+ column-gap: 0;+ }+ ]]></style>+ </head>+ <body>+ <div>+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ </div>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-columns-006.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-columns-006.xhtnew file mode 100644index 00000000000..d6c10176791--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-columns-006.xht@@ -0,0 +1,43 @@+<!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: columns shorthand (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-07-25 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#the-number-and-width-of-columns" title="3. The number and width of columns" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-columns-001-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="This test checks that 'columns: 6 auto' shorthand correctly set 'column-width' and 'column-count' properties." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ body {width: 600px;}++ div+ {+ background-color: yellow;+ color: black;+ font: 1.25em/1 Ahem;+ orphans: 1;+ widows: 1;++ columns: 6 auto;+ column-gap: 0;+ }+ ]]></style>+ </head>+ <body>+ <div>+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ </div>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-columns-007.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-columns-007.xhtnew file mode 100644index 00000000000..61a33c88b63--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-columns-007.xht@@ -0,0 +1,43 @@+<!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: columns shorthand (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-07-25 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#the-number-and-width-of-columns" title="3. The number and width of columns" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-columns-001-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="This test checks that 'columns: auto 6' shorthand correctly set 'column-width' and 'column-count' properties." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ body {width: 600px;}++ div+ {+ background-color: yellow;+ color: black;+ font: 1.25em/1 Ahem;+ orphans: 1;+ widows: 1;++ columns: auto 6;+ column-gap: 0;+ }+ ]]></style>+ </head>+ <body>+ <div>+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ </div>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-columns-invalid-001.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-columns-invalid-001.xhtnew file mode 100644index 00000000000..2b721903824--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-columns-invalid-001.xht@@ -0,0 +1,43 @@+<!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: invalid columns shorthand</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-07-26 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#the-number-and-width-of-columns" title="3. The number and width of columns" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-columns-invalid-001-ref.xht" />+ <meta name="flags" content="ahem invalid" />+ <meta name="assert" content="This test checks that 'columns: 8 normal' is invalid (generating a parsing error) and therefore will be ignored." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: yellow;+ border: gray solid 1em;+ color: black;+ font: 1.25em/1 Ahem;+ orphans: 1;+ widows: 1;+ width: 12em;++ column-count: 4;+ column-gap: 0;+ columns: 8 normal;+ }++ span {color: blue;}+ ]]></style>+ </head>+ <body>+ <div>+ bl ac+ <span>+ bl ue+ </span>+ <span>+ bl ue+ </span>+ bl ac+ </div>+ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-columns-invalid-002.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-columns-invalid-002.xhtnew file mode 100644index 00000000000..b68b0e31244--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-columns-invalid-002.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>++ <!--+ Original, initial filename of this test was+ multicol-columns-toolong-002.xht+ and it should be filename-renamed+ multicol-columns-invalid-002.xht+ -->++ <title>CSS Multi-column Layout Test: invalid columns shorthand</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-07-26 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#the-number-and-width-of-columns" title="3. The number and width of columns" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-columns-invalid-001-ref.xht" />+ <meta name="flags" content="ahem invalid" />+ <meta name="assert" content="This test checks that 'columns: 8 auto 6em' is invalid (generating a parsing error) and therefore will be ignored." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: yellow;+ border: gray solid 1em;+ color: black;+ font: 1.25em/1 Ahem;+ orphans: 1;+ widows: 1;+ width: 12em;++ column-count: 4;+ column-gap: 0;+ columns: 8 auto 6em;+ }++ span {color: blue;}+ ]]></style>+ </head>+ <body>+ <div>+ bl ac+ <span>+ bl ue+ </span>+ <span>+ bl ue+ </span>+ bl ac+ </div>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-columns-toolong-001.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-columns-toolong-001.xhtnew file mode 100644index 00000000000..509d0610f97--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-columns-toolong-001.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 Multi-column Layout Test: narrower inline content inside wider colum box</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-07-26 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#the-number-and-width-of-columns" title="3. The number and width of columns" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-columns-invalid-001-ref.xht"/>+ <meta name="flags" content="ahem" />+ <meta name="assert" content="This test checks the rendering of inline content (2em) inside wider (3em) column boxes." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: yellow;+ border: gray solid 1em;+ color: black;+ font: 1.25em/1 Ahem;+ orphans: 1;+ widows: 1;+ width: 12em;++ column-count: 4;+ column-gap: 0;+ }++ span {color: blue;}+ ]]></style>+ </head>+ <body>+ <div>+ bl ac+ <span>+ bl ue+ </span>+ <span>+ bl ue+ </span>+ bl ac+ </div>+ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-count-001.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-count-001.xhtnew file mode 100644index 00000000000..0ffa846ec4d--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-count-001.xht@@ -0,0 +1,43 @@+<!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-count (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-07-27 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#cc" title="3.2 'column-count'" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-columns-001-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="This test checks that setting 'column-count' should accordingly create 6 column boxes. In this test, each column box should be exactly 100px wide." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ body {width: 600px;}++ div+ {+ background-color: yellow;+ color: black;+ font: 1.25em/1 Ahem;+ orphans: 1;+ widows: 1;++ column-count: 6;+ column-gap: 0;+ }+ ]]></style>+ </head>+ <body>+ <div>+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ </div>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-count-002.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-count-002.xhtnew file mode 100644index 00000000000..5ff3efcf4bd--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-count-002.xht@@ -0,0 +1,37 @@+<!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-count (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-07-27 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#cc" title="3.2 'column-count'" />+ <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 setting 'column-count' should accordingly create 4 column boxes. In this test, each column box should be exactly 5em wide." />+ <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;+ }+ ]]></style>+ </head>+ <body>+ <div>55555 1 1 22 1 22 1 1 333 1 333 1 333 55555 55555 1 1 22 1 22 1 1 22 1 22 1 22 55555 55555 1 1 333 1 333 1 4444 4444 1 55555 55555 1 1 333 1 333 1 4444 4444 1 55555+ </div>+ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-count-computed-004.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-count-computed-004.xhtnew file mode 100644index 00000000000..78b6aa77f12--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-count-computed-004.xht@@ -0,0 +1,47 @@+<!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: both 'column-width' and 'column-count' are 'auto'</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-07-29 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#pseudo-algorithm" title="3.4 Pseudo-algorithm" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-count-computed-004-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="This test checks that if 'column-width' is 'auto' and if 'column-count' is 'auto', then such element will not behave like a multi-column element and column-gap and column-rule declarations will be ignored." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background: yellow;+ border: gray solid 1em;+ color: black;+ font: 1.25em/1 Ahem;+ orphans: 1;+ widows: 1;+ width: 12em;++ column-count: auto;+ column-gap: 7em;+ column-rule-color: red;+ column-rule-width: 1.5em;+ column-rule-style: solid;+ }++ #pink {color: pink;}+ #orange {color: orange;}+ #purple {color: purple;}+ #gray {color: gray;}+ ]]></style>+ </head>++ <body>++ <div>+ <span id="pink">Pink</span>+ <span id="orange">oran</span>+ <span id="purple">PurP</span>+ <span id="gray">gray</span>+ </div>++ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-count-negative-001.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-count-negative-001.xhtnew file mode 100644index 00000000000..68e359dd119--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-count-negative-001.xht@@ -0,0 +1,46 @@+<!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: negative 'column-count' value</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-07-30 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#the-number-and-width-of-columns" title="3. The number and width of columns" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-columns-invalid-001-ref.xht" />+ <meta name="flags" content="ahem invalid" />+ <meta name="assert" content="This test checks that a specified negative 'column-count' value is invalid and ignored." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background: yellow;+ border: gray solid 1em;+ color: black;+ font: 1.25em/1 Ahem;+ orphans: 1;+ widows: 1;+ width: 12em;++ column-count: 4;+ column-count: -1;+ column-gap: 0;+ }++ span {color: blue;}+ ]]></style>+ </head>++ <body>++ <div>+ bl ac+ <span>+ bl ue+ </span>+ <span>+ bl ue+ </span>+ bl ac+ </div>++ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-count-negative-002.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-count-negative-002.xhtnew file mode 100644index 00000000000..bd8beea377c--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-count-negative-002.xht@@ -0,0 +1,46 @@+<!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: zero 'column-count' value</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-07-30 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#the-number-and-width-of-columns" title="3. The number and width of columns" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-columns-invalid-001-ref.xht" />+ <meta name="flags" content="ahem invalid" />+ <meta name="assert" content="This test checks that a specified 0 'column-count' value is invalid and ignored." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background: yellow;+ border: gray solid 1em;+ color: black;+ font: 1.25em/1 Ahem;+ orphans: 1;+ widows: 1;+ width: 12em;++ column-count: 4;+ column-count: 0; /* invalid; must be a greater-than-zero integer */+ column-gap: 0;+ }++ span {color: blue;}+ ]]></style>+ </head>++ <body>++ <div>+ bl ac+ <span>+ bl ue+ </span>+ <span>+ bl ue+ </span>+ bl ac+ </div>++ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-count-non-integer-001.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-count-non-integer-001.xhtnew file mode 100644index 00000000000..ed91f1a41e4--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-count-non-integer-001.xht@@ -0,0 +1,46 @@+<!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: non-integer 'column-count' value</title>+ <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#the-number-and-width-of-columns" title="3. The number and width of columns" />+ <link rel="help" href="http://www.w3.org/TR/css3-values/#integers" title="4.1. Integers: the '<integer>' type" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-columns-invalid-001-ref.xht" />+ <meta name="flags" content="ahem invalid" />+ <meta name="assert" content="This test checks that a specified real 'column-count' value is invalid and ignored." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background: yellow;+ border: gray solid 1em;+ color: black;+ font: 1.25em/1 Ahem;+ orphans: 1;+ widows: 1;+ width: 12em;++ column-count: 4;+ column-count: 2.1; /* invalid; must be an integer */+ column-gap: 0;+ }++ span {color: blue;}+ ]]></style>+ </head>++ <body>++ <div>+ bl ac+ <span>+ bl ue+ </span>+ <span>+ bl ue+ </span>+ bl ac+ </div>++ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-count-non-integer-002.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-count-non-integer-002.xhtnew file mode 100644index 00000000000..a3bb6a854ae--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-count-non-integer-002.xht@@ -0,0 +1,46 @@+<!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: non-integer 'column-count' value</title>+ <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#the-number-and-width-of-columns" title="3. The number and width of columns" />+ <link rel="help" href="http://www.w3.org/TR/css3-values/#integers" title="4.1. Integers: the '<integer>' type" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-columns-invalid-001-ref.xht" />+ <meta name="flags" content="ahem invalid" />+ <meta name="assert" content="This test checks that a specified real 'column-count' value is invalid and ignored." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background: yellow;+ border: gray solid 1em;+ color: black;+ font: 1.25em/1 Ahem;+ orphans: 1;+ widows: 1;+ width: 12em;++ column-count: 4;+ column-count: 1.9; /* invalid; must be an integer */+ column-gap: 0;+ }++ span {color: blue;}+ ]]></style>+ </head>++ <body>++ <div>+ bl ac+ <span>+ bl ue+ </span>+ <span>+ bl ue+ </span>+ bl ac+ </div>++ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-count-non-integer-003.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-count-non-integer-003.xhtnew file mode 100644index 00000000000..9735cec84f4--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-count-non-integer-003.xht@@ -0,0 +1,46 @@+<!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: non-integer 'column-count' value</title>+ <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#the-number-and-width-of-columns" title="3. The number and width of columns" />+ <link rel="help" href="http://www.w3.org/TR/css3-values/#integers" title="4.1. Integers: the '<integer>' type" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-columns-invalid-001-ref.xht" />+ <meta name="flags" content="ahem invalid" />+ <meta name="assert" content="This test checks that a specified real 'column-count' value is invalid and ignored." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background: yellow;+ border: gray solid 1em;+ color: black;+ font: 1.25em/1 Ahem;+ orphans: 1;+ widows: 1;+ width: 12em;++ column-count: 4;+ column-count: 2.0; /* invalid; must be an integer */+ column-gap: 0;+ }++ span {color: blue;}+ ]]></style>+ </head>++ <body>++ <div>+ bl ac+ <span>+ bl ue+ </span>+ <span>+ bl ue+ </span>+ bl ac+ </div>++ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-fill-000.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-fill-000.xhtnew file mode 100644index 00000000000..85553014a04--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-fill-000.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-fill: balance (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-25 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#cf" title="7.1 'column-fill'" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-fill-000-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="This test checks that content is balanced into all columns thanks to 'column-fill: balance'." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div.test, table#reference+ {+ background-color: yellow;+ color: lime;+ margin: 1em 0em;+ font: 1.25em/1 Ahem;+ width: 18em;+ }++ div.test+ {+ columns: 3;+ column-fill: balance;+ column-gap: 0em;++ /*++ N == 3;++ W == 6em;++ */++ orphans: 1;+ widows: 1;+ }++ div.test > p {margin: 0em;}++ table+ {+ border-spacing: 0em;+ table-layout: fixed;+ }++ td {padding: 0em;}+ ]]></style>+ </head>+ <body>++ <p>Test passes if the 3 horizontal bars are <strong>identical</strong>.</p>++ <div class="test">+ <p>A</p>+ <p>B</p>+ <p>C</p>+ </div>++ <div class="test">D<br />E<br />F</div>++ <table id="reference">+ <tr>+ <td>G</td>+ <td>H</td>+ <td>I</td>+ </tr>+ </table>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-fill-001.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-fill-001.xhtnew file mode 100644index 00000000000..eb14f0c1db6--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-fill-001.xht@@ -0,0 +1,65 @@+<!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-fill: balance with set height (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-25 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#cf" title="7.1 'column-fill'" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-fill-001-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="This test checks that content is balanced into all columns of a multi-column element with a set height thanks to 'column-fill: balance'." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div#test, table#reference+ {+ background-color: yellow;+ color: lime;+ font: 1.25em/1 Ahem;+ height: 5em;+ margin: 1em 0em;+ width: 20em;+ }++ div#test+ {+ columns: 2;+ column-fill: balance;+ column-gap: 0em;++ /*++ N == 2;++ W == 10em;++ */+ }++ table+ {+ border-spacing: 0em;+ table-layout: fixed;+ }++ td+ {+ padding: 0em;+ vertical-align: top;+ }+ ]]></style>+ </head>+ <body>++ <p>Test passes if the 2 rectangles are <strong>identical</strong>.</p>++ <div id="test">A<br />B<br />C<br />D<br />E<br />F</div>++ <table id="reference">+ <tr>+ <td>G<br />H<br />I</td>+ <td>J<br />K<br />L</td>+ </tr>+ </table>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-fill-auto-001.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-fill-auto-001.xhtnew file mode 100644index 00000000000..256a95b6dba--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-fill-auto-001.xht@@ -0,0 +1,34 @@+<!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-fill: auto' (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-07-30 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#cf" title="7.1 'column-fill'" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-fill-auto-001-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="This test checks that 'column-fill: auto' fills the column boxes of a multi-colum element sequentially with inline content and does not bother about balancing content of column boxes." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ color: black;+ font: 1.25em/1 Ahem;+ height: 10em;+ orphans: 1;+ widows: 1;+ width: 32em;++ column-count: 3;+ column-fill: auto;+ column-gap: 1em;+ }+ ]]></style>+ </head>++ <body>++ <div>1 22 333 4444 55555 666666 7777777 999999999 1 22 333 4444 55555 666666 7777777 999999999 1 22 333 4444 55555 666666 7777777 999999999</div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-fill-auto-003.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-fill-auto-003.xhtnew file mode 100644index 00000000000..e86760e0a72--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-fill-auto-003.xht@@ -0,0 +1,60 @@+<!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-fill: auto' (basic)</title>+ <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-08-01 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#cf" title="7.1 'column-fill'" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-fill-auto-003-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="This test checks if inline content fills column boxes sequentially when 'column-fill' is set to 'auto'." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-image: url("support/red20x20.png");+ background-repeat: no-repeat;+ background-position: 2em 4em;+ border: green solid 1em;+ color: green;+ font: 1.25em/1 Ahem;+ height: 6em;+ width: 21em;++ column-count: 2;+ column-fill: auto;+ column-gap: 1em;+ column-rule: yellow solid 1em;+ }+ ]]></style>+ </head>++ <body>++ <p>Test passes if there is <strong>no red</strong>.</p>++ <div>1234567890 12 4567 90 123 56 890 123 56789 1 34567 90 12 4567 90+123 56 890 123 56</div>++ <!--++ Expected result:++ ************ ************+ |1234567890| |123 56 890|+ |12 4567 90| |123 56 |+ |123 56 890| | |+ |123 56789 | | |+ |1 34567 90| | |+ |12 4567 90| | |+ ************ ************++ The digits are the green squares, the white squares+ are the blank white spaces. The yellow vertical stripe+ represent both the column-gap and the column-rule.+ The "3" glyph at line 5 of 1st column box should be+ overlapping the red square.++ -->++ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-fill-auto-005.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-fill-auto-005.htmlnew file mode 100644index 00000000000..44ef21bf8dc--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-fill-auto-005.html@@ -0,0 +1,14 @@+<!DOCTYPE html>+<title>Column-fill:auto, auto block-size, more forced breaks than columns</title>+<link rel="author" title="Morten Stenshorne" href="mailto:[email protected]">+<link rel="help" href="https://www.w3.org/TR/2024/CR-css-multicol-1-20240516/#pagination-and-overflow-outside-multicol">+<link rel="help" href="https://issues.chromium.org/issues/385595003">+<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:2; column-fill:auto; background:green;">+ <div style="break-before:column; height:20px;"></div>+ <div style="break-before:column; height:40px;"></div>+ <div style="break-before:column; height:100px;"></div>+ </div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-fill-balance-005.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-fill-balance-005.htmlnew file mode 100644index 00000000000..00a0634253d--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-fill-balance-005.html@@ -0,0 +1,8 @@+<!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="columns:2; column-gap:0; width:100px; height:20px; max-height:40px; min-height:100px; background:red;">+ <div style="height:200px; background:green;"></div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-fill-balance-040.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-fill-balance-040.htmlnew file mode 100644index 00000000000..909829bfb5e--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-fill-balance-040.html@@ -0,0 +1,14 @@+<!DOCTYPE html>+<title>Column balancing, more forced breaks than columns</title>+<link rel="author" title="Morten Stenshorne" href="mailto:[email protected]">+<link rel="help" href="https://www.w3.org/TR/2024/CR-css-multicol-1-20240516/#pagination-and-overflow-outside-multicol">+<link rel="help" href="https://issues.chromium.org/issues/385595003">+<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:2; background:green;">+ <div style="break-before:column; height:20px;"></div>+ <div style="break-before:column; height:40px;"></div>+ <div style="break-before:column; height:100px;"></div>+ </div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-gap-000.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-gap-000.xhtnew file mode 100644index 00000000000..3a22bcc3c80--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-gap-000.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 Multi-column Layout Test: column-gap (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-25 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#column-gap" title="4.1 'column-gap'" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-gap-000-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="This test checks that column gap appears between two columns." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ font: 1.25em/1 Ahem;+ margin: 1em 0;+ width: 30em;+ }++ div#test+ {+ background-color: yellow;+ orphans: 1;+ widows: 1;++ column-width: 10em;+ column-gap: 10em;+ }++ span {color: yellow;}+ ]]></style>+ </head>+ <body>++ <p>Test passes if the 2 horizontal bars are <strong>identical</strong>.</p>++ <div id="test">1234567890<br />1234567890</div>++ <div id="reference">1234567890<span>1234567890</span>1234567890</div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-gap-001.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-gap-001.xhtnew file mode 100644index 00000000000..91e95921d98--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-gap-001.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 Multi-column Layout Test: 'column-gap: normal'</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-05 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#column-gap" title="4.1. 'column-gap'" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-gap-001-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="This test checks that the 'normal' column gap is 1em." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: yellow;+ color: black;+ font: 1.25em/1 Ahem;+ margin: 1em;+ orphans: 1;+ widows: 1;+ width: 3em;+ }++ div.multicol+ {+ column-gap: normal;+ column-width: 1em;+ }++ span {padding-right: 1em;}+ ]]></style>+ </head>+ <body>+ <p>Test passes if the 2 stripes are <strong>identical</strong>.</p>++ <div class="multicol">x<br />x</div>+ <div><span>x</span>x</div>+ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-gap-002.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-gap-002.xhtnew file mode 100644index 00000000000..ccb3c567aa8--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-gap-002.xht@@ -0,0 +1,41 @@+<!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-gap (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-05 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#column-gap" title="4.1. 'column-gap'" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-gap-002-ref.xht" />+ <meta name="flags" content="ahem" />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: yellow;+ border: gray solid 1em;+ color: black;+ font: 1.25em/1 Ahem;+ orphans: 1;+ widows: 1;+ width: 11em;++ column-count: 4;+ column-gap: 1em;+ }++ span {color: blue;}+ ]]></style>+ </head>+ <body>+ <div>+ bl ac+ <span>+ bl ue+ </span>+ <span>+ bl ue+ </span>+ bl ac+ </div>+ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-gap-003.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-gap-003.xhtnew file mode 100644index 00000000000..9581f7b9daa--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-gap-003.xht@@ -0,0 +1,41 @@+<!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-gap: normal'</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-05 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#column-gap" title="4.1. 'column-gap'" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-gap-002-ref.xht" />+ <meta name="flags" content="ahem" />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: yellow;+ border: gray solid 1em;+ color: black;+ font: 1.25em/1 Ahem;+ orphans: 1;+ widows: 1;+ width: 11em;++ column-count: 4;+ column-gap: normal;+ }++ span {color: blue;}+ ]]></style>+ </head>+ <body>+ <div>+ bl ac+ <span>+ bl ue+ </span>+ <span>+ bl ue+ </span>+ bl ac+ </div>+ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-gap-fraction-001.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-gap-fraction-001.xhtnew file mode 100644index 00000000000..09837d0b5c5--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-gap-fraction-001.xht@@ -0,0 +1,57 @@+<!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-gap' with increasing values</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-05 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#column-gap" title="4.1. 'column-gap'" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-gap-fraction-001-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="Test checks that increasing column gaps display consistently" />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: gray;+ font: 1.25em/1 Ahem;+ width: 14.5em;+ orphans: 1;+ widows: 1;++ column-count: 2;+ column-gap: 0.5em;+ }++ #two {column-gap: 2.5em;}++ #three {column-gap: 4.5em;}++ #four {column-gap: 6.5em;}++ span {color: blue;}+ ]]></style>+ </head>+ <body>++ <div id="one">+ blac+ <span>blue</span>+ </div>++ <div id="two">+ blac+ <span>blue</span>+ </div>++ <div id="three">+ blac+ <span>blue</span>+ </div>++ <div id="four">+ blac+ <span>blue</span>+ </div>++ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-gap-large-001.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-gap-large-001.xhtnew file mode 100644index 00000000000..70182ec902b--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-gap-large-001.xht@@ -0,0 +1,56 @@+<!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-gap' with large value</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-06 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#column-gap" title="4.1 'column-gap" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-gap-large-001-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="This test checks that when 'column-gap' is large and when used 'column-width' is narrow, then content extends into column-gap and content can extend, overflow outside the edges of the multi-colum element if 'overflow' is set to '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: black;+ font: 1.25em/1 Ahem;+ orphans: 1;+ widows: 1;+ width: 11em;++ column-count: 4;+ column-gap: 4em;++ /*+ N == 4;+ W == 0em;+ */++ /*+ In this test, the content of first 3 column+ boxes extend into middle of column-gap and+ content of the 4th column box extend outside the+ right edge of multi-column. The gray border-right of+ multi-column elemen overlaps partially the 3rd+ column-gap.+ */+ }++ span {color: blue;}+ ]]></style>+ </head>+ <body>+ <div>+ bl ac+ <span>+ bl ue+ </span>+ <span>+ bl ue+ </span>+ bl ac+ </div>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-gap-large-002.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-gap-large-002.xhtnew file mode 100644index 00000000000..df0a386038c--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-gap-large-002.xht@@ -0,0 +1,47 @@+<!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-gap' with large value</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-06 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#column-gap" title="4.1 'column-gap" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-gap-large-002-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="This test checks that a large column-gap is supported. We should have two 3.5em columns with a 4em gap between them." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: yellow;+ border: gray solid 1em;+ color: black;+ font: 1.25em/1 Ahem;+ orphans: 1;+ widows: 1;+ width: 11em;++ column-count: 2;+ column-gap: 4em;++ /*+ N == 2;+ W == 3.5em;+ */+ }++ span {color: blue;}+ ]]></style>+ </head>+ <body>+ <div>+ bl ac+ <span>+ bl ue+ </span>+ <span>+ bl ue+ </span>+ bl ac+ </div>+ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-gap-negative-001.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-gap-negative-001.xhtnew file mode 100644index 00000000000..c3bce452c15--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-gap-negative-001.xht@@ -0,0 +1,43 @@+<!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-gap with negative value</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-06 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#column-gap" title="4.1. 'column-gap'" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-gap-002-ref.xht" />+ <meta name="flags" content="ahem invalid" />+ <meta name="asset" content="Test checks that a negative value is not allowed for column-gap" />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: yellow;+ border: gray solid 1em;+ color: black;+ font: 1.25em/1 Ahem;+ orphans: 1;+ widows: 1;+ width: 11em;++ column-count: 4;+ column-gap: 1em;+ column-gap: -1em;+ }++ span {color: blue;}+ ]]></style>+ </head>+ <body>+ <div>+ bl ac+ <span>+ bl ue+ </span>+ <span>+ bl ue+ </span>+ bl ac+ </div>+ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-height-001.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-height-001.xhtnew file mode 100644index 00000000000..9e67f2bdb5f--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-height-001.xht@@ -0,0 +1,37 @@+<!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-count and height</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-06 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#column-gap" title="4.1. 'column-gap'" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-height-001-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="This test checks that length of column rules is equal to the length of the columns and if a nth column box overflows outside the available width of a multi-column element, then an (n-1)th column rule should be drawn. In this test, a 3rd column box is created outside the content edge of the multi-column element: therefore, a 2nd blue column rule should be drawn accordingly." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ color: white;+ font: 1.25em/1 Ahem;+ height: 8em;+ width: 14em;++ column-count: 2;+ column-fill: auto;+ column-gap: 2em;+ column-rule: blue solid 10px;+ }+ ]]></style>+ </head>+ <body>+ <p>Test passes if there are 2 blue vertical stripes of equal height.</p>++ <div>+ 1st col 1st col 1st col+ 1st col 2nd col 2nd col+ 2nd col 2nd col 3rd col+ 3rd col 3rd col 3rd col+ </div>+ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-inherit-001.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-inherit-001.xhtnew file mode 100644index 00000000000..57ddbff67a6--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-inherit-001.xht@@ -0,0 +1,76 @@+<!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: multicolumn and inheritance</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-08 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#the-number-and-width-of-columns" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-inherit-001-ref.xht" />+ <meta name="flags" content="ahem" />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ body+ {+ font: 1.25em/1 Ahem;+ width: 34em;+ }++ body > div+ {+ column-count: 3;+ column-gap: 1em;++ /*+ N == 3;++ 34em : available width+ - 2em : horizontal margin of external div+ - 2em : 2 column gaps+ ==========+ 30em++ So, W == 10em;++ 30em+ - 6em : 3 mult by 2em: horizontal margin of 3 internal divs+ ==========+ 24em : 8em for each of the 3 column boxes without their horizontal margins++ */+ }++ div+ {+ background-color: yellow;+ color: black;+ margin: 0 1em 1em;+ orphans: 1;+ widows: 1;+ }+ ]]></style>+ </head>+ <body>++ <div>+ <div>+ aa aa+ aa aa+ aa aa+ aa aa+ </div>+ <div>+ mm mm+ mm mm+ mm mm+ mm mm+ </div>+ <div>+ xx xx+ xx xx+ xx xx+ xx xx+ </div>+ </div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-inherit-002.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-inherit-002.xhtnew file mode 100644index 00000000000..f639f114fcb--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-inherit-002.xht@@ -0,0 +1,83 @@+<!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-count' and inherit</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-08 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#cc" title="3.2 'column-count'" />+ <link rel="help" href="http://www.w3.org/TR/css3-values/#common-keywords" title="3.1.1. CSS-wide keywords: 'initial' and 'inherit'" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-inherit-002-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="This test checks that 'column-count' can be inherited by setting it with the CSS-wide keyword 'inherit'." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ body > div+ {+ background-color: blue;+ column-count: 3;+ column-gap: 1em;+ font: 1.25em/1 Ahem;+ width: 32em;++ /*+ N == 3;++ 32em+ - 2em : 2 column gaps+ ==========+ 30em : available width of the 3 inner multi-column elements++ So, W == 10em;++ 30em+ - 6em : 3 mult by 2em: horizontal margin of 3 inner multi-column elements+ - 6em : 3 mult by 2em: horizontal column-gaps of all 3 inner multi-column elements+ ==========+ 18em : 6em for each of the 3 column boxes without their own horizontal margins+ So, each column boxes of inner multi-column elements is 2em wide.+ */+ }++ div+ {+ color: black;+ margin: 1em;+ orphans: 1;+ widows: 1;+ }++ div > div+ {+ background-color: yellow;+ column-count: inherit;+ column-gap: 1em;+ }++ div > div:first-child {margin-top: 0;}+ ]]></style>+ </head>+ <body>++ <div>+ <div>+ aa aa+ aa aa+ aa aa+ aa aa+ </div>+ <div>+ mm mm+ mm mm+ mm mm+ mm mm+ </div>+ <div>+ xx xx+ xx xx+ xx xx+ xx xx+ </div>+ </div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-list-item-001.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-list-item-001.xhtnew file mode 100644index 00000000000..78e87a678f0--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-list-item-001.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 Multi-column Layout Test: multi-column and list-item</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-10 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#pseudo-algorithm" title="3.4 Pseudo-algorithm" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-list-item-001-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="This test checks that an unordered list of list items can be set to display its list-items in column boxes." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ ul+ {+ background-color: black;+ font: 1.25em/1 Ahem;+ margin: 0em;+ padding: 0em;+ width: 10em;++ column-gap: 0em;+ column-width: 5em;+ }++ li, span {font-size: 1em;}++ li+ {+ margin-left: 1em;+ padding: 0em;+ list-style-type: "X";+ }++ span {display: block;}+ ]]></style>+ </head>++ <body>++ <ul>+ <li>1sli</li>+ <li>2nli</li>+ <li>3rli</li>+ <li>4tli</li>+ <li>5tli</li>+ <li><span>6tli</span></li>+ <li>7tli</li>+ <li>8tli</li>+ <li>9tli</li>+ <li>10tl</li>+ </ul>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-margin-001.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-margin-001.xhtnew file mode 100644index 00000000000..c7c5a633643--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-margin-001.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: multi-column and margin collapsing of first child (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-10 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#pseudo-algorithm" title="3.4 Pseudo-algorithm" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/../reference/ref-filled-green-100px-square.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="This test checks that the margin-top of the first child of a multi-column element (with column-fill: auto) does not collapse with its parent." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div#test-multi-column-red+ {+ background-color: red;+ color: white;+ font: 3.125em/1 Ahem; /* equivalent to 50px/50px Ahem */+ height: 4em;+ margin-top: 0em;+ width: 4em;++ column-count: 2;+ column-fill: auto;+ column-gap: 0em;+ }++ div#first-child {margin-top: 2em;}++ div#reference-overlapping-green+ {+ background-color: green;+ bottom: 200px;+ height: 100px;+ position: relative;+ width: 100px;+ }+ ]]></style>++ </head>++ <body>++ <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>++ <div id="test-multi-column-red">+ <div id="first-child">ab cd</div>+ ef gh ij kl+ </div>++ <div id="reference-overlapping-green"></div>++ <!--++ Expected result (before the overlapping):++ *********************+ | margin- | ef |+ | top red | |+ | back | gh |+ | ground | |+ *********************+ | ab | ij |+ | | |+ | cd | kl |+ | | |+ *********************++ -->++ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-margin-002.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-margin-002.xhtnew file mode 100644index 00000000000..6510050d8eb--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-margin-002.xht@@ -0,0 +1,75 @@+<!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: multi-column and margin collapsing of first child (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-10 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#pseudo-algorithm" title="3.4 Pseudo-algorithm" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/../reference/ref-filled-green-100px-square.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="This test checks that the margin-top of the first child (an inline-block) of a multi-column element (with column-fill: balance) does not collapse with its parent." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div#test-multi-column-red+ {+ background-color: red;+ color: white;+ font: 3.125em/1 Ahem; /* equivalent to 50px/50px Ahem */+ height: 4em;+ margin-top: 0em;+ width: 4em;++ column-count: 2;+ column-fill: balance;+ column-gap: 0em;+ }++ span+ {+ display: inline-block;+ margin-top: 2em;+ }++ div#reference-overlapping-green+ {+ background-color: green;+ bottom: 200px;+ height: 100px;+ position: relative;+ width: 100px;+ }+ ]]></style>++ </head>++ <body>++ <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>++ <div id="test-multi-column-red">+ <span>ab cd</span>+ ef gh ij kl+ </div>++ <div id="reference-overlapping-green"></div>++ <!--++ Expected result (before the overlapping):++ *********************+ | margin- | ef |+ | top red | |+ | back | gh |+ | ground | |+ *********************+ | ab | ij |+ | | |+ | cd | kl |+ | | |+ *********************++ -->++ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-margin-003.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-margin-003.htmlnew file mode 100644index 00000000000..22bb9fca58c--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-margin-003.html@@ -0,0 +1,50 @@+<!DOCTYPE html>+<html>+ <meta charset="utf-8">+ <title>CSS Multi-column Layout Test: multi-column and margin bottom of last 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/#the-multi-column-model">+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/../reference/ref-filled-green-100px-square-only.html">+ <meta name="assert" content="This test checks the margin-bottom of the last child of a multi-column should not affect its parent's margin-bottom.">++ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style>+ article {+ font: 25px/25px Ahem;+ color: green;+ background-color: green;+ width: 100px;+ column-count: 2;+ column-gap: 0;+ margin-bottom: 0;+ orphans: 1;+ widows: 1;+ }++ article div:last-child {+ margin-bottom: 13px;+ }+ </style>++ <body>+ <p>Test passes if there is a filled green square.</p>+ <article>+ <div>a1 a2 a3 a4</div>+ <div>a5</div>+ </article>+ <article>b1 b2</article>++ <!--+ Expected result:++ |------+------|+ | a1 | a4 |+ | a2 | a5 |+ | a3 |margin|+ |------+------|+ | b1 | b2 |+ |------+------|+ -->+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-margin-child-001.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-margin-child-001.xhtnew file mode 100644index 00000000000..c2876df0231--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-margin-child-001.xht@@ -0,0 +1,49 @@+<!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: multi-column and margin collapsing of block children (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-10 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#the-multi-column-model" title="2. The multi-column model" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-margin-child-001-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="This test checks that the margin-bottom of a block child in a multi-column element will collapse with the margin-top of a following block child of that same multi-column element if those children are vertically adjacent and if no line boxes, no clearance, no padding and no border separate them." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: yellow;+ border: gray solid 1em;+ color: blue;+ font: 1.25em/1 Ahem;+ width: 10em;++ column-count: 2;+ column-fill: balance;+ column-gap: 0em;+ }++ h4+ {+ font: inherit;+ margin: 1em 0;+ }+ ]]></style>++ </head>++ <body>++ <div>+ 1scol 1scol+ 1scol+ <h4> h4h41 </h4>+ <h4> h4h42 </h4>+ 2ncol 2ncol+ 2ncol 2ncol+ 2ncol 2ncol+ 2ncol 2ncol+ </div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-reduce-000.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-reduce-000.xhtnew file mode 100644index 00000000000..440124c93f8--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-reduce-000.xht@@ -0,0 +1,64 @@+<!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 width becomes wider to fill available space</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-25 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#cw" title="3.1 'column-width'" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-reduce-000-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="This test checks that column width is increased to fill the available space: in this test, there are only 2 column boxes." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div#test, div#reference+ {+ background-color: yellow;+ border: black solid thin;+ color: orange;+ font: 1.25em/1 Ahem;+ margin-bottom: 0.5em;+ width: 30em;+ }++ div#test+ {+ column-gap: 0;+ column-width: 201px;++ /*++ N == max(1, floor((U + column-gap)/(column-width + column-gap)))+ N == max(1, floor((600px + 0px)/(201px + 0)))+ N == max(1, floor(600px/201px))+ N == max(1, floor(2.985))+ N == max(1, 2)+ N == 2;++ W == max(0, ((U + column-gap)/N - column-gap))+ W == max(0, ((600px + 0px)/2 - 0px))+ W == max(0, ((600px)/2 - 0px))+ W == max(0, (300px - 0px))+ W == max(0, 300px)+ W == 300px;++ */+ }++ span {color: blue;}+ ]]></style>+ </head>+ <body>++ <p>Test passes if the 2 rectangles with orange and blue vertical stripes are <strong>identical</strong>.</p>++ <div id="test">+ 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 <span>A B C D E F G H I J K L M N O P</span>+ </div>++ <div id="reference">+ 1 2 3 4 5 6 7 8<span>A B C D E F G H </span><br />+ 9 0 1 2 3 4 5 6<span>I J K L M N O P </span>+ </div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-000.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-000.xhtnew file mode 100644index 00000000000..184bf01c157--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-000.xht@@ -0,0 +1,59 @@+<!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-rule shorthand (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-rule-000-ref.xht" />+ <meta name="assert" content="This test checks that the shorthand column-rule property draws the rule correctly." />+ <meta name="flags" content="ahem" />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ color: black;+ font: 1.25em/1 Ahem;+ margin-bottom: 0.5em;+ width: 602px;+ }++ div#test+ {+ columns: 3;+ column-gap: 1px;+ column-rule: lime solid 1px;++ /*++ N == 3;++ W == 200px;++ */++ orphans: 1;+ widows: 1;+ }++ span+ {+ border-left: lime solid 1px;+ border-right: lime solid 1px;+ }+ ]]></style>+ </head>+ <body>++ <p>Test passes if the 2 horizontal bars are <strong>identical</strong>.</p>++ <div id="test">+ 1234567890<br />ABCDEFGHIJ<br />1234567890+ </div>++ <div id="reference">+ 1234567890<span>ABCDEFGHIJ</span>1234567890+ </div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-001.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-001.xhtnew file mode 100644index 00000000000..e5994b36132--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-001.xht@@ -0,0 +1,50 @@+<!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-rule exceeding column-gap</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-gaps-and-rules" title="4. Column gaps and rules" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-rule-001-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="If a column rule is wider than its gap, then the adjacent column boxes overlap the rule. This test checks that if inline content of column boxes uses only 1 twentieth (1/20) of each of the adjacent column box width, then the column rule must shine through 19 twentieths (19/20) of each of the adjacent column boxes (and above their respective backgrounds)." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: red;+ color: green;+ font: 1.25em/1 Ahem;+ margin-bottom: 0.5em;+ width: 20em;+ }++ div#test+ {+ columns: 2;+ column-gap: 0em;+ column-rule: green solid 20em;++ /*++ N == 2;++ W == 200px;++ */++ orphans: 1;+ widows: 1;+ }+ ]]></style>+ </head>+ <body>++ <p>Test passes if there are 2 green bars and <strong>no red</strong>.</p>++ <div id="test">1<br />2</div>++ <div id="reference">12345678901234567890</div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-003.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-003.xhtnew file mode 100644index 00000000000..56a6483f17b--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-003.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 Multi-column Layout Test: column-rule (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-14 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#column-gaps-and-rules" title="4. Column gaps and rules" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-rule-003-ref.xht" />+ <meta name="assert" content="Tests that the three column-rule-* longhand properties are correctly applied." />+ <meta name="flags" content="ahem" />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: yellow;+ border: gray solid 1em;+ color: black;+ font: 1.25em/1 Ahem;+ orphans: 1;+ widows: 1;+ width: 15em;++ column-count: 4;+ column-gap: 1em;+ column-rule-color: blue;+ column-rule-style: solid;+ column-rule-width: 1em;+ }+ ]]></style>+ </head>++ <body>++ <div>+ 1s cl+ 2n cl+ 3r cl+ 4t cl+ </div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-color-001.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-color-001.xhtnew file mode 100644index 00000000000..acda0d31c84--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-color-001.xht@@ -0,0 +1,57 @@+<!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-rule-color (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-14 -->+ <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-rule-color-001-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="Basic test that the column-rule-color property is applied." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ border: gray solid 1em;+ color: lime;+ font: 1.25em/1 Ahem;+ orphans: 1;+ widows: 1;+ width: 14em;++ column-count: 4;+ column-gap: 1em;+ column-rule-color: blue;+ column-rule-style: solid;+ column-rule-width: 1em;+ }++ /*++ N == 4;++ W == max(0, (available-width - ((N - 1) * column-gap)) / N);+ W == max(0, (14em - ((4 - 1) * 1em)) / 4);+ W == max(0, (14em - (3 * 1em)) / 4);+ W == max(0, (14em - (3em)) / 4);+ W == max(0, (11em) / 4);+ W == max(0, 2.75em);+ W == 2.75em;++ */++ span {color: black;}+ ]]></style>+ </head>++ <body>++ <div>+ <span>1s cl</span>+ <span>2n cl</span>+ <span>3r cl</span>+ <span>4t cl</span>+ </div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-color-inherit-001.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-color-inherit-001.xhtnew file mode 100644index 00000000000..2449dd21960--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-color-inherit-001.xht@@ -0,0 +1,138 @@+<!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-rule-color: inherit</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-09-02 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#crc" title="4.2. 'column-rule-color'" />+ <link rel="help" href="http://www.w3.org/TR/css3-values/#common-keywords" title="3.1.1. CSS-wide keywords: 'initial' and 'inherit'" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-rule-color-inherit-001-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="This test checks that, by default, column-rule-color is the current color applying to the element unless reserved keyword 'inherit' is used in which case column-rule-color will be inherited from the parent's column-rule-color value." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div#parent+ {+ column-rule-color: green;+ column-rule-style: none;+ font: 1.25em/1 Ahem;+ width: 17em;+ }++ /*++ N == 3;++ W == max(0, (available-width - ((N - 1) * column-gap)) / N);+ W == max(0, (17em - ((3 - 1) * 1em)) / 3);+ W == max(0, (17em - (2 * 1em)) / 3);+ W == max(0, (17em - 2em) / 3);+ W == max(0, 15em / 3);+ W == max(0, 5em);+ W == 5em;++ The height of column rule depends on number of line boxes in+ each outer column box which depends on number of line boxes+ in each inner column box.++ N == 3;++ W == max(0, (available-width - ((N - 1) * column-gap)) / N);+ W == max(0, (5em - ((3 - 1) * 1em)) / 3);+ W == max(0, (5em - (2 * 1em)) / 3);+ W == max(0, (5em - 2em) / 3);+ W == max(0, 3em / 3);+ W == max(0, 1em);+ W == 1em;++ */++ div+ {+ color: red; /* both div#parent and div.child have and use 'color: red' */+ orphans: 1;+ widows: 1;++ column-count: 3;+ column-gap: 1em;+ column-rule-width: 1em;+ }++ div.child+ {+ column-rule-color: inherit;+ column-rule-style: solid;+ font-size: 1em;+ }+ ]]></style>+ </head>++ <body>++ <p>Test passes if there are 6 vertical green stripes and <strong>no red</strong>.</p>++ <div id="parent">+ <div class="child">+ + + + + + + + + + + + + + + + + + + </div>+ <div class="child">+ + + + + + + + + + + + + + + + + + + </div>+ <div class="child">+ + + + + + + + + + + + + + + + + + + </div>+ </div>++ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-color-inherit-002.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-color-inherit-002.xhtnew file mode 100644index 00000000000..90efb18c6b2--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-color-inherit-002.xht@@ -0,0 +1,122 @@+<!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-rule-color: inherit (complex)</title>+ <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2013-09-03 and 2016-10-02 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#crc" title="4.2. 'column-rule-color'" />+ <link rel="help" href="http://www.w3.org/TR/css3-values/#common-keywords" title="3.1.1. CSS-wide keywords: 'initial' and 'inherit'" />+ <link rel="help" href="https://drafts.csswg.org/css-color-4/#currentcolor-color" title="5.2. The 'currentcolor' keyword" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-rule-color-inherit-001-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="In this test, div#parent's computed 'column-rule-color' is given by div#parent's 'currentcolor' (a reserved keyword) and not 'red'. Then div.child's 'column-rule-color' take such specified value ('currentcolor') from its parent (due to 'inherit' keyword) and not 'red'. And then, it is applied to div.child's 'column-rule-color'." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div#parent+ {+ color: red;+ font: 20px/1 Ahem;+ }++ div.child+ {+ color: green;+ display: inline-block;+ font-size: 1em;+ width: 5em;++ column-count: 3;+ column-gap: 1em;+ column-rule-color: inherit;+ column-rule-style: solid;+ column-rule-width: 1em;+ }++ /*++ N == 3;++ W == max(0, (available-width - ((N - 1) * column-gap)) / N);+ W == max(0, (5em - ((3 - 1) * 1em)) / 3);+ W == max(0, (5em - (2 * 1em)) / 3);+ W == max(0, (5em - 2em) / 3);+ W == max(0, 3em / 3);+ W == max(0, 1em);+ W == 1em;++ */++ ]]></style>+ </head>++ <body>++ <p>Test passes if there are 6 vertical green stripes and <strong>no red</strong>.</p>++ <div id="parent">+ <div class="child">+ + + + + + + + + + + + + + + + + + + </div>++ <div class="child">+ + + + + + + + + + + + + + + + + + + </div>++ <div class="child">+ + + + + + + + + + + + + + + + + + + </div>++ </div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-dashed-000.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-dashed-000.xhtnew file mode 100644index 00000000000..55d1d4aae65--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-dashed-000.xht@@ -0,0 +1,53 @@+<!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-rule shorthand with 'dashed' border style</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-rule-dashed-000-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="Tests that the dashed value of column-rule-style is correctly rendered when used in the shorthand column-rule property." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <meta name="fuzzy" content="maxDifference=0-85; totalPixels=0-20" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: black;+ color: black;+ font: 3.125em/1 Ahem;+ margin-bottom: 0.2em;+ width: 8.2em;+ }++ div#test+ {+ columns: 2;+ column-gap: 0.2em;+ column-rule: lime dashed 0.2em;++ /*++ N == 2;++ W == 200px;++ */++ orphans: 1;+ widows: 1;+ }++ span {border-left: lime dashed 0.2em;}+ ]]></style>+ </head>+ <body>++ <p>Test passes if the 2 black stripes with vertical green bars are <strong>identical</strong>.</p>++ <div id="test">1 <br />2 </div>++ <div id="reference">1234<span>5678</span></div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-dotted-000.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-dotted-000.xhtnew file mode 100644index 00000000000..7c61e48aa45--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-dotted-000.xht@@ -0,0 +1,52 @@+<!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-rule shorthand with 'dotted' border style</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-rule-dotted-000-ref.xht" />+ <meta name="assert" content="Tests that the dotted value of column-rule-style is correctly rendered when used in the shorthand column-rule property." />+ <meta name="flags" content="ahem" />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: black;+ color: black;+ font: 3.125em/1 Ahem;+ margin-bottom: 0.2em;+ width: 8.2em;+ }++ div#test+ {+ columns: 2;+ column-gap: 0.2em;+ column-rule: lime dotted 0.2em;++ /*++ N == 2;++ W == 200px;++ */++ orphans: 1;+ widows: 1;+ }++ span {border-left: lime dotted 0.2em;}+ ]]></style>+ </head>+ <body>++ <p>Test passes if the 2 black stripes with green dots in their center are <strong>identical</strong>.</p>++ <div id="test">1 <br />2 </div>++ <div id="reference">1234<span>5678</span></div>++ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-double-000.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-double-000.xhtnew file mode 100644index 00000000000..8c0117bb79c--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-double-000.xht@@ -0,0 +1,52 @@+<!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-rule shorthand with 'double' border style</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-rule-double-000-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="Tests that the double value of column-rule-style is correctly rendered when used in the shorthand column-rule property." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: black;+ color: black;+ font: 3.125em/1 Ahem;+ margin-bottom: 0.2em;+ width: 8.2em;+ }++ div#test+ {+ columns: 2;+ column-gap: 0.2em;+ column-rule: lime double 0.2em;++ /*++ N == 2;++ W == 200px;++ */++ orphans: 1;+ widows: 1;+ }++ span {border-left: lime double 0.2em;}+ ]]></style>+ </head>+ <body>++ <p>Test passes if the 2 black stripes with vertical green bars are <strong>identical</strong>.</p>++ <div id="test">1 <br />2 </div>++ <div id="reference">1234<span>5678</span></div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-fraction-001.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-fraction-001.xhtnew file mode 100644index 00000000000..5a4f1a23720--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-fraction-001.xht@@ -0,0 +1,56 @@+<!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-rule-width</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-14 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#crw" title="4.4. 'column-rule-width'" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-rule-fraction-001-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="Basic test for the column-rule-width property, checking that values above 0 but below 1 are allowed." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: yellow;+ border: gray solid 1em;+ color: black;+ font: 1.25em/1 Ahem;+ orphans: 1;+ widows: 1;+ width: 14em;++ column-count: 4;+ column-gap: 1em;+ column-rule-color: blue;+ column-rule-style: solid;+ column-rule-width: 0.9em;+ }++ /*++ N == 4;++ W == max(0, (available-width - ((N - 1) * column-gap)) / N);+ W == max(0, (14em - ((4 - 1) * 1em)) / 4);+ W == max(0, (14em - (3 * 1em)) / 4);+ W == max(0, (14em - (3em)) / 4);+ W == max(0, (11em) / 4);+ W == max(0, 2.75em);+ W == 2.75em;++ */+ ]]></style>+ </head>++ <body>++ <div>+ 1s cl+ 2n cl+ 3r cl+ 4t cl+ </div>++ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-fraction-002.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-fraction-002.xhtnew file mode 100644index 00000000000..49d2077943b--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-fraction-002.xht@@ -0,0 +1,56 @@+<!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: wide column-rule-width painted above background-color</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-14 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#crw" title="4.4. 'column-rule-width'" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-rule-fraction-002-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="This test checks that if a column rule is wider than its gap, then the column rule will overlap adjacent column boxes above the background of the multi-column element but below the inline content inside the multicol element. In this test, the blue column-rule is painted above the yellow background-color but below (under) the black Ahem glyphs." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: yellow;+ border: gray solid 1em;+ color: black;+ font: 1.25em/1 Ahem;+ orphans: 1;+ widows: 1;+ width: 14em;++ column-count: 4;+ column-gap: 1em;+ column-rule-color: blue;+ column-rule-style: solid;+ column-rule-width: 1.9em;+ }++ /*++ N == 4;++ W == max(0, (available-width - ((N - 1) * column-gap)) / N);+ W == max(0, (14em - ((4 - 1) * 1em)) / 4);+ W == max(0, (14em - (3 * 1em)) / 4);+ W == max(0, (14em - (3em)) / 4);+ W == max(0, (11em) / 4);+ W == max(0, 2.75em);+ W == 2.75em;++ */+ ]]></style>+ </head>++ <body>++ <div>+ 1s cl+ 2n cl+ 3r cl+ 4t cl+ </div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-groove-000.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-groove-000.xhtnew file mode 100644index 00000000000..eb612364423--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-groove-000.xht@@ -0,0 +1,52 @@+<!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-rule shorthand with 'groove' border style</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-rule-groove-000-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="Test checks that the value of 'groove' for 'column-rule-style' is drawn correctly." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: black;+ color: black;+ font: 3.125em/1 Ahem;+ margin-bottom: 0.2em;+ width: 8.2em;+ }++ div#test+ {+ columns: 2;+ column-gap: 0.2em;+ column-rule: lime groove 0.2em;++ /*++ N == 2;++ W == 200px;++ */++ orphans: 1;+ widows: 1;+ }++ span {border-left: lime groove 0.2em;}+ ]]></style>+ </head>+ <body>++ <p>Test passes if the 2 black stripes with vertical green bars are <strong>identical</strong>.</p>++ <div id="test">1 <br />2 </div>++ <div id="reference">1234<span>5678</span></div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-hidden-000.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-hidden-000.xhtnew file mode 100644index 00000000000..946b8a99fe7--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-hidden-000.xht@@ -0,0 +1,50 @@+<!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-rule shorthand with 'hidden' border style</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-rule-hidden-000-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="Test checks that a column-rule-width value of hidden results in no rule being drawn." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: black;+ color: black;+ font: 3.125em/1 Ahem;+ margin-bottom: 0.2em;+ width: 8.2em;+ }++ div#test+ {+ columns: 2;+ column-gap: 0.2em;+ column-rule: red hidden 0.2em;++ /*++ N == 2;++ W == 200px;++ */++ orphans: 1;+ widows: 1;+ }+ ]]></style>+ </head>+ <body>++ <p>Test passes if the 2 black stripes are <strong>identical</strong>.</p>++ <div id="test">1 <br />2 </div>++ <div id="reference">A</div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-inset-000.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-inset-000.xhtnew file mode 100644index 00000000000..60b5487cd83--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-inset-000.xht@@ -0,0 +1,52 @@+<!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-rule shorthand with 'inset' border style</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-rule-ridge-000-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="'border-style' values of column-rule are interpreted as in the collapsing border model in which case 'inset' value is drawn the same as 'ridge'." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: black;+ color: black;+ font: 3.125em/1 Ahem;+ margin-bottom: 0.2em;+ width: 8.2em;+ }++ div#test+ {+ columns: 2;+ column-gap: 0.2em;+ column-rule: lime inset 0.2em;++ /*++ N == 2;++ W == 200px;++ */++ orphans: 1;+ widows: 1;+ }++ span {border-left: lime ridge 0.2em;}+ ]]></style>+ </head>+ <body>++ <p>Test passes if the 2 black stripes with vertical green bars are <strong>identical</strong>.</p>++ <div id="test">1 <br />2 </div>++ <div id="reference">1234<span>5678</span></div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-large-001.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-large-001.xhtnew file mode 100644index 00000000000..d540bd6ecd4--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-large-001.xht@@ -0,0 +1,68 @@+<!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: excessively wide column-rule-width</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-09-03 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#crw" title="4.4. 'column-rule-width'" />+ <link rel="bookmark" href="http://lists.w3.org/Archives/Public/www-style/2013Sep/0006.html" title="[css3-multicol] z-order of column-rule: below or above border?" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-rule-large-001-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="This test checks that if a column rule is wider than its gap, then the column rule will overlap adjacent column boxes; its painting will be above background of multi-column element but below the inline content inside the multicol element." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ body+ {+ font: 1.25em/1 Ahem;+ margin-left: 1em;+ }++ div+ {+ background-color: red;+ border: gray solid 1em;+ color: lime;+ font-size: 1em;+ orphans: 1;+ widows: 1;+ width: 15em;++ column-count: 4;+ column-gap: 1em;+ column-rule-color: blue;+ column-rule-style: solid;+ column-rule-width: 17em;+ }++ /*++ N == 4;++ W == max(0, (available-width - ((N - 1) * column-gap)) / N);+ W == max(0, (15em - ((4 - 1) * 1em)) / 4);+ W == max(0, (15em - (3 * 1em)) / 4);+ W == max(0, (15em - (3em)) / 4);+ W == max(0, (12em) / 4);+ W == max(0, 3em);+ W == 3em;++ */++ /*+ Since column rules do not take up space, then the test+ should not generate an horizontal scrollbar.+ */+ ]]></style>+ </head>++ <body>++ <div>+ 1s cl+ 2n cl+ 3r cl+ 4t cl+ </div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-none-000.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-none-000.xhtnew file mode 100644index 00000000000..5688ec3d288--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-none-000.xht@@ -0,0 +1,50 @@+<!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-rule shorthand with 'none' border style</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-rule-hidden-000-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="Test checks that a column-rule-width value of none results in no rule being drawn." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: black;+ color: black;+ font: 3.125em/1 Ahem;+ margin-bottom: 0.2em;+ width: 8.2em;+ }++ div#test+ {+ columns: 2;+ column-gap: 0.2em;+ column-rule: red none 0.2em;++ /*++ N == 2;++ W == 200px;++ */++ orphans: 1;+ widows: 1;+ }+ ]]></style>+ </head>+ <body>++ <p>Test passes if the 2 black stripes are <strong>identical</strong>.</p>++ <div id="test">1 <br />2 </div>++ <div id="reference">A</div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-outset-000.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-outset-000.xhtnew file mode 100644index 00000000000..7b22d935a4a--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-outset-000.xht@@ -0,0 +1,52 @@+<!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-rule shorthand with 'outset' border style</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-rule-groove-000-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="'border-style' values of column-rule are interpreted as in the collapsing border model in which case 'outset' value is drawn the same as 'groove'." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: black;+ color: black;+ font: 3.125em/1 Ahem;+ margin-bottom: 0.2em;+ width: 8.2em;+ }++ div#test+ {+ columns: 2;+ column-gap: 0.2em;+ column-rule: lime outset 0.2em;++ /*++ N == 2;++ W == 200px;++ */++ orphans: 1;+ widows: 1;+ }++ span {border-left: lime groove 0.2em;}+ ]]></style>+ </head>+ <body>++ <p>Test passes if the 2 black stripes with vertical green bars are <strong>identical</strong>.</p>++ <div id="test">1 <br />2 </div>++ <div id="reference">1234<span>5678</span></div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-percent-001.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-percent-001.xhtnew file mode 100644index 00000000000..ab929e58c92--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-percent-001.xht@@ -0,0 +1,34 @@+<!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-rule-width and percentage unit (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-14 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#crw" title="4.4. 'column-rule-width'" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-containing-002-ref.xht" />+ <meta name="flags" content="ahem invalid" />+ <meta name="assert" content="This test checks that the column-rule-width property does not accept percentage unit in its values." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ color: green;+ font: 1.25em/1 Ahem;+ width: 19em;++ column-count: 4;+ column-gap: 1em;+ column-rule-color: red;+ column-rule-style: solid;+ column-rule-width: 0;+ column-rule-width: 200%;+ }+ ]]></style>+ </head>++ <body>++ <div>4444 1 1 1 1 4444 1 1 1 4444 1 1 1 1 4444 1 1 1 1 1 1 4444 1 1 4444 1 1 4444 4444 1 1 4444 1 1 4444</div>++ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-ridge-000.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-ridge-000.xhtnew file mode 100644index 00000000000..24a93a78caf--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-ridge-000.xht@@ -0,0 +1,52 @@+<!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-rule shorthand with 'ridge' border style</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-rule-ridge-000-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="Test checks that the value of 'ridge' for 'column-rule-style' is drawn correctly." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: black;+ color: black;+ font: 3.125em/1 Ahem;+ margin-bottom: 0.2em;+ width: 8.2em;+ }++ div#test+ {+ columns: 2;+ column-gap: 0.2em;+ column-rule: lime ridge 0.2em;++ /*++ N == 2;++ W == 200px;++ */++ orphans: 1;+ widows: 1;+ }++ span {border-left: lime ridge 0.2em;}+ ]]></style>+ </head>+ <body>++ <p>Test passes if the 2 black stripes with vertical green bars are <strong>identical</strong>.</p>++ <div id="test">1 <br />2 </div>++ <div id="reference">1234<span>5678</span></div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-samelength-001.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-samelength-001.xhtnew file mode 100644index 00000000000..d4988f991f0--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-samelength-001.xht@@ -0,0 +1,73 @@+<!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-rule-width' has same length as 'column-gap'</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-15 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#crw" title="4.4. 'column-rule-width'" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-rule-samelength-001-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="Test that a gap of 5em and a column-rule-width of 5em both take up the same space." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ body {margin: 8px;}++ p+ {+ line-height: 1.25em;+ margin: 1em 0em;+ }++ strong {line-height: 1;}++ div#red-overlapped-reference+ {+ background-color: red;+ height: 100px;+ width: 100px;+ }++ div#test-overlapping-green+ {+ bottom: 100px;+ color: transparent;+ font: 1.25em/1 Ahem; /* equivalent to 20px/1 Ahem */+ position: relative;+ right: 40px;+ width: 9em;++ column-count: 2;+ column-gap: 5em;+ column-rule-color: green;+ column-rule-style: solid;+ column-rule-width: 5em;+ }+ ]]></style>+ </head>++ <body>++ <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>++ <div id="red-overlapped-reference"></div>++ <div id="test-overlapping-green">Le ft Co lu mn Ri gh Co lu mn</div>++ <!--++ Expected results+ column-gap+ column-rule+ v=====v+ *************+ |Le| |Ri|+ |ft| |gh|+ |Co| |Co|+ |lu| |lu|+ |mn| |mn|+ *************++ -->++ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-shorthand-001.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-shorthand-001.xhtnew file mode 100644index 00000000000..02a462d2d79--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-shorthand-001.xht@@ -0,0 +1,83 @@+<!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-rule' shorthand</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-15 -->+ <link rel="help" href="http://www.w3.org/TR/css3-multicol/#crw" title="4.4. 'column-rule-width'" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-rule-samelength-001-ref.xht" />+ <meta name="flags" content="ahem invalid" />+ <meta name="assert" content="Tests that column rules are not displayed for invalid properties and values."/>+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ body {margin: 8px;}++ p+ {+ line-height: 1.25em;+ margin: 1em 0em;+ }++ strong {line-height: 1;}++ div#red-overlapped-reference+ {+ background-color: red;+ height: 100px;+ width: 100px;+ }++ div#test-overlapping-green+ {+ bottom: 100px;+ color: transparent;+ font: 1.25em/1 Ahem; /* equivalent to 20px/1 Ahem */+ position: relative;+ right: 40px;+ width: 9em;++ column-count: 2;+ column-gap: 5em;+ column-rule: green solid 5em;+ column-rule: normal red 5em;+ column-rule: normal 5em red;+ column-rule: red normal 5em;+ column-rule: red 5em normal;+ column-rule: 5em normal red;+ column-rule: 5em red normal;+ column-rule: red 5em red solid;+ column-rule: red 5em solid red;+ column-rule: red solid 5em red;+ column-rule: red solid red 5em;+ column-rule: 5em red solid red;+ column-rule: solid red 5em red;+ }+ ]]></style>+ </head>++ <body>++ <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>++ <div id="red-overlapped-reference"></div>++ <div id="test-overlapping-green">Le ft Co lu mn Ri gh Co lu mn</div>++ <!--++ Expected results+ column-gap+ column-rule+ v=====v+ *************+ |Le| |Ri|+ |ft| |gh|+ |Co| |Co|+ |lu| |lu|+ |mn| |mn|+ *************++ -->++ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-solid-000.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-solid-000.xhtnew file mode 100644index 00000000000..60184964950--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-rule-solid-000.xht@@ -0,0 +1,52 @@+<!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-rule shorthand with 'solid' border style</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-rule-solid-000-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="Test checks that a column-rule-style value set as 'solid' is rendered correctly." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: black;+ color: black;+ font: 3.125em/1 Ahem;+ margin-bottom: 0.2em;+ width: 8.2em;+ }++ div#test+ {+ columns: 2;+ column-gap: 0.2em;+ column-rule: lime solid 0.2em;++ /*++ N == 2;++ W == 200px;++ */++ orphans: 1;+ widows: 1;+ }++ span {border-left: lime solid 0.2em;}+ ]]></style>+ </head>+ <body>++ <p>Test passes if the 2 black stripes with vertical green bars are <strong>identical</strong>.</p>++ <div id="test">1 <br />2 </div>++ <div id="reference">1234<span>5678</span></div>++ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-width-001.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-width-001.xhtnew file mode 100644index 00000000000..a31d9520a4c--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-width-001.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 Multi-column Layout Test: column-width (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-23 -->+ <link rel="help" href="https://www.w3.org/TR/css-multicol-1/#the-number-and-width-of-columns" title="The number and width of columns" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-width-001-ref.xht" />+ <meta name="assert" content="Tests that column-width is calculated correctly."/>+ <meta name="flags" content="ahem" />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ font: 1.25em/1 Ahem;+ width: 30em;+ background-color: yellow;+ color: black;++ column-gap: 0;+ column-width: 6em;+ }+ ]]></style>+ </head>+ <body>+ <p>Test passes if it is identical to the reference.</p>+ <div>+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ </div>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-width-002.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-width-002.xhtnew file mode 100644index 00000000000..b56ae8dc9f5--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-width-002.xht@@ -0,0 +1,37 @@+<!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-width (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-23 -->+ <link rel="help" href="https://www.w3.org/TR/css-multicol-1/#the-number-and-width-of-columns" title="The number and width of columns" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-width-002-ref.xht" />+ <meta name="assert" content="Tests that column-width is calculated correctly."/>+ <meta name="flags" content="ahem" />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: yellow;+ border: gray solid 1em;+ color: black;+ font: 1.25em/1 Ahem;+ width: 12em;++ column-gap: 0;+ column-width: 6em;+ }++ span {color: blue;}+ ]]></style>+ </head>+ <body>+ <p>Test passes if there are two black bars and two blue bars with a yellow stripe to the right of each bar, matching reference.</p>+ <div>+ bl ac bl ac+ <span>+ bl ue bl ue+ </span>+ </div>+ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-width-ch-001.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-width-ch-001.htmlnew file mode 100644index 00000000000..6cd8b279f71--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-width-ch-001.html@@ -0,0 +1,26 @@+<!DOCTYPE html>+<title>CSS Multi-column Layout Test: column-width (ch units)</title>+<link rel="author" title="Opera Software ASA" href="http://www.opera.com/">+<link rel="help" href="https://www.w3.org/TR/css-multicol-1/#the-number-and-width-of-columns">+<link rel="stylesheet" type="text/css" href="../../fonts/ahem.css">+<link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-width-ch-ref.html">+<meta name="assert" value="Test that the ch unit can be used as a value for column-width.">+<style>+ .multicol {+ font: 10px ahem;+ width: 69ch;+ column-width: 13ch;+ column-gap: 1ch;+ background: yellow;+ }+</style>++<div class="multicol">+ one two three four+ five six seven eight+ nineten eleven twelve+ thirtn fourtnfiftn sixtn+ seventn eightn ninetn twenty+ hundred thousand million billionx+ trillionsopp+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-width-count-001.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-width-count-001.xhtnew file mode 100644index 00000000000..0c7eb6e19c3--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-width-count-001.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 Multi-column Layout Test: column-count and column-width (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-23 -->+ <link rel="help" href="https://www.w3.org/TR/css-multicol-1/#the-number-and-width-of-columns" title="3. The number and width of columns" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-width-001-ref.xht" />+ <meta name="asset" content="Test that column-count and column-width are valid in combination"/>+ <meta name="flags" content="ahem" />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ font: 1.25em/1 Ahem;+ width: 30em;+ background-color: yellow;+ color: black;+ column-count: 5;+ column-gap: 0;+ column-width: 5em;+ }+ ]]></style>+ </head>+ <body>+ <p>Test passes if it is identical to the reference.</p>+ <div>+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ x xx xxx xxxx xxxxx+ </div>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-width-count-002.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-width-count-002.xhtnew file mode 100644index 00000000000..7de9a07cb82--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-width-count-002.xht@@ -0,0 +1,37 @@+<!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-count and column-width (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-23 -->+ <link rel="help" href="https://www.w3.org/TR/css-multicol-1/#cc" title="3.2 'column-count'" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-count-002-ref.xht" />+ <meta name="asset" content="Test that column-count acts as a max when combined with column-width."/>+ <meta name="flags" content="ahem" />+ <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;+ column-width: 4em; /* would create 5 columns if column-count was not acting as a max */+ }+ ]]></style>+ </head>+ <body>+ <div>55555 1 1 22 1 22 1 1 333 1 333 1 333 55555 55555 1 1 22 1 22 1 1 22 1 22 1 22 55555 55555 1 1 333 1 333 1 4444 4444 1 55555 55555 1 1 333 1 333 1 4444 4444 1 55555+ </div>+ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-width-invalid-001.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-width-invalid-001.xhtnew file mode 100644index 00000000000..d2edc704ba4--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-width-invalid-001.xht@@ -0,0 +1,41 @@+<!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: invalid column-width</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-23 -->+ <link rel="help" href="https://www.w3.org/TR/css-multicol-1/#cw" title="3.1. 'column-width'" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-width-invalid-001-ref.xht" />+ <meta name="flags" content="ahem invalid" />+ <meta name="assert" content="This test checks that 'column-width: bzzt' is invalid (generating a parsing error) and therefore will be ignored." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: yellow;+ border: gray solid 1em;+ color: black;+ font: 1.25em/1 Ahem;+ width: 12em;++ column-gap: 0;+ column-width: bzzt; /* this value is invalid */+ }++ span {color: blue;}+ ]]></style>+ </head>+ <body>+ <p>This test passes is it is idential to the reference.</p>+ <div>+ bl ac+ <span>+ bl ue+ </span>+ <span>+ bl ue+ </span>+ bl ac+ </div>+ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-width-large-001.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-width-large-001.xhtnew file mode 100644index 00000000000..8c102a6fda5--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-width-large-001.xht@@ -0,0 +1,41 @@+<!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: large column-width</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-23 -->+ <link rel="help" href="https://www.w3.org/TR/css-multicol-1/#cw" title="3.1. 'column-width'" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-width-invalid-001-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="This test checks that a set 'column-width' may be wider (to fill the available space). In this test, the actual column-width will be increased to 12em." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: yellow;+ border: gray solid 1em;+ color: black;+ font: 1.25em/1 Ahem;+ width: 12em;++ column-gap: 0;+ column-width: 9em;+ }++ span {color: blue;}+ ]]></style>+ </head>+ <body>+ <p>This test passes is it is idential to the reference.</p>+ <div>+ bl ac+ <span>+ bl ue+ </span>+ <span>+ bl ue+ </span>+ bl ac+ </div>+ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-width-large-002.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-width-large-002.xhtnew file mode 100644index 00000000000..f5191f4d676--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-width-large-002.xht@@ -0,0 +1,41 @@+<!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: large column-width</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-24 -->+ <link rel="help" href="https://www.w3.org/TR/css-multicol-1/#cw" title="3.1. 'column-width'" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-width-invalid-001-ref.xht" />+ <meta name="flags" content="ahem" />+ <meta name="assert" content="This test checks that a set 'column-width' equal in width to the whole available space of the multi-column will use it all for its 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: black;+ font: 1.25em/1 Ahem;+ width: 12em;++ column-gap: 0;+ column-width: 12em;+ }++ span {color: blue;}+ ]]></style>+ </head>+ <body>+ <p>This test passes is it is idential to the reference.</p>+ <div>+ bl ac+ <span>+ bl ue+ </span>+ <span>+ bl ue+ </span>+ bl ac+ </div>+ </body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-width-negative-001.xht b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-width-negative-001.xhtnew file mode 100644index 00000000000..a355328138c--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/multicol-width-negative-001.xht@@ -0,0 +1,29 @@+<!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: negative column-width</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-24 -->+ <link rel="help" href="https://www.w3.org/TR/css-multicol-1/#cw" title="3.1. 'column-width'" />+ <link rel="match" href="../../../../expected/wpt-import/css/css-multicol/multicol-count-002-ref.xht" />+ <meta name="flags" content="ahem invalid" />+ <meta name="assert" content="This test checks that a set 'column-width' can not be negative." />+ <link rel="stylesheet" type="text/css" href="../../fonts/ahem.css" />+ <style type="text/css"><![CDATA[+ div+ {+ background-color: black;+ border: black solid 1em;+ color: yellow;+ font: 1.25em/1 Ahem;+ width: 19em;++ column-width: -100px;+ column-gap: 0;+ }+ ]]></style>+ </head>+ <body>+ <div>4444 4444 4444 4444 1 1 1 1 1 1 1 1 1 1 1 1 4444 4444 4444 4444 1 1 1 1 1 1 1 1 1 1 1 1 1 4444 4444</div>+ </body>+</html>\ No newline at end of filediff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/relative-child-overflowing-container.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/relative-child-overflowing-container.htmlnew file mode 100644index 00000000000..312099159af--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/relative-child-overflowing-container.html@@ -0,0 +1,28 @@+<!DOCTYPE html>+<title>Relative child wider than the column container should overflow the container</title>+<link rel="help" href="https://drafts.csswg.org/css-multicol/">+<link rel="match" href="../../../../expected/wpt-import/css/css-multicol/../reference/ref-filled-green-100px-square.xht">++<style>+.multicol {+ width: 0px;+ column-count: 2;+ column-gap: 0px;+}++.relative-layer {+ position: relative;+}++.child {+ width: 100px;+ height: 200px;+ background: green;+}+</style>+<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>+<div class="multicol">+ <div class="relative-layer">+ <div class="child"></div>+ </div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/support/black20x20.png b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/support/black20x20.pngnew file mode 100644index 00000000000..ebf7027ee78Binary files /dev/null and b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/support/black20x20.png differdiff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/support/red20x20.png b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/support/red20x20.pngnew file mode 100644index 00000000000..5d44ef210e1Binary files /dev/null and b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/support/red20x20.png differdiff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/zero-column-width-layout.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/zero-column-width-layout.htmlnew file mode 100644index 00000000000..b57ebbfefab--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-multicol/zero-column-width-layout.html@@ -0,0 +1,13 @@+<!DOCTYPE html>+<title>column-width:0</title>+<meta name="assert" content="column-width:0 is valid as specified and computed value, but its used value may never be less than 1px">+<link rel="author" title="Morten Stenshorne" href="[email protected]">+<link rel="help" href="https://drafts.csswg.org/css-multicol/#cw" title="3.1. column-width">+<link rel="match" href="../../../../expected/wpt-import/css/css-multicol/../reference/ref-filled-green-100px-square-only.html">+<p>Test passes if there is a filled green square.</p>+<div style="float:left; width:50px; height:100px; column-width:0; column-gap:0;">+ <div style="height:5000px; background:green;"></div>+</div>+<div style="float:left; width:50px; height:100px; columns:0; column-gap:0;">+ <div style="height:5000px; background:green;"></div>+</div>diff --git a/Tests/LibWeb/Text/expected/multicol-break-lines.txt b/Tests/LibWeb/Text/expected/multicol-break-lines.txtnew file mode 100644index 00000000000..eafe36ebc22--- /dev/null+++ b/Tests/LibWeb/Text/expected/multicol-break-lines.txt@@ -0,0 +1,5 @@+float-balanced: aa@100,0 bb@160,0 cc@100,20 dd@160,20 ee@100,40 ff@160,40 gg@0,60 hh@60,60 ii@120,60 jj@0,80 kk@60,80 ll@120,80 mm@0,100 nn@60,100 oo@120,100 pp@0,120 qq@60,120 rr@120,120 ss@0,140 tt@60,140 uu@120,140 vv@0,160 ww@60,160 xx@120,160 yy@0,180 zz@60,180 11@120,180 22@200,0 33@260,0 44@320,0 55@200,20 66@260,20 77@320,20 88@200,40 99@260,40 AA@320,40 BB@200,60 CC@260,60 DD@320,60 EE@200,80 FF@260,80 GG@320,80 HH@200,100 II@260,100 JJ@320,100 KK@200,120 LL@260,120 MM@320,120 NN@200,140 OO@260,140 PP@320,140 QQ@200,160+float-fixed: aa@100,0 bb@160,0 cc@100,20 dd@160,20 ee@100,40 ff@160,40 gg@0,60 hh@60,60 ii@120,60 jj@0,80 kk@60,80 ll@120,80 mm@200,0 nn@260,0 oo@320,0 pp@200,20 qq@260,20 rr@320,20 ss@200,40 tt@260,40 uu@320,40 vv@200,60 ww@260,60 xx@320,60 yy@200,80 zz@260,80 11@320,80 22@400,0 33@460,0 44@520,0 55@400,20 66@460,20 77@520,20 88@400,40 99@460,40 AA@520,40 BB@400,60 CC@460,60 DD@520,60 EE@400,80 FF@460,80 GG@520,80 HH@600,0 II@660,0 JJ@720,0 KK@600,20 LL@660,20 MM@720,20 NN@600,40 OO@660,40 PP@720,40 QQ@600,60+span across the break: 60,18 106x24 0,38 160x24 0,58 160x24 0,78 160x24 0,98 160x24 0,118 160x24 200,-2 106x24+one-column-first: 60,-2 52x24, bounding 60,-2 52x24, offset width 52+one-column-second: 260,18 52x24, bounding 260,18 52x24, offset width 52diff --git a/Tests/LibWeb/Text/expected/multicol-caret-across-columns.txt b/Tests/LibWeb/Text/expected/multicol-caret-across-columns.txtnew file mode 100644index 00000000000..d1adb1dde6c--- /dev/null+++ b/Tests/LibWeb/Text/expected/multicol-caret-across-columns.txt@@ -0,0 +1,3 @@+below the text of column 2: 59+moving down from column 1: 31 -> 41 -> 51 -> 59+moving back up: 59 -> 41 -> 31 -> 21diff --git a/Tests/LibWeb/Text/expected/multicol-caret-in-later-column.txt b/Tests/LibWeb/Text/expected/multicol-caret-in-later-column.txtnew file mode 100644index 00000000000..927650f9970--- /dev/null+++ b/Tests/LibWeb/Text/expected/multicol-caret-in-later-column.txt@@ -0,0 +1,2 @@+caret at 150,5: paragraph 5+caret at 150,25: paragraph 7diff --git a/Tests/LibWeb/Text/expected/multicol-inline-box-in-later-column.txt b/Tests/LibWeb/Text/expected/multicol-inline-box-in-later-column.txtnew file mode 100644index 00000000000..b58c8a82a79--- /dev/null+++ b/Tests/LibWeb/Text/expected/multicol-inline-box-in-later-column.txt@@ -0,0 +1,4 @@+nested: offset 220,0 rect 220,0+right-to-left: offset 60,0 rect 60,0+own-line-root: offset 220,0 rect 220,0+inline-block in relative span: offset left 0 rect 164,26diff --git a/Tests/LibWeb/Text/expected/multicol-inline-box-without-fragments.txt b/Tests/LibWeb/Text/expected/multicol-inline-box-without-fragments.txtnew file mode 100644index 00000000000..6e0129198de--- /dev/null+++ b/Tests/LibWeb/Text/expected/multicol-inline-box-without-fragments.txt@@ -0,0 +1,4 @@+break-only: 12x26, padding-left 3px+collapsed-whitespace: 12x26, padding-left 3px+starts-after-break: 210 150+starts-with-break: 220 70diff --git a/Tests/LibWeb/Text/expected/multicol-later-column-line-overflow.txt b/Tests/LibWeb/Text/expected/multicol-later-column-line-overflow.txtnew file mode 100644index 00000000000..38e57357d17--- /dev/null+++ b/Tests/LibWeb/Text/expected/multicol-later-column-line-overflow.txt@@ -0,0 +1,2 @@+scroller: 820+outer: 820diff --git a/Tests/LibWeb/Text/expected/multicol-later-column-text-edit.txt b/Tests/LibWeb/Text/expected/multicol-later-column-text-edit.txtnew file mode 100644index 00000000000..982a0f232ee--- /dev/null+++ b/Tests/LibWeb/Text/expected/multicol-later-column-text-edit.txt@@ -0,0 +1 @@+last word: 240,20diff --git a/Tests/LibWeb/Text/expected/multicol-line-clamp-ignored.txt b/Tests/LibWeb/Text/expected/multicol-line-clamp-ignored.txtnew file mode 100644index 00000000000..67c1bf45c31--- /dev/null+++ b/Tests/LibWeb/Text/expected/multicol-line-clamp-ignored.txt@@ -0,0 +1,2 @@+line-clamp: height 84, scroll height 84, atomic 360,40+webkit-line-clamp: height 84, scroll height 84, atomic 360,40diff --git a/Tests/LibWeb/Text/expected/multicol-resumed-line-start.txt b/Tests/LibWeb/Text/expected/multicol-resumed-line-start.txtnew file mode 100644index 00000000000..b940fbd151b--- /dev/null+++ b/Tests/LibWeb/Text/expected/multicol-resumed-line-start.txt@@ -0,0 +1,4 @@+edges: span 120,0 105x20, text 145,0+pre-wrap: 80,0 160,0+each-line: 260,0 40x20+hanging: 220,0 40x20diff --git a/Tests/LibWeb/Text/expected/multicol-shared-items-past-column-end.txt b/Tests/LibWeb/Text/expected/multicol-shared-items-past-column-end.txtnew file mode 100644index 00000000000..53e8228790b--- /dev/null+++ b/Tests/LibWeb/Text/expected/multicol-shared-items-past-column-end.txt@@ -0,0 +1,3 @@+long word lines: 0,0 60 | 0,20 60 | 93.328125,0 60 | 93.328125,20 60 | 186.65625,0 60 | 186.65625,20 60 | 279.984375,0 60 | 279.984375,20 60 | 373.3125,0 60 | 373.3125,20 60 | 466.640625,0 60 | 466.640625,20 60 | 559.96875,0 60 | 559.96875,20 60 | 653.296875,0 60 | 653.296875,20 60 | 746.625,0 60 | 746.625,20 60 | 839.953125,0 60 | 839.953125,20 60+abspos: 0,0+last: 559.96875,0diff --git a/Tests/LibWeb/Text/input/multicol-break-lines.html b/Tests/LibWeb/Text/input/multicol-break-lines.htmlnew file mode 100644index 00000000000..a62b4ef90f9--- /dev/null+++ b/Tests/LibWeb/Text/input/multicol-break-lines.html@@ -0,0 +1,58 @@+<!DOCTYPE html>+<script src="include.js"></script>+<style>+ @font-face {+ font-family: Ahem;+ src: url("../../Ref/data/fonts/Ahem.ttf");+ }+ body { margin: 0; }+ .case { columns: 2; column-gap: 0; width: 400px; font: 20px/20px Ahem; margin-bottom: 20px; }+ .float { float: left; width: 100px; height: 60px; }+ p { margin: 0; }+ .boxed { border: 2px solid; padding: 0 4px; }+</style>+<div class="case" id="float-balanced"><div class="float"></div><p id="float-balanced-text">aa bb cc dd ee ff gg hh ii jj kk ll mm nn oo pp qq rr ss tt uu vv ww xx yy zz 11 22 33 44 55 66 77 88 99 AA BB CC DD EE FF GG HH II JJ KK LL MM NN OO PP QQ</p></div>+<div class="case" id="float-fixed" style="column-fill: auto; height: 100px"><div class="float"></div><p id="float-fixed-text">aa bb cc dd ee ff gg hh ii jj kk ll mm nn oo pp qq rr ss tt uu vv ww xx yy zz 11 22 33 44 55 66 77 88 99 AA BB CC DD EE FF GG HH II JJ KK LL MM NN OO PP QQ</p></div>+<div class="case" id="edges"><p>aa bb cc dd <span class="boxed" id="edges-span">ee ff gg hh ii jj kk ll mm nn oo pp qq rr ss tt uu vv ww</span> xx yy zz 11 22 33 44 55 66 77 88 99 AA BB CC DD EE FF</p></div>+<div class="case" id="one-column"><p>aa <span class="boxed" id="one-column-first">bb</span> cc dd ee ff gg hh ii jj kk ll mm nn oo pp <span class="boxed" id="one-column-second">qq</span> rr ss tt uu vv</p></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(" ");+ }++ function wordsIn(paragraph, container) {+ const origin = container.getBoundingClientRect();+ const range = document.createRange();+ const words = [];+ for (const node of paragraph.childNodes) {+ const pattern = /\S+/g;+ let match;+ while ((match = pattern.exec(node.data))) {+ range.setStart(node, match.index);+ range.setEnd(node, match.index + match[0].length);+ const rect = range.getClientRects()[0];+ words.push(rect ? `${match[0]}@${rect.x - origin.x},${rect.y - origin.y}` : `${match[0]}@missing`);+ }+ }+ return words.join(" ");+ }++ asyncTest(async done => {+ await document.fonts.load("20px Ahem");+ for (const id of ["float-balanced", "float-fixed"])+ println(`${id}: ${wordsIn(document.getElementById(`${id}-text`), document.getElementById(id))}`);+ const edges = document.getElementById("edges");+ println(`span across the break: ${rectsIn(document.getElementById("edges-span"), edges)}`);+ const oneColumn = document.getElementById("one-column");+ for (const id of ["one-column-first", "one-column-second"]) {+ const span = document.getElementById(id);+ const origin = oneColumn.getBoundingClientRect();+ const box = span.getBoundingClientRect();+ println(`${id}: ${rectsIn(span, oneColumn)}, bounding ${box.x - origin.x},${box.y - origin.y} ${box.width}x${box.height}, offset width ${span.offsetWidth}`);+ }+ done();+ });+</script>diff --git a/Tests/LibWeb/Text/input/multicol-caret-across-columns.html b/Tests/LibWeb/Text/input/multicol-caret-across-columns.htmlnew file mode 100644index 00000000000..25ca8946f23--- /dev/null+++ b/Tests/LibWeb/Text/input/multicol-caret-across-columns.html@@ -0,0 +1,35 @@+<!DOCTYPE html>+<script src="include.js"></script>+<style>+ @font-face { font-family: Ahem; src: url(../../Ref/data/fonts/Ahem.ttf); }+ body { margin: 0; }+ #multicol { columns: 2; column-gap: 20px; column-fill: auto; height: 81px; width: 420px; font: 20px/20px Ahem; }+ p { margin: 0; }+</style>+<div id="multicol"><p id="paragraph" contenteditable>aaaa bbbb cccc dddd eeee ffff gggg hhhh iiii jjjj kkkk llll</p></div>+<script>+ asyncTest(async done => {+ await document.fonts.load("20px Ahem");+ const paragraph = document.getElementById("paragraph");+ const text = paragraph.firstChild;++ println(`below the text of column 2: ${document.caretPositionFromPoint(300, 70).offset}`);++ const selection = getSelection();+ paragraph.focus();+ selection.collapse(text, 31);+ const downOffsets = [selection.focusOffset];+ for (let i = 0; i < 3; ++i) {+ selection.modify("move", "forward", "line");+ downOffsets.push(selection.focusOffset);+ }+ println(`moving down from column 1: ${downOffsets.join(" -> ")}`);+ const upOffsets = [selection.focusOffset];+ for (let i = 0; i < 3; ++i) {+ selection.modify("move", "backward", "line");+ upOffsets.push(selection.focusOffset);+ }+ println(`moving back up: ${upOffsets.join(" -> ")}`);+ done();+ });+</script>diff --git a/Tests/LibWeb/Text/input/multicol-caret-in-later-column.html b/Tests/LibWeb/Text/input/multicol-caret-in-later-column.htmlnew file mode 100644index 00000000000..2ee0e7d69d9--- /dev/null+++ b/Tests/LibWeb/Text/input/multicol-caret-in-later-column.html@@ -0,0 +1,34 @@+<!DOCTYPE html>+<script src="include.js"></script>+<style>+ body {+ margin: 0;+ }+ .multicol {+ columns: 2;+ column-gap: 0;+ column-fill: auto;+ width: 200px;+ height: 40px;+ }+ p {+ margin: 0;+ font-size: 0;+ }+ span {+ display: inline-block;+ width: 20px;+ vertical-align: top;+ }+</style>+<div class="multicol"><p id="paragraph"><span style="height: 30px"></span><br><span style="height: 10px"></span><br><span style="height: 20px"></span><br><span style="height: 20px"></span></p></div>+<script>+ test(() => {+ const paragraph = document.getElementById("paragraph");+ for (const [x, y] of [[150, 5], [150, 25]]) {+ const position = document.caretPositionFromPoint(x, y);+ const nodeName = position.offsetNode === paragraph ? "paragraph" : position.offsetNode.nodeName;+ println(`caret at ${x},${y}: ${nodeName} ${position.offset}`);+ }+ });+</script>diff --git a/Tests/LibWeb/Text/input/multicol-inline-box-in-later-column.html b/Tests/LibWeb/Text/input/multicol-inline-box-in-later-column.htmlnew file mode 100644index 00000000000..4b78d4ee3c2--- /dev/null+++ b/Tests/LibWeb/Text/input/multicol-inline-box-in-later-column.html@@ -0,0 +1,28 @@+<!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; }+ .multicol { columns: 2; column-gap: 20px; column-fill: auto; height: 41px; width: 420px; position: relative; }+ p { margin: 0; }+</style>+<div class="multicol"><p>aaa bbb ccc ddd <span id="nested">eee</span> fff</p></div>+<div class="multicol" dir="rtl"><p>aaa bbb ccc ddd <span id="right-to-left">eee</span> fff</p></div>+<div class="multicol">aaa bbb ccc ddd <span id="own-line-root">eee</span> fff</div>+<div class="multicol"><p>aaa bbb ccc ddd <span id="relative" style="position: relative; left: 4px"><span id="inline-block" style="display: inline-block; width: 10px; height: 10px"></span></span> fff</p></div>+<script>+ asyncTest(async done => {+ await document.fonts.load("20px Ahem");+ for (const id of ["nested", "right-to-left", "own-line-root"]) {+ const element = document.getElementById(id);+ const multicol = element.closest(".multicol").getBoundingClientRect();+ const rect = element.getBoundingClientRect();+ println(`${id}: offset ${element.offsetLeft},${element.offsetTop} rect ${rect.x - multicol.x},${rect.y - multicol.y}`);+ }+ const inlineBlock = document.getElementById("inline-block");+ const multicol = inlineBlock.closest(".multicol").getBoundingClientRect();+ const rect = inlineBlock.getBoundingClientRect();+ println(`inline-block in relative span: offset left ${inlineBlock.offsetLeft} rect ${rect.x - multicol.x},${rect.y - multicol.y}`);+ done();+ });+</script>diff --git a/Tests/LibWeb/Text/input/multicol-inline-box-without-fragments.html b/Tests/LibWeb/Text/input/multicol-inline-box-without-fragments.htmlnew file mode 100644index 00000000000..385e57b14e7--- /dev/null+++ b/Tests/LibWeb/Text/input/multicol-inline-box-without-fragments.html@@ -0,0 +1,32 @@+<!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; }+ .multicol { columns: 2; column-gap: 20px; width: 420px; margin-bottom: 10px; }+ .fill { column-fill: auto; height: 21px; }+ p { margin: 0; }+ .edges { border: 3px solid; padding: 0 3px; }+ .start-edge { border-left: 6px solid; padding-left: 4px; }+</style>+<div class="multicol"><p>aa <span class="edges" id="break-only"><br></span>bb</p></div>+<div class="multicol"><p>aa <span class="edges" id="collapsed-whitespace"> </span>bb</p></div>+<div class="multicol fill"><p>aaaaaaa<span class="start-edge" id="starts-after-break"> ccccccc</span></p></div>+<div class="multicol fill"><p>aaa<span class="start-edge" id="starts-with-break"><br>bbb</span></p></div>+<script>+ asyncTest(async done => {+ await document.fonts.load("20px Ahem");+ for (const id of ["break-only", "collapsed-whitespace"]) {+ const element = document.getElementById(id);+ const style = getComputedStyle(element);+ println(`${id}: ${element.offsetWidth}x${element.offsetHeight}, padding-left ${style.paddingLeft}`);+ }+ for (const id of ["starts-after-break", "starts-with-break"]) {+ const element = document.getElementById(id);+ const origin = element.closest(".multicol").getBoundingClientRect();+ const rects = Array.from(element.getClientRects()).map(rect => `${rect.x - origin.x} ${rect.width}`);+ println(`${id}: ${rects.join(" | ")}`);+ }+ done();+ });+</script>diff --git a/Tests/LibWeb/Text/input/multicol-later-column-line-overflow.html b/Tests/LibWeb/Text/input/multicol-later-column-line-overflow.htmlnew file mode 100644index 00000000000..c43aeb9d5e8--- /dev/null+++ b/Tests/LibWeb/Text/input/multicol-later-column-line-overflow.html@@ -0,0 +1,18 @@+<!DOCTYPE html>+<script src="include.js"></script>+<style>+ @font-face { font-family: Ahem; src: url(../../Ref/data/fonts/Ahem.ttf); }+ body { margin: 0; }+ .mc { columns: 2; column-gap: 20px; column-fill: auto; height: 41px; width: 420px; font: 20px/20px Ahem; }+ p { margin: 0; }+</style>+<div class="mc" id="scroller" style="overflow: hidden"><p>aa<br>bb<br>cccccccccccccccccccccccccccccc</p></div>+<div style="width: 420px; overflow: hidden" id="outer"><div class="mc"><p>aa<br>bb<br>cccccccccccccccccccccccccccccc</p></div></div>+<script>+ asyncTest(async done => {+ await document.fonts.load("20px Ahem");+ println(`scroller: ${document.getElementById("scroller").scrollWidth}`);+ println(`outer: ${document.getElementById("outer").scrollWidth}`);+ done();+ });+</script>diff --git a/Tests/LibWeb/Text/input/multicol-later-column-text-edit.html b/Tests/LibWeb/Text/input/multicol-later-column-text-edit.htmlnew file mode 100644index 00000000000..80f75ee6275--- /dev/null+++ b/Tests/LibWeb/Text/input/multicol-later-column-text-edit.html@@ -0,0 +1,26 @@+<!DOCTYPE html>+<script src="include.js"></script>+<style>+ @font-face { font-family: Ahem; src: url(../../Ref/data/fonts/Ahem.ttf); }+ body { margin: 0; }+</style>+<div style="columns: 2; column-fill: auto; height: 41px; width: 220px; font: 20px/20px Ahem"><p id="p" style="margin: 0"><span style="border: 1px solid">aaaa</span> bbbb cccc dddd</p></div>+<script>+ asyncTest(async done => {+ await document.fonts.load("20px Ahem");+ const frame = () => new Promise(resolve => requestAnimationFrame(() => requestAnimationFrame(resolve)));+ await frame();+ const p = document.getElementById("p");+ p.lastChild.data = " bbbb cc";+ await frame();+ p.lastChild.data = " bbbb cccc dddd eeee ffff";+ await frame();+ const origin = p.parentElement.getBoundingClientRect();+ const range = document.createRange();+ range.setStart(p.lastChild, p.lastChild.data.length - 4);+ range.setEnd(p.lastChild, p.lastChild.data.length);+ const rect = range.getBoundingClientRect();+ println(`last word: ${rect.x - origin.x},${rect.y - origin.y}`);+ done();+ });+</script>diff --git a/Tests/LibWeb/Text/input/multicol-line-clamp-ignored.html b/Tests/LibWeb/Text/input/multicol-line-clamp-ignored.htmlnew file mode 100644index 00000000000..15687b8abc1--- /dev/null+++ b/Tests/LibWeb/Text/input/multicol-line-clamp-ignored.html@@ -0,0 +1,22 @@+<!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; }+ p { margin: 0; }+ .atomic { display: inline-block; width: 20px; height: 20px; }+</style>+<div id="line-clamp" style="columns: 2; column-gap: 0; width: 400px; line-clamp: 2"><p>aaa bbb ccc ddd eee fff ggg hhh iii jjj kkk lll mmm nnn <span class="atomic"></span> ooo</p></div>+<div id="webkit-line-clamp" style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; columns: 2; column-gap: 0; width: 400px"><p>aaa bbb ccc ddd eee fff ggg hhh iii jjj kkk lll mmm nnn <span class="atomic"></span> ooo</p></div>+<script>+ asyncTest(async done => {+ await document.fonts.load("20px Ahem");+ for (const id of ["line-clamp", "webkit-line-clamp"]) {+ const container = document.getElementById(id);+ const atomic = container.querySelector(".atomic").getBoundingClientRect();+ const origin = container.getBoundingClientRect();+ println(`${id}: height ${container.offsetHeight}, scroll height ${container.scrollHeight}, atomic ${atomic.x - origin.x},${atomic.y - origin.y}`);+ }+ done();+ });+</script>diff --git a/Tests/LibWeb/Text/input/multicol-resumed-line-start.html b/Tests/LibWeb/Text/input/multicol-resumed-line-start.htmlnew file mode 100644index 00000000000..987c69cc4f5--- /dev/null+++ b/Tests/LibWeb/Text/input/multicol-resumed-line-start.html@@ -0,0 +1,44 @@+<!DOCTYPE html>+<script src="include.js"></script>+<style>+ @font-face { font-family: Ahem; src: url(../../Ref/data/fonts/Ahem.ttf); }+ body { margin: 0; }+ .mc { column-fill: auto; height: 41px; width: 220px; column-gap: 20px; font: 20px/20px Ahem; }+ p { margin: 0; }+</style>+<div class="mc" id="edges" style="columns: 2"><p>l1<br>aaa <span id="edges-span" style="padding-left: 20px; border-left: 5px solid"> bbbb</span> cc</p></div>+<div class="mc" id="pre-wrap" style="columns: 3"><p style="white-space: pre-wrap">aaaa bbbb cccc dddd eeee ffff</p></div>+<div class="mc" id="each-line" style="columns: 2; width: 420px; orphans: 1; widows: 1"><p style="text-indent: 40px each-line">aa<br>bb<br><span id="each-line-span">cc</span><br>dd</p></div>+<div class="mc" id="hanging" style="columns: 2; width: 420px; orphans: 1; widows: 1"><p style="text-indent: 40px each-line hanging">aa<br>bb<br><span id="hanging-span">cc</span><br>dd</p></div>+<script>+ function textOffset(container, text) {+ const walker = document.createTreeWalker(container, NodeFilter.SHOW_TEXT);+ const origin = container.getBoundingClientRect();+ for (let node = walker.nextNode(); node; node = walker.nextNode()) {+ const index = node.data.indexOf(text);+ if (index < 0)+ continue;+ const range = document.createRange();+ range.setStart(node, index);+ range.setEnd(node, index + text.length);+ const rect = range.getBoundingClientRect();+ return `${rect.x - origin.x},${rect.y - origin.y}`;+ }+ return "missing";+ }+ function boxOffset(id) {+ const element = document.getElementById(id);+ const origin = element.closest(".mc").getBoundingClientRect();+ const rect = element.getBoundingClientRect();+ return `${rect.x - origin.x},${rect.y - origin.y} ${rect.width}x${rect.height}`;+ }+ asyncTest(async done => {+ await document.fonts.load("20px Ahem");+ println(`edges: span ${boxOffset("edges-span")}, text ${textOffset(document.getElementById("edges"), "bbbb")}`);+ const preWrap = document.getElementById("pre-wrap");+ println(`pre-wrap: ${textOffset(preWrap, "cccc")} ${textOffset(preWrap, "eeee")}`);+ println(`each-line: ${boxOffset("each-line-span")}`);+ println(`hanging: ${boxOffset("hanging-span")}`);+ done();+ });+</script>diff --git a/Tests/LibWeb/Text/input/multicol-shared-items-past-column-end.html b/Tests/LibWeb/Text/input/multicol-shared-items-past-column-end.htmlnew file mode 100644index 00000000000..c6fc899067a--- /dev/null+++ b/Tests/LibWeb/Text/input/multicol-shared-items-past-column-end.html@@ -0,0 +1,28 @@+<!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; }+ .multicol { columns: 3; column-gap: 20px; column-fill: auto; height: 41px; width: 260px; margin-bottom: 10px; }+ p { margin: 0; }+</style>+<div class="multicol"><p id="long-word" style="overflow-wrap: anywhere">abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefgh</p></div>+<div class="multicol"><p><span style="position: absolute" id="abspos"></span>aaa bbb ccc ddd eee fff ggg hhh iii jjj kkk lll <span id="last">mmm</span></p></div>+<script>+ asyncTest(async done => {+ await document.fonts.load("20px Ahem");+ const longWord = document.getElementById("long-word");+ const origin = longWord.parentElement.getBoundingClientRect();+ const range = document.createRange();+ range.selectNodeContents(longWord);+ const lines = Array.from(range.getClientRects()).map(rect => `${rect.x - origin.x},${rect.y - origin.y} ${rect.width}`);+ println(`long word lines: ${lines.join(" | ")}`);+ for (const id of ["abspos", "last"]) {+ const element = document.getElementById(id);+ const multicol = element.closest(".multicol").getBoundingClientRect();+ const rect = element.getBoundingClientRect();+ println(`${id}: ${rect.x - multicol.x},${rect.y - multicol.y}`);+ }+ done();+ });+</script>