Bug 90356

Summary: Style not updated for element with display:none becoming first/last-child
Product: WebKit Reporter: dstockwell
Component: CSSAssignee: dstockwell
Status: RESOLVED FIXED    
Severity: Normal CC: cmarcelo, noel.gordon, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description dstockwell 2012-07-01 21:27:15 PDT
When an element marked as display:none becomes the first/last-child (eg. when a sibling is removed), its style is not recalculated. The element would not be rendered even if the style change would have caused it to become visible.

Reported in Chromium: http://code.google.com/p/chromium/issues/detail?id=115257
Comment 1 dstockwell 2012-07-01 21:32:50 PDT
Created attachment 150356 [details]
Patch
Comment 2 noel gordon 2012-07-10 21:03:12 PDT
Doug, nice tests.  Do you know if the opposite case works?  An element that has a  matching last- or first-child style rule is updated when the DOM changes such that the element no longer matches that rule.
Comment 3 dstockwell 2012-07-10 21:20:52 PDT
Created attachment 151586 [details]
Patch
Comment 4 noel gordon 2012-07-10 21:25:25 PDT
Ah the inverse tests. LGTM.
Comment 5 Kent Tamura 2012-07-10 23:06:29 PDT
Comment on attachment 151586 [details]
Patch

ok
Comment 6 WebKit Review Bot 2012-07-10 23:23:19 PDT
Comment on attachment 151586 [details]
Patch

Clearing flags on attachment: 151586

Committed r122302: <http://trac.webkit.org/changeset/122302>
Comment 7 WebKit Review Bot 2012-07-10 23:23:23 PDT
All reviewed patches have been landed.  Closing bug.