Auto merge of #14978 - shinglyu:inline-flex, r=notriddle

Implemented display: inline-flex

<!-- Please describe your changes on the following line: -->

---
<!-- 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] These changes fix #14685 (github issue number if applicable).

<!-- Either: -->
- [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. -->

<!-- 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/14978)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-01-22 19:57:49 -08:00 committed by GitHub
commit c75946c3ed
9 changed files with 28 additions and 26 deletions

View file

@ -19,10 +19,11 @@
values = """inline block inline-block
table inline-table table-row-group table-header-group table-footer-group
table-row table-column-group table-column table-cell table-caption
list-item flex none
list-item flex inline-flex
none
""".split()
if product == "gecko":
values += """inline-flex grid inline-grid ruby ruby-base ruby-base-container
values += """grid inline-grid ruby ruby-base ruby-base-container
ruby-text ruby-text-container contents flow-root -webkit-box
-webkit-inline-box -moz-box -moz-inline-box -moz-grid -moz-inline-grid
-moz-grid-group -moz-grid-line -moz-stack -moz-inline-stack -moz-deck

View file

@ -1953,8 +1953,10 @@ pub fn apply_declarations<'a, F, I>(viewport_size: Size2D<Au>,
let is_item = matches!(context.inherited_style.get_box().clone_display(),
% if product == "gecko":
computed_values::display::T::grid |
computed_values::display::T::inline_grid |
% endif
computed_values::display::T::flex);
computed_values::display::T::flex |
computed_values::display::T::inline_flex);
let (blockify_root, blockify_item) = match flags.contains(SKIP_ROOT_AND_ITEM_BASED_DISPLAY_FIXUP) {
false => (is_root_element, is_item),
true => (false, false),