[Webkit-unassigned] [Bug 137580] New: Transitions skipped right after transition from display:none

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 9 15:53:30 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=137580

           Summary: Transitions skipped right after transition from
                    display:none
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Macintosh
        OS/Version: Mac OS X 10.9
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: dgatwood at mac.com


I'm seeing a curious behavior when mixing CSS transitions with "display: none".  Specifically, if you have an element set to "display: none", then set that element to be "display: block" and simultaneously change the element's class, the transition is skipped.  This results in a fair bit of ugliness when, for example, fading in an overlay window.  You end up having to instead push the content off the screen or change its size to zero in combination with "overlay: hidden", neither of which is nearly as clean as preventing interaction by actually making the element be non-rendered.  I see nothing in the spec that suggests that this behavior is correct, so I'm assuming it is a bug.

I realize the underlying issue—that at the time the transition would begin, the element's layout probably hasn't been calculated yet—but it would make a lot more sense if WebKit recognized that the element was in such a transitional state and rescheduled application of that transition after the next draw loop, rather than skipping the transition and applying the final style to the initial layout as it appears to do now.

Minimal example attached.  When you click the button, content should shift around immediately (when the "display: block" gets applied), but then the actual content of the div should fade in.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list