Summary: | Test for Ensuring Pseudo Class's are Respected on Dynamic Changes | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Joseph Pecoraro <joepeck> | ||||
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | joepeck | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | PC | ||||||
OS: | OS X 10.5 | ||||||
Attachments: |
|
Description
Joseph Pecoraro
2010-03-29 10:44:24 PDT
Created attachment 51929 [details]
[TEST] Upstreamed Test
Comment on attachment 51929 [details] [TEST] Upstreamed Test > +// Need to test after the initial layout to force a dynamic recalc. > +setTimeout(makeDynamicChanges, 0); I don't think this is true. I think you just need a way to force style calculate both before and after. I think that a call to getComputedStyle both before and after would do the trick. Let me know if I should make this test more extensive. It currently tests :only-child, and not first/last/nth. However, that should be enough given what this test is trying to prevent. This test was used to catch a situation where a RenderStyle is cloned and reapply without copying the RenderStyle's state information, which used for pseudo class styling. (In reply to comment #2) > (From update of attachment 51929 [details]) > > +// Need to test after the initial layout to force a dynamic recalc. > > +setTimeout(makeDynamicChanges, 0); > > I don't think this is true. I think you just need a way to force style > calculate both before and after. I think that a call to getComputedStyle both > before and after would do the trick. Good idea. It makes the test clearer as well. Committed r56733 A LayoutTests/fast/css/dynamic-pseudo-class-expected.txt A LayoutTests/fast/css/dynamic-pseudo-class.html M LayoutTests/ChangeLog r56733 = 0db386c4456b0761bc7058857117c0c130da56e0 (trunk) http://trac.webkit.org/changeset/56733 |