-
Notifications
You must be signed in to change notification settings - Fork 6k
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] Remove non-ShadowDom mode #39915
Conversation
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.
This cleanup is great. Thanks for adding the throw "this won't work without ShadowDOM" in the embedder, it makes a lot of sense.
Also, millions of thanks for creating the global_styles.dart
file. 😭
I think some of the tests can be simplified and moved to a global_styles_test.dart
file and tested there in more isolation, but the rest looks good, especially if all the tests continue to pass :P
(This is going to cause some conflicts with @htoor3's incoming PR though!)
lib/web_ui/test/embedder_test.dart
Outdated
embedder.glassPaneElement.remove(); | ||
}); | ||
|
||
test('throws when shadowDom is not available', () { |
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.
Thanks for this test!
lib/web_ui/test/embedder_test.dart
Outdated
expect(hasFakeRule, isFalse); | ||
}); | ||
|
||
test('Attaches outrageous text styles to flt-scene-host', () { |
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.
I'd move these tests to a separate global_styles_test.dart
where we assert the things that must be contained in the sheet, then in the embedder_test leave only the ones that assert that a sheet was added at the right spot (hasCssRule
shouldn't live in embedder_test.dart
, but in global_stles_test.dart
, IMO)
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.
Done
Safari is being fun and failing here:
|
Great idea! It'll help us fix the Safari failure too (I'll explain below).
Yep. I plan to wait for @htoor3 to land his PR first.
Ugh. This is because we set the default css font to Your idea of moving some tests to
to avoid the normal normal thingy.
|
What I remember from Safari (not sure if from this change or one from @htoor3) was that they'd unroll the shorthand CSS property into every separate property, so if you did: |
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.
This LGTM! Thank you very much for the cleanup @mdebbar!
…125150) flutter/engine@609f9d5...d626f16 2023-04-19 [email protected] [web] Remove non-ShadowDom mode (flutter/engine#39915) 2023-04-19 [email protected] [impeller] added moltenvk notice (flutter/engine#41317) 2023-04-19 [email protected] Roll Skia from 8af1dd9659f0 to ad90b6bd4760 (3 revisions) (flutter/engine#41337) 2023-04-19 [email protected] Roll Dart SDK from 27e71f19c144 to fe8bb0565a30 (2 revisions) (flutter/engine#41336) 2023-04-19 [email protected] Roll Fuchsia Mac SDK from yD5a3QBJHUFM4nVou... to suSuT9F8zuP-pBg-E... (flutter/engine#41334) 2023-04-19 [email protected] Roll Fuchsia Linux SDK from Cy5LG4U2InaFLkJGz... to Tun7i4VLz6ncx8JJJ... (flutter/engine#41331) 2023-04-19 [email protected] Roll Skia from 85d9e67653b1 to 8af1dd9659f0 (1 revision) (flutter/engine#41333) 2023-04-19 [email protected] Roll Skia from 5a718d9e9c06 to 85d9e67653b1 (4 revisions) (flutter/engine#41330) 2023-04-19 [email protected] Roll Dart SDK from 1f224df52bee to 27e71f19c144 (3 revisions) (flutter/engine#41329) Also rolling transitive DEPS: fuchsia/sdk/core/linux-amd64 from Cy5LG4U2InaF to Tun7i4VLz6nc fuchsia/sdk/core/mac-amd64 from yD5a3QBJHUFM to suSuT9F8zuP- 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://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
If we still want to do this, here's a quick PR :)
Fixes flutter/flutter#116204