mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Replaced ZERO_POINT with Point2D::zero()
This commit is contained in:
parent
3995a7672d
commit
ee746e252c
7 changed files with 12 additions and 21 deletions
|
@ -58,7 +58,6 @@ use style::values::specified::{AngleOrCorner, HorizontalDirection, VerticalDirec
|
|||
use table_cell::CollapsedBordersForCell;
|
||||
use url::Url;
|
||||
use util::cursor::Cursor;
|
||||
use util::geometry::ZERO_POINT;
|
||||
use util::logical_geometry::{LogicalPoint, LogicalRect, LogicalSize, WritingMode};
|
||||
use util::opts;
|
||||
use util::range::Range;
|
||||
|
@ -1208,7 +1207,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
CoordinateSystem::Parent)
|
||||
}
|
||||
StackingContextCreationMode::InnerScrollWrapper => {
|
||||
Rect::new(ZERO_POINT, base_flow.overflow.size)
|
||||
Rect::new(Point2D::zero(), base_flow.overflow.size)
|
||||
}
|
||||
};
|
||||
let overflow = match mode {
|
||||
|
@ -1222,7 +1221,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
}
|
||||
StackingContextCreationMode::InnerScrollWrapper |
|
||||
StackingContextCreationMode::OuterScrollWrapper => {
|
||||
Rect::new(ZERO_POINT, border_box.size)
|
||||
Rect::new(Point2D::zero(), border_box.size)
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1498,7 +1497,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
(*clip).clone()),
|
||||
box_bounds: stacking_relative_box,
|
||||
color: color.to_gfx_color(),
|
||||
offset: ZERO_POINT,
|
||||
offset: Point2D::zero(),
|
||||
blur_radius: blur_radius,
|
||||
spread_radius: Au(0),
|
||||
border_radius: Au(0),
|
||||
|
|
|
@ -46,7 +46,6 @@ use text;
|
|||
use text::TextRunScanner;
|
||||
use url::Url;
|
||||
use util;
|
||||
use util::geometry::ZERO_POINT;
|
||||
use util::logical_geometry::{LogicalMargin, LogicalRect, LogicalSize, WritingMode};
|
||||
use util::range::*;
|
||||
use util::str::slice_chars;
|
||||
|
@ -2053,7 +2052,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::new(ZERO_POINT, border_box.size)
|
||||
return Rect::new(Point2D::zero(), border_box.size)
|
||||
}
|
||||
|
||||
// FIXME(pcwalton): This can double-count relative position sometimes for inlines (e.g.
|
||||
|
|
|
@ -29,7 +29,6 @@ use style::properties::longhands::{display, position};
|
|||
use style::properties::style_structs;
|
||||
use style::values::AuExtensionMethods;
|
||||
use util::cursor::Cursor;
|
||||
use util::geometry::ZERO_POINT;
|
||||
use util::logical_geometry::WritingMode;
|
||||
use wrapper::{LayoutNode, ThreadSafeLayoutNode};
|
||||
|
||||
|
@ -487,9 +486,9 @@ pub fn process_resolved_style_request<'ln, N: LayoutNode<'ln>>(
|
|||
flow::base(flow_ref.deref()).stacking_relative_position,
|
||||
// TODO(dzbarsky) search parents until we find node with a flow ref.
|
||||
// https://github.com/servo/servo/issues/8307
|
||||
_ => ZERO_POINT
|
||||
_ => Point2D::zero()
|
||||
}
|
||||
}).unwrap_or(ZERO_POINT);
|
||||
}).unwrap_or(Point2D::zero());
|
||||
let property = match *property {
|
||||
atom!("bottom") => PositionProperty::Bottom,
|
||||
atom!("top") => PositionProperty::Top,
|
||||
|
|
|
@ -17,7 +17,6 @@ use traversal::{AssignBSizesAndStoreOverflow, AssignISizes};
|
|||
use traversal::{BubbleISizes, ConstructFlows, RecalcStyleForNode};
|
||||
use traversal::{BuildDisplayList, ComputeAbsolutePositions};
|
||||
use traversal::{PostorderDomTraversal, PreorderDomTraversal};
|
||||
use util::geometry::ZERO_POINT;
|
||||
use util::opts;
|
||||
use wrapper::LayoutNode;
|
||||
|
||||
|
@ -151,5 +150,5 @@ pub fn iterate_through_flow_tree_fragment_border_boxes(root: &mut FlowRef,
|
|||
}
|
||||
}
|
||||
|
||||
doit(flow_ref::deref_mut(root), 0, iterator, &ZERO_POINT);
|
||||
doit(flow_ref::deref_mut(root), 0, iterator, &Point2D::zero());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue