philc / vimium

The hacker's browser.
https://chrome.google.com/webstore/detail/vimium/dbepggeogbaibhgnhhndojpepiihcmeb
MIT License
22.59k stars 2.45k forks source link

Fix find mode not searching inside elements with `display` property set to `contents` #4493

Open victoragcosta opened 3 weeks ago

victoragcosta commented 3 weeks ago

Description

Resolves #4492.

The checkVisibility method considers elements with display set to contents as not visible in the page and it is true that the element is not visible, but its children are completely visible. So I simply made the node traversal algorithm also visit the children of elements with node.style.display === 'contents' and it worked.