Auto merge of #17913 - upsuper:prop-enabled, r=Manishearth

Have check_allowed_in read gPropertyEabled table directly

This is the Servo side change of [bug 1381690](https://bugzilla.mozilla.org/show_bug.cgi?id=1381690).

<!-- 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/17913)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-07-28 21:49:38 -05:00 committed by GitHub
commit b47e1876bd
2 changed files with 2 additions and 4 deletions

View file

@ -1418,9 +1418,6 @@ extern "C" {
pub fn Gecko_ReleaseCSSValueSharedListArbitraryThread(aPtr:
*mut nsCSSValueSharedList);
}
extern "C" {
pub fn Gecko_PropertyId_IsPrefEnabled(id: nsCSSPropertyID) -> bool;
}
extern "C" {
pub fn Gecko_nsStyleFont_SetLang(font: *mut nsStyleFont,
atom: *mut nsIAtom);

View file

@ -1184,8 +1184,9 @@ impl PropertyId {
}
% endif
% if product == "gecko":
use gecko_bindings::structs;
let id = self.to_nscsspropertyid().unwrap();
unsafe { bindings::Gecko_PropertyId_IsPrefEnabled(id) }
unsafe { structs::nsCSSProps_gPropertyEnabled[id as usize] }
% endif
};