Don't optimize display list for projective transforms

There are situations where elements are transformed from outside the
display list. With projective transforms it's currently difficult to
detect these. In those cases we just don't optimize the display list,
so that they will always be shown.

Fixes #13822.
This commit is contained in:
Martin Robinson 2017-05-10 14:20:25 +02:00
parent 0040160b38
commit 3236611aba
4 changed files with 81 additions and 0 deletions

View file

@ -2222,6 +2222,14 @@ impl BlockFlowDisplayListBuilding for BlockFlow {
}
match transform {
Some(transform) if transform.m13 != 0.0 || transform.m23 != 0.0 => {
// We cannot properly handle perspective transforms, because there may be a
// situation where an element is transformed from outside the clip into the
// clip region. Here we don't have enough information to detect when that is
// happening. For the moment we just punt on trying to optimize the display
// list for those cases.
max_rect()
}
Some(transform) => {
let clip = Rect::new(Point2D::new((clip.origin.x - origin.x).to_f32_px(),
(clip.origin.y - origin.y).to_f32_px()),