Auto merge of #13212 - Manishearth:resync, r=emilio

Handle None_ => None enum changes

Pulls in changes from https://bugzilla.mozilla.org/show_bug.cgi?id=1300337

r? @SimonSapin

don't mark for landing, I'll manually r= this when I do the next sync

<!-- 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/13212)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-09-10 04:46:37 -05:00 committed by GitHub
commit 5e7d918297
4 changed files with 17 additions and 20 deletions

View file

@ -46,12 +46,9 @@ class Keyword(object):
def gecko_constant(self, value):
if self.gecko_enum_prefix:
if value == "none":
return self.gecko_enum_prefix + "::None_"
else:
parts = value.replace("-moz-", "").split("-")
parts = [p.title() for p in parts]
return self.gecko_enum_prefix + "::" + "".join(parts)
parts = value.replace("-moz-", "").split("-")
parts = [p.title() for p in parts]
return self.gecko_enum_prefix + "::" + "".join(parts)
else:
return self.gecko_constant_prefix + "_" + value.replace("-moz-", "").replace("-", "_").upper()

View file

@ -1623,7 +1623,7 @@ clip-path
// clean up existing struct
unsafe { Gecko_DestroyClipPath(clip_path) };
clip_path.mType = StyleShapeSourceType::None_;
clip_path.mType = StyleShapeSourceType::None;
match v {
ShapeSource::Url(..) => println!("stylo: clip-path: url() not yet implemented"),
@ -1724,7 +1724,7 @@ clip-path
let ref clip_path = self.gecko.mClipPath;
match clip_path.mType {
StyleShapeSourceType::None_ => ShapeSource::None,
StyleShapeSourceType::None => ShapeSource::None,
StyleShapeSourceType::Box => {
ShapeSource::Box(clip_path.mReferenceBox.into())
}