Auto merge of #8796 - cheba:zero-point, r=SimonSapin

Replaced ZERO_POINT with Point2D::zero()

This is a proposed in servo/servo#8792 clean up.

Fixes #8792.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8796)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-12-04 11:09:59 +05:30
commit 2dbc314e2d
7 changed files with 12 additions and 21 deletions

View file

@ -35,7 +35,7 @@ use std::{f32, mem, ptr};
use style::computed_values::{border_style, filter, image_rendering, mix_blend_mode};
use text::TextRun;
use text::glyph::CharIndex;
use util::geometry::{self, MAX_RECT, PagePx, ScreenPx, ZERO_POINT};
use util::geometry::{self, MAX_RECT, PagePx, ScreenPx};
use util::opts;
use util::range::Range;
@ -1351,7 +1351,7 @@ impl<'a> PaintContext<'a> {
self.draw_target.set_transform(&draw_target_transform.mul(&Matrix2D::new(0., -1.,
1., 0.,
x, y)));
ZERO_POINT
Point2D::zero()
}
SidewaysRight => {
let x = text.baseline_origin.x.to_f32_px();
@ -1359,7 +1359,7 @@ impl<'a> PaintContext<'a> {
self.draw_target.set_transform(&draw_target_transform.mul(&Matrix2D::new(0., 1.,
-1., 0.,
x, y)));
ZERO_POINT
Point2D::zero()
}
};

View file

@ -34,7 +34,7 @@ use std::mem as std_mem;
use std::sync::Arc;
use std::sync::mpsc::{Receiver, Select, Sender, channel};
use url::Url;
use util::geometry::{ExpandToPixelBoundaries, ZERO_POINT};
use util::geometry::{ExpandToPixelBoundaries};
use util::opts;
use util::task;
use util::task_state;
@ -454,7 +454,7 @@ impl<C> PaintTask<C> where C: PaintListener + Send + 'static {
let mut properties = Vec::new();
build_from_paint_layer(&mut properties,
root_paint_layer,
&ZERO_POINT,
&Point2D::zero(),
&Matrix4::identity(),
&Matrix4::identity(),
None);