mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Auto merge of #16201 - Manishearth:text-emph-pos, r=emilio
stylo: Handle text-emphasis-position pres attrs Somehow slipped through the cracks. try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=e1d349e847b528be3d61ad2ebf374a791800cfbb <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16201) <!-- Reviewable:end -->
This commit is contained in:
commit
955d3a8b87
2 changed files with 23 additions and 0 deletions
|
@ -1076,6 +1076,28 @@ ${helpers.single_keyword("text-align-last",
|
|||
vertical.to_css(dest)
|
||||
}
|
||||
}
|
||||
|
||||
% if product == "gecko":
|
||||
impl SpecifiedValue {
|
||||
pub fn from_gecko_keyword(kw: u32) -> Self {
|
||||
use gecko_bindings::structs;
|
||||
|
||||
let vert = if kw & structs::NS_STYLE_TEXT_EMPHASIS_POSITION_RIGHT != 0 {
|
||||
VerticalWritingModeValue::Right
|
||||
} else {
|
||||
debug_assert!(kw & structs::NS_STYLE_TEXT_EMPHASIS_POSITION_LEFT != 0);
|
||||
VerticalWritingModeValue::Left
|
||||
};
|
||||
let horiz = if kw & structs::NS_STYLE_TEXT_EMPHASIS_POSITION_OVER != 0 {
|
||||
HorizontalWritingModeValue::Over
|
||||
} else {
|
||||
debug_assert!(kw & structs::NS_STYLE_TEXT_EMPHASIS_POSITION_UNDER != 0);
|
||||
HorizontalWritingModeValue::Under
|
||||
};
|
||||
SpecifiedValue(horiz, vert)
|
||||
}
|
||||
}
|
||||
% endif
|
||||
</%helpers:longhand>
|
||||
|
||||
${helpers.predefined_type("text-emphasis-color", "CSSColor",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue