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

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

Issue 170873004: Fix issue in which removing a class does not always invalidate style (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed bug - was not clearing the NeedsStyleInvalidation bit correctly. 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 b229f9faf2840bf3c33d4221c1f00614f3ff9d70..cbf58d1b56417a4431fcd0a17f03bf5ec53d1eac 100644
--- a/LayoutTests/fast/css/invalidation/targeted-class-style-invalidation.html
+++ b/LayoutTests/fast/css/invalidation/targeted-class-style-invalidation.html
@@ -2,11 +2,14 @@
<script src="../../../resources/js-test.js"></script>
<style>
- .outer .inner {}
+ div { width: 100px }
+ .outer .inner { width: 200px }
</style>
<div id="outer">
<div id="inner" class="inner">
+ <div id="innerChild">
+ </div>
</div>
<div id="inner2">
</div>
@@ -23,18 +26,29 @@ function insertStyleSheet(css)
}
var outer = document.getElementById('outer');
+var inner = document.getElementById('inner');
-outer.offsetTop;
-outer.className = 'outer';
+var count;
+if (internals.runtimeFlags.targetedStyleRecalcEnabled)
+ count = 2;
+else
+ count = 4;
// Style recalc should happen on "inner" and "outer", but not "inner2".
+outer.offsetTop;
+outer.className = 'outer';
+shouldBe("internals.updateStyleAndReturnAffectedElementCount()", '' + count);
+shouldBe("getComputedStyle(inner).width", '"200px"');
-var count;
if (internals.runtimeFlags.targetedStyleRecalcEnabled)
- count = 2;
+ count = 1;
else
- count = 3;
+ count = 2;
+// Style recalc should happen on "inner", but not "innerChild".
+inner.offsetTop;
+inner.className = '';
shouldBe("internals.updateStyleAndReturnAffectedElementCount()", '' + count);
+shouldBe("getComputedStyle(inner).width", '"100px"');
</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