Bug 90356 - Style not updated for element with display:none becoming first/last-child
Summary: Style not updated for element with display:none becoming first/last-child
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: dstockwell
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-01 21:27 PDT by dstockwell
Modified: 2012-07-10 23:23 PDT (History)
3 users (show)

See Also:


Attachments
Patch (5.38 KB, patch)
2012-07-01 21:32 PDT, dstockwell
no flags Details | Formatted Diff | Diff
Patch (7.85 KB, patch)
2012-07-10 21:20 PDT, dstockwell
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.