mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Rustfmt has changed its default style :/
This commit is contained in:
parent
82fc6d9f49
commit
be69f9c3e6
207 changed files with 1200 additions and 1339 deletions
|
@ -513,29 +513,28 @@ impl ClippingRegion {
|
|||
/// This is a quick, not a precise, test; it can yield false positives.
|
||||
#[inline]
|
||||
pub fn might_intersect_point(&self, point: &LayoutPoint) -> bool {
|
||||
self.main.contains(point) && self
|
||||
.complex
|
||||
.iter()
|
||||
.all(|complex| complex.rect.contains(point))
|
||||
self.main.contains(point) &&
|
||||
self.complex
|
||||
.iter()
|
||||
.all(|complex| complex.rect.contains(point))
|
||||
}
|
||||
|
||||
/// Returns true if this clipping region might intersect the given rectangle and false
|
||||
/// otherwise. This is a quick, not a precise, test; it can yield false positives.
|
||||
#[inline]
|
||||
pub fn might_intersect_rect(&self, rect: &LayoutRect) -> bool {
|
||||
self.main.intersects(rect) && self
|
||||
.complex
|
||||
.iter()
|
||||
.all(|complex| complex.rect.intersects(rect))
|
||||
self.main.intersects(rect) &&
|
||||
self.complex
|
||||
.iter()
|
||||
.all(|complex| complex.rect.intersects(rect))
|
||||
}
|
||||
|
||||
/// Returns true if this clipping region completely surrounds the given rect.
|
||||
#[inline]
|
||||
pub fn does_not_clip_rect(&self, rect: &LayoutRect) -> bool {
|
||||
self.main.contains(&rect.origin) && self.main.contains(&rect.bottom_right()) && self
|
||||
.complex
|
||||
.iter()
|
||||
.all(|complex| {
|
||||
self.main.contains(&rect.origin) &&
|
||||
self.main.contains(&rect.bottom_right()) &&
|
||||
self.complex.iter().all(|complex| {
|
||||
complex.rect.contains(&rect.origin) && complex.rect.contains(&rect.bottom_right())
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue