mozilla/servo — pull request #2692 by Martiusweb (2014-06-21 16:25:22+00:00)
Title: HTMLStyleElement only applies CSS in the document

HTMLStyleElement will not parse a style element created in Javascript until it
is attached to the DOM.

This fixes the bug #2107.

I added a reftest for the given cases:

* a style element is defined in the HTML code,
* a style element is created in Javascript, CSS content is added to the
element and the element is later attached to the document,
* a style element is created in Javascript, attached to the document and
later CSS content is added to the element,
* a style element is created in Javascript, CSS content is added to the
* element but the element is never attached to the document.