Very easy to reproduce: <style type="text/css"> .e { background-color: red; margin: 5px; width: 90%; } .e:empty { border: display: none; } </style> <div class="e">This is not empty</div> See attached url for a more detailed testcase.
Created attachment 31590 [details] Testcase
Created attachment 49956 [details] Simple test case
Bug confirmed, :empty is bogus when used with display: none; (see my testcase)
The two attached testcases confirmed this behavior. The testcase inlined in the first comment is wrong (border: display: none;) but confirm too by removing "border:"
*** Bug 42614 has been marked as a duplicate of this bug. ***
*** Bug 44871 has been marked as a duplicate of this bug. ***
Looks fixed WebKit 534.36 (trunk@86496)
Thank you for following up! I'm wondering if we should land a regression test for this.
(In reply to comment #8) > I'm wondering if we should land a regression test for this. Does fast/css/empty-display-none.html suffice?
Created attachment 101547 [details] Patch Add a specific test case for variety.
(In reply to comment #8) > Thank you for following up! > > I'm wondering if we should land a regression test for this. Yes we should. Could you review please?
Comment on attachment 101547 [details] Patch Nice!
Comment on attachment 101547 [details] Patch Clearing flags on attachment: 101547 Committed r91744: <http://trac.webkit.org/changeset/91744>
All reviewed patches have been landed. Closing bug.
In chromium 34 on linux and 35 on osx I've have an issue with a similar case but a bit more complex (see the following jsfiddle): http://jsfiddle.net/YprUV/47/ When 'remove' button is clicked, 'is empty' should appears, but it doesn't without the workaround I've added (the first empty css 'ul:empty {}'). Try to comment it, and then 'is empty' would not appears.
Different because of the combinator perhaps. >In chromium 34 on linux and 35 on osx Please do file a bug at crbug.com