This is a tracking bug for improving internal quality and performance of Shadow DOM like - Code clean up and refactoring - Possible performance improvement - Low-priority missing features I'd like to split refactoring part from Bug 72352 to this bug and use 72532 for tracking more obvious bugs.