Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Side by Side Diff: LayoutTests/fast/css/pseudo-empty-adjacent-dynamic.html

Issue 558333002: Don't clear StyleAffectedByEmpty before recalc. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/css/pseudo-empty-adjacent-dynamic-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"></script>
3 <style>
4 :empty + div { background-color: green; }
5 </style>
6 <div id="empty">To be removed</div>
7 <div id="sibling">This text should be green</div>
8 <script>
9 description("Check that the sibling of an element that becomes :empty is properl y recalculated");
10
11 var transparent = "rgba(0, 0, 0, 0)";
12 var green = "rgb(0, 128, 0)";
13
14 empty.offsetTop; // force recalc
15 empty.style.color = "red"; // force LocalStyleChange on #empty
16 empty.offsetTop; // force recalc
17
18 shouldBe("getComputedStyle(sibling, '').backgroundColor", "transparent");
19
20 empty.removeChild(empty.firstChild);
21 empty.offsetTop; // force recalc
22
23 shouldBe("getComputedStyle(sibling, '').backgroundColor", "green");
24 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/css/pseudo-empty-adjacent-dynamic-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698