mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
layout: Add support for table captions (#32657)
This adds initial support for table captions. To do this, the idea of the table wrapper becomes a bit more concrete. Even so, the wrapper is still reponsible for allocating space for the grid's border and padding, as those properties are specified on the wrapper and not grid in CSS. In order to account for this weirdness of HTML/CSS captions and grid are now laid out and placed with a negative offset in the table wrapper content rect. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
f8e4ae6040
commit
959ffad99a
76 changed files with 551 additions and 322 deletions
|
@ -1367,9 +1367,9 @@ struct ContainingBlockPaddingAndBorder<'a> {
|
|||
max_box_size: LogicalVec2<Option<Length>>,
|
||||
}
|
||||
|
||||
struct ResolvedMargins {
|
||||
pub(crate) struct ResolvedMargins {
|
||||
/// Used value for the margin properties, as exposed in getComputedStyle().
|
||||
margin: LogicalSides<Au>,
|
||||
pub margin: LogicalSides<Au>,
|
||||
|
||||
/// Distance between the border box and the containing block on the inline-start side.
|
||||
/// This is typically the same as the inline-start margin, but can be greater when
|
||||
|
@ -1377,7 +1377,7 @@ struct ResolvedMargins {
|
|||
/// The reason we aren't just adjusting the used margin-inline-start is that
|
||||
/// this shouldn't be observable via getComputedStyle().
|
||||
/// <https://drafts.csswg.org/css-align/#justify-self-property>
|
||||
effective_margin_inline_start: Au,
|
||||
pub effective_margin_inline_start: Au,
|
||||
}
|
||||
|
||||
/// Given the style for an in-flow box and its containing block, determine the containing
|
||||
|
@ -1440,7 +1440,7 @@ fn solve_containing_block_padding_and_border_for_in_flow_box<'a>(
|
|||
/// Note that in the presence of floats, this shouldn't be used for a block-level box
|
||||
/// that establishes an independent formatting context (or is replaced), since the
|
||||
/// margins could then be incorrect.
|
||||
fn solve_margins(
|
||||
pub(crate) fn solve_margins(
|
||||
containing_block: &ContainingBlock<'_>,
|
||||
pbm: &PaddingBorderMargin,
|
||||
inline_size: Au,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue