diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-04-17 01:28:31 +0530 |
---|---|---|
committer | bors-servo <lbergstrom+bors@mozilla.com> | 2016-04-17 01:28:31 +0530 |
commit | cc32c66e28f129e7ec14c5a55b5f2448a6994495 (patch) | |
tree | b5e73591090a9ebc79153b77e994080a9e80531e | |
parent | a373bd10ccbeb7415098433253eaf1bf21b69362 (diff) | |
parent | f5021fc0c5e25ff1df2423d57f7a6f1f82fdc234 (diff) | |
download | servo-cc32c66e28f129e7ec14c5a55b5f2448a6994495.tar.gz servo-cc32c66e28f129e7ec14c5a55b5f2448a6994495.zip |
Auto merge of #10628 - KiChjang:extra-gecko-values, r=bholley
Add missing gecko keyword values to styles
Not sure if I caught them all.
Part of #10408.
r? @bholley
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10628)
<!-- Reviewable:end -->
-rw-r--r-- | components/style/properties.mako.rs | 21 | ||||
-rw-r--r-- | ports/geckolib/properties.mako.rs | 2 |
2 files changed, 13 insertions, 10 deletions
diff --git a/components/style/properties.mako.rs b/components/style/properties.mako.rs index 4fce2ae4549..b68d47ad1a3 100644 --- a/components/style/properties.mako.rs +++ b/components/style/properties.mako.rs @@ -55,8 +55,8 @@ class Keyword(object): self.name = name self.values = values self.gecko_constant_prefix = gecko_constant_prefix or "NS_STYLE_" + self.name.upper().replace("-", "_") - self.extra_gecko_values = extra_gecko_values or [] - self.extra_servo_values = extra_servo_values or [] + self.extra_gecko_values = (extra_gecko_values or "").split() + self.extra_servo_values = (extra_servo_values or "").split() def gecko_values(self): return self.values + self.extra_gecko_values def servo_values(self): @@ -178,7 +178,7 @@ pub mod longhands { <%def name="raw_longhand(name, **kwargs)"> <% - products = kwargs.pop("products", "gecko,servo") + products = kwargs.pop("products", "gecko servo").split() if not CONFIG["product"] in products: return "" @@ -350,7 +350,7 @@ pub mod longhands { </%call> </%def> - <%def name="predefined_type(name, type, initial_value, parse_method='parse', products='gecko,servo')"> + <%def name="predefined_type(name, type, initial_value, parse_method='parse', products='gecko servo')"> <%self:longhand name="${name}" products="${products}"> #[allow(unused_imports)] use app_units::Au; @@ -587,7 +587,7 @@ pub mod longhands { </%self:longhand> - ${single_keyword("position", "static absolute relative fixed")} + ${single_keyword("position", "static absolute relative fixed", extra_gecko_values="sticky")} <%self:single_keyword_computed name="float" values="none left right" gecko_ffi_name="mFloats"> impl ToComputedValue for SpecifiedValue { @@ -965,7 +965,8 @@ pub mod longhands { ${switch_to_style_struct("InheritedBox")} // TODO: collapse. Well, do tables first. - ${single_keyword("visibility", "visible hidden", gecko_ffi_name="mVisible")} + ${single_keyword("visibility", "visible hidden", extra_gecko_values="collapse", + gecko_ffi_name="mVisible")} // CSS 2.1, Section 12 - Generated content, automatic numbering, and lists @@ -2234,7 +2235,8 @@ pub mod longhands { gecko_constant_prefix="NS_STYLE_WORDWRAP")} // TODO(pcwalton): Support `word-break: keep-all` once we have better CJK support. - ${single_keyword("word-break", "normal break-all", gecko_constant_prefix="NS_STYLE_WORDBREAK")} + ${single_keyword("word-break", "normal break-all", extra_gecko_values="keep-all", + gecko_constant_prefix="NS_STYLE_WORDBREAK")} // TODO(pcwalton): Support `text-justify: distribute`. ${single_keyword("text-justify", "auto none inter-word", products="servo")} @@ -2461,7 +2463,8 @@ pub mod longhands { </%self:single_keyword_computed> // TODO(pcwalton): `full-width` - ${single_keyword("text-transform", "none capitalize uppercase lowercase")} + ${single_keyword("text-transform", "none capitalize uppercase lowercase", + extra_gecko_values="full-width")} ${single_keyword("text-rendering", "auto optimizespeed optimizelegibility geometricprecision")} @@ -2486,7 +2489,7 @@ pub mod longhands { ${single_keyword("empty-cells", "show hide", gecko_constant_prefix="NS_STYLE_TABLE_EMPTY_CELLS")} - ${single_keyword("caption-side", "top bottom")} + ${single_keyword("caption-side", "top bottom", extra_gecko_values="right left top-outside bottom-outside")} <%self:longhand name="border-spacing"> use app_units::Au; diff --git a/ports/geckolib/properties.mako.rs b/ports/geckolib/properties.mako.rs index d5a63915ffd..77c8b2679c9 100644 --- a/ports/geckolib/properties.mako.rs +++ b/ports/geckolib/properties.mako.rs @@ -181,7 +181,7 @@ impl Debug for ${style_struct.gecko_ffi_name} { # Enum class instead of NS_STYLE_... force_stub += ["box-sizing"] # Inconsistent constant naming in gecko - force_stub += ["unicode-bidi"] + 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"] # Automatic mapping generates NS_STYLE_TEXT_DECORATION_STYLE__MOZ_NONE instead of |