mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Remove usage of the deprecated std::num::Zero trait.
This commit is contained in:
parent
32c721e640
commit
084a63df45
10 changed files with 42 additions and 51 deletions
|
@ -53,7 +53,6 @@ use servo_util::geometry::Au;
|
|||
use servo_util::logical_geometry::WritingMode;
|
||||
use servo_util::logical_geometry::{LogicalRect, LogicalSize};
|
||||
use std::mem;
|
||||
use std::num::Zero;
|
||||
use std::fmt;
|
||||
use std::iter::Zip;
|
||||
use std::raw;
|
||||
|
@ -686,7 +685,7 @@ impl AbsolutePositionInfo {
|
|||
// of the root layer.
|
||||
AbsolutePositionInfo {
|
||||
relative_containing_block_size: LogicalSize::zero(writing_mode),
|
||||
stacking_relative_position_of_absolute_containing_block: Zero::zero(),
|
||||
stacking_relative_position_of_absolute_containing_block: Point2D::zero(),
|
||||
layers_needed_for_positioned_flows: false,
|
||||
}
|
||||
}
|
||||
|
@ -902,7 +901,7 @@ impl BaseFlow {
|
|||
parallel: FlowParallelInfo::new(),
|
||||
floats: Floats::new(writing_mode),
|
||||
collapsible_margins: CollapsibleMargins::new(),
|
||||
stacking_relative_position: Zero::zero(),
|
||||
stacking_relative_position: Point2D::zero(),
|
||||
abs_descendants: Descendants::new(),
|
||||
absolute_static_i_offset: Au(0),
|
||||
fixed_static_i_offset: Au(0),
|
||||
|
@ -911,7 +910,7 @@ impl BaseFlow {
|
|||
absolute_cb: ContainingBlockLink::new(),
|
||||
display_list_building_result: DisplayListBuildingResult::None,
|
||||
absolute_position_info: AbsolutePositionInfo::new(writing_mode),
|
||||
clip_rect: Rect(Zero::zero(), Size2D(Au(0), Au(0))),
|
||||
clip_rect: Rect(Point2D::zero(), Size2D::zero()),
|
||||
flags: flags,
|
||||
writing_mode: writing_mode,
|
||||
}
|
||||
|
|
|
@ -33,7 +33,6 @@ use servo_util::arc_ptr_eq;
|
|||
use std::cmp::max;
|
||||
use std::fmt;
|
||||
use std::mem;
|
||||
use std::num;
|
||||
use std::u16;
|
||||
use style::computed_values::{text_align, vertical_align, white_space};
|
||||
use style::ComputedValues;
|
||||
|
@ -211,7 +210,7 @@ impl LineBreaker {
|
|||
|
||||
/// Reinitializes the pending line to blank data.
|
||||
fn reset_line(&mut self) {
|
||||
self.pending_line.range.reset(num::zero(), num::zero());
|
||||
self.pending_line.range.reset(FragmentIndex(0), FragmentIndex(0));
|
||||
self.pending_line.bounds = LogicalRect::new(self.floats.writing_mode,
|
||||
Au(0),
|
||||
self.cur_b,
|
||||
|
@ -632,7 +631,7 @@ impl LineBreaker {
|
|||
if self.pending_line_is_empty() {
|
||||
assert!(self.new_fragments.len() <= (u16::MAX as uint));
|
||||
self.pending_line.range.reset(FragmentIndex(self.new_fragments.len() as int),
|
||||
num::zero());
|
||||
FragmentIndex(0));
|
||||
}
|
||||
|
||||
self.pending_line.range.extend_by(FragmentIndex(1));
|
||||
|
@ -655,7 +654,7 @@ impl LineBreaker {
|
|||
|
||||
/// Returns true if the pending line is empty and false otherwise.
|
||||
fn pending_line_is_empty(&self) -> bool {
|
||||
self.pending_line.range.length() == num::zero()
|
||||
self.pending_line.range.length() == FragmentIndex(0)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue