mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-19 23:07:33 +09:00
Issue #2135 - Bug 1410578: Make <link rel="stylesheet"> work in shadow trees
This commit is contained in:
parent
45c179d01b
commit
588c2154a5
4 changed files with 21 additions and 49 deletions
|
|
@ -22,22 +22,7 @@ isnot(document.baseURI, "http://www.example.org/", "Base element should be inert
|
|||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
// Check that <link> is inert.
|
||||
var numStyleBeforeLoad = document.styleSheets.length;
|
||||
|
||||
shadow.innerHTML = '<link id="shadowlink" rel="stylesheet" type="text/css" href="inert_style.css" /><span id="shadowspan"></span>';
|
||||
shadow.applyAuthorStyles = true;
|
||||
var shadowSpan = shadow.getElementById("shadowspan");
|
||||
var shadowStyle = shadow.getElementById("shadowlink");
|
||||
|
||||
function runChecks() {
|
||||
isnot(getComputedStyle(shadowSpan, null).getPropertyValue("padding-top"), "10px", "Link element should be inert.");
|
||||
is(document.styleSheets.length, numStyleBeforeLoad, "Document style count should remain the same because the style should not be in the doucment.");
|
||||
is(shadow.styleSheets.length, 0, "Inert link should not add style to ShadowRoot.");
|
||||
// Remove link to make sure we don't get assertions.
|
||||
shadow.removeChild(shadowStyle);
|
||||
SimpleTest.finish();
|
||||
};
|
||||
SimpleTest.finish();
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue