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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/pseudo-hover-active-display-none.html

Issue 2095833003: :active pseudo class is not applied for element with display none. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated test case which require LocalStyleChange calculation from both setActive and setHover Created 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <input type="submit" id="sub1"/>
3 <input type="submit" id="sub2"/>
4 <style>
5 #sub1:active {
6 display: none;
7 }
8 #sub2:hover {
9 display: none;
10 }
11 </style>
12 <script>
13 if (window.eventSender) {
14 // Tests if the display style is applied and restored properly when display: none is set on active state
15 var b1 = document.getElementById("sub1");
16 var startX = b1.offsetLeft + b1.offsetWidth/2;
17 var startY = b1.offsetTop + b1.offsetHeight/2;
18 var endX = startX + b1.offsetWidth;
19 var endY = startY + b1.offsetHeight;
20 eventSender.dragMode = true;
21 eventSender.mouseMoveTo(startX, startY);
22 eventSender.mouseDown();
23 eventSender.mouseMoveTo(endX, endY);
24 eventSender.mouseUp();
25
26 // Tests if the display style is applied and restored properly when display: none is set on hover state
27 var b2 = document.getElementById("sub2");
28 var x = b2.offsetLeft + b2.offsetWidth/2;
29 var y = b2.offsetTop + b2.offsetHeight/2;
30 eventSender.mouseMoveTo(x, y);
31 eventSender.mouseMoveTo(x + b2.offsetWidth, y + b2.offsetHeight);
32 }
33 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698