Skip to content

Commit

Permalink
[Squad] Get rid of MutableStyleRef() in list items.
Browse files Browse the repository at this point in the history
Clone and reset ComputedStyle When modifying the style of anonymous
layout objects inside list items.

Bug: 813068
Change-Id: Icd0d9d93d0e64fd130cfb5ba151bce7c34bfb234
Reviewed-on: https://chromium-review.googlesource.com/1053727
Reviewed-by: cathie chen <cathiechen@tencent.com>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558257}
  • Loading branch information
Rune Lillesveen authored and chromium-wpt-export-bot committed May 14, 2018
1 parent 40d2e0d commit b22e127
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions css/css-display/display-list-item-height-after-dom-change.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Display: reflowing a display:list-item on dom changes - non-zero height</title>
<link rel="author" title="Rune Lillesveen" href="mailto:futhark@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-display-3/#list-items">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<ul>
<li id="item" style="background:green">
<div id="content" style="overflow:hidden">Text<div>
</li>
</ul>
<script>
test(function() {
document.body.offsetTop; // force layout
item.insertBefore(document.createTextNode("This text should have a green background"), item.firstChild);
content.innerHTML = "";
assert_not_equals(item.clientHeight, 0, "The height of the LI should not be 0px.");
}, "List item height after DOM change.");
</script>

0 comments on commit b22e127

Please sign in to comment.