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

Unified Diff: third_party/WebKit/LayoutTests/fast/css/variables/tricky-cycle-cases.html

Issue 1698203002: Simplify CSS variables resolution logic [1 of 2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: third_party/WebKit/LayoutTests/fast/css/variables/tricky-cycle-cases.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/variables/tricky-cycle-cases.html b/third_party/WebKit/LayoutTests/fast/css/variables/tricky-cycle-cases.html
index cc56bf589dcc1b575dd0d480e4002d94c950c461..5d7e52a19932810d4a4cce2cebf754e28961cc08 100644
--- a/third_party/WebKit/LayoutTests/fast/css/variables/tricky-cycle-cases.html
+++ b/third_party/WebKit/LayoutTests/fast/css/variables/tricky-cycle-cases.html
@@ -99,6 +99,13 @@ div {
background-color: orange;
background-color: var(--n, var(--o, green));
}
+
+#twocycle_with_separate_fallback {
+ --a: var(--b) var(--c, red);
+ --b: var(--a) var(--c, red);
+ background-color: orange;
+ background-color: var(--a, green);
+}
</style>
<div id=twocycleinfallback_a></div>
@@ -113,6 +120,7 @@ div {
<div id=secondarycycle_chain_r></div>
<div id=secondarycycle_fallback></div>
<div id=secondarycycle_fallback_r></div>
+<div id=twocycle_with_separate_fallback></div>
<script>
test(function() {
@@ -144,4 +152,8 @@ test(function() {
assert_equals(getComputedStyle(secondarycycle_fallback).backgroundColor, 'rgb(0, 128, 0)');
assert_equals(getComputedStyle(secondarycycle_fallback_r).backgroundColor, 'rgb(0, 128, 0)');
}, 'Secondary cycles need to be detected too (secondary cycle in fallback)');
+
+test(function() {
+ assert_equals(getComputedStyle(twocycle_with_separate_fallback).backgroundColor, 'rgb(0, 128, 0)');
+}, 'A cycle is not affected by other variable references with fallbacks');
</script>

Powered by Google App Engine
This is Rietveld 408576698