Skip to content

Commit

Permalink
style: Move SVGPathData and its parser into svg_path.rs.
Browse files Browse the repository at this point in the history
SVGPathData will be used by clip-path and offset-path (and/or more on the
properties which support <basic-shape>). Therefore, let's move
SVGPathData out of motion.rs.

Differential Revision: https://phabricator.services.mozilla.com/D3631
  • Loading branch information
BorisChiou authored and emilio committed Sep 3, 2018
1 parent d4163ea commit a92f9c1
Show file tree
Hide file tree
Showing 4 changed files with 522 additions and 500 deletions.
2 changes: 1 addition & 1 deletion components/style/gecko/conversions.rs
Expand Up @@ -743,7 +743,7 @@ pub mod basic_shape {
impl<'a> From<&'a StyleShapeSource> for OffsetPath {
fn from(other: &'a StyleShapeSource) -> Self {
use gecko_bindings::structs::StylePathCommand;
use values::specified::motion::{SVGPathData, PathCommand};
use values::specified::svg_path::{SVGPathData, PathCommand};
match other.mType {
StyleShapeSourceType::Path => {
let gecko_path = unsafe { &*other.__bindgen_anon_1.mSVGPath.as_ref().mPtr };
Expand Down
2 changes: 2 additions & 0 deletions components/style/values/specified/mod.rs
Expand Up @@ -68,6 +68,7 @@ pub use self::position::{PositionComponent, ZIndex};
pub use self::svg::{SVGLength, SVGOpacity, SVGPaint, SVGPaintKind};
pub use self::svg::{SVGPaintOrder, SVGStrokeDashArray, SVGWidth};
pub use self::svg::MozContextProperties;
pub use self::svg_path::SVGPathData;
pub use self::table::XSpan;
pub use self::text::{InitialLetter, LetterSpacing, LineHeight, MozTabSize, TextAlign};
pub use self::text::{TextEmphasisPosition, TextEmphasisStyle};
Expand Down Expand Up @@ -109,6 +110,7 @@ pub mod rect;
pub mod resolution;
pub mod source_size_list;
pub mod svg;
pub mod svg_path;
pub mod table;
pub mod text;
pub mod time;
Expand Down

0 comments on commit a92f9c1

Please sign in to comment.