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

Unified Diff: third_party/WebKit/LayoutTests/fast/css/invalidation/independent-inheritance-fast-path.html

Issue 2715213003: Use independent property inheritance fast-path for text-align. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSProperties.json5 » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/css/invalidation/independent-inheritance-fast-path.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/invalidation/independent-inheritance-fast-path.html b/third_party/WebKit/LayoutTests/fast/css/invalidation/independent-inheritance-fast-path.html
index ec04abc405df8e7afb5610c5e529a536dba5105e..981f81cdd1f2fa93af9c66c1631dae1be328d4f9 100644
--- a/third_party/WebKit/LayoutTests/fast/css/invalidation/independent-inheritance-fast-path.html
+++ b/third_party/WebKit/LayoutTests/fast/css/invalidation/independent-inheritance-fast-path.html
@@ -24,6 +24,7 @@ var independent_properties = [
["webkitPrintColorAdjust", ["economy", "exact"]],
["textTransform", ["capitalize", "uppercase", "lowercase", "none"]],
["webkitRtlOrdering", ["logical", "visual"]],
+ ["textAlign", ["start", "left"]],
];
independent_properties.forEach(function(test_data)
@@ -82,6 +83,17 @@ independent_properties.forEach(function(test_data)
assert_equals(getComputedStyle(innermost)[propertyName], value1);
outer.offsetTop; // Force recalc.
+ // Setting inner to value2 and outer to value1 should not propagate value1 to inner.
+ inner.style[propertyName] = value2;
+ outer.offsetTop; // Force recalc.
+ outer.style[propertyName] = value1;
+ assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 1, "Only outer should be recalced (2 without fast path)");
+
+ assert_equals(getComputedStyle(outer)[propertyName], value1);
+ assert_equals(getComputedStyle(inner)[propertyName], value2);
+ assert_equals(getComputedStyle(innermost)[propertyName], value2);
+ outer.offsetTop; // Force recalc.
+
// Clear for next test.
outer.remove();
}, "Changing " + propertyName + ", an independent inherited property, propagates correctly with a single style recalc.");
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSProperties.json5 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698