Bug 75294

Summary: :empty still matches after content is added to element with display: none
Product: WebKit Reporter: webkit
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: ap, davidbarr, jchaffraix, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
URL: http://jsfiddle.net/gtXYC/1/

Description webkit 2011-12-28 00:22:00 PST
Compare the following examples (using innerHTML to add content):

1) http://jsfiddle.net/gtXYC/0/ (works)
2) http://jsfiddle.net/gtXYC/1/ (broken)

Same problem using appendChild() instead of innerHTML:

3) http://jsfiddle.net/gtXYC/2/ (works)
4) http://jsfiddle.net/gtXYC/3/ (broken)

Examples 1/3: The div's background-color changes based on whether the div is empty or not.
Examples 2/4: Same situation, except that the visibility of the div should change. The problem is that :empty still matches after content is added to the div.
Comment 1 David Barr 2012-04-25 21:43:20 PDT
Verified as fixed with WebKit Nightly Version 5.1.5 (6534.55.3, r115022).
Comment 2 Julien Chaffraix 2012-04-26 07:28:20 PDT
(In reply to comment #1)
> Verified as fixed with WebKit Nightly Version 5.1.5 (6534.55.3, r115022).

Are we sure the test cases attached on this bug are covered? Shouldn't we land them to prevent a regression?
Comment 3 Alexey Proskuryakov 2012-04-26 10:06:16 PDT
Since we don't know what fixed this, and haven't landed tests, this is WORKSFORME at best. I agree with Julien that we should investigate the need to land tests.
Comment 5 David Barr 2012-04-26 18:48:13 PDT

*** This bug has been marked as a duplicate of bug 79734 ***
Comment 6 Alexey Proskuryakov 2012-04-26 22:37:46 PDT
Thank you for researching when this got fixed!