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.
Verified as fixed with WebKit Nightly Version 5.1.5 (6534.55.3, r115022).
(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?
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.
$ bisect-builds http://jsfiddle.net/gtXYC/1/ -r 109280:109476 -p -s
Fails: r109280 Works: r109476
:empty still applies to elements made non-empty via page dynamics.
Covered by test:
*** This bug has been marked as a duplicate of bug 79734 ***
Thank you for researching when this got fixed!