[Webkit-unassigned] [Bug 145244] New: Page fails to update CSS sometimes when styles are dynamically injected into the page

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 20 22:30:32 PDT 2015


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

            Bug ID: 145244
           Summary: Page fails to update CSS sometimes when styles are
                    dynamically injected into the page
    Classification: Unclassified
           Product: WebKit
           Version: 528+ (Nightly build)
          Hardware: Macintosh Intel
                OS: Mac OS X 10.10
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: dak at dak.org

WebKit is apparently failing to update its CSS and redraw the page when <style> tags are dynamically injected into a page.

In the failing code, the <style> tags are being injected inside of the body tag (as <style scoped> — scoped isn't supported yet, but the styles should still apply globally). I've not yet confirmed whether or not this is a necessary condition for the issue.

I've been attempting to create a simplified test case for this issue, but have so far been unable to do so. There may be an element of complexity/timing necessary for the issue to manifest itself. At the moment, the issue can be seen at http://32demclub.com (code at https://github.com/DerekKent/32demclub/tree/d0b2dd6dc146b40ea2a7541f1e46522e7eda7711/dist).

I'll update this issue with a test case if/when I'm able to produce one.

Running the following code after the page has rendered fixes the issue:
```
// Updates the CSS, but some DOM elements are missing
var head = $('head');
var style = $('<style>');
head.append(style);
style.remove();

// Restores missing DOM elements
$('#main').get(0).parentNode.style.cssText += ';-webkit-transform:rotateZ(0deg)';
$('#main').get(0).parentNode.offsetHeight;
$('#main').get(0).parentNode.style.cssText += ';-webkit-transform:none';
```

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150521/72596aaf/attachment-0001.html>


More information about the webkit-unassigned mailing list