From 1a727225a625a81b70e0efedb70f172dc2551102 Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Wed, 20 Apr 2016 17:33:30 -0700 Subject: [PATCH] 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. --- components/style/properties/properties.mako.rs | 14 ++++++++++++-- ports/geckolib/properties.mako.rs | 2 -- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index 031a79a6966..9fb8e132184 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -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(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); diff --git a/ports/geckolib/properties.mako.rs b/ports/geckolib/properties.mako.rs index 5baaa9ca1b5..f04bb2bb93a 100644 --- a/ports/geckolib/properties.mako.rs +++ b/ports/geckolib/properties.mako.rs @@ -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"]