mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 07:45:30 +00:00
Bug 1374062: Test. r=heycam,manishearth
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
This commit is contained in:
parent
5fae0f256d
commit
f3027e4723
8
layout/reftests/bugs/1374062-ref.html
Normal file
8
layout/reftests/bugs/1374062-ref.html
Normal file
@ -0,0 +1,8 @@
|
||||
<!doctype html>
|
||||
<title>CSS Test reference</title>
|
||||
<style>
|
||||
div { color: green; font-size: 10px; }
|
||||
</style>
|
||||
<div>
|
||||
Should be green, and have a 10px font-size.
|
||||
</div>
|
16
layout/reftests/bugs/1374062.html
Normal file
16
layout/reftests/bugs/1374062.html
Normal file
@ -0,0 +1,16 @@
|
||||
<!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>
|
@ -2015,3 +2015,4 @@ fails-if(!stylo||styloVsGecko) == 1365162-1.html 1365162-1-ref.html
|
||||
== 1369954-1.xhtml 1369954-1-ref.xhtml
|
||||
== 1369985-1.html 1369985-1-ref.html
|
||||
== 1371130.xhtml 1371130-ref.xhtml
|
||||
== 1374062.html 1374062-ref.html
|
||||
|
Loading…
Reference in New Issue
Block a user