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

Unified Diff: PerformanceTests/CSS/HoverUpdate.html

Issue 18089009: Hovered/active/focused nodes will never share style with siblings/cousins. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed indentation and review issue in test Created 7 years, 6 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/HoverUpdate.html
diff --git a/PerformanceTests/CSS/HoverUpdate.html b/PerformanceTests/CSS/HoverUpdate.html
new file mode 100644
index 0000000000000000000000000000000000000000..72a45eb43f97ce31c072000aefb0d884f9960270
--- /dev/null
+++ b/PerformanceTests/CSS/HoverUpdate.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Measure hover update for a simple color change</title>
+ <script src="../resources/runner.js"></script>
+ <style type="text/css">
+ body { margin: 0 }
+ .h { height: 50px; color: black; }
+ .h:hover { color: white; }
+ </style>
+</head>
+<body>
+ <script>
+ for (var i=0; i<100; i++) {
+ document.write('<div>');
+ for (var j=0; j<100; j++)
+ document.write('<div></div>');
+ document.write('</div>');
+ }
+ </script>
+ <div>
+ <div class="h"></div><div class="h"></div>
+ </div>
+ <script type="text/javascript">
+ document.body.offsetTop; // Force layout. The mouse is not tracked before first layout.
+
+ PerfTestRunner.measureRunsPerSecond({run:function() {
+ eventSender.mouseMoveTo(10, 10); // Hover.
+ document.body.offsetTop; // Update layout for hovered state.
+ eventSender.mouseMoveTo(10, 70); // Hover.
+ document.body.offsetTop; // Update layout for hovered 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