We currently make use of synthetic style changes, and code in RenderObject::adjustStyleDifference() to force RenderLayers to get created for elements that need them for compositing (iframes, canvas, plugins). This has caused problems (see patch in bug 44877). We should instead just make RenderLayers directly somehow.
@Simon - Is this bug still applicable?
We do still do this via invalidateStyleAndLayerComposition(). Doesn't seem particularly bad, though.