mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWeb: Propagate iframe element margin attribute changes into content
This commit is contained in:
committed by
Andreas Kling
parent
2725142db9
commit
a34a45bf64
Notes:
github-actions[bot]
2025-02-22 19:03:27 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/a34a45bf64f Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3654
@@ -65,6 +65,13 @@ void HTMLIFrameElement::attribute_changed(FlyString const& name, Optional<String
|
||||
// FIXME: This should only invalidate the layout, not the style.
|
||||
invalidate_style(DOM::StyleInvalidationReason::HTMLIFrameElementGeometryChange);
|
||||
}
|
||||
|
||||
if (name == HTML::AttributeNames::marginwidth || name == HTML::AttributeNames::marginheight) {
|
||||
if (auto* document = this->content_document_without_origin_check()) {
|
||||
if (auto* body_element = document->body())
|
||||
const_cast<HTMLElement*>(body_element)->set_needs_style_update(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-iframe-element:html-element-post-connection-steps
|
||||
|
||||
Reference in New Issue
Block a user