Commit graph

3 commits

Author SHA1 Message Date
Andreas Kling
a146225331 LibWeb: Use unsafe layout/paintable accessors where appropriate
Add unsafe_layout_node(), unsafe_paintable(), and unsafe_paintable_box()
accessors that skip layout-staleness verification. These are for use in
contexts where accessing layout/paintable data is legitimate despite
layout not being up to date: tree construction, style recalculation,
painting, animation interpolation, DOM mutation, and invalidation
propagation.

Also add wrapper APIs on Node to centralize common patterns:
- set_needs_display() wraps if (unsafe_paintable()) ...set_needs_display
- set_needs_paint_only_properties_update() wraps similar
- set_needs_layout_update() wraps if (unsafe_layout_node()) ...

And add Document::layout_is_up_to_date() which checks whether layout
tree update flags are all clear.
2026-02-26 21:09:08 +01:00
Aliaksandr Kalenik
edf42ec9f9 LibWeb: Remove Document.h include from SVGElement.h
This reduces the recompilation cascade when Document.h is modified,
cutting off the transitive path through ~30 SVG element headers.

Move the inline try_resolve_url_to() template body in
SVGGraphicsElement.h to a non-template helper in the .cpp file to
avoid needing Document.h and ShadowRoot.h in the header.

Add explicit includes to files that relied on the transitive dependency.
2026-02-08 18:51:13 +01:00
Tim Ledbetter
d4f05bc4ef LibWeb: Implement <feImage> SVG filter 2025-08-29 10:15:24 +01:00