Remove SetLayerClipRect and add SetLayerOrigin

The constallation has accurate information about iframe layer origins,
but not their size.
This commit is contained in:
Bryan Bell 2014-08-29 17:30:07 -07:00 committed by Martin Robinson
parent e17cc2d5e2
commit ff71c32218
4 changed files with 21 additions and 23 deletions

View file

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use compositor_task::{CompositorChan, LoadComplete, ShutdownComplete, SetLayerClipRect, SetIds};
use compositor_task::{CompositorChan, LoadComplete, ShutdownComplete, SetLayerOrigin, SetIds};
use std::collections::hashmap::{HashMap, HashSet};
use geom::rect::{Rect, TypedRect};
use geom::scale_factor::ScaleFactor;
@ -507,9 +507,9 @@ impl<LTF: LayoutTaskFactory, STF: ScriptTaskFactory> Constellation<LTF, STF> {
initial_viewport: rect.size * ScaleFactor(1.0),
device_pixel_ratio: self.window_size.device_pixel_ratio,
}));
self.compositor_chan.send(SetLayerClipRect(pipeline.id,
LayerId::null(),
rect.to_untyped()));
self.compositor_chan.send(SetLayerOrigin(pipeline.id,
LayerId::null(),
rect.to_untyped().origin));
} else {
already_sent.insert(pipeline.id);
}