| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
A sequence of whitespace shouldn't generate an anonymous table row/cell,
but we can't just throw away the leading whitespace, because afterwards
we may encounter some other content, and then the leading whitespace
should appear in the cell (noticeable with e.g. `white-space: pre`).
|
| |
|
|
|
|
|
|
|
|
| |
Put table cell content fragments into a hieararchy of fragments that
include their table row and table row group fragments. This ensures that
things like relative positioning and transforms set on rows and row
groups properly affect cells and cell content.
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
| |
* clippy: fix warnings in components/layout_2020
* fix: review comments
|
|
|
|
|
|
|
| |
This doesn't really have observable behavior right now, as much as I
tried to trigger some kind of bug. On the other hand, it's just wrong
and is very obvious when you dump the Fragment tree. If you create a
`display: table-cell` that is a child of the `<body>` all parts of the
anonymous table are flagged as if they are the `<body>` element.
|
|
|
|
|
|
|
| |
Anonymous tables should not use legacy pseudos, as the legacy layout
engine had them inherit lots of random properites that lead to bad
layout in the new layout engine.
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
| |
Instead of just taking the value from the ancestor outside the table,
combine the values when constructing the table.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds support for table rows, columns, rowgroups and colgroups.
There are few additions here:
1. The createion of fragments, which allows script queries and hit
testing to work properly. These fragments are empty as all cells are
still direct descendants of the table fragment.
2. Properly handling size information from tracks and track groups as
well as frustrating rules about reordering rowgroups.
3. Painting a background seemlessly across track groups and groups. This
is a thing that isn't done in legacy layout (nor WebKit)!
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
|
|
|
| |
This implements a very naive row height allocation approach. It has just
enough to implement `vertical-align` in table cells. Rowspanned cells
get enough space for their content, with the extra space necessary being
allocated to the last row. There's still a lot missing here, including
proper distribution of row height to rowspanned cells.
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
| |
cargo clippy --fix -p layout_2020 --allow-dirty --broken-code
|
|
|
|
|
|
| |
Replaced elements should never be able to have a layout internal
display, according to the specification. This change makes it so that
the used value of replaced element's display is always inline, as the
specification says.
|
|
|
|
| |
This fixes many rustdoc errors that occur due to raw URLs in rustdoc
comments as well as unescaped Rust code that should be in backticks.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* layout: Add *very* basic support for table layout
This is the first step to proper table layout. It implements a naive
layout algorithm, notably only taking into account the preferred widths
of the first table row. Still, it causes some float tests to start
passing, so turn on the `layout.tables.enabled` preference for those
directories.
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
* Address review comments
* Fix a crash with rowspan=0
* Turn on pref and update results for `/css/css-tables` and `/css/CSS2/tables`
---------
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds support for fixing up tables so that internal table elements
that are not properly parented in the DOM have the correct box tree
structure according to the CSS Table specification [1]. Note that this
only comes into play when building the DOM via script, as HTML 5 has its
own table fixups that mean that the box tree construction fixups here
are not necessary.
There are no tests for this change. In general, it's hard to write tests
against the shape of the box tree, because it depends on the DOM. We
plan to test this via WPT tests once layout is complete.
1. https://drafts.csswg.org/css-tables/#table-internal-element
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
|
|
This is the first part of constructing the box tree for table layout. No
layout is actually done and the construction of tables is now hidden
behind a flag (in order to not regress WPT). Notably, this does not
handle anonymous table part construction, when the DOM does not reflect
a fully-formed table. That's part two.
Progress toward #27459.
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
Co-authored-by: Manish Goregaokar <manishsmail@gmail.com>
|