| Summary: | REGRESSION (r276370): Elements with animated transform property might not properly rendered | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Roland Soos <roland> | ||||||||
| Component: | Layout and Rendering | Assignee: | Simon Fraser (smfr) <simon.fraser> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | bfulgham, changseok, dino, esprehn+autocc, ews-watchlist, glenn, graouts, graouts, kondapallykalyan, mmaxfield, pdr, rbuis, simon.fraser, webkit-bug-importer, zalan | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | Other | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Roland Soos
2021-09-24 09:02:27 PDT
I can reproduce on macOS too. Bistected to https://trac.webkit.org/changeset/276370/webkit The problem is related to the fact that we are animating the .n2-ss-slider-pipeline element's transform-> translate() value. When we switch it to translate3d() there is no problem during the animation. I will fix this on our main site, but as a reference, I made a static page which produce the error: https://smartslider3.com/bugs/webkit/animatedtransform/ This reproduces in MiniBrowser if you use the Safari user agent. Seems like the content is UA-sniffing. Created attachment 441314 [details]
Reduced testcase
The problem occurs at the computation of the outlineBoundsForRepaint in RenderLayer::computeRepaintRects() using the geometry map. The logic in https://trac.webkit.org/changeset/276370/webkit is wrong. In this content, the element has transform and preserves-3d, so: if (current->hasTransformRelatedProperty() && !current->style().preserves3D()) return false; does not return, so it incorrectly uses the geometry map when there is a transform. Created attachment 441329 [details]
Patch
Comment on attachment 441329 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=441329&action=review > Source/WebCore/rendering/RenderGeometryMap.cpp:153 > + if (current->hasTransformRelatedProperty() && (style.hasTransform() || style.translate() || style.scale() || style.rotate() || style.hasPerspective())) Surely there’s a more direct way of representing this condition? Committed r284247 (243056@main): <https://commits.webkit.org/243056@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 441329 [details]. |