aboutsummaryrefslogtreecommitdiffstats
path: root/ports
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2017-11-21 13:33:35 +0100
committerEmilio Cobos Álvarez <emilio@crisal.io>2017-11-21 14:26:16 +0100
commit8de554f33456d3bf06fdec812d024ed35a7d28bd (patch)
tree883c1383d01367fb52e3a9476dde614745298718 /ports
parent5905f8d3eab42ce759c9802699ee5bd50498dd59 (diff)
downloadservo-8de554f33456d3bf06fdec812d024ed35a7d28bd.tar.gz
servo-8de554f33456d3bf06fdec812d024ed35a7d28bd.zip
style: Move property allowance tests to PropertyId::parse_into.
It's not only more consistent (since we have a proper ParserContext there), but also fixes a bunch of bugs where Gecko accidentally exposes and allows setting internal state because of conversions from nsCSSPropertyID to PropertyId. This adds the extra complexity of caring about aliases for longer, but that's probably not a big deal in practice, since we also have PropertyDeclarationId. MozReview-Commit-ID: C2Js8PfloxQ
Diffstat (limited to 'ports')
-rw-r--r--ports/geckolib/glue.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs
index 1e108122e2a..cca21a5c44e 100644
--- a/ports/geckolib/glue.rs
+++ b/ports/geckolib/glue.rs
@@ -2443,7 +2443,8 @@ where
url_data,
reporter,
parsing_mode,
- quirks_mode)
+ quirks_mode,
+ )
}
#[no_mangle]
@@ -2690,7 +2691,7 @@ pub extern "C" fn Servo_DeclarationBlock_GetNthProperty(
macro_rules! get_property_id_from_property {
($property: ident, $ret: expr) => {{
let property = $property.as_ref().unwrap().as_str_unchecked();
- match PropertyId::parse(property.into(), None) {
+ match PropertyId::parse(property.into()) {
Ok(property_id) => property_id,
Err(_) => { return $ret; }
}