Bug 1500885 - Remove tests and other similar bits. r=mats

Also remove specified-value-only keywords, since those are handled
only in Rust code and C++ doesn't need to know about them.

Differential Revision: https://phabricator.services.mozilla.com/D9634

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Emilio Cobos Álvarez 2018-10-24 20:32:16 +00:00
Родитель e428a9142a
Коммит 9f8636dee7
9 изменённых файлов: 5 добавлений и 159 удалений

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

@ -330,8 +330,6 @@ fails-if(!cocoaWidget) != osx-font-smoothing.html osx-font-smoothing-ref.html
fails-if(!cocoaWidget) != osx-font-smoothing-2.html osx-font-smoothing-2-notref.html
== osx-font-smoothing-2.html osx-font-smoothing-2-ref.html
pref(layout.css.text-align-unsafe-value.enabled,true) fails == text-align-unsafe.html text-align-unsafe-ref.html # bug 1388949
# stray control chars should be visible by default, bug 1099557
!= control-chars-01a.html control-chars-01-notref.html
!= control-chars-01b.html control-chars-01-notref.html

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

@ -1,62 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>text-align-unsafe</title>
<meta charset="utf-8">
<style type="text/css">
p {
overflow:hidden;
width:8em;
white-space:nowrap;
margin:0;
}
.test1 p {
text-align: end;
}
.test2 p {
text-align: right;
}
.test3 p {
text-align: end;
}
.test4 p {
text-align: left;
}
.test5 p {
text-align: right;
}
.r {
float:right;
}
.l {
float:left;
}
</style>
</head>
<body>
<div class=test1>
<p>Lorem ipsum dolor sit amet.</p>
<p dir="rtl">ישים אל לבו חובתו אשר הוא&nbsp;מתעלם&nbsp;ממנה.</p>
</div>
<div class=test2>
<p><span class="r">Lorem ipsum dolor sit amet.</span></p>
<p dir="rtl">ישים אל לבו חובתו אשר הוא&nbsp;מתעלם&nbsp;ממנה.</p>
</div>
<div class=test3>
<p><span class="r">Lorem ipsum dolor sit amet.</span></p>
<p dir="rtl"><span class="l">ישים אל לבו חובתו אשר הוא&nbsp;מתעלם&nbsp;ממנה.</span></p>
</div>
<div class=test4>
<p>Lorem ipsum dolor sit amet.</p>
<p dir="rtl"><span class="l">ישים אל לבו חובתו אשר הוא&nbsp;מתעלם&nbsp;ממנה.</span></p>
</div>
<div class=test5>
<p><span class="r">Lorem ipsum dolor sit amet.</span></p>
</div>
left|unsafe right</body>
</html>

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

@ -1,68 +0,0 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<title>text-align-unsafe</title>
<meta charset="utf-8">
<style type="text/css">
p {
overflow:hidden;
width:8em;
white-space:nowrap;
margin:0;
}
.test1 p {
text-align: unsafe right;
text-align-last: end;
}
.test2 p {
text-align: unsafe right;
}
.test3 p {
text-align: end unsafe;
}
.test4 p {
text-align: unsafe left;
}
.test5 p {
text-align: left;
text-align-last: unsafe right;
}
</style>
</head>
<body>
<div class=test1>
<p>Lorem ipsum dolor sit amet.</p>
<p dir="rtl">ישים אל לבו חובתו אשר הוא&nbsp;מתעלם&nbsp;ממנה.</p>
</div>
<div class=test2>
<p>Lorem ipsum dolor sit amet.</p>
<p dir="rtl">ישים אל לבו חובתו אשר הוא&nbsp;מתעלם&nbsp;ממנה.</p>
</div>
<div class=test3>
<p>Lorem ipsum dolor sit amet.</p>
<p dir="rtl">ישים אל לבו חובתו אשר הוא&nbsp;מתעלם&nbsp;ממנה.</p>
</div>
<div class=test4>
<p>Lorem ipsum dolor sit amet.</p>
<p dir="rtl">ישים אל לבו חובתו אשר הוא&nbsp;מתעלם&nbsp;ממנה.</p>
</div>
<div class=test5>
<p>Lorem ipsum dolor sit amet.</p>
</div>
<script>
var elem = document.querySelector('.test5 p');
var a = window.getComputedStyle(elem).getPropertyValue("text-align");
document.body.appendChild(document.createTextNode(a +"|"));
a = window.getComputedStyle(elem).getPropertyValue("text-align-last");
document.body.appendChild(document.createTextNode(a));
document.documentElement.removeAttribute('class');
</script>
</body>
</html>

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

