WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
115995
Node: Use FINAL instead of the non-virtual shadowing hack.
https://bugs.webkit.org/show_bug.cgi?id=115995
Summary
Node: Use FINAL instead of the non-virtual shadowing hack.
Andreas Kling
Reported
2013-05-12 16:28:40 PDT
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.
Attachments
Patch
(5.76 KB, patch)
2013-05-12 16:37 PDT
,
Andreas Kling
andersca
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Andreas Kling
Comment 1
2013-05-12 16:29:43 PDT
Oh, also this: RenderStyle* computedStyle(PseudoId pseudoElementSpecifier = NOPSEUDO) { return virtualComputedStyle(pseudoElementSpecifier); }
Andreas Kling
Comment 2
2013-05-12 16:37:38 PDT
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.
Andreas Kling
Comment 3
2013-05-12 18:59:55 PDT
Committed
r149974
: <
http://trac.webkit.org/changeset/149974
>
Darin Adler
Comment 4
2013-05-12 21:40:53 PDT
The non-virtual shadowing *design pattern*. Hack, my foot ;-)
Andreas Kling
Comment 5
2013-05-13 06:22:59 PDT
(In reply to
comment #4
)
> The non-virtual shadowing *design pattern*. Hack, my foot ;-)
<
http://i.imgur.com/sXXky9V.jpg
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug