mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibWeb: Teach HTMLObjectElement to negotiate natural size with SVGs
We do this by generalizing the code previously used for SVGSVGBox into something that can be used for NavigableViewportContainer as well.
This commit is contained in:
committed by
Andreas Kling
parent
2405805ddf
commit
733c6b14ff
@@ -1931,6 +1931,12 @@ void finalize_a_cross_document_navigation(GC::Ref<Navigable> navigable, HistoryH
|
||||
|
||||
// 10. Apply the push/replace history step targetStep to traversable.
|
||||
traversable->apply_the_push_or_replace_history_step(target_step, history_handling, TraversableNavigable::SynchronousNavigation::No);
|
||||
|
||||
// AD-HOC: If we're inside a navigable container, let's trigger a relayout in the container document.
|
||||
// This allows size negotiation between the containing document and SVG documents to happen.
|
||||
if (auto container = navigable->container()) {
|
||||
container->document().set_needs_layout();
|
||||
}
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/browsing-the-web.html#url-and-history-update-steps
|
||||
|
||||
Reference in New Issue
Block a user