@ -562,7 +562,7 @@ const KTableEntry nsCSSProps::kScrollSnapTypeKTable[] = {
{ eCSSKeyword_UNKNOWN, -1 }
};
KTableEntry nsCSSProps::kTextAlignKTable[] = {
const KTableEntry nsCSSProps::kTextAlignKTable[] = {
{ eCSSKeyword_left, NS_STYLE_TEXT_ALIGN_LEFT },
{ eCSSKeyword_right, NS_STYLE_TEXT_ALIGN_RIGHT },
{ eCSSKeyword_center, NS_STYLE_TEXT_ALIGN_CENTER },
@ -572,8 +572,6 @@ KTableEntry nsCSSProps::kTextAlignKTable[] = {
{ eCSSKeyword__moz_left, NS_STYLE_TEXT_ALIGN_MOZ_LEFT },
{ eCSSKeyword_start, NS_STYLE_TEXT_ALIGN_START },
{ eCSSKeyword_end, NS_STYLE_TEXT_ALIGN_END },
{ eCSSKeyword_unsafe, NS_STYLE_TEXT_ALIGN_UNSAFE },
{ eCSSKeyword_match_parent, NS_STYLE_TEXT_ALIGN_MATCH_PARENT },
{ eCSSKeyword_UNKNOWN, -1 }
};

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

@ -345,9 +345,7 @@ public:
static const KTableEntry kOverflowClipBoxKTable[];
static const KTableEntry kOverscrollBehaviorKTable[];
static const KTableEntry kScrollSnapTypeKTable[];
// Not const because we modify its entries when the pref
// "layout.css.text-align-unsafe-value.enabled" changes:
static KTableEntry kTextAlignKTable[];
static const KTableEntry kTextAlignKTable[];
static const KTableEntry kTextDecorationLineKTable[];
static const KTableEntry kTextDecorationStyleKTable[];
static const KTableEntry kTextEmphasisStyleShapeKTable[];

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

@ -769,11 +769,7 @@ enum class StyleGridTrackBreadth : uint8_t {
#define NS_STYLE_TEXT_ALIGN_MOZ_CENTER 8
#define NS_STYLE_TEXT_ALIGN_MOZ_RIGHT 9
#define NS_STYLE_TEXT_ALIGN_MOZ_LEFT 10
// NS_STYLE_TEXT_ALIGN_MOZ_CENTER_OR_INHERIT is only used in data structs; it
// is never present in stylesheets or computed data.
#define NS_STYLE_TEXT_ALIGN_MOZ_CENTER_OR_INHERIT 11
#define NS_STYLE_TEXT_ALIGN_UNSAFE 12
#define NS_STYLE_TEXT_ALIGN_MATCH_PARENT 13
// Note: make sure that the largest NS_STYLE_TEXT_ALIGN_* value is smaller than
// the smallest NS_STYLE_VERTICAL_ALIGN_* value below!

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

@ -4411,7 +4411,7 @@ var gCSSProperties = {
// don't know whether left and right are same as start
initial_values: [ "start" ],
other_values: [ "center", "justify", "end", "match-parent" ],
invalid_values: [ "true", "true true", "char", "-moz-center-or-inherit" ]
invalid_values: [ "true", "true true", "char", "-moz-center-or-inherit", "true left", "unsafe left" ]
},
"text-align-last": {
domProp: "textAlignLast",
@ -7936,12 +7936,6 @@ if (IsCSSPropertyPrefEnabled("layout.css.prefixes.gradients")) {
);
}
if (IsCSSPropertyPrefEnabled("layout.css.text-align-unsafe-value.enabled")) {
gCSSProperties["text-align"].other_values.push("true left");
} else {
gCSSProperties["text-align"].invalid_values.push("true left");
}
gCSSProperties["display"].other_values.push("flow-root");
if (IsCSSPropertyPrefEnabled("layout.css.column-span.enabled")) {

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

@ -3021,9 +3021,6 @@ pref("layout.css.convertFromNode.enabled", false);
pref("layout.css.convertFromNode.enabled", true);
#endif
// Is support for CSS "text-align: unsafe X" enabled?
pref("layout.css.text-align-unsafe-value.enabled", false);
// Is support for CSS text-justify property enabled?
pref("layout.css.text-justify.enabled", true);

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

@ -488,12 +488,7 @@ impl TextAlign {
/// Convert an enumerated value coming from Gecko to a `TextAlign`.
#[cfg(feature = "gecko")]
pub fn from_gecko_keyword(kw: u32) -> Self {
use gecko_bindings::structs::NS_STYLE_TEXT_ALIGN_MATCH_PARENT;
if kw == NS_STYLE_TEXT_ALIGN_MATCH_PARENT {
TextAlign::MatchParent
} else {
TextAlign::Keyword(TextAlignKeyword::from_gecko_keyword(kw))
}
TextAlign::Keyword(TextAlignKeyword::from_gecko_keyword(kw))
}
}