diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-11-10 11:53:05 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-10 11:53:05 -0600 |
commit | d16f3124640be647b4ed67cc4a68cebd55cdb7cc (patch) | |
tree | 1d7a7ba1c16c1af5531242f0789d55980174d7db /components/layout/fragment.rs | |
parent | d8a0a0003252391d6130cca5f64b9738255e224a (diff) | |
parent | eb22d33d4e8370d4393b8bebd633eb4687a7e3f9 (diff) | |
download | servo-d16f3124640be647b4ed67cc4a68cebd55cdb7cc.tar.gz servo-d16f3124640be647b4ed67cc4a68cebd55cdb7cc.zip |
Auto merge of #14136 - stshine:orthogonal-symmetry, r=SimonSapin
style: Add a "start_end()" method to LogicalMargin
<!-- Please describe your changes on the following line: -->
Add a `LogicalMargin::start_end()` method that receives a `Direction' parameter. This is useful for some layout that is symmetric in inline and block directions, like flexbox.
Part of #14123.
---
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).
<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because refactoring
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
r? @SimonSapin
<!-- 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/14136)
<!-- Reviewable:end -->
Diffstat (limited to 'components/layout/fragment.rs')
-rw-r--r-- | components/layout/fragment.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/layout/fragment.rs b/components/layout/fragment.rs index 2c193d09e41..a0f09dd5dd1 100644 --- a/components/layout/fragment.rs +++ b/components/layout/fragment.rs @@ -23,7 +23,7 @@ use inline::{InlineMetrics, LAST_FRAGMENT_OF_ELEMENT, LineMetrics}; use ipc_channel::ipc::IpcSender; #[cfg(debug_assertions)] use layout_debug; -use model::{self, Direction, IntrinsicISizes, IntrinsicISizesContribution, MaybeAuto}; +use model::{self, IntrinsicISizes, IntrinsicISizesContribution, MaybeAuto}; use msg::constellation_msg::PipelineId; use net_traits::image::base::{Image, ImageMetadata}; use net_traits::image_cache_thread::{ImageOrMetadataAvailable, UsePlaceholder}; @@ -44,7 +44,7 @@ use style::computed_values::{transform_style, vertical_align, white_space, word_ use style::computed_values::content::ContentItem; use style::context::SharedStyleContext; use style::dom::TRestyleDamage; -use style::logical_geometry::{LogicalMargin, LogicalRect, LogicalSize, WritingMode}; +use style::logical_geometry::{Direction, LogicalMargin, LogicalRect, LogicalSize, WritingMode}; use style::properties::ServoComputedValues; use style::selector_impl::RestyleDamage; use style::servo::restyle_damage::RECONSTRUCT_FLOW; |