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

Unified Diff: LayoutTests/fast/css/invalidation/targeted-class-style-invalidation.html

Issue 171513013: Do not add features to classes in rightmost compound selector. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Back to using two loops. Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/css/invalidation/targeted-class-style-invalidation-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/css/invalidation/targeted-class-style-invalidation.html
diff --git a/LayoutTests/fast/css/invalidation/targeted-class-style-invalidation.html b/LayoutTests/fast/css/invalidation/targeted-class-style-invalidation.html
index 5f346ae51bf7f10ddc1d97d9e3573d5550ee1b64..21cdf6fc82dcbdf077c2c3227c5152e3099dcc0b 100644
--- a/LayoutTests/fast/css/invalidation/targeted-class-style-invalidation.html
+++ b/LayoutTests/fast/css/invalidation/targeted-class-style-invalidation.html
@@ -5,6 +5,7 @@
div { width: 100px }
.outer .inner { width: 200px }
.outer2 { width: 150px }
+ .outer3.nomatch {}
</style>
<div id="outer">
@@ -20,6 +21,10 @@
<div id="outer2">
<div id="inner3"></div>
</div>
+<div id="outer3">
+ <div class="nomatch"></div>
+ <div class="outer3"></div>
+</div>
<script>
description("Test that adding and removing class names only updates the elements that are affected.");
@@ -34,6 +39,7 @@ function insertStyleSheet(css)
var outer = document.getElementById('outer');
var inner = document.getElementById('inner');
var outer2 = document.getElementById('outer2');
+var outer3 = document.getElementById('outer3');
var count;
if (internals.runtimeFlags.targetedStyleRecalcEnabled)
@@ -68,4 +74,14 @@ outer2.offsetTop;
outer2.className = 'outer2';
shouldBe("internals.updateStyleAndReturnAffectedElementCount()", '' + count);
shouldBe("getComputedStyle(outer2).width", '"150px"');
+
+if (internals.runtimeFlags.targetedStyleRecalcEnabled)
+ count = 1;
+else
+ count = 3;
+
+// Style recalc should happen on "outer3", but none of its children.
+outer3.offsetTop;
+outer3.className = 'outer3';
+shouldBe("internals.updateStyleAndReturnAffectedElementCount()", '' + count);
</script>
« no previous file with comments | « no previous file | LayoutTests/fast/css/invalidation/targeted-class-style-invalidation-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698