mozilla / fathom

A framework for extracting meaning from web pages
http://mozilla.github.io/fathom/
Mozilla Public License 2.0
1.97k stars 76 forks source link

Check ancestors overflow style instead of descendant's overflow style in IsVisible() #300

Open DimiDL opened 2 years ago

DimiDL commented 2 years ago

Emilio mentioned that the following code is wrong while review this patch https://github.com/mozilla/fathom/blob/49d678dc2a44f35e5ad8233059ebbbe8feab3be6/fathom/utilsForFrontend.mjs#L502-L506

The overflow style of descendants doesn't affect whether they are visible in presence of a zero-sized ancestor. You want to check the overflow style of the ancestor itself if you want that.