Skip to content

Commit d10ddec

Browse files
authored
Enable font-synthesis-weight support for servo (#244)
* parse font-synthesis-weight for servo Signed-off-by: minghuaw <[email protected]> * derive Serialize and Deserialize for FontSynthesis Signed-off-by: minghuaw <[email protected]> * derive Hash for FontSynthesis Signed-off-by: minghuaw <[email protected]> * restore mistakenly removed Serialzie and Deserialze derive Signed-off-by: minghuaw <[email protected]> --------- Signed-off-by: minghuaw <[email protected]>
1 parent bb62b4e commit d10ddec

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

style/properties/cascade.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,6 @@ impl<'b> Cascade<'b> {
10741074
builder.add_flags(ComputedValueFlags::HAS_AUTHOR_SPECIFIED_WORD_SPACING);
10751075
}
10761076

1077-
#[cfg(feature = "gecko")]
10781077
if self
10791078
.author_specified
10801079
.contains(LonghandId::FontSynthesisWeight)

style/properties/longhands/font.mako.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ ${helpers.predefined_type(
8787
${helpers.predefined_type(
8888
"font-synthesis-weight",
8989
"FontSynthesis",
90-
engines="gecko",
90+
engines="gecko servo",
9191
initial_value="computed::FontSynthesis::Auto",
9292
initial_specified_value="specified::FontSynthesis::Auto",
9393
gecko_ffi_name="mFont.synthesisWeight",

style/values/specified/font.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1522,6 +1522,7 @@ impl Parse for FontLanguageOverride {
15221522
Copy,
15231523
Debug,
15241524
Eq,
1525+
Hash,
15251526
MallocSizeOf,
15261527
Parse,
15271528
PartialEq,
@@ -1531,6 +1532,7 @@ impl Parse for FontLanguageOverride {
15311532
ToResolvedValue,
15321533
ToShmem,
15331534
)]
1535+
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
15341536
pub enum FontSynthesis {
15351537
/// This attribute may be synthesized if not supported by a face.
15361538
Auto,

0 commit comments

Comments
 (0)