mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-22 10:19:20 +00:00
LibWeb: Invalidate layout tree at nearest non-anonymous ancestor
When marking a part of the layout tree for rebuild, if the subtree root that we're marking has an anonymous parent, we now mark from the nearest non-anonymous ancestor instead. This ensures that subtrees inside anonymous wrappers don't just get duplicated (i.e recreated but inserted instead of replaced).
This commit is contained in:
parent
93cd17db74
commit
6dba720370
Notes:
github-actions[bot]
2025-06-03 22:44:28 +00:00
Author: https://github.com/awesomekling
Commit: 6dba720370
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4987
3 changed files with 52 additions and 1 deletions
|
@ -0,0 +1,14 @@
|
|||
<!doctype html>
|
||||
<script>
|
||||
function flipFlop() {
|
||||
foo.style.position = 'relative';
|
||||
foo.offsetWidth;
|
||||
foo.style.position = '';
|
||||
foo.offsetWidth;
|
||||
}
|
||||
onload = function() {
|
||||
flipFlop();
|
||||
flipFlop();
|
||||
flipFlop();
|
||||
};
|
||||
</script><body><a><span id="foo"></span><h1>test</h1>
|
Loading…
Add table
Add a link
Reference in a new issue