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

Unified Diff: third_party/WebKit/LayoutTests/fast/css/atapply/at-apply-identical-aside-from-inherited.html

Issue 2219543003: Elements using @apply shouldn't use the MatchedPropertiesCache (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove check Created 4 years, 4 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/resolver/StyleResolver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/css/atapply/at-apply-identical-aside-from-inherited.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/atapply/at-apply-identical-aside-from-inherited.html b/third_party/WebKit/LayoutTests/fast/css/atapply/at-apply-identical-aside-from-inherited.html
new file mode 100644
index 0000000000000000000000000000000000000000..337e0e2a739da28d7ed41650878d259735680f64
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/atapply/at-apply-identical-aside-from-inherited.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<style>
+#parent1 {
+ --mixin: {
+ border: 5px solid black;
+ };
+}
+#parent2 {
+ --mixin: {
+ border: 10px dotted orange;
+ };
+}
+
+#child1, #child2, #child3 {
+ @apply --mixin;
+}
+</style>
+<div id="parent1">
+ <div id="child1">X</div>
+</div>
+<div id="parent2">
+ <div id="child2">X</div>
+</div>
+<div id="parent3">
+ <div id="child3">X</div>
+</div>
+<script>
+test(function() {
+ assert_equals(getComputedStyle(child1).borderWidth, '5px');
+ assert_equals(getComputedStyle(child2).borderWidth, '10px');
+ assert_equals(getComputedStyle(child3).borderWidth, '0px');
+}, "Elements style identically aside from an @apply'd variable with different inherited values are computed properly");
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/resolver/StyleResolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698