mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
ComputedDistance for IntermediateTextShadow.
This commit is contained in:
parent
46e567e688
commit
0ec5a64a71
1 changed files with 4 additions and 4 deletions
|
@ -2660,7 +2660,7 @@ impl ComputeDistance for ClipRect {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ComputeDistance for TextShadow {
|
impl ComputeDistance for IntermediateTextShadow {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn compute_distance(&self, other: &Self) -> Result<f64, ()> {
|
fn compute_distance(&self, other: &Self) -> Result<f64, ()> {
|
||||||
self.compute_squared_distance(other).map(|sd| sd.sqrt())
|
self.compute_squared_distance(other).map(|sd| sd.sqrt())
|
||||||
|
@ -2676,7 +2676,7 @@ impl ComputeDistance for TextShadow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ComputeDistance for TextShadowList {
|
impl ComputeDistance for IntermediateTextShadowList {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn compute_distance(&self, other: &Self) -> Result<f64, ()> {
|
fn compute_distance(&self, other: &Self) -> Result<f64, ()> {
|
||||||
self.compute_squared_distance(other).map(|sd| sd.sqrt())
|
self.compute_squared_distance(other).map(|sd| sd.sqrt())
|
||||||
|
@ -2684,11 +2684,11 @@ impl ComputeDistance for TextShadowList {
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn compute_squared_distance(&self, other: &Self) -> Result<f64, ()> {
|
fn compute_squared_distance(&self, other: &Self) -> Result<f64, ()> {
|
||||||
let zero = TextShadow {
|
let zero = IntermediateTextShadow {
|
||||||
offset_x: Au(0),
|
offset_x: Au(0),
|
||||||
offset_y: Au(0),
|
offset_y: Au(0),
|
||||||
blur_radius: Au(0),
|
blur_radius: Au(0),
|
||||||
color: CSSParserColor::RGBA(RGBA::transparent()),
|
color: IntermediateColor::IntermediateRGBA(IntermediateRGBA::transparent()),
|
||||||
};
|
};
|
||||||
|
|
||||||
let max_len = cmp::max(self.0.len(), other.0.len());
|
let max_len = cmp::max(self.0.len(), other.0.len());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue