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

Unified Diff: LayoutTests/fast/css/style-sharing-grand-parent-invalidate.html

Issue 30453002: Should not allow style sharing if grandparents matches different rule chain (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@build_hack
Patch Set: reupload Created 7 years, 2 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/style-sharing-grand-parent-invalidate-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/css/style-sharing-grand-parent-invalidate.html
diff --git a/LayoutTests/fast/css/style-sharing-grand-parent-invalidate.html b/LayoutTests/fast/css/style-sharing-grand-parent-invalidate.html
new file mode 100644
index 0000000000000000000000000000000000000000..c9f7520f3e53b4ef6cc21cd1b8ab7ac071f48659
--- /dev/null
+++ b/LayoutTests/fast/css/style-sharing-grand-parent-invalidate.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+.outerx .mid .inner {
+ background-color: red;
+}
+.outery .mid .inner {
+ background-color: green;
+}
+.inner {
+ width: 50px;
+ height: 50px;
+}
+</style>
+<script>
+function test() {
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ var x = document.getElementById("x");
+ x.classList.add("outerx");
+
+ var y = document.getElementById("y");
+ y.classList.add("outery");
+
+ var colorX = getComputedStyle(x.children[0].children[0]).backgroundColor;
+ var colorY = getComputedStyle(y.children[0].children[0]).backgroundColor;
+
+ var result = document.getElementById("result")
+ if (colorX == colorY)
+ result.innerHTML = "FAIL";
+ else
+ result.innerHTML = "SUCCESS";
+}
+</script>
+</head>
+<body onload="test()">
+This test succeeds if the two blocks show red and green repectively: <span id="result"></span>
+<div id="x">
+ <div class="mid">
+ <div class="inner">
+ </div>
+ </div>
+</div>
+<div id="y">
+ <div class="mid">
+ <div class="inner">
+ </div>
+ </div>
+</div>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/css/style-sharing-grand-parent-invalidate-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698