Auto merge of #15808 - servo:moz-user-select, r=nox,SimonSapin

Add remaining keyword values of -moz-user-select (fixes #15197)

<!-- 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/15808)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-03-03 08:17:44 -08:00 committed by GitHub
commit 1842b2e25e
4 changed files with 37 additions and 3 deletions

View file

@ -70,7 +70,7 @@ class Keyword(object):
moz_stripped = value.replace("-moz-", '') if self.gecko_strip_moz_prefix else value.replace("-moz-", 'moz-')
mapped = self.consts_map.get(value)
if self.gecko_enum_prefix:
parts = moz_stripped.split('-')
parts = moz_stripped.replace('-', '_').split('_')
parts = mapped if mapped else [p.title() for p in parts]
return self.gecko_enum_prefix + "::" + "".join(parts)
else:

View file

@ -16,11 +16,12 @@ ${helpers.single_keyword("ime-mode", "normal auto active disabled inactive",
animatable=False,
spec="https://drafts.csswg.org/css-ui/#input-method-editor")}
${helpers.single_keyword("-moz-user-select", "auto text none all", products="gecko",
${helpers.single_keyword("-moz-user-select", "auto text none all element elements" +
" toggle tri_state -moz-all -moz-none -moz-text",
products="gecko",
alias="-webkit-user-select",
gecko_ffi_name="mUserSelect",
gecko_enum_prefix="StyleUserSelect",
gecko_inexhaustive=True,
animatable=False,
spec="https://drafts.csswg.org/css-ui-4/#propdef-user-select")}