Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor grid style types and impls #16970

Merged
merged 1 commit into from May 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/style/gecko/values.rs
Expand Up @@ -17,8 +17,8 @@ use values::computed::{LengthOrPercentageOrNone, Number, NumberOrPercentage};
use values::computed::{MaxLength, MinLength};
use values::computed::basic_shape::ShapeRadius as ComputedShapeRadius;
use values::generics::basic_shape::ShapeRadius;
use values::generics::grid::{TrackBreadth, TrackKeyword};
use values::specified::Percentage;
use values::specified::grid::{TrackBreadth, TrackKeyword};

/// A trait that defines an interface to convert from and to `nsStyleCoord`s.
pub trait GeckoStyleCoordConvertible : Sized {
Expand Down
6 changes: 3 additions & 3 deletions components/style/properties/gecko.mako.rs
Expand Up @@ -1198,7 +1198,7 @@ fn static_assert() {

% for kind in ["rows", "columns"]:
pub fn set_grid_auto_${kind}(&mut self, v: longhands::grid_auto_${kind}::computed_value::T) {
use values::specified::grid::TrackSize;
use values::generics::grid::TrackSize;

match v {
TrackSize::FitContent(lop) => {
Expand Down Expand Up @@ -1231,8 +1231,8 @@ fn static_assert() {
use gecko_bindings::structs::{nsTArray, nsStyleGridLine_kMaxLine};
use nsstring::{nsCString, nsStringRepr};
use std::usize;
use values::specified::grid::TrackListType::Auto;
use values::specified::grid::{RepeatCount, TrackSize};
use values::generics::grid::TrackListType::Auto;
use values::generics::grid::{RepeatCount, TrackSize};

#[inline]
fn set_bitfield(bitfield: &mut u8, pos: u8, val: bool) {
Expand Down
7 changes: 4 additions & 3 deletions components/style/values/computed/mod.rs
Expand Up @@ -18,17 +18,18 @@ use std::fmt;
use style_traits::ToCss;
use super::{CSSFloat, CSSInteger, RGBA};
use super::generics::BorderRadiusSize as GenericBorderRadiusSize;
use super::generics::grid::{TrackBreadth as GenericTrackBreadth, TrackSize as GenericTrackSize};
use super::generics::grid::TrackList as GenericTrackList;
use super::specified;
use super::specified::grid::{TrackBreadth as GenericTrackBreadth, TrackSize as GenericTrackSize};
use super::specified::grid::TrackList as GenericTrackList;

pub use app_units::Au;
pub use cssparser::Color as CSSColor;
pub use self::image::{Gradient, GradientItem, ImageLayer, LineDirection, Image, ImageRect};
pub use super::{Auto, Either, None_};
#[cfg(feature = "gecko")]
pub use super::specified::{AlignItems, AlignJustifyContent, AlignJustifySelf, JustifyItems};
pub use super::specified::{BorderStyle, GridLine, Percentage, UrlOrNone};
pub use super::specified::{BorderStyle, Percentage, UrlOrNone};
pub use super::generics::grid::GridLine;
pub use super::specified::url::SpecifiedUrl;
pub use self::length::{CalcLengthOrPercentage, Length, LengthOrNumber, LengthOrPercentage, LengthOrPercentageOrAuto};
pub use self::length::{LengthOrPercentageOrAutoOrContent, LengthOrPercentageOrNone, LengthOrNone};
Expand Down