Automatic update from web-platform-tests layout: Clear laid out fragments of descendants when `content` is replaced A dynamic change of the `content` property can turn a non-replaced element into replaced. In that case, it's possible that the contents were laid out previously, and now they will be skipped. The problem was that we were still caching the results from the previous layout in some cases. Thus, script queries like `getComputedStyle` could return the wrong value, or Servo could crash. Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Oriol Brufau <obrufau@igalia.com> -- wpt-commits: aa133226f042b41a269689ff9072ec91098916cd wpt-pr: 61099
15 lines
314 B
HTML
15 lines
314 B
HTML
<!DOCTYPE html>
|
|
<link rel="help" href="https://github.com/servo/servo/issues/46023">
|
|
|
|
<style>
|
|
html { scale: 1; }
|
|
div { display: flow-root; }
|
|
</style>
|
|
<div><img id="img"></div>
|
|
<script>
|
|
onload = _ => {
|
|
document.documentElement.style.cssText = "content: linear-gradient(blue); scale: 0";
|
|
img.height;
|
|
}
|
|
</script>
|