Bug 1073924 - Hovering over links in SVG does not cause cursor to change. r=jwatt

This commit is contained in:
Robert Longson 2014-09-29 09:20:22 +01:00
parent 29c43cc253
commit 1722ba86eb
3 changed files with 24 additions and 2 deletions

View File

@ -57,6 +57,7 @@ function doNavigationTest(testNumber, initialHref, f) {
var iframe = document.getElementById("iframe" + testNumber);
var a = iframe.contentDocument.getElementById("a");
ok(endsWith(iframe.contentWindow.location, initialHref), "Initial href of test " + testNumber);
is("pointer", window.getComputedStyle(a).getPropertyValue("cursor"), "expected pointer cursor");
iframe.onload = function() {
ok(endsWith(iframe.contentWindow.location, "a_href_destination.svg"), "Final href of test " + testNumber);
if (++navigationCount == testCount) {

View File

@ -99,6 +99,11 @@
font-variant-numeric: tabular-nums;
}
/* SVG documents don't always load this file but they do have links.
* If you change the link rules, consider carefully whether to make
* the same changes to svg.css.
*/
/* Links */
*|*:-moz-any-link {

View File

@ -75,8 +75,24 @@ foreignObject {
opacity: inherit;
}
/* nsDocumentViewer::CreateStyleSet doesn't load ua.css for SVG-as-an-image,
* but SVG-as-an-image needs this rule from that file.
/* nsDocumentViewer::CreateStyleSet doesn't load ua.css.
* A few styles are common to html and SVG though
* so we copy the rules below from that file.
*/
/* Links */
*|*:-moz-any-link {
cursor: pointer;
}
*|*:-moz-any-link:-moz-focusring {
/* Don't specify the outline-color, we should always use initial value. */
outline: 1px dotted;
}
/*
* SVG-as-an-image needs this rule
*/
*|*::-moz-viewport, *|*::-moz-viewport-scroll, *|*::-moz-canvas, *|*::-moz-scrolled-canvas {
display: block !important;