Bug 1557403 - Handle default angle in radians. r=me

We were not copying the angle in this case for some reason, and I overlooked
this.
This commit is contained in:
Emilio Cobos Álvarez 2019-06-06 19:18:28 -04:00
Родитель eb1f65e802
Коммит e2fcdb0253
2 изменённых файлов: 2 добавлений и 0 удалений

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

@ -107,6 +107,7 @@ var validGradientAndElementValues = [
"linear-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))",
"linear-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)",
"linear-gradient(red, green calc(50% + 20px), blue)",
"linear-gradient(180deg, red, blue)",
"linear-gradient(to top, red, blue)",
"linear-gradient(to bottom, red, blue)",

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

@ -389,6 +389,7 @@ impl nsStyleImage {
let angle = Angle::from_gecko_style_coord(&gecko_gradient.mAngle);
let line_direction = match (angle, horizontal_style, vertical_style) {
(Some(a), None, None) => LineDirection::Angle(a),
(None, None, None) => LineDirection::Angle(Angle::from_radians(PI)),
(None, Some(horizontal), Some(vertical)) => {
line_direction(horizontal, vertical)
},