[Webkit-unassigned] [Bug 84320] New: Appended element's CSSStyleDeclaration doesn't update correctly.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 18 23:03:46 PDT 2012


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

           Summary: Appended element's CSSStyleDeclaration doesn't update
                    correctly.
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Windows 7
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: CSS
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: myst.dg at gmail.com


Created an attachment (id=137846)
 --> (https://bugs.webkit.org/attachment.cgi?id=137846&action=review)
a demo for this bug

The appended DIV element's transition doesn't work as expected.


<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>computing style bug</title>
    <style>
        div {
            width: 500px;
            height: 500px;
            background: red;
            -webkit-transition: all 1s linear;
            -moz-transition: all 1s linear;
            -ms-transition: all 1s linear;
            -o-transition: all 1s linear;
            transition: all 1s linear;
        }
    </style>
</head>
<body>
    <script>
        var cell = document.createElement('div');
        document.body.appendChild(cell);
        /*
         * A present workaround is to read any property's value of its CSSStyleDeclaration.
         * For instance:
         * var oHeight = cell.offsetHeight;
         * or
         * getComputedStyle(cell).clear;
         */
        cell.style.width = '200px';
        /*
         * Or alternatively, call a timeout function.
         * setTimeout("cell.style.width = '200px'", 0);
         */
    </script>
</body>
</html>

-- 
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