mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 16:57:36 +00:00
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.
This commit is contained in:
parent
f6d2a21d27
commit
f544132fe8
6 changed files with 269 additions and 29 deletions
15
Userland/Libraries/LibWeb/Painting/TableBordersPainting.h
Normal file
15
Userland/Libraries/LibWeb/Painting/TableBordersPainting.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
/*
|
||||
* 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&);
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue