mirror of
https://github.com/servo/servo.git
synced 2025-08-14 01:45:33 +01:00
style: Use a generic type in preparation to fix animation.
Apart from a bit more code reuse. Bug: 1455358 Reviewed-by: xidorn MozReview-Commit-ID: 2BNOK6v30lX
This commit is contained in:
parent
32d4da8a99
commit
737501153b
9 changed files with 158 additions and 120 deletions
|
@ -2625,7 +2625,7 @@ fn static_assert() {
|
|||
}
|
||||
|
||||
pub fn set_font_style(&mut self, v: longhands::font_style::computed_value::T) {
|
||||
use values::computed::font::FontStyle;
|
||||
use values::generics::font::FontStyle;
|
||||
self.gecko.mFont.style = match v {
|
||||
FontStyle::Normal => structs::NS_STYLE_FONT_STYLE_NORMAL,
|
||||
FontStyle::Italic => structs::NS_STYLE_FONT_STYLE_ITALIC,
|
||||
|
|
|
@ -18,8 +18,8 @@ ${helpers.predefined_type("font-family",
|
|||
${helpers.predefined_type(
|
||||
"font-style",
|
||||
"FontStyle",
|
||||
initial_value="computed::FontStyle::Normal",
|
||||
initial_specified_value="specified::FontStyle::Normal",
|
||||
initial_value="computed::FontStyle::normal()",
|
||||
initial_specified_value="specified::FontStyle::normal()",
|
||||
# FIXME(emilio): This won't handle clamping correctly.
|
||||
animation_value_type="ComputedValue",
|
||||
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue