Node::m_parentOrShadowHostNode is currently used both as the parent pointer for regular nodes and as the host pointer for ShadowRoots. This is confusing. It is also slow as it introduces a branch to all code paths that want to traverse element ancestors. It is especially important in selector matching.
Created attachment 208859 [details] patch
Comment on attachment 208859 [details] patch Attachment 208859 [details] did not pass qt-ews (qt): Output: http://webkit-queues.appspot.com/results/1469316
Comment on attachment 208859 [details] patch Attachment 208859 [details] did not pass qt-wk2-ews (qt-wk2): Output: http://webkit-queues.appspot.com/results/1462590
Comment on attachment 208859 [details] patch Attachment 208859 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/1467370
Comment on attachment 208859 [details] patch Attachment 208859 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/1470331
Comment on attachment 208859 [details] patch Attachment 208859 [details] did not pass gtk-wk2-ews (gtk-wk2): Output: http://webkit-queues.appspot.com/results/1470336
Created attachment 208871 [details] more release build friendly version
Comment on attachment 208871 [details] more release build friendly version Attachment 208871 [details] did not pass qt-wk2-ews (qt-wk2): Output: http://webkit-queues.appspot.com/results/1467431
http://trac.webkit.org/changeset/154165