1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-22 16:15:08 +00:00
serenity/Userland/Libraries/LibWeb/Painting/TableBordersPainting.h
Andi Gallo f544132fe8 LibWeb: Some improvements for painting of collapsed table borders
Follow the specification in making the borders centered on the grid
lines. This avoids visual bugs due to double-rendering of borders on
either side of an edge and paves the way for a full implementation of
the harmonization algorithm for collapsed borders.

Currently, this still lacks complete handling of row and column spans.
Also, the box model for cells still considers the full width of the
internal borders instead of just half, as the specification requires.
Some additional handling of rounding issues will be needed to avoid very
subtle visual bugs.

Despite these limitations, this improves the appearance of all the
tables with collapsed borders I've tried while limiting the amount of
change to something reasonable.
2023-07-06 10:31:51 +02:00

15 lines
261 B
C++

/*
* Copyright (c) 2023, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWeb/Painting/PaintContext.h>
namespace Web::Painting {
void paint_table_collapsed_borders(PaintContext&, Layout::Node const&);
}