mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 21:07:36 +00:00
LibWeb: Resolve outline CSS property before paint commands recording
Refactor to resolve paint-only properties before painting, aiming to stop using layout nodes during recording of painting commands. Also adds a test, as we have not had any for outlines yet.
This commit is contained in:
parent
f19b17e089
commit
95d91a37d2
7 changed files with 64 additions and 11 deletions
|
@ -167,11 +167,9 @@ void InlinePaintable::paint(PaintContext& context, PaintPhase phase) const
|
|||
}
|
||||
|
||||
if (phase == PaintPhase::Outline) {
|
||||
auto outline_width = computed_values().outline_width().to_px(layout_node());
|
||||
auto maybe_outline_data = borders_data_for_outline(layout_node(), computed_values().outline_color(), computed_values().outline_style(), outline_width);
|
||||
if (maybe_outline_data.has_value()) {
|
||||
auto maybe_outline_data = this->outline_data();
|
||||
if (maybe_outline_data.has_value())
|
||||
paint_border_or_outline(maybe_outline_data.value(), computed_values().outline_offset().to_px(layout_node()));
|
||||
}
|
||||
}
|
||||
|
||||
if (phase == PaintPhase::Foreground) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue