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

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

Issue 208323003: Add support for attribute selectors in TargetedStyleRecalc. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix compilation Created 6 years, 9 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-attribute-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-attribute-style-invalidation.html
diff --git a/LayoutTests/fast/css/invalidation/targeted-class-style-invalidation.html b/LayoutTests/fast/css/invalidation/targeted-attribute-style-invalidation.html
similarity index 85%
copy from LayoutTests/fast/css/invalidation/targeted-class-style-invalidation.html
copy to LayoutTests/fast/css/invalidation/targeted-attribute-style-invalidation.html
index 21cdf6fc82dcbdf077c2c3227c5152e3099dcc0b..7ffb6044c5a3e40c618720cdb39277c6adf6a825 100644
--- a/LayoutTests/fast/css/invalidation/targeted-class-style-invalidation.html
+++ b/LayoutTests/fast/css/invalidation/targeted-attribute-style-invalidation.html
@@ -3,14 +3,14 @@
<style>
div { width: 100px }
- .outer .inner { width: 200px }
- .outer2 { width: 150px }
- .outer3.nomatch {}
+ [outer="1"] [inner="1"] { width: 200px }
+ [outer="2"] { width: 150px }
+ [outer="3"][nomatch="1"] { width: 300px; }
</style>
<div id="outer">
<div id="mid">
- <div id="inner" class="inner">
+ <div id="inner" inner="1">
<div id="innerChild">
</div>
</div>
@@ -42,14 +42,14 @@ var outer2 = document.getElementById('outer2');
var outer3 = document.getElementById('outer3');
var count;
-if (internals.runtimeFlags.targetedStyleRecalcEnabled)
+if (internals && internals.runtimeFlags.targetedStyleRecalcEnabled)
count = 2;
else
count = 5;
// Style recalc should happen on "inner" and "outer", but not "inner2" or "mid".
outer.offsetTop;
-outer.className = 'outer';
+outer.setAttribute('outer', '1');
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.className = '';
+inner.removeAttribute('inner');
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.className = 'outer2';
+outer2.setAttribute('outer', '2');
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.className = 'outer3';
+outer3.setAttribute('outer', '3');
shouldBe("internals.updateStyleAndReturnAffectedElementCount()", '' + count);
</script>
« no previous file with comments | « no previous file | LayoutTests/fast/css/invalidation/targeted-attribute-style-invalidation-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698