Fix rotation regression from #3970.
Merge pull request #3971 from brendandahl/rotation2

Fix rotation regression from #3970.
Fix printing regression from #3848.
Append entire DOM fragment at once.
Merge pull request #3976 from brendandahl/dom-frag

Append entire DOM fragment at once.
Merge pull request #3972 from brendandahl/print-reg

Fix printing regression from #3848.