Unstub text-orientation.

The spec has changed a bit since the servo implementation. We still need to alias
sideways-right to sideways and add other writing modes, but we can do that later.
This commit is contained in:
Bobby Holley 2016-04-20 17:33:30 -07:00
parent 6d2284cdb7
commit 1a727225a6
2 changed files with 12 additions and 4 deletions

View file

@ -1960,8 +1960,11 @@ pub mod longhands {
// FIXME(SimonSapin): Add 'mixed' and 'upright' (needs vertical text support)
// FIXME(SimonSapin): initial (first) value should be 'mixed', when that's implemented
${helpers.single_keyword("text-orientation", "sideways sideways-left sideways-right",
experimental=True, need_clone=True)}
// FIXME(bholley): sideways-right is needed as an alias to sideways in gecko.
${helpers.single_keyword("text-orientation", "sideways",
experimental=True, need_clone=True,
extra_gecko_values="mixed upright",
extra_servo_values="sideways-right sideways-left")}
// CSS Color Module Level 4
// https://drafts.csswg.org/css-color/
@ -6127,10 +6130,17 @@ pub fn get_writing_mode<S: style_struct_traits::InheritedBox>(inheritedbox_style
},
}
match inheritedbox_style.clone_text_orientation() {
% if product == "servo":
computed_values::text_orientation::T::sideways_right => {},
computed_values::text_orientation::T::sideways_left => {
flags.insert(logical_geometry::FLAG_VERTICAL_LR);
},
% elif product == "gecko":
// FIXME(bholley): Need to make sure these are correct when we add
// full writing-mode support.
computed_values::text_orientation::T::mixed => {},
computed_values::text_orientation::T::upright => {},
% endif
computed_values::text_orientation::T::sideways => {
if flags.intersects(logical_geometry::FLAG_VERTICAL_LR) {
flags.insert(logical_geometry::FLAG_SIDEWAYS_LEFT);

View file

@ -258,8 +258,6 @@ impl Debug for ${style_struct.gecko_ffi_name} {
force_stub += ["box-sizing"]
# Inconsistent constant naming in gecko
force_stub += ["unicode-bidi", "text-transform"]
# Need to figure out why servo has sideways-left computed value and gecko doesn't
force_stub += ["text-orientation"]
# These are booleans.
force_stub += ["page-break-after", "page-break-before"]