mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
parent
a9aa50683f
commit
5c408d2be9
39 changed files with 397 additions and 377 deletions
|
@ -1047,7 +1047,7 @@ impl BlockFlow {
|
|||
self.base.floats.add_float(&info);
|
||||
|
||||
// FIXME (mbrubeck) Get the correct container size for self.base.floats;
|
||||
let container_size = Size2D(self.base.block_container_inline_size, Au(0));
|
||||
let container_size = Size2D::new(self.base.block_container_inline_size, Au(0));
|
||||
|
||||
// Move in from the margin edge, as per CSS 2.1 § 9.5, floats may not overlap anything on
|
||||
// their margin edges.
|
||||
|
@ -1669,7 +1669,7 @@ impl Flow for BlockFlow {
|
|||
fn compute_absolute_position(&mut self, layout_context: &LayoutContext) {
|
||||
// FIXME (mbrubeck): Get the real container size, taking the container writing mode into
|
||||
// account. Must handle vertical writing modes.
|
||||
let container_size = Size2D(self.base.block_container_inline_size, Au(0));
|
||||
let container_size = Size2D::new(self.base.block_container_inline_size, Au(0));
|
||||
|
||||
if self.is_root() {
|
||||
self.base.clip = ClippingRegion::max();
|
||||
|
@ -1776,7 +1776,7 @@ impl Flow for BlockFlow {
|
|||
//
|
||||
// FIXME(pcwalton): Is this vertical-writing-direction-safe?
|
||||
let margin = self.fragment.margin.to_physical(self.base.writing_mode);
|
||||
origin_for_children = Point2D(-margin.left, Au(0)) + relative_offset;
|
||||
origin_for_children = Point2D::new(-margin.left, Au(0)) + relative_offset;
|
||||
clip_in_child_coordinate_system =
|
||||
self.base.clip.translate(&-self.base.stacking_relative_position);
|
||||
} else {
|
||||
|
@ -1789,7 +1789,7 @@ impl Flow for BlockFlow {
|
|||
let visible_rect =
|
||||
match layout_context.shared.visible_rects.get(&self.layer_id(0)) {
|
||||
Some(visible_rect) => *visible_rect,
|
||||
None => Rect(Point2D::zero(), layout_context.shared.screen_size),
|
||||
None => Rect::new(Point2D::zero(), layout_context.shared.screen_size),
|
||||
};
|
||||
|
||||
let screen_size = layout_context.shared.screen_size;
|
||||
|
|
|
@ -22,7 +22,6 @@ use model::{self, MaybeAuto, ToGfxMatrix, ToAu};
|
|||
use table_cell::CollapsedBordersForCell;
|
||||
|
||||
use geom::{Point2D, Rect, Size2D, SideOffsets2D};
|
||||
use geom::matrix::identity;
|
||||
use geom::Matrix4;
|
||||
use gfx_traits::color;
|
||||
use gfx::display_list::{BLUR_INFLATION_FACTOR, BaseDisplayItem, BorderDisplayItem};
|
||||
|
@ -392,18 +391,18 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
// wide.
|
||||
let image_aspect_ratio = (image.width as f64) / (image.height as f64);
|
||||
let bounds_aspect_ratio = bounds.size.width.to_f64_px() / bounds.size.height.to_f64_px();
|
||||
let intrinsic_size = Size2D(Au::from_px(image.width as i32),
|
||||
Au::from_px(image.height as i32));
|
||||
let intrinsic_size = Size2D::new(Au::from_px(image.width as i32),
|
||||
Au::from_px(image.height as i32));
|
||||
match (style.get_background().background_size.clone(),
|
||||
image_aspect_ratio < bounds_aspect_ratio) {
|
||||
(background_size::T::Contain, false) | (background_size::T::Cover, true) => {
|
||||
Size2D(bounds.size.width,
|
||||
Au::from_f64_px(bounds.size.width.to_f64_px() / image_aspect_ratio))
|
||||
Size2D::new(bounds.size.width,
|
||||
Au::from_f64_px(bounds.size.width.to_f64_px() / image_aspect_ratio))
|
||||
}
|
||||
|
||||
(background_size::T::Contain, true) | (background_size::T::Cover, false) => {
|
||||
Size2D(Au::from_f64_px(bounds.size.height.to_f64_px() * image_aspect_ratio),
|
||||
bounds.size.height)
|
||||
Size2D::new(Au::from_f64_px(bounds.size.height.to_f64_px() * image_aspect_ratio),
|
||||
bounds.size.height)
|
||||
}
|
||||
|
||||
(background_size::T::Explicit(background_size::ExplicitSize {
|
||||
|
@ -412,7 +411,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
}), _) => {
|
||||
let width = MaybeAuto::from_style(width, bounds.size.width)
|
||||
.specified_or_default(intrinsic_size.width);
|
||||
Size2D(width, Au::from_f64_px(width.to_f64_px() / image_aspect_ratio))
|
||||
Size2D::new(width, Au::from_f64_px(width.to_f64_px() / image_aspect_ratio))
|
||||
}
|
||||
|
||||
(background_size::T::Explicit(background_size::ExplicitSize {
|
||||
|
@ -421,14 +420,14 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
}), _) => {
|
||||
let height = MaybeAuto::from_style(height, bounds.size.height)
|
||||
.specified_or_default(intrinsic_size.height);
|
||||
Size2D(Au::from_f64_px(height.to_f64_px() * image_aspect_ratio), height)
|
||||
Size2D::new(Au::from_f64_px(height.to_f64_px() * image_aspect_ratio), height)
|
||||
}
|
||||
|
||||
(background_size::T::Explicit(background_size::ExplicitSize {
|
||||
width,
|
||||
height
|
||||
}), _) => {
|
||||
Size2D(MaybeAuto::from_style(width, bounds.size.width)
|
||||
Size2D::new(MaybeAuto::from_style(width, bounds.size.width)
|
||||
.specified_or_default(intrinsic_size.width),
|
||||
MaybeAuto::from_style(height, bounds.size.height)
|
||||
.specified_or_default(intrinsic_size.height))
|
||||
|
@ -542,7 +541,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
Cursor::DefaultCursor),
|
||||
clip),
|
||||
image: image.clone(),
|
||||
stretch_size: Size2D(image_size.width, image_size.height),
|
||||
stretch_size: Size2D::new(image_size.width, image_size.height),
|
||||
image_rendering: style.get_effects().image_rendering.clone(),
|
||||
}), level);
|
||||
}
|
||||
|
@ -561,10 +560,10 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
// between the starting point and the ending point.
|
||||
let delta = match gradient.angle_or_corner {
|
||||
AngleOrCorner::Angle(angle) => {
|
||||
Point2D(Au::from_f32_px(angle.radians().sin() *
|
||||
absolute_bounds.size.width.to_f32_px() / 2.0),
|
||||
Au::from_f32_px(-angle.radians().cos() *
|
||||
absolute_bounds.size.height.to_f32_px() / 2.0))
|
||||
Point2D::new(Au::from_f32_px(angle.radians().sin() *
|
||||
absolute_bounds.size.width.to_f32_px() / 2.0),
|
||||
Au::from_f32_px(-angle.radians().cos() *
|
||||
absolute_bounds.size.height.to_f32_px() / 2.0))
|
||||
}
|
||||
AngleOrCorner::Corner(horizontal, vertical) => {
|
||||
let x_factor = match horizontal {
|
||||
|
@ -575,8 +574,8 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
VerticalDirection::Top => -1,
|
||||
VerticalDirection::Bottom => 1,
|
||||
};
|
||||
Point2D(absolute_bounds.size.width * x_factor / 2,
|
||||
absolute_bounds.size.height * y_factor / 2)
|
||||
Point2D::new(absolute_bounds.size.width * x_factor / 2,
|
||||
absolute_bounds.size.height * y_factor / 2)
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -643,8 +642,8 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
})
|
||||
}
|
||||
|
||||
let center = Point2D(absolute_bounds.origin.x + absolute_bounds.size.width / 2,
|
||||
absolute_bounds.origin.y + absolute_bounds.size.height / 2);
|
||||
let center = Point2D::new(absolute_bounds.origin.x + absolute_bounds.size.width / 2,
|
||||
absolute_bounds.origin.y + absolute_bounds.size.height / 2);
|
||||
|
||||
let gradient_display_item = DisplayItem::GradientClass(box GradientDisplayItem {
|
||||
base: BaseDisplayItem::new(*absolute_bounds,
|
||||
|
@ -669,8 +668,8 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
clip: &ClippingRegion) {
|
||||
// NB: According to CSS-BACKGROUNDS, box shadows render in *reverse* order (front to back).
|
||||
for box_shadow in style.get_effects().box_shadow.iter().rev() {
|
||||
let bounds = shadow_bounds(&absolute_bounds.translate(&Point2D(box_shadow.offset_x,
|
||||
box_shadow.offset_y)),
|
||||
let bounds = shadow_bounds(&absolute_bounds.translate(&Point2D::new(box_shadow.offset_x,
|
||||
box_shadow.offset_y)),
|
||||
box_shadow.blur_radius,
|
||||
box_shadow.spread_radius);
|
||||
list.push(DisplayItem::BoxShadowClass(box BoxShadowDisplayItem {
|
||||
|
@ -681,7 +680,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
(*clip).clone()),
|
||||
box_bounds: *absolute_bounds,
|
||||
color: style.resolve_color(box_shadow.color).to_gfx_color(),
|
||||
offset: Point2D(box_shadow.offset_x, box_shadow.offset_y),
|
||||
offset: Point2D::new(box_shadow.offset_x, box_shadow.offset_y),
|
||||
blur_radius: box_shadow.blur_radius,
|
||||
spread_radius: box_shadow.spread_radius,
|
||||
clip_mode: if box_shadow.inset {
|
||||
|
@ -867,12 +866,12 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
};
|
||||
|
||||
// FIXME(pcwalton, #2795): Get the real container size.
|
||||
let clip_origin = Point2D(stacking_relative_border_box.origin.x + style_clip_rect.left,
|
||||
stacking_relative_border_box.origin.y + style_clip_rect.top);
|
||||
let clip_origin = Point2D::new(stacking_relative_border_box.origin.x + style_clip_rect.left,
|
||||
stacking_relative_border_box.origin.y + style_clip_rect.top);
|
||||
let right = style_clip_rect.right.unwrap_or(stacking_relative_border_box.size.width);
|
||||
let bottom = style_clip_rect.bottom.unwrap_or(stacking_relative_border_box.size.height);
|
||||
let clip_size = Size2D(right - clip_origin.x, bottom - clip_origin.y);
|
||||
(*parent_clip).clone().intersect_rect(&Rect(clip_origin, clip_size))
|
||||
let clip_size = Size2D::new(right - clip_origin.x, bottom - clip_origin.y);
|
||||
(*parent_clip).clone().intersect_rect(&Rect::new(clip_origin, clip_size))
|
||||
}
|
||||
|
||||
fn build_display_list(&mut self,
|
||||
|
@ -1030,7 +1029,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
// to back).
|
||||
let text_color = self.style().get_color().color;
|
||||
for text_shadow in self.style.get_effects().text_shadow.0.iter().rev() {
|
||||
let offset = &Point2D(text_shadow.offset_x, text_shadow.offset_y);
|
||||
let offset = &Point2D::new(text_shadow.offset_x, text_shadow.offset_y);
|
||||
let color = self.style().resolve_color(text_shadow.color);
|
||||
self.build_display_list_for_text_fragment(display_list,
|
||||
&**text_fragment,
|
||||
|
@ -1047,7 +1046,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
text_color,
|
||||
&stacking_relative_content_box,
|
||||
None,
|
||||
&Point2D(Au(0), Au(0)),
|
||||
&Point2D::new(Au(0), Au(0)),
|
||||
clip);
|
||||
|
||||
if opts::get().show_debug_fragment_borders {
|
||||
|
@ -1142,15 +1141,15 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
.relative_containing_block_mode,
|
||||
CoordinateSystem::Parent);
|
||||
|
||||
let mut transform = identity();
|
||||
let mut transform = Matrix4::identity();
|
||||
|
||||
if let Some(ref operations) = self.style().get_effects().transform {
|
||||
let transform_origin = self.style().get_effects().transform_origin;
|
||||
let transform_origin =
|
||||
Point2D(model::specified(transform_origin.horizontal,
|
||||
border_box.size.width).to_f32_px(),
|
||||
model::specified(transform_origin.vertical,
|
||||
border_box.size.height).to_f32_px());
|
||||
Point2D::new(model::specified(transform_origin.horizontal,
|
||||
border_box.size.width).to_f32_px(),
|
||||
model::specified(transform_origin.vertical,
|
||||
border_box.size.height).to_f32_px());
|
||||
|
||||
let pre_transform = Matrix4::create_translation(transform_origin.x,
|
||||
transform_origin.y,
|
||||
|
@ -1193,7 +1192,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
|
||||
// FIXME(pcwalton): Is this vertical-writing-direction-safe?
|
||||
let margin = self.margin.to_physical(base_flow.writing_mode);
|
||||
let overflow = base_flow.overflow.translate(&-Point2D(margin.left, Au(0)));
|
||||
let overflow = base_flow.overflow.translate(&-Point2D::new(margin.left, Au(0)));
|
||||
|
||||
// Create the filter pipeline.
|
||||
let effects = self.style().get_effects();
|
||||
|
@ -1241,10 +1240,10 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
layout_context: &LayoutContext) {
|
||||
let border_padding = (self.border_padding).to_physical(self.style.writing_mode);
|
||||
let content_size = self.content_box().size.to_physical(self.style.writing_mode);
|
||||
let iframe_rect = Rect(Point2D((offset.x + border_padding.left).to_f32_px(),
|
||||
(offset.y + border_padding.top).to_f32_px()),
|
||||
Size2D(content_size.width.to_f32_px(),
|
||||
content_size.height.to_f32_px()));
|
||||
let iframe_rect = Rect::new(Point2D::new((offset.x + border_padding.left).to_f32_px(),
|
||||
(offset.y + border_padding.top).to_f32_px()),
|
||||
Size2D::new(content_size.width.to_f32_px(),
|
||||
content_size.height.to_f32_px()));
|
||||
|
||||
debug!("finalizing position and size of iframe for {:?},{:?}",
|
||||
iframe_fragment.pipeline_id,
|
||||
|
@ -1726,8 +1725,8 @@ impl BaseFlowDisplayListBuilding for BaseFlow {
|
|||
|
||||
let thread_id = self.thread_id;
|
||||
let stacking_context_relative_bounds =
|
||||
Rect(self.stacking_relative_position,
|
||||
self.position.size.to_physical(self.writing_mode));
|
||||
Rect::new(self.stacking_relative_position,
|
||||
self.position.size.to_physical(self.writing_mode));
|
||||
|
||||
let mut color = THREAD_TINT_COLORS[thread_id as usize % THREAD_TINT_COLORS.len()];
|
||||
color.a = 1.0;
|
||||
|
|
|
@ -1072,7 +1072,7 @@ impl BaseFlow {
|
|||
let position_with_overflow = self.position
|
||||
.to_physical(self.writing_mode, container_size)
|
||||
.union(&self.overflow);
|
||||
let bounds = Rect(self.stacking_relative_position, position_with_overflow.size);
|
||||
let bounds = Rect::new(self.stacking_relative_position, position_with_overflow.size);
|
||||
|
||||
let all_items = match self.display_list_building_result {
|
||||
DisplayListBuildingResult::None => Vec::new(),
|
||||
|
|
|
@ -1957,7 +1957,7 @@ impl Fragment {
|
|||
relative_containing_block_size.to_physical(relative_containing_block_mode);
|
||||
let border_box = self.border_box.to_physical(self.style.writing_mode, container_size);
|
||||
if coordinate_system == CoordinateSystem::Own && self.establishes_stacking_context() {
|
||||
return Rect(ZERO_POINT, border_box.size)
|
||||
return Rect::new(ZERO_POINT, border_box.size)
|
||||
}
|
||||
|
||||
// FIXME(pcwalton): This can double-count relative position sometimes for inlines (e.g.
|
||||
|
@ -1974,10 +1974,10 @@ impl Fragment {
|
|||
pub fn stacking_relative_content_box(&self, stacking_relative_border_box: &Rect<Au>)
|
||||
-> Rect<Au> {
|
||||
let border_padding = self.border_padding.to_physical(self.style.writing_mode);
|
||||
Rect(Point2D(stacking_relative_border_box.origin.x + border_padding.left,
|
||||
stacking_relative_border_box.origin.y + border_padding.top),
|
||||
Size2D(stacking_relative_border_box.size.width - border_padding.horizontal(),
|
||||
stacking_relative_border_box.size.height - border_padding.vertical()))
|
||||
Rect::new(Point2D::new(stacking_relative_border_box.origin.x + border_padding.left,
|
||||
stacking_relative_border_box.origin.y + border_padding.top),
|
||||
Size2D::new(stacking_relative_border_box.size.width - border_padding.horizontal(),
|
||||
stacking_relative_border_box.size.height - border_padding.vertical()))
|
||||
}
|
||||
|
||||
/// Returns true if this fragment establishes a new stacking context and false otherwise.
|
||||
|
@ -2033,7 +2033,7 @@ impl Fragment {
|
|||
|
||||
// Box shadows cause us to draw outside our border box.
|
||||
for box_shadow in self.style().get_effects().box_shadow.iter() {
|
||||
let offset = Point2D(box_shadow.offset_x, box_shadow.offset_y);
|
||||
let offset = Point2D::new(box_shadow.offset_x, box_shadow.offset_y);
|
||||
let inflation = box_shadow.spread_radius + box_shadow.blur_radius *
|
||||
BLUR_INFLATION_FACTOR;
|
||||
overflow = overflow.union(&border_box.translate(&offset).inflate(inflation, inflation))
|
||||
|
|
|
@ -1467,7 +1467,7 @@ impl Flow for InlineFlow {
|
|||
fn compute_absolute_position(&mut self, _: &LayoutContext) {
|
||||
// First, gather up the positions of all the containing blocks (if any).
|
||||
let mut containing_block_positions = Vec::new();
|
||||
let container_size = Size2D(self.base.block_container_inline_size, Au(0));
|
||||
let container_size = Size2D::new(self.base.block_container_inline_size, Au(0));
|
||||
for (fragment_index, fragment) in self.fragments.fragments.iter().enumerate() {
|
||||
if let SpecificFragmentInfo::InlineAbsolute(_) = fragment.specific {
|
||||
let containing_block_range =
|
||||
|
|
|
@ -28,7 +28,7 @@ use canvas_traits::CanvasMsg;
|
|||
use encoding::EncodingRef;
|
||||
use encoding::all::UTF_8;
|
||||
use fnv::FnvHasher;
|
||||
use geom::matrix;
|
||||
use geom::Matrix4;
|
||||
use geom::point::Point2D;
|
||||
use geom::rect::Rect;
|
||||
use geom::scale_factor::ScaleFactor;
|
||||
|
@ -295,7 +295,7 @@ impl LayoutTask {
|
|||
time_profiler_chan: time::ProfilerChan,
|
||||
mem_profiler_chan: mem::ProfilerChan)
|
||||
-> LayoutTask {
|
||||
let screen_size = Size2D(Au(0), Au(0));
|
||||
let screen_size = Size2D::new(Au(0), Au(0));
|
||||
let device = Device::new(
|
||||
MediaType::Screen,
|
||||
opts::get().initial_window_size.as_f32() * ScaleFactor::new(1.0));
|
||||
|
@ -867,13 +867,13 @@ impl LayoutTask {
|
|||
let paint_layer = Arc::new(PaintLayer::new(layout_root.layer_id(0),
|
||||
root_background_color,
|
||||
ScrollPolicy::Scrollable));
|
||||
let origin = Rect(Point2D(Au(0), Au(0)), root_size);
|
||||
let origin = Rect::new(Point2D::new(Au(0), Au(0)), root_size);
|
||||
|
||||
let stacking_context = Arc::new(StackingContext::new(display_list,
|
||||
&origin,
|
||||
&origin,
|
||||
0,
|
||||
&matrix::identity(),
|
||||
&Matrix4::identity(),
|
||||
filter::T::new(Vec::new()),
|
||||
mix_blend_mode::T::normal,
|
||||
Some(paint_layer)));
|
||||
|
@ -916,8 +916,8 @@ impl LayoutTask {
|
|||
|
||||
let initial_viewport = data.window_size.initial_viewport;
|
||||
let old_screen_size = rw_data.screen_size;
|
||||
let current_screen_size = Size2D(Au::from_f32_px(initial_viewport.width.get()),
|
||||
Au::from_f32_px(initial_viewport.height.get()));
|
||||
let current_screen_size = Size2D::new(Au::from_f32_px(initial_viewport.width.get()),
|
||||
Au::from_f32_px(initial_viewport.height.get()));
|
||||
rw_data.screen_size = current_screen_size;
|
||||
|
||||
// Handle conditions where the entire flow tree is invalid.
|
||||
|
@ -931,8 +931,8 @@ impl LayoutTask {
|
|||
debug!("Viewport constraints: {:?}", constraints);
|
||||
|
||||
// other rules are evaluated against the actual viewport
|
||||
rw_data.screen_size = Size2D(Au::from_f32_px(constraints.size.width.get()),
|
||||
Au::from_f32_px(constraints.size.height.get()));
|
||||
rw_data.screen_size = Size2D::new(Au::from_f32_px(constraints.size.width.get()),
|
||||
Au::from_f32_px(constraints.size.height.get()));
|
||||
let device = Device::new(MediaType::Screen, constraints.size);
|
||||
rw_data.stylist.set_device(device);
|
||||
|
||||
|
@ -1035,8 +1035,8 @@ impl LayoutTask {
|
|||
let mut must_regenerate_display_lists = false;
|
||||
let mut old_visible_rects = HashMap::with_hash_state(Default::default());
|
||||
let inflation_amount =
|
||||
Size2D(rw_data.screen_size.width * DISPLAY_PORT_THRESHOLD_SIZE_FACTOR,
|
||||
rw_data.screen_size.height * DISPLAY_PORT_THRESHOLD_SIZE_FACTOR);
|
||||
Size2D::new(rw_data.screen_size.width * DISPLAY_PORT_THRESHOLD_SIZE_FACTOR,
|
||||
rw_data.screen_size.height * DISPLAY_PORT_THRESHOLD_SIZE_FACTOR);
|
||||
for &(ref layer_id, ref new_visible_rect) in new_visible_rects.iter() {
|
||||
match rw_data.visible_rects.get(layer_id) {
|
||||
None => {
|
||||
|
@ -1251,7 +1251,7 @@ impl LayoutRPC for LayoutRPCImpl {
|
|||
|
||||
/// Requests the node containing the point of interest.
|
||||
fn hit_test(&self, _: TrustedNodeAddress, point: Point2D<f32>) -> Result<HitTestResponse, ()> {
|
||||
let point = Point2D(Au::from_f32_px(point.x), Au::from_f32_px(point.y));
|
||||
let point = Point2D::new(Au::from_f32_px(point.x), Au::from_f32_px(point.y));
|
||||
let resp = {
|
||||
let &LayoutRPCImpl(ref rw_data) = self;
|
||||
let rw_data = rw_data.lock().unwrap();
|
||||
|
@ -1278,7 +1278,7 @@ impl LayoutRPC for LayoutRPCImpl {
|
|||
fn mouse_over(&self, _: TrustedNodeAddress, point: Point2D<f32>)
|
||||
-> Result<MouseOverResponse, ()> {
|
||||
let mut mouse_over_list: Vec<DisplayItemMetadata> = vec!();
|
||||
let point = Point2D(Au::from_f32_px(point.x), Au::from_f32_px(point.y));
|
||||
let point = Point2D::new(Au::from_f32_px(point.x), Au::from_f32_px(point.y));
|
||||
{
|
||||
let &LayoutRPCImpl(ref rw_data) = self;
|
||||
let rw_data = rw_data.lock().unwrap();
|
||||
|
|
|
@ -324,14 +324,14 @@ impl CollapsedBordersForCell {
|
|||
|
||||
// FIXME(pcwalton): Get the real container size.
|
||||
let mut logical_bounds =
|
||||
LogicalRect::from_physical(writing_mode, *border_bounds, Size2D(Au(0), Au(0)));
|
||||
LogicalRect::from_physical(writing_mode, *border_bounds, Size2D::new(Au(0), Au(0)));
|
||||
logical_bounds.start.i = logical_bounds.start.i - inline_start_offset;
|
||||
logical_bounds.start.b = logical_bounds.start.b - block_start_offset;
|
||||
logical_bounds.size.inline = logical_bounds.size.inline + inline_start_offset +
|
||||
inline_end_offset;
|
||||
logical_bounds.size.block = logical_bounds.size.block + block_start_offset +
|
||||
block_end_offset;
|
||||
*border_bounds = logical_bounds.to_physical(writing_mode, Size2D(Au(0), Au(0)))
|
||||
*border_bounds = logical_bounds.to_physical(writing_mode, Size2D::new(Au(0), Au(0)))
|
||||
}
|
||||
|
||||
pub fn adjust_border_colors_and_styles_for_painting(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue