Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Issue 23991004: Generate toFooElement() functions from tagname data (Closed)

Created:
7 years, 3 months ago by gyuyoung-inactive
Modified:
7 years, 3 months ago
Reviewers:
tkent, pdr.
CC:
blink-reviews, gavinp+prerender_chromium.org, eae+blinkwatch, dglazkov+blink, f(malita), adamk+blink_chromium.org, pdr, Stephen Chennney
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Generate toFooElement() functions from tagname data Introduce a "generateTypeHelpers" attribute that can be used in HTMLTagNames.in, SVGTagNames.in. After landing this cl, toFooElement() style helpers will be added to HTML|SVGElementTypeHelpers.h. We don't need to include "HTML|SVGNames.h" anymore, HTML|SVGElement.h just need to include the HTML|SVGElementTypeHelpers.h This attribute can support isFooElement() as well. A patch for the isFooElement() will be followed if this patch is accepted. Merge from WebKit r154965 and r155155. BUG=N/A

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+116 lines, -486 lines) Patch
M Source/core/html/HTMLAnchorElement.h View 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/html/HTMLAreaElement.h View 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/html/HTMLBodyElement.h View 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/html/HTMLCanvasElement.h View 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/html/HTMLDataListElement.h View 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/html/HTMLDivElement.h View 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/html/HTMLElement.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/HTMLFieldSetElement.h View 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/html/HTMLFormElement.h View 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/html/HTMLFrameElement.h View 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/html/HTMLFrameSetElement.h View 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/html/HTMLIFrameElement.h View 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/html/HTMLImageElement.h View 1 chunk +0 lines, -12 lines 0 comments Download
M Source/core/html/HTMLLabelElement.h View 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/html/HTMLLegendElement.h View 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/html/HTMLLinkElement.h View 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/html/HTMLMapElement.h View 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/html/HTMLMeterElement.h View 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/html/HTMLOListElement.h View 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/html/HTMLObjectElement.h View 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/html/HTMLOptGroupElement.h View 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/html/HTMLOptionElement.h View 1 chunk +0 lines, -12 lines 0 comments Download
M Source/core/html/HTMLParamElement.h View 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/html/HTMLProgressElement.h View 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/html/HTMLScriptElement.h View 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/html/HTMLSelectElement.h View 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/html/HTMLSourceElement.h View 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/html/HTMLStyleElement.h View 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/html/HTMLTableCaptionElement.h View 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/html/HTMLTableElement.h View 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/html/HTMLTableRowElement.h View 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/html/HTMLTagNames.in View 3 chunks +35 lines, -35 lines 0 comments Download
M Source/core/html/HTMLTextAreaElement.h View 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/html/HTMLTitleElement.h View 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/html/HTMLTrackElement.h View 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/scripts/make_names.pl View 4 chunks +48 lines, -1 line 1 comment Download
M Source/core/svg/SVGCircleElement.h View 2 chunks +0 lines, -7 lines 0 comments Download
M Source/core/svg/SVGClipPathElement.h View 2 chunks +0 lines, -7 lines 0 comments Download
M Source/core/svg/SVGElement.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/svg/SVGEllipseElement.h View 2 chunks +0 lines, -7 lines 0 comments Download
M Source/core/svg/SVGFEDiffuseLightingElement.h View 2 chunks +0 lines, -7 lines 0 comments Download
M Source/core/svg/SVGFEImageElement.h View 2 chunks +0 lines, -7 lines 0 comments Download
M Source/core/svg/SVGFESpecularLightingElement.h View 2 chunks +0 lines, -7 lines 0 comments Download
M Source/core/svg/SVGFilterElement.h View 2 chunks +0 lines, -7 lines 0 comments Download
M Source/core/svg/SVGFontElement.h View 2 chunks +0 lines, -7 lines 0 comments Download
M Source/core/svg/SVGFontFaceElement.h View 2 chunks +0 lines, -7 lines 0 comments Download
M Source/core/svg/SVGGlyphElement.h View 2 chunks +0 lines, -7 lines 0 comments Download
M Source/core/svg/SVGHKernElement.h View 2 chunks +0 lines, -7 lines 0 comments Download
M Source/core/svg/SVGImageElement.h View 2 chunks +0 lines, -7 lines 0 comments Download
M Source/core/svg/SVGLineElement.h View 2 chunks +0 lines, -7 lines 0 comments Download
M Source/core/svg/SVGLinearGradientElement.h View 2 chunks +0 lines, -7 lines 0 comments Download
M Source/core/svg/SVGMPathElement.h View 2 chunks +0 lines, -7 lines 0 comments Download
M Source/core/svg/SVGMarkerElement.h View 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/svg/SVGMaskElement.h View 2 chunks +0 lines, -7 lines 0 comments Download
M Source/core/svg/SVGMissingGlyphElement.h View 2 chunks +0 lines, -7 lines 0 comments Download
M Source/core/svg/SVGPathElement.h View 2 chunks +0 lines, -7 lines 0 comments Download
M Source/core/svg/SVGPatternElement.h View 2 chunks +0 lines, -7 lines 0 comments Download
M Source/core/svg/SVGPolygonElement.h View 2 chunks +0 lines, -7 lines 0 comments Download
M Source/core/svg/SVGPolylineElement.h View 2 chunks +0 lines, -7 lines 0 comments Download
M Source/core/svg/SVGRadialGradientElement.h View 2 chunks +0 lines, -7 lines 0 comments Download
M Source/core/svg/SVGRectElement.h View 2 chunks +0 lines, -7 lines 0 comments Download
M Source/core/svg/SVGScriptElement.h View 2 chunks +0 lines, -7 lines 0 comments Download
M Source/core/svg/SVGTextElement.h View 2 chunks +0 lines, -7 lines 0 comments Download
M Source/core/svg/SVGTextPathElement.h View 2 chunks +0 lines, -7 lines 0 comments Download
M Source/core/svg/SVGUseElement.h View 2 chunks +0 lines, -7 lines 0 comments Download
M Source/core/svg/SVGVKernElement.h View 2 chunks +0 lines, -7 lines 0 comments Download
M Source/core/svg/SVGViewElement.h View 2 chunks +0 lines, -7 lines 0 comments Download
M Source/core/svg/svgtags.in View 2 chunks +31 lines, -31 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
gyuyoung-inactive
I would like to introduce a generation patch for toFooElement(). IMHO, we can only generate ...
7 years, 3 months ago (2013-09-09 05:36:53 UTC) #1
tkent
I'm slightly negative for this patch because - It can support only a part of ...
7 years, 3 months ago (2013-09-09 05:53:39 UTC) #2
tkent
I found C++ standard didn't guarantee a base class address and a derived class address ...
7 years, 3 months ago (2013-09-09 06:37:51 UTC) #3
gyuyoung-inactive
On 2013/09/09 06:37:51, tkent wrote: > I found C++ standard didn't guarantee a base class ...
7 years, 3 months ago (2013-09-09 07:26:01 UTC) #4
tkent
On 2013/09/09 07:26:01, gyuyoung wrote: > On 2013/09/09 06:37:51, tkent wrote: > > I found ...
7 years, 3 months ago (2013-09-10 01:19:06 UTC) #5
gyuyoung-inactive
On 2013/09/10 01:19:06, tkent wrote: > It's not a simple replacement. *ElementTypeHelpers.h needs to include ...
7 years, 3 months ago (2013-09-10 03:21:25 UTC) #6
gyuyoung-inactive
7 years, 3 months ago (2013-09-10 09:03:01 UTC) #7
Message was sent while issue was closed.
> In my opinion, it is not too confuse to support auto-generated toFooElement()
> only for elements. Because I believe someone will recognize what is
> "generateTypeHelpers" role when he/she sees HTMLTagsNames.in or svgtags.in.
> 
> Anyway, it is a big problem to use static_cast<> instead of reinterpret_cast<>
> in this case. :(

We can't use reinterpret_cast<> for downcasting. Closed this cl.

Powered by Google App Engine
This is Rietveld 408576698