In 273288@main we started caching `display: none` styles in a similar fashion we do `display: contents` style. One of the way the cached `display: contents` style is used is through the `Element::renderOrDisplayContentsStyle()` method. We need to audit those call sites and also ready for the `display: none` style when appropriate.
Pull request: https://github.com/WebKit/WebKit/pull/26186
After further consideration, I don't think this is a good thing to do and we should reduce the scope of where we return the displayContentsOrNoneStyle() value.