mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
auto merge of #3617 : mrobinson/servo/layer-positioning, r=pcwalton
Layers are currently all children of the root layer, so instead of using coordinates relative to the parent flow we should use coordinates relative to the page. Fixes #2061.
This commit is contained in:
commit
eff0de0ce1
3 changed files with 14 additions and 2 deletions
|
@ -1251,8 +1251,9 @@ impl BlockFlow {
|
|||
let layer_rect = self.base.position.union(&self.base.overflow);
|
||||
let size = Size2D(layer_rect.size.inline.to_nearest_px() as uint,
|
||||
layer_rect.size.block.to_nearest_px() as uint);
|
||||
let origin = Point2D(layer_rect.start.i.to_nearest_px() as uint,
|
||||
layer_rect.start.b.to_nearest_px() as uint);
|
||||
let origin = Point2D(self.base.abs_position.x.to_nearest_px() as uint,
|
||||
self.base.abs_position.y.to_nearest_px() as uint);
|
||||
|
||||
let scroll_policy = if self.is_fixed() {
|
||||
FixedPosition
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue