style: Compute damage for text nodes.

They have styles just like elements do.

Allows a dynamic change of `display: none` to `display: inline` to work.

Closes #9868.
This commit is contained in:
Patrick Walton 2016-03-14 19:14:21 -07:00
parent aea8d8959d
commit d59dee0c65
5 changed files with 52 additions and 6 deletions

View file

@ -1,3 +0,0 @@
[run-in-display-none-between-003.htm]
type: reftest
expected: FAIL

View file

@ -4560,6 +4560,18 @@
"url": "/_mozilla/css/text_align_start_end.html"
}
],
"css/text_damage_a.html": [
{
"path": "css/text_damage_a.html",
"references": [
[
"/_mozilla/css/text_damage_ref.html",
"=="
]
],
"url": "/_mozilla/css/text_damage_a.html"
}
],
"css/text_decoration_cached.html": [
{
"path": "css/text_decoration_cached.html",
@ -10760,6 +10772,18 @@
"url": "/_mozilla/css/text_align_start_end.html"
}
],
"css/text_damage_a.html": [
{
"path": "css/text_damage_a.html",
"references": [
[
"/_mozilla/css/text_damage_ref.html",
"=="
]
],
"url": "/_mozilla/css/text_damage_a.html"
}
],
"css/text_decoration_cached.html": [
{
"path": "css/text_decoration_cached.html",

View file

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html class="reftest-wait">
<meta charset="utf-8">
<title></title>
<link rel="match" href="text_damage_ref.html">
<span class="lock" style="display: none">foo</span><span>bar</span>
<script>
window.onload = function() {
document.querySelector(".lock").style.display = "inline";
document.documentElement.classList.remove("reftest-wait");
};
</script>

View file

@ -0,0 +1,6 @@
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<title></title>
<span class="lock" style="display: inline">foo</span><span>bar</span>