1. 01 Oct, 2018 2 commits
  2. 28 Sep, 2018 1 commit
  3. 27 Sep, 2018 7 commits
  4. 26 Sep, 2018 10 commits
  5. 25 Sep, 2018 14 commits
  6. 24 Sep, 2018 6 commits
    • Federico Mena Quintero's avatar
      css.rs: New file; start porting the CSS processing code to Rust · 08f28816
      Federico Mena Quintero authored
      This commit moves the bookkeeping of CSS-derived style declarations
      into Rust.  The parsing code that calls libcroco is still in C.
      08f28816
    • Federico Mena Quintero's avatar
      Remove unused function · a7c84102
      Federico Mena Quintero authored
      a7c84102
    • Federico Mena Quintero's avatar
      Update NEWS · ad6ab813
      Federico Mena Quintero authored
      ad6ab813
    • Federico Mena Quintero's avatar
      (#344): Don't let a viewBox with overflowing numbers pass through · 7b440303
      Federico Mena Quintero authored
      This commit adds expect_finite_number() and finite_f32() to parsers.rs.
      
      Part of issue #344 is that we need to validate parsed numbers, as
      cssparser can give us back -inf or inf when it overflows.  These
      values ripple down the code and end up creating a NaN inside a
      cairo::Matrix, which makes it invalid.
      
      This commit introduces a CssParserExt trait to have an
      expect_finite_number() method for cssparser::Parser, and the
      corresponding, low-level finite_f32() validation function.
      
      Those functions return a Result<f32, ValueErrorKind>.  This commit
      makes the following return a ValueErrorKind for the error case as
      well:
      
      * impl Parse for f64
      * parsers::number()
      * parsers::number_optional_number()
      * parsers:;integer()
      * parsers::integer_optional_integer()
      
      This has implications in all the callers, since they used to expect a
      ParseError, but must now expect ValueErrorKind.
      
      The biggest change is in transform.rs.  For simplicity, the individual
      parsers for transform functions now have two sections:  the first
      extracts f32 from cssparser::Parser, and the second validates those
      numbers and computes the final result --- instead of doing everything
      at the same time.
      
      #344
      7b440303
    • Federico Mena Quintero's avatar
      rustfmt · ef53f00b
      Federico Mena Quintero authored
      ef53f00b
    • Federico Mena Quintero's avatar
      Update NEWS · 18336735
      Federico Mena Quintero authored
      18336735