Bug 133056

Summary: Reduce constructor copypasta in RenderText and RenderElement.
Product: WebKit Reporter: Andreas Kling <kling>
Component: Layout and RenderingAssignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, darin, esprehn+autocc, glenn, kling, koivisto, kondapallykalyan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch andersca: review+

Description Andreas Kling 2014-05-18 14:59:18 PDT
We can use delegating constructors to avoid duplicating some initializer lists.
Comment 1 Andreas Kling 2014-05-18 15:12:32 PDT
Created attachment 231667 [details]
Patch
Comment 2 Darin Adler 2014-05-18 20:50:52 PDT
Comment on attachment 231667 [details]
Patch

All our compilers support delegating constructors!? Hooray!

What about inlining? Is it OK to add another level of function call here?
Comment 3 Andreas Kling 2014-05-18 23:25:25 PDT
(In reply to comment #2)
> (From update of attachment 231667 [details])
> All our compilers support delegating constructors!? Hooray!
> 
> What about inlining? Is it OK to add another level of function call here?

Looks like they do! I wasn't sure so wanted to wait for EWS.

I'll slap an "inline" on the delegate ctor's definition for good measure.
Comment 4 Andreas Kling 2014-05-18 23:45:07 PDT
Committed r169038: <http://trac.webkit.org/changeset/169038>