WebCore::Node currently has: const AtomicString& localName() const { return virtualLocalName(); } const AtomicString& namespaceURI() const { return virtualNamespaceURI(); } const AtomicString& prefix() const { return virtualPrefix(); } These are then shadowed on Element to avoid virtual dispatch when calling through on subclass pointers. While this is pretty neat, we should just use FINAL instead. Yup.
Oh, also this: RenderStyle* computedStyle(PseudoId pseudoElementSpecifier = NOPSEUDO) { return virtualComputedStyle(pseudoElementSpecifier); }
Created attachment 201511 [details] Patch Actually, never mind computedStyle(), we want that to be fast for non-SVG elements and we can't make it FINAL on Element since SVGElement overrides it. This patch changes prefix/namespaceURI/localName to use FINAL.
Committed r149974: <http://trac.webkit.org/changeset/149974>
The non-virtual shadowing *design pattern*. Hack, my foot ;-)
(In reply to comment #4) > The non-virtual shadowing *design pattern*. Hack, my foot ;-) <http://i.imgur.com/sXXky9V.jpg>