mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
LibWeb: Add opt-in tracing of update_layout() calls with reason
This commit is contained in:
parent
c4b1d2382a
commit
c333042e63
Notes:
github-actions[bot]
2025-03-08 02:39:13 +00:00
Author: https://github.com/awesomekling
Commit: c333042e63
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3852
21 changed files with 137 additions and 52 deletions
|
@ -362,7 +362,7 @@ GC::Ref<Geometry::DOMRect> SVGGraphicsElement::get_b_box(Optional<SVGBoundingBox
|
|||
// SVG coordinate space (before any viewbox or other transformations), so it should be possible to
|
||||
// calculate this from SVG geometry without a full layout tree (at least for simple cases).
|
||||
// See: https://svgwg.org/svg2-draft/coords.html#BoundingBoxes
|
||||
const_cast<DOM::Document&>(document()).update_layout();
|
||||
const_cast<DOM::Document&>(document()).update_layout(DOM::UpdateLayoutReason::SVGGraphicsElementGetBBox);
|
||||
if (!layout_node())
|
||||
return Geometry::DOMRect::create(realm());
|
||||
// Invert the SVG -> screen space transform.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue