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

@ -567,7 +567,7 @@ impl BlockFlow {
} else {
BlockType::FloatNonReplaced
}
} else if self.is_inline_block() {
} else if self.is_inline_block_or_inline_flex() {
if self.fragment.is_replaced() {
BlockType::InlineBlockReplaced
} else {
@ -1558,8 +1558,9 @@ impl BlockFlow {
debug_assert_eq!(self.fragment.margin_box_inline_size(), self.base.position.size.inline);
}
fn is_inline_block(&self) -> bool {
self.fragment.style().get_box().display == display::T::inline_block
fn is_inline_block_or_inline_flex(&self) -> bool {
self.fragment.style().get_box().display == display::T::inline_block ||
self.fragment.style().get_box().display == display::T::inline_flex
}
/// Computes the content portion (only) of the intrinsic inline sizes of this flow. This is