Before this change, :hover wouldn't match anything outside the shadow
boundary when hovering elements inside a shadow tree. This was most
noticeable when hovering the text inside an input element and hover
styles disappearing from the hosting input element itself.
(cherry picked from commit 84ab8bf7973147d054a99445943b9da930ceb0a2)