| 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 cbf58d1b56417a4431fcd0a17f03bf5ec53d1eac..df733d145188eb14a9e3ec1ea41382ea602211af 100644
|
| --- a/LayoutTests/fast/css/invalidation/targeted-class-style-invalidation.html
|
| +++ b/LayoutTests/fast/css/invalidation/targeted-class-style-invalidation.html
|
| @@ -4,6 +4,7 @@
|
| <style>
|
| div { width: 100px }
|
| .outer .inner { width: 200px }
|
| + .outer2 { width: 150px }
|
| </style>
|
|
|
| <div id="outer">
|
| @@ -14,6 +15,9 @@
|
| <div id="inner2">
|
| </div>
|
| </div>
|
| +<div id="outer2">
|
| + <div id="inner3"></div>
|
| +</div>
|
|
|
| <script>
|
| description("Test that adding and removing class names only updates the elements that are affected.");
|
| @@ -27,6 +31,7 @@ function insertStyleSheet(css)
|
|
|
| var outer = document.getElementById('outer');
|
| var inner = document.getElementById('inner');
|
| +var outer2 = document.getElementById('outer2');
|
|
|
| var count;
|
| if (internals.runtimeFlags.targetedStyleRecalcEnabled)
|
| @@ -51,4 +56,14 @@ inner.className = '';
|
| shouldBe("internals.updateStyleAndReturnAffectedElementCount()", '' + count);
|
| shouldBe("getComputedStyle(inner).width", '"100px"');
|
|
|
| +if (internals.runtimeFlags.targetedStyleRecalcEnabled)
|
| + count = 1;
|
| +else
|
| + count = 2;
|
| +
|
| +// Style recalc should happen on "outer2", but not "inner3".
|
| +outer2.offsetTop;
|
| +outer2.className = 'outer2';
|
| +shouldBe("internals.updateStyleAndReturnAffectedElementCount()", '' + count);
|
| +shouldBe("getComputedStyle(outer2).width", '"150px"');
|
| </script>
|
|
|