Bug 133056 - Reduce constructor copypasta in RenderText and RenderElement.
Summary: Reduce constructor copypasta in RenderText and RenderElement.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-18 14:59 PDT by Andreas Kling
Modified: 2014-05-18 23:45 PDT (History)
7 users (show)

See Also:


Attachments
Patch (5.31 KB, patch)
2014-05-18 15:12 PDT, Andreas Kling
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>