Bug 203613 - The image is flashing if falls out and has an animation transform: rotate
Summary: The image is flashing if falls out and has an animation transform: rotate
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Compositing (show other bugs)
Version: Safari 13
Hardware: Macintosh macOS 10.15
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-10-30 09:39 PDT by Roman Kosov
Modified: 2019-11-15 08:59 PST (History)
7 users (show)

See Also:


Attachments
image with animation transform: rotate = flashing (16.29 MB, video/quicktime)
2019-10-30 09:39 PDT, Roman Kosov
no flags Details
Reduced test case (1.10 KB, text/html)
2019-11-13 17:33 PST, Simon Fraser (smfr)
no flags Details
Patch (8.63 KB, patch)
2019-11-14 14:55 PST, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Kosov 2019-10-30 09:39:41 PDT
Created attachment 382324 [details]
image with animation transform: rotate = flashing

The image is flashing if falls out and has an animation transform: rotate.

Preview: https://codepen.io/romankosov/full/GRRMPJJ
Code: https://codepen.io/romankosov/pen/GRRMPJJ

MacOS X: 10.15.1 Beta (19B86a)
Safri: Version 13.0.3 (15608.3.10.1.4)
Comment 1 Said Abou-Hallawa 2019-10-30 10:01:11 PDT
The flashing happens only when resizing the window or scrolling the page horizontally such that the image is partially visible. And it is not because of image decoding.
Comment 2 Radar WebKit Bug Importer 2019-10-30 10:01:25 PDT
<rdar://problem/56748028>
Comment 3 Simon Fraser (smfr) 2019-10-30 11:56:14 PDT
This is about backing store detachment.
Comment 4 Simon Fraser (smfr) 2019-11-13 17:33:48 PST
Created attachment 383525 [details]
Reduced test case
Comment 5 Simon Fraser (smfr) 2019-11-13 18:33:21 PST
This code is wrong:
    if (auto extent = animationExtent()) {
        // Adjust the animation extent to match the current animation position.
        bounds = rects.animatingTransform.inverse().valueOr(TransformationMatrix()).mapRect(*extent);
    }
Comment 6 Simon Fraser (smfr) 2019-11-13 18:35:04 PST
Antti added this code in r218735
Comment 7 Simon Fraser (smfr) 2019-11-13 18:39:55 PST
I don't think we need to map "extent" through the inverses of the current transform, because "extent" was computed as the union of all the possible bounds that result from the animation.
Comment 8 Simon Fraser (smfr) 2019-11-14 14:55:48 PST
Created attachment 383574 [details]
Patch
Comment 9 WebKit Commit Bot 2019-11-15 08:59:05 PST
Comment on attachment 383574 [details]
Patch

Clearing flags on attachment: 383574

Committed r252486: <https://trac.webkit.org/changeset/252486>
Comment 10 WebKit Commit Bot 2019-11-15 08:59:07 PST
All reviewed patches have been landed.  Closing bug.