mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 03:55:24 +00:00
LibWeb: Propagate iframe element margin attribute changes into content
This commit is contained in:
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
1 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue