| Index: LayoutTests/fast/css/invalidation/targeted-id-style-invalidation.html
|
| diff --git a/LayoutTests/fast/css/invalidation/targeted-attribute-style-invalidation.html b/LayoutTests/fast/css/invalidation/targeted-id-style-invalidation.html
|
| similarity index 81%
|
| copy from LayoutTests/fast/css/invalidation/targeted-attribute-style-invalidation.html
|
| copy to LayoutTests/fast/css/invalidation/targeted-id-style-invalidation.html
|
| index 7ffb6044c5a3e40c618720cdb39277c6adf6a825..4b822e3df75e1356d5bc283ea888e67e354b34d8 100644
|
| --- a/LayoutTests/fast/css/invalidation/targeted-attribute-style-invalidation.html
|
| +++ b/LayoutTests/fast/css/invalidation/targeted-id-style-invalidation.html
|
| @@ -3,14 +3,14 @@
|
|
|
| <style>
|
| div { width: 100px }
|
| - [outer="1"] [inner="1"] { width: 200px }
|
| - [outer="2"] { width: 150px }
|
| - [outer="3"][nomatch="1"] { width: 300px; }
|
| + #outer1on #inner1on { width: 200px }
|
| + #outer2on { width: 150px }
|
| + #outer3on#nomatch1 { width: 300px; }
|
| </style>
|
|
|
| <div id="outer">
|
| <div id="mid">
|
| - <div id="inner" inner="1">
|
| + <div id="inner1on">
|
| <div id="innerChild">
|
| </div>
|
| </div>
|
| @@ -27,7 +27,7 @@
|
| </div>
|
|
|
| <script>
|
| -description("Test that adding and removing class names only updates the elements that are affected.");
|
| +description("Test that adding and removing ids only updates the elements that are affected.");
|
|
|
| function insertStyleSheet(css)
|
| {
|
| @@ -37,7 +37,7 @@ function insertStyleSheet(css)
|
| }
|
|
|
| var outer = document.getElementById('outer');
|
| -var inner = document.getElementById('inner');
|
| +var inner = document.getElementById('inner1on');
|
| var outer2 = document.getElementById('outer2');
|
| var outer3 = document.getElementById('outer3');
|
|
|
| @@ -49,7 +49,7 @@ else
|
|
|
| // Style recalc should happen on "inner" and "outer", but not "inner2" or "mid".
|
| outer.offsetTop;
|
| -outer.setAttribute('outer', '1');
|
| +outer.id = 'outer1on';
|
| shouldBe("internals.updateStyleAndReturnAffectedElementCount()", '' + count);
|
| shouldBe("getComputedStyle(inner).width", '"200px"');
|
|
|
| @@ -60,7 +60,7 @@ else
|
|
|
| // Style recalc should happen on "inner", but not "innerChild".
|
| inner.offsetTop;
|
| -inner.removeAttribute('inner');
|
| +inner.id = '';
|
| shouldBe("internals.updateStyleAndReturnAffectedElementCount()", '' + count);
|
| shouldBe("getComputedStyle(inner).width", '"100px"');
|
|
|
| @@ -71,7 +71,7 @@ else
|
|
|
| // Style recalc should happen on "outer2", but not "inner3".
|
| outer2.offsetTop;
|
| -outer2.setAttribute('outer', '2');
|
| +outer2.id = 'outer2on';
|
| shouldBe("internals.updateStyleAndReturnAffectedElementCount()", '' + count);
|
| shouldBe("getComputedStyle(outer2).width", '"150px"');
|
|
|
| @@ -82,6 +82,6 @@ else
|
|
|
| // Style recalc should happen on "outer3", but none of its children.
|
| outer3.offsetTop;
|
| -outer3.setAttribute('outer', '3');
|
| +outer3.id = 'outer3on';
|
| shouldBe("internals.updateStyleAndReturnAffectedElementCount()", '' + count);
|
| </script>
|
|
|