Bug 1769263 - Remove layout.css.line-height.normal-as-resolved-value.enabled. r=jwatt

It's been enabled-by-default for years.

Differential Revision: https://phabricator.services.mozilla.com/D146309
This commit is contained in:
Emilio Cobos Álvarez 2022-05-13 19:28:40 +00:00
Родитель c641ca6aa7
Коммит 07b22c6553
7 изменённых файлов: 1 добавлений и 95 удалений

Просмотреть файл

@ -1,24 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<style>
span { visibility: hidden }
div { font-size: 20px; background: blue; margin: 10px; }
</style>
</head>
<body>
<div><span>TEST</span></div>
<div style="line-height: 5px;"><span>TEST</span></div>
<div style="line-height: 40px;"><span>TEST</span></div>
<div><span>TEST</span></div>
<div style="line-height: 30px;"><span>TEST</span></div>
<div style="line-height: 10px;"><span>TEST</span></div>
<div><span>TEST</span></div>
<div style="line-height: 5px;"><span>TEST</span></div>
<div style="line-height: 40px;"><span>TEST</span></div>
<div><span>TEST</span></div>
<div style="line-height: 30px;"><span>TEST</span></div>
<div style="line-height: 10px;"><span>TEST</span></div>
</body>
</html>

Просмотреть файл

@ -1,48 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<style>
div.source { display: none; font-size: 20px }
div.source2 { font-size: 20px ; height: 0; margin: 0; visibility: hidden; }
div { background: blue; margin: 10px }
</style>
</head>
<body>
<!-- Put all the source divs after the test divs so the test divs can margin-collapse like the reference -->
<div id="test1"></div>
<div id="test2"></div>
<div id="test3"></div>
<div id="test4"></div>
<div id="test5"></div>
<div id="test6"></div>
<div id="test7"></div>
<div id="test8"></div>
<div id="test9"></div>
<div id="test10"></div>
<div id="test11"></div>
<div id="test12"></div>
<div id="source1" class="source">TEST</div>
<div id="source2" class="source" style="line-height: 5px">TEST</div>
<div id="source3" class="source" style="line-height: 2em">TEST</div>
<div id="source4" class="source" style="line-height: normal">TEST</div>
<div id="source5" class="source" style="line-height: 150%">TEST</div>
<div id="source6" class="source" style="line-height: 0.5">TEST</div>
<div id="source7" class="source2">TEST</div>
<div id="source8" class="source2" style="line-height: 5px">TEST</div>
<div id="source9" class="source2" style="line-height: 2em">TEST</div>
<div id="source10" class="source2" style="line-height: normal">TEST</div>
<div id="source11" class="source2" style="line-height: 150%">TEST</div>
<div id="source12" class="source2" style="line-height: 0.5">TEST</div>
<script>
var d = document;
for (var i = 1; i <= 12; ++i) {
d.getElementById("test" + i).style.height =
d.defaultView.getComputedStyle(d.getElementById("source" + i)).lineHeight;
}
</script>
</html>

Просмотреть файл

@ -639,7 +639,6 @@ fuzzy-if(!nativeThemePref,0-1,0-4) == 370422-1.html 370422-1-ref.html
== 370586-1.xhtml 370586-1-ref.xhtml
== 370629-1.html 370629-1-ref.html
== 370629-2.html 370629-2-ref.html
pref(layout.css.line-height.normal-as-resolved-value.enabled,false) == 371041-1.html 371041-1-ref.html
== 371043-1.html 371043-1-ref.html
== 371354-1.html 371354-1-ref.html
== 371483-1.html about:blank # assertion test

Просмотреть файл

@ -2157,9 +2157,7 @@ already_AddRefed<CSSValue> nsComputedDOMStyle::GetPaddingWidthFor(
bool nsComputedDOMStyle::GetLineHeightCoord(nscoord& aCoord) {
nscoord blockHeight = NS_UNCONSTRAINEDSIZE;
const auto& lh = StyleText()->mLineHeight;
if (lh.IsNormal() &&
StaticPrefs::layout_css_line_height_normal_as_resolved_value_enabled()) {
if (lh.IsNormal()) {
return false;
}

Просмотреть файл

@ -8217,21 +8217,6 @@
value: true
mirror: always
# Whether the computed value of line-height: normal returns the `normal`
# keyword rather than a pixel value based on the first available font.
#
# Only enabled on Nightly and early beta, at least for now.
#
# It'd be nice to make numbers compute also to themselves, but it looks like
# everybody agrees on turning them into pixels, see the discussion starting
# from [1].
#
# [1]: https://github.com/w3c/csswg-drafts/issues/3749#issuecomment-477287453
- name: layout.css.line-height.normal-as-resolved-value.enabled
type: bool
value: true
mirror: always
# Is 'content:none' supported on (non-pseudo) elements?
- name: layout.css.element-content-none.enabled
type: RelaxedAtomicBool

Просмотреть файл

@ -1,2 +0,0 @@
[line-height-computed.html]
prefs: [layout.css.line-height.normal-as-resolved-value.enabled:true]

Просмотреть файл

@ -1,2 +0,0 @@
[getComputedStyle-line-height.html]
prefs: [layout.css.line-height.normal-as-resolved-value.enabled:true]