зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
5fae0f256d
Коммит
f3027e4723
|
@ -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>
|
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче