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

Side by Side Diff: third_party/WebKit/LayoutTests/svg/repaint/color-fill-currentColor-and-css.html

Issue 1455153003: Fix animation of 'color' w/ currentColor for SVG 'fill' and 'stroke' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 <script src="../../fast/repaint/resources/text-based-repaint.js"></script>
3 <script>
4 window.testIsAsync = true;
5
6 var rootSVGElement;
fs 2015/12/15 11:36:24 You don't need this.
7
8 function svgLoaded() {
fs 2015/12/15 11:36:24 ...and hence not this.
9 rootSVGElement = document.getElementById("svg");
10 }
11
12
13 function runTimer() {
14 finishRepaintTest();
15 }
16
17 function repaintTest() {
18 cirlce = rootSVGElement.ownerDocument.getElementsByTagName("circle")[0];
fs 2015/12/15 11:36:24 'rootSVGElement.ownerDocument' could just be writt
19 bound = circle.getBoundingClientRect();
20
21 if (window.eventSender) {
22 eventSender.mouseMoveTo(bound.left + 40, bound.top + 40);
fs 2015/12/15 11:36:24 Do we really need 'hover' to trigger the bug, or c
23 }
24
25 setTimeout(runTimer, 2000);
fs 2015/12/15 11:36:24 s/runTimer/finishRepaintTest/ - but I suspect this
26 }
27 </script>
28 <style>
29 circle {
30 fill: currentColor;
31 transition: 2s;
32 color: blue;
33 }
34
35 circle:hover {
36 color: cyan;
37 }
38 </style>
39 <body onload="runRepaintAndPixelTest()">
fs 2015/12/15 11:36:24 You can do: onload = runRepaintAndPixelTest; wit
40 <svg id="svg" xmlns="http://www.w3.org/2000/svg" width=90 height=90 onload="svgL oaded()">
fs 2015/12/15 11:36:24 Per above you no longer need 'id' or 'onload' - 'x
41 <circle id="circle" r="40" cx="40" cy="40" />
fs 2015/12/15 11:36:24 The 'id' isn't used so that can be dropped. I also
42 </svg>
43 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698