Reduce a shadow root object's size by not inheriting DoublyLinkedList
Using DoublyLinkedList increases a shadow root object's size by adding two pointers,
m_prev and m_next.
Because these pointers are only required for multiple shadow roots,
these pointers can be moved to ShadowRootRareDataV0.
- Maintain a doubly linked list manually, instead of inheriting DoublyLinkedList.
- ElementShadow has only one shadowRoot object, instead of having DoublyLinkedList<ShadowRoot>.
- ElementShadow::m_shadowRoot acts as the oldest shadow root in case for multiple shadow roots.
BUG=531990
Review URL: https://codereview.chromium.org/1904923002
Cr-Commit-Position: refs/heads/master@{#389013}
5 files changed