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

Unified Diff: third_party/WebKit/LayoutTests/fast/css/variables/computed-style.html

Issue 1945623002: Make sure computed style is up-to-date for custom properties. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/css/variables/computed-style.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/variables/computed-style.html b/third_party/WebKit/LayoutTests/fast/css/variables/computed-style.html
index 661ecdf9b75bad7be17d3dedeb76f26104b69587..da64b01340e95a8671c29baaf06b5645bc1c8f18 100644
--- a/third_party/WebKit/LayoutTests/fast/css/variables/computed-style.html
+++ b/third_party/WebKit/LayoutTests/fast/css/variables/computed-style.html
@@ -22,6 +22,10 @@
--percentage-value: 75%;
width: var(--percentage-value);
}
+
+#dynamic.dynamic {
+ --custom-value:pass;
+}
</style>
<body>
@@ -29,6 +33,7 @@
<div id="float_pixel"></div>
<div id="em"></div>
<div id="percentage"></div>
+ <div id="dynamic"></div>
</body>
<script>
@@ -53,4 +58,10 @@ test(function() {
assert_equals(
getComputedStyle(percentage).width, parseInt(getComputedStyle(document.body).width) * 0.75 + 'px');
}, 'width property, percentage value');
+
+test(function() {
+ assert_equals(getComputedStyle(dynamic).getPropertyValue("--custom-value"), "");
+ dynamic.className = "dynamic";
+ assert_equals(getComputedStyle(dynamic).getPropertyValue("--custom-value"), "pass");
+}, 'custom property, forced style recalc');
</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698