To improve performance I am proposing we use IsShadowRootFlag and isSVGShadowRoot virtual slightly differently: getFlag(IsShadowRootFlag) => ShadowRoot or SVGShadowRoot getFlag(IsShadowRootFlag) && !getFlag(IsSVGElementFlag) => ShadowRoot (ie new style) getFlag(IsShadowRootFlag) && getFlag(IsSVGElementFlag) => SVGShadowRoot This will fix a performance regression in parentNode (see bug 69266) and remove a virtual from Node (isSVGShadowRoot can just consult flags.) One way isSVGShadowRoot and getFlag(IsShadowRootFlag) vary today is that isSVGShadowRoot is associated with the SVGShadowRoot type the vtable; it never changes for a given instance. But ShadowRoot sets and clears getFlag(IsShadowRootFlag) when a ShadowRoot is attached/detached to a host. I think this is needless variation. I think we should always set IsShadowRootFlag for ShadowRoot instances. If the caller wants to find out whether it is associated with a host, it can test null-ness of shadowHost().
Created attachment 109757 [details] Patch
Comment on attachment 109757 [details] Patch Looks sane.
Comment on attachment 109757 [details] Patch Clearing flags on attachment: 109757 Committed r96782: <http://trac.webkit.org/changeset/96782>
All reviewed patches have been landed. Closing bug.