Skip to content

Commit

Permalink
servo: Merge #13570 - Add support for 'font-stretch' in geckolib (fro…
Browse files Browse the repository at this point in the history
…m Wafflespeanut:font_stretch); r=Manishearth

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build-geckolib` does not report any errors
- [x] `./mach test-tidy` does not report any errors

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

r? Manishearth

Source-Repo: https://github.com/servo/servo
Source-Revision: b772f4335ee82007afe26fa58dd94d097d6135ba

UltraBlame original commit: dcead809bfd4d427052d40f9cd3f21bfe7844980
  • Loading branch information
marco-c committed Oct 1, 2019
1 parent cfe4724 commit 5af73ef
Showing 1 changed file with 168 additions and 5 deletions.
173 changes: 168 additions & 5 deletions servo/components/style/properties/gecko.mako.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3994,11 +3994,6 @@ kerning
"
font
-
stretch
"
"
font
-
variant
"
]
Expand Down Expand Up @@ -6418,6 +6413,9 @@ font
family
font
-
stretch
font
-
style
font
-
Expand Down Expand Up @@ -6921,6 +6919,171 @@ mSize
}
pub
fn
set_font_stretch
(
&
mut
self
v
:
longhands
:
:
font_stretch
:
:
computed_value
:
:
T
)
{
use
computed_values
:
:
font_stretch
:
:
T
;
self
.
gecko
.
mFont
.
stretch
=
match
v
{
T
:
:
normal
=
>
structs
:
:
NS_FONT_STRETCH_NORMAL
as
i16
T
:
:
ultra_condensed
=
>
structs
:
:
NS_FONT_STRETCH_ULTRA_CONDENSED
as
i16
T
:
:
extra_condensed
=
>
structs
:
:
NS_FONT_STRETCH_EXTRA_CONDENSED
as
i16
T
:
:
condensed
=
>
structs
:
:
NS_FONT_STRETCH_CONDENSED
as
i16
T
:
:
semi_condensed
=
>
structs
:
:
NS_FONT_STRETCH_SEMI_CONDENSED
as
i16
T
:
:
semi_expanded
=
>
structs
:
:
NS_FONT_STRETCH_SEMI_EXPANDED
as
i16
T
:
:
expanded
=
>
structs
:
:
NS_FONT_STRETCH_EXPANDED
as
i16
T
:
:
extra_expanded
=
>
structs
:
:
NS_FONT_STRETCH_EXTRA_EXPANDED
as
i16
T
:
:
ultra_expanded
=
>
structs
:
:
NS_FONT_STRETCH_ULTRA_EXPANDED
as
i16
}
;
}
{
impl_simple_copy
(
'
font_stretch
'
'
mFont
.
stretch
'
)
}
pub
fn
set_font_weight
(
&
Expand Down

0 comments on commit 5af73ef

Please sign in to comment.