Bug 119982

Summary: Make Element::attach non-virtual
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: kling
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
le patch
kling: review+
fix lists none

Description Antti Koivisto 2013-08-18 09:06:59 PDT
This will be helpful for future refactorings.
Comment 1 Antti Koivisto 2013-08-18 11:23:49 PDT
Created attachment 209039 [details]
le patch
Comment 2 Andreas Kling 2013-08-18 11:35:53 PDT
Comment on attachment 209039 [details]
le patch

r=me
Comment 3 Antti Koivisto 2013-08-18 12:23:20 PDT
Created attachment 209040 [details]
fix lists
Comment 4 Andreas Kling 2013-08-18 12:28:02 PDT
Two thoughts about this that we already discussed on IRC, crystallizing here:

1. We should make the has-custom-style-resolve-callbacks bit part of the node creation flag-mask.
2. It might be good to always call the base class willAttachRenderers()/didAttachRenderers() for consistency. As long as "useless" base class implementations are inline, there will be zero overhead.
Comment 5 Antti Koivisto 2013-08-18 12:35:13 PDT
(In reply to comment #4)
> Two thoughts about this that we already discussed on IRC, crystallizing here:
> 
> 1. We should make the has-custom-style-resolve-callbacks bit part of the node creation flag-mask.

This is a good idea.

> 2. It might be good to always call the base class willAttachRenderers()/didAttachRenderers() for consistency. As long as "useless" base class implementations are inline, there will be zero overhead.

I'm not so sure about this. The call is unnecessary in most cases and calling no-op functions for "consistency" feels strange. willAttachRenderers() and pals are currently private so calling them unnecessarily will fail. Easy to test.
Comment 6 Antti Koivisto 2013-08-18 12:37:04 PDT
private in Element I mean.
Comment 7 Antti Koivisto 2013-08-18 13:00:48 PDT
https://trac.webkit.org/r154254