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

Unified Diff: PerformanceTests/CSS/FocusUpdate.html

Issue 18764003: Hovered/active/focused will never share style with siblings/cousins. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 5 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 | Source/core/css/resolver/StyleResolver.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: PerformanceTests/CSS/FocusUpdate.html
diff --git a/PerformanceTests/CSS/FocusUpdate.html b/PerformanceTests/CSS/FocusUpdate.html
new file mode 100644
index 0000000000000000000000000000000000000000..30b0e43a0027bef287c244362b7197cae0f937ce
--- /dev/null
+++ b/PerformanceTests/CSS/FocusUpdate.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Measure :focus update for a simple color change</title>
+ <script src="../resources/runner.js"></script>
+ <style type="text/css">
+ body { margin: 0 }
+ a { color: black; }
+ a:focus { color: red; }
+ </style>
+</head>
+<body>
+ <script>
+ for (var i=0; i<100; i++) {
+ document.write('<div>');
+ for (var j=0; j<100; j++)
+ document.write('<a></a>');
+ document.write('</div>');
+ }
+ </script>
+ <div id="test"><a href="."></a><a href="."></div></div>
+ <script type="text/javascript">
+ document.body.offsetTop; // Force layout.
+
+ var testDiv = document.getElementById("test");
+ var a1 = testDiv.firstChild;
+ var a2 = a1.nextSibling;
+
+ PerfTestRunner.measureRunsPerSecond({
+ description: "Measure :focus update for a simple color change",
+ run:function() {
+ a1.focus();
+ document.body.offsetTop; // Update layout for focused state.
+ a2.focus();
+ document.body.offsetTop; // Update layout for focused state.
+ }});
+ </script>
+</body>
+</html>
« no previous file with comments | « no previous file | Source/core/css/resolver/StyleResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698