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

SVG test flaky in Safari due to bug in internal component implementation #16402

Open
jugglinmike opened this issue Apr 18, 2019 · 3 comments
Open

Comments

@jugglinmike
Copy link
Contributor

The shadow DOM for the controls of Safari's media elements throw a runtime exception in some circumstances, and this can trigger a harness error.

Test: svg/interact/scripted/tabindex-focus-flag.svg

2019-04-17-safari-shadow-bug-1

This occurs consistently on Safari 11 and 12, but only when the browser's cache is disabled. It appears to be triggered by rendering the controls UI of <audio> and <video> elements in an SVG. (If the controls attribute is removed or the element is rendered in the context of an HTML document, no error occurs.)

2019-04-17-safari-shadow-bug-2

I discovered this while researching discrepancies between results from the Bocoup's Mac Mini and the Azure Pipelines environment. The runtime error is consistently reported to the developer's console, but the uncaught exception only triggers the window's error handler (and only causes a harness error) if the browser has not previously rendered one of these elements during the current session. This explains why the bug is reported from the Mac Mini and not Azure Pipelines: the two setups differ in the sequence they execute tests.

I was hopeful that this would be the root cause of every discrepancy and I could take the rest of the week off. Unfortunately, the offending markup appears in just one test:

$ git grep -E '[<:](video|audio)\b' . | grep '.svg:'
svg/interact/scripted/tabindex-focus-flag.svg:        <h:audio controls="controls"></h:audio>
svg/interact/scripted/tabindex-focus-flag.svg:        <h:video controls="controls"></h:video>

Though it's possible that other UI elements also cause uncaught exceptions.

@burg could you check if this is tracked in Radar?

@gsnedders @jgraham any ideas for a workaround?

@eric-carlson
Copy link

@jugglinmike I filed rdar://problem/50001165.

Thanks for the detailed report!

@jugglinmike
Copy link
Contributor Author

Certainly!

@jugglinmike
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants