-
Notifications
You must be signed in to change notification settings - Fork 6k
Fix #77084: flutter website doesn't resize properly when zoomed in/ou… #33695
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
|
Is there a way to test this? |
Create a sample flutter app, run it in web, then zoom out or in several times and you will see the broken behavior |
|
Sorry, what I meant is we should add a unit-test for it. Check out how this test tweaks device-pixel ratio to test some of the functionality. In fact, maybe this can be tested as part of that test by adding the necessary conditions and/or checks. |
…t and resizing window on desktop -_translateCanvas() isn't called after zooming in browser
yjbanov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
|
Validations Fail. |
ditman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks sensible (and familiar! hadn't we landed a fix like this earlier?)
Yes, but we forgot to call _translateCanvas in one location |
|
|
Thanks so much @yjbanov for adding the unit test coverage |
…en zoomed in/ou… (flutter/engine#33695)
|
Hi, |
I believe this engine fix was released as part of Flutter 3.7 already. If you are having an issue with browser zoom it's likely a different/new one. For me browser zoom works fine (for example, in the Flutter gallery). Exception being that since 3.10 you can no longer zoom with Ctrl+mousewheel (that's issue #129933). |
I'm using "HTML" rendering not "canvaskit", Canvaskit is working well. Why "HTML" rendering - browser zooming is not working well? |
|
I'm using "HTML" rendering not "canvaskit", Canvaskit is working well. Why "HTML" rendering - browser zooming is not working well? |

This is a continuation of issue #77084 as the fix done there is only a partial fix.
A comment by @HeinrichJanzing said:
This ticket aims to fix this issue.
Fixes flutter/flutter#77084
If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.
Pre-launch Checklist
writing and running engine tests.
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.