aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/model.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-08-03 09:24:31 -0500
committerGitHub <noreply@github.com>2016-08-03 09:24:31 -0500
commit15947f8f73bc8145916e1213f559eede815d8529 (patch)
tree57924c858576655760621ac9e0d9e4e2a8cad445 /components/layout/model.rs
parente2d4ff5b62aff7fc6f40460270af44e1ab5283d4 (diff)
parent60e2f44a1950559398fa25aa9aa36cd2a7fa39ad (diff)
downloadservo-15947f8f73bc8145916e1213f559eede815d8529.tar.gz
servo-15947f8f73bc8145916e1213f559eede815d8529.zip
Auto merge of #12330 - stshine:flexitem, r=pcwalton
Implement flexible box layout for row container <!-- Please describe your changes on the following line: --> This pull requests implements basic flexible box layout for row container. It has implemented most basic flexbox features, including grow, shrink, multi-line, *reverse properties, and alignment under `justify-content`, `align-items`, `align-self`, `align-content`. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] There are tests for these changes <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> r? @pcwalton <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12330) <!-- Reviewable:end -->
Diffstat (limited to 'components/layout/model.rs')
-rw-r--r--components/layout/model.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/components/layout/model.rs b/components/layout/model.rs
index bb9bb1736fc..f988ef370dd 100644
--- a/components/layout/model.rs
+++ b/components/layout/model.rs
@@ -502,6 +502,13 @@ impl ToGfxMatrix for ComputedMatrix {
}
}
+// Used to specify the logical direction.
+#[derive(Debug, Clone, Copy)]
+pub enum Direction {
+ Inline,
+ Block
+}
+
// https://drafts.csswg.org/css2/visudet.html#min-max-widths
// https://drafts.csswg.org/css2/visudet.html#min-max-heights
/// A min or max constraint