Bug 137174 - Automatically generate template specializations for most Elements
Summary: Automatically generate template specializations for most Elements
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-27 00:43 PDT by Chris Dumez
Modified: 2014-09-28 19:13 PDT (History)
17 users (show)

See Also:


Attachments
WIP Patch (13.39 KB, patch)
2014-09-27 00:50 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (33.62 KB, patch)
2014-09-27 10:59 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (86.68 KB, patch)
2014-09-28 18:17 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2014-09-27 00:43:19 PDT
Currently, the template specializations to make is<>() / downcast<>() work for HTML/SVG/MathML elements are only generated if "generateTypeHelpers" parameter is explicitly specified for the corresponding tag name in the *Tags.in file. We are however able to generate the template specializations for most types so I would propose we generate those helpers by default.

One case we cannot generate the specialization is when a class is associated to several tag names but the make_names.pl script could easily detect this and skip those classes.
Comment 1 Chris Dumez 2014-09-27 00:50:04 PDT
Created attachment 238768 [details]
WIP Patch
Comment 2 Chris Dumez 2014-09-27 10:59:14 PDT
Created attachment 238781 [details]
Patch
Comment 3 WebKit Commit Bot 2014-09-27 11:00:56 PDT
Attachment 238781 [details] did not pass style-queue:


ERROR: Source/WebCore/svg/SVGAnimateElement.h:82:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Total errors found: 1 in 14 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Darin Adler 2014-09-28 17:27:44 PDT
Comment on attachment 238781 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=238781&action=review

Looks great.

> Source/WebCore/svg/SVGAnimateElement.h:35
> +class SVGAnimateElementBase : public SVGAnimationElement {

I think we should consider moving SVGAnimateElementBase to its own separate source file.
Comment 5 Chris Dumez 2014-09-28 18:17:18 PDT
Created attachment 238833 [details]
Patch
Comment 6 WebKit Commit Bot 2014-09-28 18:18:36 PDT
Attachment 238833 [details] did not pass style-queue:


ERROR: Source/WebCore/svg/SVGAnimateElementBase.h:81:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Total errors found: 1 in 34 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 WebKit Commit Bot 2014-09-28 19:13:47 PDT
Comment on attachment 238833 [details]
Patch

Clearing flags on attachment: 238833

Committed r174050: <http://trac.webkit.org/changeset/174050>
Comment 8 WebKit Commit Bot 2014-09-28 19:13:56 PDT
All reviewed patches have been landed.  Closing bug.