1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:07:45 +00:00

LibWeb: Resolve table border conflicts at edge level

This better conforms to specification, which describes border conflict
resolution by edge, not by element.
This commit is contained in:
Andi Gallo 2023-07-02 03:39:06 +00:00 committed by Andreas Kling
parent b39d8af5a6
commit 85c1b93eb7
2 changed files with 84 additions and 31 deletions

View file

@ -120,17 +120,24 @@ private:
CSSPixels compute_row_content_height(Cell const& cell) const;
enum class ConflictingEdge {
enum class ConflictingSide {
Top,
Right,
Bottom,
Left,
Right,
};
struct ConflictingEdge {
Node const* element;
ConflictingSide side;
};
const CSS::BorderData& border_data_conflicting_edge(ConflictingEdge const& conflicting_edge);
class BorderConflictFinder {
public:
BorderConflictFinder(TableFormattingContext const* context);
Vector<Node const*> conflicting_elements(Cell const&, ConflictingEdge) const;
Vector<ConflictingEdge> conflicting_edges(Cell const&, ConflictingSide) const;
private:
void collect_conflicting_col_elements();