зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1682295 - Remove some text-decoration prefs that are always on. r=layout-reviewers,mats
Differential Revision: https://phabricator.services.mozilla.com/D99675
This commit is contained in:
Родитель
9adf901280
Коммит
6f9b45e8b3
|
@ -4008,8 +4008,7 @@ void nsCSSRendering::PaintDecorationLine(
|
|||
aFrame->StyleText()->mTextDecorationSkipInk;
|
||||
bool skipInkEnabled =
|
||||
skipInk != mozilla::StyleTextDecorationSkipInk::None &&
|
||||
aParams.decoration != StyleTextDecorationLine::LINE_THROUGH &&
|
||||
StaticPrefs::layout_css_text_decoration_skip_ink_enabled();
|
||||
aParams.decoration != StyleTextDecorationLine::LINE_THROUGH;
|
||||
|
||||
if (!skipInkEnabled || aParams.glyphRange.Length() == 0) {
|
||||
PaintDecorationLineInternal(aFrame, aDrawTarget, aParams, rect);
|
||||
|
|
|
@ -113,10 +113,9 @@ fuzzy-if(skiaContent,0-4,0-2) == underline-select-1.html underline-select-1-ref.
|
|||
== vertical-mode-decorations-1.html vertical-mode-decorations-1-ref.html
|
||||
fuzzy-if(Android,0-238,0-36) == vertical-mode-decorations-2.html vertical-mode-decorations-2-ref.html
|
||||
!= 1415214.html 1415214-notref.html
|
||||
test-pref(layout.css.text-decoration-thickness.enabled,false) == text-decoration-shorthands-001.html text-decoration-shorthands-001-ref.html
|
||||
test-pref(layout.css.text-decoration-skip-ink.enabled,true) test-pref(layout.css.text-underline-offset.enabled,true) HTTP(..) == skip-ink-multiline-position.html skip-ink-multiline-position-ref.html
|
||||
test-pref(layout.css.text-decoration-skip-ink.enabled,true) == skip-ink-vertical-align.html skip-ink-vertical-align-ref.html
|
||||
test-pref(layout.css.text-decoration-skip-ink.enabled,true) != skip-ink-vertical-align-2.html skip-ink-vertical-align-2-notref.html
|
||||
pref(layout.css.text-decoration-skip-ink.enabled,true) fuzzy(0-94,0-4) == skip-ink-cjk-1.html skip-ink-cjk-1-ref.html
|
||||
pref(layout.css.text-decoration-skip-ink.enabled,true) == skip-ink-cjk-2.html skip-ink-cjk-2-ref.html
|
||||
pref(layout.css.text-decoration-skip-ink.enabled,true) == skip-ink-cjk-3.html skip-ink-cjk-3-ref.html
|
||||
test-pref(layout.css.text-underline-offset.enabled,true) HTTP(..) == skip-ink-multiline-position.html skip-ink-multiline-position-ref.html
|
||||
== skip-ink-vertical-align.html skip-ink-vertical-align-ref.html
|
||||
!= skip-ink-vertical-align-2.html skip-ink-vertical-align-2-notref.html
|
||||
fuzzy(0-94,0-4) == skip-ink-cjk-1.html skip-ink-cjk-1-ref.html
|
||||
== skip-ink-cjk-2.html skip-ink-cjk-2-ref.html
|
||||
== skip-ink-cjk-3.html skip-ink-cjk-3-ref.html
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Reference case for text-decoration shorthands</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if no underline is rendered</p>
|
||||
<div>XX XX</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test case for text-decoration shorthands</title>
|
||||
<meta name="assert" content="text-decoration: the line should not be rendered with text-decoration-thickness's pref set to false">
|
||||
<link rel="author" title="Charlie Marlow" href="mailto:cmarlow@mozilla.com">
|
||||
<link rel="author" title="Mozilla" href="https://www.mozilla.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-decor-4/#text-decoration-width-property">
|
||||
<link rel="match" href="text-decoration-shorthands-001-ref.html">
|
||||
<style>
|
||||
/*
|
||||
This test ensures the underline is not rendered when
|
||||
text-decoration-thickness is turned off, since the CSS below
|
||||
should not actually be parsed
|
||||
*/
|
||||
div{
|
||||
text-decoration: red underline 100px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if no underline is rendered</p>
|
||||
<div>XX XX</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -14,11 +14,7 @@ prefs =
|
|||
layout.css.motion-path-ray.enabled=true
|
||||
layout.css.overflow-logical.enabled=true
|
||||
layout.css.step-position-jump.enabled=true
|
||||
layout.css.text-underline-offset.enabled=true
|
||||
layout.css.text-underline-position.enabled=true
|
||||
layout.css.text-decoration-thickness.enabled=true
|
||||
layout.css.backdrop-filter.enabled=true
|
||||
layout.css.text-decoration-skip-ink.enabled=true
|
||||
support-files =
|
||||
animation_utils.js
|
||||
ccd-quirks.html
|
||||
|
|
|
@ -6062,30 +6062,6 @@
|
|||
value: -1.0f
|
||||
mirror: always
|
||||
|
||||
# text underline offset
|
||||
- name: layout.css.text-underline-offset.enabled
|
||||
type: bool
|
||||
value: true
|
||||
mirror: always
|
||||
|
||||
# text underline position
|
||||
- name: layout.css.text-underline-position.enabled
|
||||
type: bool
|
||||
value: true
|
||||
mirror: always
|
||||
|
||||
# text decoration thickness
|
||||
- name: layout.css.text-decoration-thickness.enabled
|
||||
type: bool
|
||||
value: true
|
||||
mirror: always
|
||||
|
||||
# text decoration skip ink
|
||||
- name: layout.css.text-decoration-skip-ink.enabled
|
||||
type: bool
|
||||
value: true
|
||||
mirror: always
|
||||
|
||||
# Is support for CSS backdrop-filter enabled?
|
||||
- name: layout.css.backdrop-filter.enabled
|
||||
type: bool
|
||||
|
@ -6703,12 +6679,6 @@
|
|||
value: true
|
||||
mirror: always
|
||||
|
||||
# Is support for CSS text-justify property enabled?
|
||||
- name: layout.css.text-justify.enabled
|
||||
type: bool
|
||||
value: true
|
||||
mirror: always
|
||||
|
||||
# Is support for -webkit-line-clamp enabled?
|
||||
- name: layout.css.webkit-line-clamp.enabled
|
||||
type: bool
|
||||
|
|
|
@ -109,8 +109,6 @@ ${helpers.predefined_type(
|
|||
extra_specified="${'distribute' if engine == 'gecko' else ''}"
|
||||
gecko_enum_prefix="StyleTextJustify"
|
||||
animation_value_type="discrete"
|
||||
gecko_pref="layout.css.text-justify.enabled"
|
||||
has_effect_on_gecko_scrollbars="False"
|
||||
spec="https://drafts.csswg.org/css-text/#propdef-text-justify"
|
||||
servo_restyle_damage="rebuild_and_reflow"
|
||||
>
|
||||
|
@ -386,8 +384,6 @@ ${helpers.predefined_type(
|
|||
"computed::LengthPercentageOrAuto::auto()",
|
||||
engines="gecko",
|
||||
animation_value_type="ComputedValue",
|
||||
gecko_pref="layout.css.text-underline-offset.enabled",
|
||||
has_effect_on_gecko_scrollbars=False,
|
||||
spec="https://drafts.csswg.org/css-text-decor-4/#underline-offset",
|
||||
)}
|
||||
|
||||
|
@ -398,8 +394,6 @@ ${helpers.predefined_type(
|
|||
"computed::TextUnderlinePosition::AUTO",
|
||||
engines="gecko",
|
||||
animation_value_type="discrete",
|
||||
gecko_pref="layout.css.text-underline-position.enabled",
|
||||
has_effect_on_gecko_scrollbars=False,
|
||||
spec="https://drafts.csswg.org/css-text-decor-3/#text-underline-position-property",
|
||||
)}
|
||||
|
||||
|
@ -411,7 +405,5 @@ ${helpers.predefined_type(
|
|||
engines="gecko",
|
||||
needs_context=False,
|
||||
animation_value_type="discrete",
|
||||
gecko_pref="layout.css.text-decoration-skip-ink.enabled",
|
||||
has_effect_on_gecko_scrollbars=False,
|
||||
spec="https://drafts.csswg.org/css-text-decor-4/#text-decoration-skip-ink-property",
|
||||
)}
|
||||
|
|
|
@ -75,6 +75,5 @@ ${helpers.predefined_type(
|
|||
engines="gecko",
|
||||
initial_specified_value="generics::text::GenericTextDecorationLength::Auto",
|
||||
animation_value_type="ComputedValue",
|
||||
gecko_pref="layout.css.text-decoration-thickness.enabled",
|
||||
spec="https://drafts.csswg.org/css-text-decor-4/#text-decoration-width-property"
|
||||
)}
|
||||
|
|
|
@ -10,11 +10,9 @@
|
|||
sub_properties="text-decoration-line
|
||||
${' text-decoration-style text-decoration-color text-decoration-thickness' if engine == 'gecko' else ''}"
|
||||
spec="https://drafts.csswg.org/css-text-decor/#propdef-text-decoration">
|
||||
|
||||
% if engine == "gecko":
|
||||
use crate::values::specified;
|
||||
use crate::properties::longhands::{text_decoration_style, text_decoration_color, text_decoration_thickness};
|
||||
use crate::properties::{PropertyId, LonghandId};
|
||||
% endif
|
||||
use crate::properties::longhands::text_decoration_line;
|
||||
|
||||
|
@ -23,9 +21,6 @@
|
|||
input: &mut Parser<'i, 't>,
|
||||
) -> Result<Longhands, ParseError<'i>> {
|
||||
% if engine == "gecko":
|
||||
let text_decoration_thickness_enabled =
|
||||
PropertyId::Longhand(LonghandId::TextDecorationThickness).enabled_for_all_content();
|
||||
|
||||
let (mut line, mut style, mut color, mut thickness, mut any) = (None, None, None, None, false);
|
||||
% else:
|
||||
let (mut line, mut any) = (None, false);
|
||||
|
@ -49,9 +44,7 @@
|
|||
% if engine == "gecko":
|
||||
parse_component!(style, text_decoration_style);
|
||||
parse_component!(color, text_decoration_color);
|
||||
if text_decoration_thickness_enabled {
|
||||
parse_component!(thickness, text_decoration_thickness);
|
||||
}
|
||||
parse_component!(thickness, text_decoration_thickness);
|
||||
% endif
|
||||
|
||||
break;
|
||||
|
@ -82,7 +75,7 @@
|
|||
% if engine == "gecko":
|
||||
*self.text_decoration_style == text_decoration_style::SpecifiedValue::Solid,
|
||||
*self.text_decoration_color == specified::Color::CurrentColor,
|
||||
self.text_decoration_thickness.map_or(true, |t| t.is_auto())
|
||||
self.text_decoration_thickness.is_auto()
|
||||
% else:
|
||||
true, true, true
|
||||
% endif
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
prefs: [layout.css.text-decoration-thickness.enabled:true]
|
||||
leak-threshold: [default:51200]
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[inheritance.html]
|
||||
prefs: [layout.css.text-decoration-skip-ink.enabled:true, layout.css.text-underline-position.enabled:true]
|
|
@ -1,2 +0,0 @@
|
|||
[text-decoration-skip-ink-computed.html]
|
||||
prefs: [layout.css.text-decoration-skip-ink.enabled:true]
|
|
@ -1,2 +0,0 @@
|
|||
[text-decoration-skip-ink-invalid.html]
|
||||
prefs: [layout.css.text-decoration-skip-ink.enabled:true]
|
|
@ -1,3 +0,0 @@
|
|||
[text-decoration-shorthands-001.html]
|
||||
prefs: [layout.css.text-decoration-thickness.enabled:true]
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
[text-decoration-shorthands-002.html]
|
||||
prefs: [layout.css.text-decoration-thickness.enabled:true]
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
[text-decoration-skip-ink-001.html]
|
||||
prefs: [layout.css.text-decoration-skip-ink.enabled:true]
|
|
@ -1,2 +0,0 @@
|
|||
[text-decoration-skip-ink-002.html]
|
||||
prefs: [layout.css.text-decoration-skip-ink.enabled:true]
|
|
@ -1,3 +0,0 @@
|
|||
[text-decoration-skip-ink-003.html]
|
||||
prefs: [layout.css.text-decoration-skip-ink.enabled:true,
|
||||
layout.css.text-underline-offset.enabled:true]
|
|
@ -1,3 +0,0 @@
|
|||
[text-decoration-skip-ink-004.html]
|
||||
prefs: [layout.css.text-decoration-skip-ink.enabled:true,
|
||||
layout.css.text-underline-offset.enabled:true]
|
|
@ -1,2 +0,0 @@
|
|||
[text-decoration-skip-ink-sidewayslr-001.html]
|
||||
prefs: [layout.css.text-decoration-skip-ink.enabled:true]
|
|
@ -1,3 +0,0 @@
|
|||
[text-decoration-skip-ink-sidewayslr-002.html]
|
||||
prefs: [layout.css.text-decoration-skip-ink.enabled:true,
|
||||
layout.css.text-underline-offset.enabled:true]
|
|
@ -1,2 +0,0 @@
|
|||
[text-decoration-skip-ink-sidewaysrl-001.html]
|
||||
prefs: [layout.css.text-decoration-skip-ink.enabled:true]
|
|
@ -1,3 +0,0 @@
|
|||
[text-decoration-skip-ink-sidewaysrl-002.html]
|
||||
prefs: [layout.css.text-decoration-skip-ink.enabled:true,
|
||||
layout.css.text-underline-offset.enabled:true]
|
|
@ -1,3 +1,2 @@
|
|||
[text-decoration-skip-ink-upright-001.html]
|
||||
prefs: [layout.css.text-decoration-skip-ink.enabled:true, layout.css.text-underline-offset.enabled:true]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
[text-decoration-skip-ink-upright-002.html]
|
||||
prefs: [layout.css.text-decoration-skip-ink.enabled:true, layout.css.text-underline-offset.enabled:true]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
[text-decoration-skip-ink-vertical-001.html]
|
||||
prefs: [layout.css.text-decoration-skip-ink.enabled:true,
|
||||
layout.css.text-underline-offset.enabled:true]
|
|
@ -1,3 +0,0 @@
|
|||
[text-decoration-skip-ink-vertical-002.html]
|
||||
prefs: [layout.css.text-decoration-skip-ink.enabled:true,
|
||||
layout.css.text-underline-offset.enabled:true]
|
|
@ -1,2 +0,0 @@
|
|||
[text-decoration-skip-ink.html]
|
||||
prefs: [layout.css.text-decoration-skip-ink.enabled:true]
|
Загрузка…
Ссылка в новой задаче