Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[web] No implicit view in multi-view mode #48505

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

mdebbar
Copy link
Contributor

@mdebbar mdebbar commented Nov 29, 2023

  • No implicit view in mult-view mode.
  • window.devicePixelRatio => EngineFlutterDisplay.instance.devicePixelRatio.
  • window.physicalSize => view.physicalSize.
  • Remove LayerTree.frameSize.
  • defaultRouteName is set to / when there's no implicit view.
  • All routing operations are noops in multi-view mode.

With these changes, I was able to run all examples in https://github.com/goderbauer/mvp without an implicit view.

@flutter-dashboard
Copy link

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 or stuartmorgan on the #hackers channel in Chat (don't just cc them here, they won't see it! Use 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.

Copy link
Contributor

@harryterkelsen harryterkelsen left a comment

Choose a reason for hiding this comment

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

Woohoo! LGTM

Copy link
Member

@ditman ditman left a comment

Choose a reason for hiding this comment

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

Ship it! Great change! Bye bye implicitView!

@@ -7,9 +7,10 @@ import 'package:ui/ui.dart' as ui;

/// A class that can rasterize [LayerTree]s into a given `sceneHost` element.
class Rasterizer {
Rasterizer(this.sceneHost);
Rasterizer(this.view);
Copy link
Member

Choose a reason for hiding this comment

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

Ahhh yes, I thought of making this change. Good call!

Comment on lines +221 to +224
if (!configuration.multiViewEnabled) {
ensureImplicitViewInitialized(hostElement: configuration.hostElement);
ensureFlutterViewEmbedderInitialized();
}
Copy link
Member

Choose a reason for hiding this comment

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

Let's goooo!

Comment on lines +504 to +505
// TODO(mdebbar): What should we do in multi-view mode?
// https://github.com/flutter/flutter/issues/139174
Copy link
Member

Choose a reason for hiding this comment

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

Should we CC a-wallen in the issue? I think both your comment and the one above are talking about the multi-window support.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

cc @a-wallen :)

@mdebbar mdebbar added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 29, 2023
@auto-submit auto-submit bot merged commit 0a8b615 into flutter:main Nov 29, 2023
26 checks passed
@ditman
Copy link
Member

ditman commented Nov 29, 2023

(Tests are coming next)

@mdebbar mdebbar deleted the no_implicit_view branch November 29, 2023 22:22
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 1, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 1, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 1, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Dec 1, 2023
…139342)

flutter/engine@74d2df5...c26e6ce

2023-12-01 [email protected] Roll a new version of googletest (2021->2023). (flutter/engine#48285)
2023-12-01 [email protected] [canvaskit] Add ImageFilter.compose (flutter/engine#48546)
2023-12-01 [email protected] Avoid reloading the kernel snapshot when spawning an isolate in the same group (flutter/engine#48478)
2023-12-01 [email protected] [Android] Check for text to paste before trying to retrieve data from URI (flutter/engine#48166)
2023-11-30 [email protected] Roll Skia from 88a1bcb9e43e to 0a90c366ff87 (3 revisions) (flutter/engine#48549)
2023-11-30 [email protected] Manual roll Dart SDK to 3.3.0-174.2.beta (4 revisions) (flutter/engine#48538)
2023-11-30 [email protected] Roll Skia from db3399a541f3 to 88a1bcb9e43e (1 revision) (flutter/engine#48545)
2023-11-30 [email protected] [Windows] Begin decoupling text input plugin from the view (flutter/engine#47833)
2023-11-30 [email protected] Roll Skia from 2d236de89898 to db3399a541f3 (3 revisions) (flutter/engine#48543)
2023-11-30 [email protected] [Impeller] Add direct tesselation of circles for DrawCircle and Round end caps (flutter/engine#48103)
2023-11-30 [email protected] [canvaskit] Revert to `drawImage` rendering on Chrome 110 or earlier (flutter/engine#48515)
2023-11-30 [email protected] Roll Skia from 6b4bdebaab88 to 2d236de89898 (1 revision) (flutter/engine#48537)
2023-11-30 [email protected] [Impeller] Started expanding the blur clip region (flutter/engine#48535)
2023-11-30 [email protected] Roll Skia from 0e479728cc1f to 6b4bdebaab88 (1 revision) (flutter/engine#48536)
2023-11-30 [email protected] Roll Skia from 0968fe18ff75 to 0e479728cc1f (1 revision) (flutter/engine#48534)
2023-11-30 [email protected] Use Chromium mirror for archive dependency (flutter/engine#48509)
2023-11-30 [email protected] Roll Skia from 2f01d500a352 to 0968fe18ff75 (2 revisions) (flutter/engine#48531)
2023-11-30 [email protected] Roll Skia from 11a15444a3aa to 2f01d500a352 (1 revision) (flutter/engine#48524)
2023-11-30 [email protected] Roll Skia from 84fdd36b1eea to 11a15444a3aa (1 revision) (flutter/engine#48523)
2023-11-30 [email protected] [Android] Add support for the PlatformChannel  "Share.invoke" command (flutter/engine#48265)
2023-11-30 [email protected] Roll Skia from 5d64b1322879 to 84fdd36b1eea (1 revision) (flutter/engine#48521)
2023-11-30 [email protected] Roll Skia from 23721750e433 to 5d64b1322879 (1 revision) (flutter/engine#48520)
2023-11-30 [email protected] Roll Fuchsia Linux SDK from 8wu5EgBh1yJPNOd5W... to Bb2k375udWIltCEAx... (flutter/engine#48519)
2023-11-30 [email protected] Roll Skia from 5a635f2211ce to 23721750e433 (1 revision) (flutter/engine#48514)
2023-11-29 [email protected] Roll Skia from 928e8950e8e3 to 5a635f2211ce (1 revision) (flutter/engine#48511)
2023-11-29 [email protected] [web] No implicit view in multi-view mode (flutter/engine#48505)

Also rolling transitive DEPS:
  fuchsia/sdk/core/linux-amd64 from 8wu5EgBh1yJP to Bb2k375udWIl

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 [email protected],[email protected],[email protected] 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
@wanjm
Copy link

wanjm commented Dec 5, 2023

  • No implicit view in mult-view mode.
  • window.devicePixelRatio => EngineFlutterDisplay.instance.devicePixelRatio.
  • window.physicalSize => view.physicalSize.
  • Remove LayerTree.frameSize.
  • defaultRouteName is set to / when there's no implicit view.
  • All routing operations are noops in multi-view mode.

With these changes, I was able to run all examples in https://github.com/goderbauer/mvp without an implicit view.

widget_counter.dart is not clickable, is it the current status?
raw_dynamic.dart and raw_static.dart displays nothing, is there anything wrong with me?

caseycrogers pushed a commit to caseycrogers/flutter that referenced this pull request Dec 29, 2023
…lutter#139342)

flutter/engine@74d2df5...c26e6ce

2023-12-01 [email protected] Roll a new version of googletest (2021->2023). (flutter/engine#48285)
2023-12-01 [email protected] [canvaskit] Add ImageFilter.compose (flutter/engine#48546)
2023-12-01 [email protected] Avoid reloading the kernel snapshot when spawning an isolate in the same group (flutter/engine#48478)
2023-12-01 [email protected] [Android] Check for text to paste before trying to retrieve data from URI (flutter/engine#48166)
2023-11-30 [email protected] Roll Skia from 88a1bcb9e43e to 0a90c366ff87 (3 revisions) (flutter/engine#48549)
2023-11-30 [email protected] Manual roll Dart SDK to 3.3.0-174.2.beta (4 revisions) (flutter/engine#48538)
2023-11-30 [email protected] Roll Skia from db3399a541f3 to 88a1bcb9e43e (1 revision) (flutter/engine#48545)
2023-11-30 [email protected] [Windows] Begin decoupling text input plugin from the view (flutter/engine#47833)
2023-11-30 [email protected] Roll Skia from 2d236de89898 to db3399a541f3 (3 revisions) (flutter/engine#48543)
2023-11-30 [email protected] [Impeller] Add direct tesselation of circles for DrawCircle and Round end caps (flutter/engine#48103)
2023-11-30 [email protected] [canvaskit] Revert to `drawImage` rendering on Chrome 110 or earlier (flutter/engine#48515)
2023-11-30 [email protected] Roll Skia from 6b4bdebaab88 to 2d236de89898 (1 revision) (flutter/engine#48537)
2023-11-30 [email protected] [Impeller] Started expanding the blur clip region (flutter/engine#48535)
2023-11-30 [email protected] Roll Skia from 0e479728cc1f to 6b4bdebaab88 (1 revision) (flutter/engine#48536)
2023-11-30 [email protected] Roll Skia from 0968fe18ff75 to 0e479728cc1f (1 revision) (flutter/engine#48534)
2023-11-30 [email protected] Use Chromium mirror for archive dependency (flutter/engine#48509)
2023-11-30 [email protected] Roll Skia from 2f01d500a352 to 0968fe18ff75 (2 revisions) (flutter/engine#48531)
2023-11-30 [email protected] Roll Skia from 11a15444a3aa to 2f01d500a352 (1 revision) (flutter/engine#48524)
2023-11-30 [email protected] Roll Skia from 84fdd36b1eea to 11a15444a3aa (1 revision) (flutter/engine#48523)
2023-11-30 [email protected] [Android] Add support for the PlatformChannel  "Share.invoke" command (flutter/engine#48265)
2023-11-30 [email protected] Roll Skia from 5d64b1322879 to 84fdd36b1eea (1 revision) (flutter/engine#48521)
2023-11-30 [email protected] Roll Skia from 23721750e433 to 5d64b1322879 (1 revision) (flutter/engine#48520)
2023-11-30 [email protected] Roll Fuchsia Linux SDK from 8wu5EgBh1yJPNOd5W... to Bb2k375udWIltCEAx... (flutter/engine#48519)
2023-11-30 [email protected] Roll Skia from 5a635f2211ce to 23721750e433 (1 revision) (flutter/engine#48514)
2023-11-29 [email protected] Roll Skia from 928e8950e8e3 to 5a635f2211ce (1 revision) (flutter/engine#48511)
2023-11-29 [email protected] [web] No implicit view in multi-view mode (flutter/engine#48505)

Also rolling transitive DEPS:
  fuchsia/sdk/core/linux-amd64 from 8wu5EgBh1yJP to Bb2k375udWIl

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 [email protected],[email protected],[email protected] 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
auto-submit bot pushed a commit that referenced this pull request Jan 22, 2024
- Follow up tests for #48505
    - Tests for navigation without an implicit view should work.
- Package [this workaround](https://github.com/flutter/engine/blob/cd1a3b45d21e27b27ae711c561fb5a5f2679074f/lib/web_ui/test/engine/semantics/semantics_multi_view_test.dart#L29-L30) behind a nice, future-proof API.
- Tests by default start with no implicit view.
    - Tests that need an implicit view have to explicitly indicate so (by using the `withImplicitView` param).

Fixes flutter/flutter#138906
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.

4 participants