enable-throttle-display-none-and-visibility-hidden-cross-origin-iframes flag subtly breaks extension

826 views
Skip to first unread message

Brian Vaughn

unread,
Aug 19, 2021, 11:57:19 AM8/19/21
to Chromium Extensions
Seems like this flag can break things in subtle ways. Wondering if anyone else has run into this?

We're using a bespoke auto-sizing utility (react-virtualized-auto-sizer) to resize the Components tree which is likely why we're running into issues. Maybe the "fix" here is just to move away from that approach.

That being said, we recently got a bug report that for some people, the Components tree was too small:
https://github.com/facebook/react/issues/21986

This turned out to be because animation frames were being scheduled successfully, but never called. We added a timeout fallback to handle this case, which fixed the sizing issue but let to another bug report that hover and click events aren't working:

Curious if others have run into similar issues with this flag.
Message has been deleted

Brian Vaughn

unread,
Aug 19, 2021, 7:35:35 PM8/19/21
to Chromium Extensions, Brian Vaughn
I think this is ultimately because extensions run within an `iframe` that's set (by Chrome?) to have a style of "display:none"

Unclear if there's a way to work around.

wOxxOm

unread,
Aug 20, 2021, 10:57:49 AM8/20/21
to Chromium Extensions, brian.dav...@gmail.com
If you can make a definitive test case that reproduces the problem, it's best to report it on https://crbug.com.

>  extensions run within an `iframe`

Devtools panels added by an extension, yes.

> that's set (by Chrome?) to have a style of "display:none"

When a different devtools tab is selected, yes, that's exactly what I see in devtools-on-devtools.

W. James Maclean

unread,
Aug 20, 2021, 11:20:48 AM8/20/21
to Chromium Extensions, wOxxOm, brian.dav...@gmail.com
I'm responsible for the flag in question. This is the issue that motivated adding the flag: https://bugs.chromium.org/p/chromium/issues/detail?id=958475

We've landed a recent fix for one known issue, so it would help me to know what version of Chrome you're testing with. The fix is in versions 94.0.4600.0 and later.

If it doesn't help, then any repro steps you can describe will help me to debug it. And filing a bug on https://crbug.com is always a good idea. There are several known issues we're working on, just in case your issue fits into any of them:

Brian Vaughn

unread,
Aug 20, 2021, 11:30:38 AM8/20/21
to Chromium Extensions, W. James Maclean, wOxxOm, Brian Vaughn
Hi James! Thank you for adding context.

This flag has been associated with several bugs reported on the React GitHub repo. People have reported this bug with Chrome versions 92.0.4515.0, 92.0.4515.107, 92.0.4515.131, and 92.0.4515.159.

The issue was not reproducible in 91.0.4472.114 (but maybe that's because the flag wasn't around in that version.) It's also not reproducible with Chrome Canary version 95.0.4608.0 (but that flag is not present there either).

I will try to file a CR bug with a narrowed down repro sometime later this afternoon.

W. James MacLean

unread,
Aug 20, 2021, 12:41:50 PM8/20/21
to Brian Vaughn, Chromium Extensions, wOxxOm
Hmm, the flag expired, we'll need to re-instate it at some point. If there's any chance you can retry with one of the 94.0.4600.0 versions that would be a great help, but if not a set of detailed repro steps will help.

GoogleAnimated.gif

W. James MacLean

Software Engineer

Google Waterloo, Canada



Brian Vaughn

unread,
Aug 20, 2021, 12:52:44 PM8/20/21
to Chromium Extensions, W. James Maclean, Chromium Extensions, wOxxOm, Brian Vaughn
Will do.

Looks like Chrome Dev is build 94.0.4606.9 and the bug still reproduces on this build.

I'll try to file a narrowed down CR bug shortly.

wOxxOm

unread,
Aug 20, 2021, 2:48:21 PM8/20/21
to Chromium Extensions, brian.dav...@gmail.com, W. James Maclean, Chromium Extensions, wOxxOm
You can enable the feature even without a flag:
  1. click "exit" in the browser's main menu
  2. edit the shortcut or start it from the terminal manually with a command line parameter: --enable-features= ThrottleDisplayNoneAndVisibilityHiddenCrossOriginIframes
  3. To disable it, use  --disable-features= 
To test in an arbitrary version of Chromium quickly, use https://www.chromium.org/developers/bisect-builds-py

Brian Vaughn

unread,
Aug 20, 2021, 3:20:11 PM8/20/21
to Chromium Extensions, wOxxOm, Brian Vaughn, W. James Maclean, Chromium Extensions
I assumed that a build that didn't show the flag would also be a build that didn't contain the feature (nothing to toggle on). Is that incorrect?

wOxxOm

unread,
Aug 20, 2021, 3:39:28 PM8/20/21
to Chromium Extensions, brian.dav...@gmail.com, wOxxOm, W. James Maclean, Chromium Extensions
A flag is a separate thing, which has expiration time whereas features do not as they are removed manually when the implementation has been settled for a while, which usually takes quite some time and that didn't happen yet. Of course this command line won't have effect on old builds that were released before the feature was implemented (v92 or revision 874311 for bisect-builds).

Brian Vaughn

unread,
Aug 20, 2021, 4:01:30 PM8/20/21
to Chromium Extensions, wOxxOm, Brian Vaughn, W. James Maclean, Chromium Extensions
Thanks for that added context!

In this case, the bug still repros on 94.0.4606.9 which I think is all the info needed for the moment.

Brian Vaughn

unread,
Aug 20, 2021, 6:56:19 PM8/20/21
to Chromium Extensions, Brian Vaughn, wOxxOm, W. James Maclean, Chromium Extensions
Reply all
Reply to author
Forward
0 new messages