mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-05 09:06:08 +00:00
LibWeb: Update anonymous wrappers when applying style changes
Anonymous wrapper boxes inherit style from their layout tree parent, and since style data is per-layout-node, we have to manually sync them from parent to anonymous children when something changes. This is not very elegant or efficient, so I've left a FIXME about solving it in a nicer way. This fixes horizontal dog alignment on https://waffles.dog/ :^)
This commit is contained in:
parent
b918ce4022
commit
510dfbb7e6
Notes:
sideshowbarker
2024-07-16 23:59:28 +09:00
Author: https://github.com/awesomekling
Commit: 510dfbb7e6
Pull-request: https://github.com/SerenityOS/serenity/pull/19768
4 changed files with 36 additions and 0 deletions
|
@ -0,0 +1,8 @@
|
|||
<!doctype html><style>
|
||||
body {
|
||||
text-align: center;
|
||||
}
|
||||
</style><body><h1>header</h1>anonymously wrapped text<script>
|
||||
document.body.offsetWidth; // Force a layout.
|
||||
document.body.style.textAlign = 'left';
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue