mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #16795 - mrobinson:out-of-viewport-transform, r=glennw
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. <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #13822 (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16795) <!-- Reviewable:end -->
This commit is contained in:
commit
fada0eb660
4 changed files with 81 additions and 0 deletions
|
@ -2236,6 +2236,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()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue