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] Move text editing nodes outside of shadowDOM - reopened #40904

Merged
merged 32 commits into from Apr 5, 2023

Conversation

htoor3
Copy link
Contributor

@htoor3 htoor3 commented Apr 4, 2023

Password input autofill + suggest password functionality is broken for password inputs inside of a shadowDOM on chrome. This experiment is testing to see if we can lift text editing nodes outside of the shadowDOM while maintaining functionality.

  1. Create a new host node outside of the shadowDOM for text-editing + accessibility
  2. Attach all text editing nodes, accessibility placeholders, and semantics tree into that node
  3. Ensure text editing + accessibility global styles are applied to new host node

Tree goes from:

                flt-glass-pane
                      |
                 #shadow-root
                      |
                 text nodes

to:

                            flutter-view
           -----------------------------------------------
           /                        |                  \
  flt-glass-pane             text-editing-host   semantics-host
          /  \                      |                  |
#shadow-root platform views     text nodes       semantics nodes

…ove platform views under glass pane, fix tests and naming
@flutter-dashboard flutter-dashboard bot added the platform-web Code specifically for the web engine label Apr 4, 2023
@htoor3 htoor3 changed the title Pass autofill reopen [web] Move text editing nodes outside of shadowDOM - reopened Apr 4, 2023
@htoor3 htoor3 marked this pull request as ready for review April 4, 2023 16:56
@@ -62,7 +63,10 @@ class FlutterViewEmbedder {
/// Abstracts all the DOM manipulations required to embed a Flutter app in an user-supplied `hostElement`.
final EmbeddingStrategy _embeddingStrategy;

// The tag name for the root view of the flutter app (glass-pane)
// The tag name for the Flutter View, which hosts the app.
static const String flutterViewTagName = 'flutter-view';
Copy link
Member

Choose a reason for hiding this comment

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

@yjbanov can this be flt-view? Custom elements work off the tag name, and I wouldn't want to have collisions if we ever implement custom element stuff.

@flutter-dashboard
Copy link

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

Changes reported for pull request #40904 at sha 0ab230a

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.

I've tested this with my latest experiment app, and it seems to be working well.

Have you checked the tests in other repos so this can land @htoor3?

@htoor3
Copy link
Contributor Author

htoor3 commented Apr 4, 2023

I've tested this with my latest experiment app, and it seems to be working well.

Have you checked the tests in other repos so this can land @htoor3?

Yes, the /packages integration tests are passing.

There is a framework test that will need a fix: flutter/flutter#124160

And it looks like there are some internal g3 tests that will likely be affected that I'll need to fix.

@htoor3 htoor3 added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 5, 2023
@auto-submit auto-submit bot merged commit 74d7933 into flutter:main Apr 5, 2023
34 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 6, 2023
htoor3 added a commit that referenced this pull request Apr 6, 2023
@jonahwilliams
Copy link
Member

I'm still seeing failing tests on an engine roll that contains this change: https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8784608634967978705/+/u/run_test.dart_for_web_long_running_tests_shard_and_subshard_5_5/test_stdout

Is this expected?

@zanderso
Copy link
Member

zanderso commented Apr 6, 2023

Revert landed here: #40960

engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 6, 2023
zanderso pushed a commit to flutter/flutter that referenced this pull request Apr 6, 2023
…ions) (#124300)

Manual roll requested by zra@google.com

flutter/engine@610cdf0...1ec74c6

2023-04-06 110993981+htoor3@users.noreply.github.com Revert "[web] Move
text editing nodes outside of shadowDOM - reopened"
(flutter/engine#40960)
2023-04-05 110993981+htoor3@users.noreply.github.com [web] Move text
editing nodes outside of shadowDOM - reopened (flutter/engine#40904)
2023-04-05 30870216+gaaclarke@users.noreply.github.com [Impeller]
adjusted the rotated text test to have an opaque background and account
for screen scale (flutter/engine#40954)
2023-04-05 jacksongardner@google.com Copy canvaskit files directly into
`flutter_web_sdk` (flutter/engine#40951)

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 jonahwilliams@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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
@ditman
Copy link
Member

ditman commented Apr 6, 2023

We hadn't seen the failures on test_driver/text_editing_integration.dart in an earlier attempt to land this. @htoor3 has a fix for that test so this can be relanded.

@htoor3
Copy link
Contributor Author

htoor3 commented Apr 6, 2023

We hadn't seen the failures on test_driver/text_editing_integration.dart in an earlier attempt to land this. @htoor3 has a fix for that test so this can be relanded.

Thanks @ditman.
Fix PR is flutter/flutter#124299
Reland PR is #40968

exaby73 pushed a commit to NevercodeHQ/flutter that referenced this pull request Apr 17, 2023
…ions) (flutter#124300)

Manual roll requested by zra@google.com

flutter/engine@610cdf0...1ec74c6

2023-04-06 110993981+htoor3@users.noreply.github.com Revert "[web] Move
text editing nodes outside of shadowDOM - reopened"
(flutter/engine#40960)
2023-04-05 110993981+htoor3@users.noreply.github.com [web] Move text
editing nodes outside of shadowDOM - reopened (flutter/engine#40904)
2023-04-05 30870216+gaaclarke@users.noreply.github.com [Impeller]
adjusted the rotated text test to have an opaque background and account
for screen scale (flutter/engine#40954)
2023-04-05 jacksongardner@google.com Copy canvaskit files directly into
`flutter_web_sdk` (flutter/engine#40951)

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 jonahwilliams@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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
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 will affect goldens
Projects
None yet
4 participants