diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2017-03-08 17:07:54 +0100 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2017-03-08 17:07:54 +0100 |
commit | 1eb24f1adc2ec87a82430bed121ba0fd2d462fc0 (patch) | |
tree | 0a365b8c163b97a7c18cc0c9fc337228dea1dc5b | |
parent | 20d0e71232717c59c64f2537b184d9ef670554f0 (diff) | |
download | servo-1eb24f1adc2ec87a82430bed121ba0fd2d462fc0.tar.gz servo-1eb24f1adc2ec87a82430bed121ba0fd2d462fc0.zip |
style: Allow trailing whitespace in a calc expression.
-rw-r--r-- | components/style/values/specified/length.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/components/style/values/specified/length.rs b/components/style/values/specified/length.rs index 42d4a9c1188..1c3f7948f47 100644 --- a/components/style/values/specified/length.rs +++ b/components/style/values/specified/length.rs @@ -588,6 +588,9 @@ impl CalcLengthOrPercentage { let position = input.position(); match input.next_including_whitespace() { Ok(Token::WhiteSpace(_)) => { + if input.is_exhausted() { + break; // allow trailing whitespace + } match input.next() { Ok(Token::Delim('+')) => { products.push(try!(CalcLengthOrPercentage::parse_product(input, expected_unit))); |