Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@yjbanov
Copy link
Contributor

@yjbanov yjbanov commented Aug 6, 2020

Description

Apply transform-origin: 0 0 0 to the clipping element. Otherwise, we get wrong transform on the clipped content.

Related Issues

Fixes flutter/flutter#61691

Tests

I added the following tests:

Added a new test in canvas_draw_image_golden_test.dart, which reproduces this issue.
This change requires a new golden: flutter/goldens#103

@yjbanov yjbanov changed the title fixed clipped and transformed content in HTML clip fix clipped and transformed content in HTML clip Aug 6, 2020
@auto-assign auto-assign bot requested a review from jason-simmons August 6, 2020 20:52
@yjbanov yjbanov requested a review from ferhatb August 6, 2020 21:05
Future<void> _checkScreenshot(RecordingCanvas rc, String fileName,
{Rect region = const Rect.fromLTWH(0, 0, 500, 500),
double maxDiffRatePercent = 0.0}) async {
double maxDiffRatePercent = 0.0, bool write = false}) async {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove write:false

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's been useful the last few times I added new screenshot tests, but I can remove it if adds noise.

html.document.body.append(sceneElement);
await matchGoldenFile('$fileName.png',
region: region, maxDiffRatePercent: maxDiffRatePercent);
region: region, maxDiffRatePercent: maxDiffRatePercent, write: write);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@yjbanov yjbanov merged commit 0809f21 into flutter:master Aug 7, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 8, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 8, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"child" and "decoration" image animation have different behaviour on web

3 participants