layout: Fix calculation of overflow for stacking contexts that contain

`position: relative` fragments.

Fixes placement of the header on espn.go.com.
This commit is contained in:
Patrick Walton 2015-08-25 15:04:03 -07:00
parent f79220f1a8
commit 5c51a6214e
8 changed files with 27 additions and 19 deletions

View file

@ -2060,8 +2060,8 @@ impl Fragment {
// the time. Can't we handle relative positioning by just adjusting `border_box`?
let relative_position =
self.relative_position(&LogicalSize::zero(self.style.writing_mode));
border_box =
border_box.translate_by_size(&relative_position.to_physical(self.style.writing_mode));
border_box = border_box.translate_by_size(&relative_position.to_physical(
self.style.writing_mode));
let mut overflow = border_box;
// Box shadows cause us to draw outside our border box.