aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/display_list_builder.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-01-25 02:36:15 -0800
committerGitHub <noreply@github.com>2017-01-25 02:36:15 -0800
commit2b623fcc7a4319b217cd52d1049b228a9fcc165a (patch)
tree738e508f7418068698aa09f3b24ad7d1fc2645c0 /components/layout/display_list_builder.rs
parentc6157a2aba9c4fdbfea4fee691a995b60f2347ed (diff)
parent1b2d932cfb6b23a329c30c72c29d3bb1f17f8c2d (diff)
downloadservo-2b623fcc7a4319b217cd52d1049b228a9fcc165a.tar.gz
servo-2b623fcc7a4319b217cd52d1049b228a9fcc165a.zip
Auto merge of #15186 - servo:re-revert, r=mbrubeck
Re revert the backed out PRs r? anyone <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15186) <!-- Reviewable:end -->
Diffstat (limited to 'components/layout/display_list_builder.rs')
-rw-r--r--components/layout/display_list_builder.rs13
1 files changed, 12 insertions, 1 deletions
diff --git a/components/layout/display_list_builder.rs b/components/layout/display_list_builder.rs
index fa5126471d3..107e6cad360 100644
--- a/components/layout/display_list_builder.rs
+++ b/components/layout/display_list_builder.rs
@@ -14,7 +14,7 @@ use app_units::{AU_PER_PX, Au};
use block::{BlockFlow, BlockStackingContextType};
use canvas_traits::{CanvasData, CanvasMsg, FromLayoutMsg};
use context::SharedLayoutContext;
-use euclid::{Point2D, Rect, SideOffsets2D, Size2D};
+use euclid::{Point2D, Rect, SideOffsets2D, Size2D, TypedSize2D};
use flex::FlexFlow;
use flow::{BaseFlow, Flow, IS_ABSOLUTELY_POSITIONED};
use flow_ref::FlowRef;
@@ -32,6 +32,7 @@ use inline::{FIRST_FRAGMENT_OF_ELEMENT, InlineFlow, LAST_FRAGMENT_OF_ELEMENT};
use ipc_channel::ipc;
use list_item::ListItemFlow;
use model::{self, MaybeAuto};
+use msg::constellation_msg::PipelineId;
use net_traits::image::base::PixelFormat;
use net_traits::image_cache_thread::UsePlaceholder;
use range::Range;
@@ -56,6 +57,7 @@ use style::servo::restyle_damage::REPAINT;
use style::values::{RGBA, computed};
use style::values::computed::{AngleOrCorner, Gradient, GradientKind, LengthOrPercentage, LengthOrPercentageOrAuto};
use style::values::specified::{HorizontalDirection, VerticalDirection};
+use style_traits::PagePx;
use style_traits::cursor::Cursor;
use table_cell::CollapsedBordersForCell;
use webrender_traits::{ColorF, GradientStop, ScrollPolicy};
@@ -105,6 +107,10 @@ pub struct DisplayListBuildState<'a> {
/// The current scroll root id, used to keep track of state when
/// recursively building and processing the display list.
pub current_scroll_root_id: ScrollRootId,
+
+ /// Vector containing iframe sizes, used to inform the constellation about
+ /// new iframe sizes
+ pub iframe_sizes: Vec<(PipelineId, TypedSize2D<f32, PagePx>)>,
}
impl<'a> DisplayListBuildState<'a> {
@@ -118,6 +124,7 @@ impl<'a> DisplayListBuildState<'a> {
processing_scroll_root_element: false,
current_stacking_context_id: StackingContextId::root(),
current_scroll_root_id: ScrollRootId::root(),
+ iframe_sizes: Vec::new(),
}
}
@@ -1443,6 +1450,10 @@ impl FragmentDisplayListBuilding for Fragment {
iframe: fragment_info.pipeline_id,
});
+ let size = Size2D::new(item.bounds().size.width.to_f32_px(),
+ item.bounds().size.height.to_f32_px());
+ state.iframe_sizes.push((fragment_info.pipeline_id, TypedSize2D::from_untyped(&size)));
+
state.add_display_item(item);
}
}