Created attachment 62033 [details] Testcase Webkit browsers Chrome 5 (Win & Linux), Chromium 6 (Win & Linux), and Safari latest on PC all behave the same and don't respect the :empty selector correctly. Hitting the "force redraw" button or zooming the page force webkit to respect the pseudo-class correctly. See http://www.w3.org/TR/css3-selectors/#empty-pseudo.
Download the file locally while i host a version. The attachment seems to work fine here but locally it fails.
Comment on attachment 62033 [details] Testcase ><!doctype html> ><html> > <head> > <style type="text/css"> > h2:empty, > tbody:empty, > thead:empty { > display: none; > } > h2:not(:empty), > tbody:not(:empty), > thead:not(:empty) { > background: green; > } > </style> > </head> > <body> > <a href="https://bug-42614-attachments.webkit.org/attachment.cgi?id=62033">Reload</a> > <input onclick="document.body.innerHTML = document.body.innerHTML" id="refresher" type="button" value="force redraw (document.body.innerHTML = document.body.innerHTML)" /> > <h2>I'm not empty</h2> > <table> > <thead> > <tr> > <th>/html/body/table/thead/tr/th</th> > </tr> > </thead> > <tbody> > <tr> > <td>/html/body/table/tbody/tr/td</td> > </tr> > </tbody> > <tr> > <td>/html/body/table/tr/td => /html/body/table/tbody[2]/tr/td</td> > </tr> > </table> > </body> ></html> >
There seems to be a layout cache issue somehow. On linux chromium 6.0.470.0 (52837) i can only reproduce locally but on windows chromium 6.0.446.0 (50541) fails both online and offline (same with chrome 5.0.375.99 and safari 5.0).
Looks like a duplicate of bug 26570.
It is a dupplicate, sorry. Still the report is old. *** This bug has been marked as a duplicate of bug 26570 ***