Bug 1466008: followup: set the rule type in the custom properties code, since we use it. r=me on a CLOSED TREE
authorEmilio Cobos Álvarez <emilio@crisal.io>
Fri, 01 Jun 2018 16:13:15 +0200
changeset 420895 24447bd95fbd88c310b93e096f476873364a7ab1
parent 420894 c16c9198979ace0ac9b7f90031c96e85c0f1020b
child 420896 38ec627c4758007cbadf94a16ee188f5505bb9af
push id34083
push userapavel@mozilla.com
push dateSat, 02 Jun 2018 23:03:25 +0000
treeherdermozilla-central@1f62ecdf59b6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1466008
milestone62.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1466008: followup: set the rule type in the custom properties code, since we use it. r=me on a CLOSED TREE Though I think it may be slightly fishy if used in, e.g., a @keyframes block. For our purposes right now it doesn't make a difference, I think. MozReview-Commit-ID: A7VCTOqaIuB
servo/components/style/properties/properties.mako.rs
--- a/servo/components/style/properties/properties.mako.rs
+++ b/servo/components/style/properties/properties.mako.rs
@@ -1417,20 +1417,22 @@ impl UnparsedValue {
         custom_properties: Option<<&Arc<::custom_properties::CustomPropertiesMap>>,
         quirks_mode: QuirksMode,
     ) -> PropertyDeclaration {
         ::custom_properties::substitute(&self.css, self.first_token_type, custom_properties)
         .ok()
         .and_then(|css| {
             // As of this writing, only the base URL is used for property
             // values.
+            //
+            // FIXME(emilio): These bits are slightly fishy.
             let context = ParserContext::new(
                 Origin::Author,
                 &self.url_data,
-                None,
+                Some(CssRuleType::Style),
                 ParsingMode::DEFAULT,
                 quirks_mode,
             );
 
             let mut input = ParserInput::new(&css);
             Parser::new(&mut input).parse_entirely(|input| {
                 match self.from_shorthand {
                     None => longhand_id.parse_value(&context, input),