diff options
Diffstat (limited to 'components/layout/display_list_builder.rs')
-rw-r--r-- | components/layout/display_list_builder.rs | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/components/layout/display_list_builder.rs b/components/layout/display_list_builder.rs index 73d0461e13d..b17355cd534 100644 --- a/components/layout/display_list_builder.rs +++ b/components/layout/display_list_builder.rs @@ -45,7 +45,7 @@ use servo_util::logical_geometry::{LogicalPoint, LogicalRect, LogicalSize}; use servo_util::opts; use std::default::Default; use std::iter::repeat; -use std::num::FloatMath; +use std::num::Float; use style::values::specified::{AngleOrCorner, HorizontalDirection, VerticalDirection}; use style::computed::{Image, LinearGradient, LengthOrPercentage}; use style::computed_values::filter::Filter; @@ -53,7 +53,9 @@ use style::computed_values::{background_attachment, background_repeat, border_st use style::computed_values::{position, visibility}; use style::style_structs::Border; use style::{ComputedValues, RGBA}; +use std::num::ToPrimitive; use std::sync::Arc; +use std::sync::mpsc::channel; use url::Url; /// The results of display list building for a single flow. @@ -689,7 +691,7 @@ impl FragmentDisplayListBuilding for Fragment { relative_containing_block_size, CoordinateSystem::Self); - debug!("Fragment::build_display_list at rel={}, abs={}, dirty={}, flow origin={}: {}", + debug!("Fragment::build_display_list at rel={:?}, abs={:?}, dirty={:?}, flow origin={:?}: {:?}", self.border_box, stacking_relative_border_box, layout_context.shared.dirty, @@ -879,8 +881,8 @@ impl FragmentDisplayListBuilding for Fragment { let (sender, receiver) = channel::<Vec<u8>>(); let canvas_data = match canvas_fragment_info.renderer { Some(ref renderer) => { - renderer.lock().send(SendPixelContents(sender)); - receiver.recv() + renderer.lock().unwrap().send(SendPixelContents(sender)); + receiver.recv().unwrap() }, None => repeat(0xFFu8).take(width * height * 4).collect(), }; @@ -916,7 +918,7 @@ impl FragmentDisplayListBuilding for Fragment { Size2D(geometry::to_frac_px(content_size.width) as f32, geometry::to_frac_px(content_size.height) as f32)); - debug!("finalizing position and size of iframe for {},{}", + debug!("finalizing position and size of iframe for {:?},{:?}", iframe_fragment.pipeline_id, iframe_fragment.subpage_id); let ConstellationChan(ref chan) = layout_context.shared.constellation_chan; @@ -1276,7 +1278,7 @@ impl ListItemFlowDisplayListBuilding for ListItemFlow { } // A helper data structure for gradients. -#[deriving(Copy)] +#[derive(Copy)] struct StopRun { start_offset: f32, end_offset: f32, @@ -1300,7 +1302,7 @@ fn position_to_offset(position: LengthOrPercentage, Au(total_length): Au) -> f32 } /// "Steps" as defined by CSS 2.1 § E.2. -#[deriving(Clone, PartialEq, Show, Copy)] +#[derive(Clone, PartialEq, Show, Copy)] pub enum StackingLevel { /// The border and backgrounds for the root of this stacking context: steps 1 and 2. BackgroundAndBorders, |