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

Unified Diff: third_party/WebKit/LayoutTests/svg/css/cursor-change-href.svg

Issue 1488603002: Use LocalStyleChange for element cursor changes in SVG. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed URI paths Created 5 years, 1 month 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 | third_party/WebKit/LayoutTests/svg/css/cursor-change-href-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/svg/css/cursor-change-href.svg
diff --git a/third_party/WebKit/LayoutTests/svg/css/cursor-change-href.svg b/third_party/WebKit/LayoutTests/svg/css/cursor-change-href.svg
new file mode 100644
index 0000000000000000000000000000000000000000..da5e169b4f86bec62faac53855429bdf7a96f8a7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/svg/css/cursor-change-href.svg
@@ -0,0 +1,32 @@
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <g style="cursor:url(#cursor), auto">
+ <g>
+ <rect id="rect" x="50" y="50" width="100" height="100" fill="green" />
+ <text id="result1" x="50" y="200">Not run.</text>
+ <text id="result2" x="50" y="220">Not run.</text>
+ </g>
+ </g>
+ <cursor id="cursor" xlink:href="file:///icon1.ico" x="0" y="0" />
+ <script>
+ // Modifying href of a cursor element should cause a recalc of elements using it.
+
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ var rect = document.getElementById("rect");
+ var result1 = document.getElementById("result1").firstChild;
+ var result2 = document.getElementById("result2").firstChild;
+
+ if (getComputedStyle(rect).cursor == "url(\"file:///icon1.ico\"), auto")
+ result1.data = "PASS";
+ else
+ result1.data = "FAIL - " + getComputedStyle(rect).cursor;
+
+ document.getElementById("cursor").setAttribute("xlink:href", "file:///icon2.ico");
+
+ if (getComputedStyle(rect).cursor == "url(\"file:///icon2.ico\"), auto")
+ result2.data = "PASS";
+ else
+ result2.data = "FAIL - " + getComputedStyle(rect).cursor;
+ </script>
+</svg>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/svg/css/cursor-change-href-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698