mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Accumulate and invert stacking context transform for hit tests.
This makes hit tests work on stacking contexts with transforms. Ref #6643.
This commit is contained in:
parent
e0bd80f807
commit
ddef25030b
4 changed files with 68 additions and 67 deletions
|
@ -544,8 +544,9 @@ impl StackingContext {
|
|||
point = point - self.bounds.origin;
|
||||
|
||||
debug_assert!(!topmost_only || result.is_empty());
|
||||
let frac_point = self.transform.transform_point(&Point2D::new(point.x.to_f32_px(),
|
||||
point.y.to_f32_px()));
|
||||
let inv_transform = self.transform.invert();
|
||||
let frac_point = inv_transform.transform_point(&Point2D::new(point.x.to_f32_px(),
|
||||
point.y.to_f32_px()));
|
||||
point = Point2D::new(Au::from_f32_px(frac_point.x), Au::from_f32_px(frac_point.y));
|
||||
|
||||
// Iterate through display items in reverse stacking order. Steps here refer to the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue