Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/svg/repaint/color-fill-currentColor-and-css.html |
| diff --git a/third_party/WebKit/LayoutTests/svg/repaint/color-fill-currentColor-and-css.html b/third_party/WebKit/LayoutTests/svg/repaint/color-fill-currentColor-and-css.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c79231d75902b93c9a6a64dc18ebb674b133280e |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/svg/repaint/color-fill-currentColor-and-css.html |
| @@ -0,0 +1,43 @@ |
| +<!DOCTYPE html> |
| +<script src="../../fast/repaint/resources/text-based-repaint.js"></script> |
| +<script> |
| +window.testIsAsync = true; |
| + |
| +var rootSVGElement; |
|
fs
2015/12/15 11:36:24
You don't need this.
|
| + |
| +function svgLoaded() { |
|
fs
2015/12/15 11:36:24
...and hence not this.
|
| + rootSVGElement = document.getElementById("svg"); |
| +} |
| + |
| + |
| +function runTimer() { |
| + finishRepaintTest(); |
| +} |
| + |
| +function repaintTest() { |
| + cirlce = rootSVGElement.ownerDocument.getElementsByTagName("circle")[0]; |
|
fs
2015/12/15 11:36:24
'rootSVGElement.ownerDocument' could just be writt
|
| + bound = circle.getBoundingClientRect(); |
| + |
| + if (window.eventSender) { |
| + 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
|
| + } |
| + |
| + setTimeout(runTimer, 2000); |
|
fs
2015/12/15 11:36:24
s/runTimer/finishRepaintTest/ - but I suspect this
|
| +} |
| +</script> |
| +<style> |
| +circle { |
| + fill: currentColor; |
| + transition: 2s; |
| + color: blue; |
| +} |
| + |
| +circle:hover { |
| + color: cyan; |
| +} |
| +</style> |
| +<body onload="runRepaintAndPixelTest()"> |
|
fs
2015/12/15 11:36:24
You can do:
onload = runRepaintAndPixelTest;
wit
|
| +<svg id="svg" xmlns="http://www.w3.org/2000/svg" width=90 height=90 onload="svgLoaded()"> |
|
fs
2015/12/15 11:36:24
Per above you no longer need 'id' or 'onload' - 'x
|
| + <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
|
| +</svg> |
| +</body> |