Auto merge of #13051 - notriddle:root_flow_percent, r=glennw

Fix root flow's size at the browser window's size

When `<body>` needs to calculate its size based on `<html>`'s size, that should be the size of the browser window itself.

---

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12802 (github issue number if applicable).
- [X] There are tests for these changes OR

<!-- 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/13051)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-08-28 19:16:19 -05:00 committed by GitHub
commit 07b770b829
4 changed files with 44 additions and 2 deletions

View file

@ -1336,10 +1336,10 @@ impl BlockFlow {
};
let parent_container_size = self.explicit_block_containing_size(shared_context);
// https://drafts.csswg.org/css-ui-3/#box-sizing
let explicit_content_size = self
let mut explicit_content_size = self
.explicit_block_size(parent_container_size)
.map(|x| if x < box_border { Au(0) } else { x - box_border });
if self.is_root() { explicit_content_size = max(parent_container_size, explicit_content_size); }
// Calculate containing block inline size.
let containing_block_size = if flags.contains(IS_ABSOLUTELY_POSITIONED) {
self.containing_block_size(&shared_context.viewport_size, opaque_self).inline