mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 18:26:15 +00:00
f3027e4723
Before this commit, we assumed that if the element had no parent element, it was the root of the document, which is plain false, since we can arrive there from, let's say, getComputedStyle on a detached node. MozReview-Commit-ID: 65DxdzXgd0J --HG-- extra : rebase_source : adddedc63687ba05644d04bef1038411d02871c8
17 lines
432 B
HTML
17 lines
432 B
HTML
<!doctype html>
|
|
<title>
|
|
Test for bug 1374062: We don't update the root font-size just because the
|
|
element has no parent element.
|
|
</title>
|
|
<style>
|
|
:root { font-size: 5px; }
|
|
[restyled] { color: green; font-size: 2rem; }
|
|
</style>
|
|
<div>
|
|
Should be green, and have a 10px font-size.
|
|
</div>
|
|
<script>
|
|
getComputedStyle(document.createElement('div')).color;
|
|
document.querySelector('div').setAttribute("restyled", "");
|
|
</script>
|