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

Reland "[web] Fix Scene clip bounds. Trigger resize on DPR Change." #50457

Merged
merged 2 commits into from
Feb 8, 2024

Conversation

ditman
Copy link
Member

@ditman ditman commented Feb 8, 2024

Changes

  1. Reverts commit 9938df6, to re-land:
  2. Adds a fix to the way the HTML Scene computes its bounds that should be compatible with the current imlementation of Flutter's Golden tests.

Issues

Testing

Goldens

Verified locally that all the golden tests that caused this to roll back looked acceptable:

Test app

Next steps

During the investigation of this rollback, we found some opportunities to improve our web tests in the repo. Tracking issue:

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@ditman ditman requested review from yjbanov and mdebbar February 8, 2024 01:02
@github-actions github-actions bot added the platform-web Code specifically for the web engine label Feb 8, 2024
Copy link
Contributor

@yjbanov yjbanov left a comment

Choose a reason for hiding this comment

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

lgtm

// Must be the true DPR from the browser, nothing overridable.
// See: https://github.com/flutter/flutter/issues/143124
final double browserDpr = EngineFlutterDisplay.instance.browserDevicePixelRatio;
// The scene clip is the size of the entire window **in Logical pixels**.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: why capital "L"?

@ditman ditman added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 8, 2024
@ditman
Copy link
Member Author

ditman commented Feb 8, 2024

Trying again, see if this time this one sticks!

@auto-submit auto-submit bot merged commit 7b579dc into flutter:main Feb 8, 2024
@ditman ditman deleted the reland-web-fix-html-cull branch February 8, 2024 23:36
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 9, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Feb 9, 2024
…143195)

flutter/engine@95feed1...7b579dc

2024-02-08 ditman@gmail.com Reland "[web] Fix Scene clip bounds. Trigger resize on DPR Change." (flutter/engine#50457)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC chinmaygarde@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
autosubmit Merge PR when tree becomes green via auto submit App platform-web Code specifically for the web engine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Flutter Web] Widgets not resizing (disappear) with browser zoom in / out
2 participants