mirror of
https://github.com/servo/servo.git
synced 2025-06-21 15:49:04 +01:00
remove commented out code from compositor_layer::from_frame_tree
This commit is contained in:
parent
b437141852
commit
14fc16af2e
3 changed files with 9 additions and 15 deletions
|
@ -98,12 +98,6 @@ impl CompositorLayer {
|
||||||
let container = @mut ContainerLayer();
|
let container = @mut ContainerLayer();
|
||||||
match rect {
|
match rect {
|
||||||
Some(rect) => {
|
Some(rect) => {
|
||||||
//container.scissor = Some(Rect(Point2D(100f32, 200f32), Size2D(700f32, 800f32)));
|
|
||||||
//container.common.transform = identity().translate(100f32, 200f32, 0f32);
|
|
||||||
|
|
||||||
// FIXME: The top two lines are temporary until layout window sizes are fixed.
|
|
||||||
// When they are, uncomment the next 2 lines:
|
|
||||||
|
|
||||||
container.scissor = Some(rect);
|
container.scissor = Some(rect);
|
||||||
container.common.transform = identity().translate(rect.origin.x,
|
container.common.transform = identity().translate(rect.origin.x,
|
||||||
rect.origin.y,
|
rect.origin.y,
|
||||||
|
@ -297,13 +291,8 @@ impl CompositorLayer {
|
||||||
}
|
}
|
||||||
|
|
||||||
// A helper method to resize sublayers.
|
// A helper method to resize sublayers.
|
||||||
<<<<<<< HEAD
|
|
||||||
fn resize_helper(&mut self, pipeline_id: PipelineId, new_size: Size2D<f32>, epoch: uint) -> bool {
|
|
||||||
for child_node in self.children.mut_iter() {
|
|
||||||
=======
|
|
||||||
fn resize_helper(&mut self, pipeline_id: PipelineId, new_size: Size2D<f32>, epoch: Epoch) -> bool {
|
fn resize_helper(&mut self, pipeline_id: PipelineId, new_size: Size2D<f32>, epoch: Epoch) -> bool {
|
||||||
for self.children.mut_iter().advance |child_node| {
|
for child_node in self.children.mut_iter() {
|
||||||
>>>>>>> 2ad7d8e... Add Epoch newtype; address review comments
|
|
||||||
if pipeline_id != child_node.child.pipeline.id {
|
if pipeline_id != child_node.child.pipeline.id {
|
||||||
loop;
|
loop;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,7 @@ use servo_net::resource_task;
|
||||||
use servo_util::time::ProfilerChan;
|
use servo_util::time::ProfilerChan;
|
||||||
use std::hashmap::{HashMap, HashSet};
|
use std::hashmap::{HashMap, HashSet};
|
||||||
use std::util::replace;
|
use std::util::replace;
|
||||||
|
use extra::url::Url;
|
||||||
use extra::future::{Future, from_value};
|
use extra::future::{Future, from_value};
|
||||||
use extra::url::Url;
|
use extra::url::Url;
|
||||||
|
|
||||||
|
@ -492,6 +493,7 @@ impl Constellation {
|
||||||
// FIXME(tkuehn): Need to follow the standardized spec for checking same-origin
|
// FIXME(tkuehn): Need to follow the standardized spec for checking same-origin
|
||||||
let pipeline = @mut if (source_url.host == url.host &&
|
let pipeline = @mut if (source_url.host == url.host &&
|
||||||
source_url.port == url.port) {
|
source_url.port == url.port) {
|
||||||
|
debug!("Constellation: loading same-origin iframe at %?", url);
|
||||||
// Reuse the script task if same-origin url's
|
// Reuse the script task if same-origin url's
|
||||||
Pipeline::with_script(next_pipeline_id,
|
Pipeline::with_script(next_pipeline_id,
|
||||||
Some(subpage_id),
|
Some(subpage_id),
|
||||||
|
@ -503,6 +505,7 @@ impl Constellation {
|
||||||
source_pipeline,
|
source_pipeline,
|
||||||
size_future)
|
size_future)
|
||||||
} else {
|
} else {
|
||||||
|
debug!("Constellation: loading cross-origin iframe at %?", url);
|
||||||
// Create a new script task if not same-origin url's
|
// Create a new script task if not same-origin url's
|
||||||
Pipeline::create(next_pipeline_id,
|
Pipeline::create(next_pipeline_id,
|
||||||
Some(subpage_id),
|
Some(subpage_id),
|
||||||
|
@ -518,6 +521,7 @@ impl Constellation {
|
||||||
if url.path.ends_with(".js") {
|
if url.path.ends_with(".js") {
|
||||||
pipeline.execute(url);
|
pipeline.execute(url);
|
||||||
} else {
|
} else {
|
||||||
|
debug!("Constellation: sending load msg to %?", pipeline);
|
||||||
pipeline.load(url);
|
pipeline.load(url);
|
||||||
}
|
}
|
||||||
let rect = self.pending_sizes.pop(&(source_pipeline_id, subpage_id));
|
let rect = self.pending_sizes.pop(&(source_pipeline_id, subpage_id));
|
||||||
|
@ -632,6 +636,7 @@ impl Constellation {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn handle_renderer_ready_msg(&mut self, pipeline_id: PipelineId) {
|
fn handle_renderer_ready_msg(&mut self, pipeline_id: PipelineId) {
|
||||||
|
debug!("Renderer %? ready to send paint msg", pipeline_id);
|
||||||
// This message could originate from a pipeline in the navigation context or
|
// This message could originate from a pipeline in the navigation context or
|
||||||
// from a pending frame. The only time that we will grant paint permission is
|
// from a pending frame. The only time that we will grant paint permission is
|
||||||
// when the message originates from a pending frame or the current frame.
|
// when the message originates from a pending frame or the current frame.
|
||||||
|
@ -641,8 +646,6 @@ impl Constellation {
|
||||||
// TODO(tkuehn): In fact, this kind of message might be provably
|
// TODO(tkuehn): In fact, this kind of message might be provably
|
||||||
// impossible to occur.
|
// impossible to occur.
|
||||||
if current_frame.contains(pipeline_id) {
|
if current_frame.contains(pipeline_id) {
|
||||||
//debug!("updating compositor frame tree with %?", current_frame);
|
|
||||||
//self.set_ids(current_frame);
|
|
||||||
for frame in current_frame.iter() {
|
for frame in current_frame.iter() {
|
||||||
frame.pipeline.grant_paint_permission();
|
frame.pipeline.grant_paint_permission();
|
||||||
}
|
}
|
||||||
|
|
|
@ -464,6 +464,7 @@ impl ScriptTask {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn handle_new_layout(&mut self, new_layout_info: NewLayoutInfo) {
|
fn handle_new_layout(&mut self, new_layout_info: NewLayoutInfo) {
|
||||||
|
debug!("Script: new layout: %?", new_layout_info);
|
||||||
let NewLayoutInfo {
|
let NewLayoutInfo {
|
||||||
old_id,
|
old_id,
|
||||||
new_id,
|
new_id,
|
||||||
|
@ -529,6 +530,7 @@ impl ScriptTask {
|
||||||
|
|
||||||
/// Handles a notification that reflow completed.
|
/// Handles a notification that reflow completed.
|
||||||
fn handle_reflow_complete_msg(&mut self, pipeline_id: PipelineId) {
|
fn handle_reflow_complete_msg(&mut self, pipeline_id: PipelineId) {
|
||||||
|
debug!("Script: Reflow complete for %?", pipeline_id);
|
||||||
self.page_tree.find(pipeline_id).expect("ScriptTask: received a load
|
self.page_tree.find(pipeline_id).expect("ScriptTask: received a load
|
||||||
message for a layout channel that is not associated with this script task. This
|
message for a layout channel that is not associated with this script task. This
|
||||||
is a bug.").page.layout_join_port = None;
|
is a bug.").page.layout_join_port = None;
|
||||||
|
@ -567,7 +569,7 @@ impl ScriptTask {
|
||||||
/// The entry point to document loading. Defines bindings, sets up the window and document
|
/// The entry point to document loading. Defines bindings, sets up the window and document
|
||||||
/// objects, parses HTML and CSS, and kicks off initial layout.
|
/// objects, parses HTML and CSS, and kicks off initial layout.
|
||||||
fn load(&mut self, pipeline_id: PipelineId, url: Url) {
|
fn load(&mut self, pipeline_id: PipelineId, url: Url) {
|
||||||
debug!("ScriptTask: loading %?", url);
|
debug!("ScriptTask: loading %? on page %?", url, pipeline_id);
|
||||||
|
|
||||||
let page = self.page_tree.find(pipeline_id).expect("ScriptTask: received a load
|
let page = self.page_tree.find(pipeline_id).expect("ScriptTask: received a load
|
||||||
message for a layout channel that is not associated with this script task. This
|
message for a layout channel that is not associated with this script task. This
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue