Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove SVG style attribute reparsing code.
Now that XBL and xml:base are gone, and that <svg:use> is sane (using shadow trees instead of NAC), we can just remove this, and fix this bug. Differential Revision: https://phabricator.services.mozilla.com/D81553 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1494356 gecko-commit: fdff19ec13e2d4e94ac22be9f0702446da4088db gecko-integration-branch: autoland gecko-reviewers: longsonr
- Loading branch information
1 parent
0464638
commit 1753398
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<!doctype html> | ||
<meta charset="UTF-8"> | ||
<svg style="width: 100px; height: 100px; background-color: green"></svg> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!doctype html> | ||
<meta charset="UTF-8"> | ||
<!-- | ||
Allow scripts, but don't allow inline styles. | ||
This does allow scripts to *set* inline styles via the .style attribute. | ||
--> | ||
<title>Setting style setters via script for an SVG element outside of the document should work</title> | ||
<meta http-equiv="Content-Security-Policy" content=" | ||
script-src 'unsafe-inline'; | ||
style-src 'none'; | ||
"> | ||
<link rel="match" href="script-style-attribute-csp-ref.html"> | ||
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> | ||
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1494356"> | ||
<body> | ||
<script> | ||
const element = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); | ||
element.style.width = '100px'; | ||
element.style.height = '100px'; | ||
element.style.backgroundColor = 'green'; | ||
document.body.appendChild(element); | ||
</script> |