Commit 1ca2bfe3 authored by Henrique Ferreiro's avatar Henrique Ferreiro Committed by Commit Bot

Inline Create() in element_factory.cc.tmpl 2/3

This CL removes `inline` specifiers from constructors in core/html
classes to prepare for porting
third_party/blink/renderer/build/scripts/templates/element_factory.cc.tmpl
to MakeGarbageCollected.

Bug: 939691
Change-Id: Ic6ccd6ad5f38382453ae11d19720ae7012061659
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1578546Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Henrique Ferreiro <hferreiro@igalia.com>
Cr-Commit-Position: refs/heads/master@{#653567}
parent e58e865e
...@@ -123,7 +123,7 @@ constexpr int kUndefinedQualityValue = -1.0; ...@@ -123,7 +123,7 @@ constexpr int kUndefinedQualityValue = -1.0;
} // namespace } // namespace
inline HTMLCanvasElement::HTMLCanvasElement(Document& document) HTMLCanvasElement::HTMLCanvasElement(Document& document)
: HTMLElement(kCanvasTag, document), : HTMLElement(kCanvasTag, document),
ContextLifecycleObserver(&document), ContextLifecycleObserver(&document),
PageVisibilityObserver(document.GetPage()), PageVisibilityObserver(document.GetPage()),
......
...@@ -37,7 +37,7 @@ namespace blink { ...@@ -37,7 +37,7 @@ namespace blink {
using namespace html_names; using namespace html_names;
inline HTMLButtonElement::HTMLButtonElement(Document& document) HTMLButtonElement::HTMLButtonElement(Document& document)
: HTMLFormControlElement(kButtonTag, document), : HTMLFormControlElement(kButtonTag, document),
type_(SUBMIT), type_(SUBMIT),
is_activated_submit_(false) {} is_activated_submit_(false) {}
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
namespace blink { namespace blink {
inline HTMLDataListElement::HTMLDataListElement(Document& document) HTMLDataListElement::HTMLDataListElement(Document& document)
: HTMLElement(html_names::kDatalistTag, document) {} : HTMLElement(html_names::kDatalistTag, document) {}
HTMLDataListElement* HTMLDataListElement::Create(Document& document) { HTMLDataListElement* HTMLDataListElement::Create(Document& document) {
......
...@@ -40,7 +40,7 @@ namespace blink { ...@@ -40,7 +40,7 @@ namespace blink {
using namespace html_names; using namespace html_names;
inline HTMLFieldSetElement::HTMLFieldSetElement(Document& document) HTMLFieldSetElement::HTMLFieldSetElement(Document& document)
: HTMLFormControlElement(kFieldsetTag, document) {} : HTMLFormControlElement(kFieldsetTag, document) {}
HTMLFieldSetElement* HTMLFieldSetElement::Create(Document& document) { HTMLFieldSetElement* HTMLFieldSetElement::Create(Document& document) {
......
...@@ -32,7 +32,7 @@ namespace blink { ...@@ -32,7 +32,7 @@ namespace blink {
using namespace html_names; using namespace html_names;
inline HTMLLegendElement::HTMLLegendElement(Document& document) HTMLLegendElement::HTMLLegendElement(Document& document)
: HTMLElement(kLegendTag, document) {} : HTMLElement(kLegendTag, document) {}
DEFINE_NODE_FACTORY(HTMLLegendElement) DEFINE_NODE_FACTORY(HTMLLegendElement)
......
...@@ -39,7 +39,7 @@ namespace blink { ...@@ -39,7 +39,7 @@ namespace blink {
using namespace html_names; using namespace html_names;
inline HTMLOptGroupElement::HTMLOptGroupElement(Document& document) HTMLOptGroupElement::HTMLOptGroupElement(Document& document)
: HTMLElement(kOptgroupTag, document) {} : HTMLElement(kOptgroupTag, document) {}
// An explicit empty destructor should be in html_opt_group_element.cc, because // An explicit empty destructor should be in html_opt_group_element.cc, because
......
...@@ -44,7 +44,7 @@ float ClampCoordinate(double value) { ...@@ -44,7 +44,7 @@ float ClampCoordinate(double value) {
using namespace html_names; using namespace html_names;
inline HTMLAreaElement::HTMLAreaElement(Document& document) HTMLAreaElement::HTMLAreaElement(Document& document)
: HTMLAnchorElement(kAreaTag, document), shape_(kRect) {} : HTMLAnchorElement(kAreaTag, document), shape_(kRect) {}
// An explicit empty destructor should be in html_area_element.cc, because // An explicit empty destructor should be in html_area_element.cc, because
......
...@@ -40,7 +40,7 @@ using namespace html_names; ...@@ -40,7 +40,7 @@ using namespace html_names;
DEFINE_NODE_FACTORY(HTMLContentElement) DEFINE_NODE_FACTORY(HTMLContentElement)
inline HTMLContentElement::HTMLContentElement(Document& document) HTMLContentElement::HTMLContentElement(Document& document)
: V0InsertionPoint(kContentTag, document), : V0InsertionPoint(kContentTag, document),
should_parse_select_(false), should_parse_select_(false),
is_valid_selector_(true) { is_valid_selector_(true) {
......
...@@ -95,7 +95,7 @@ static void InertSubtreesChanged(Document& document) { ...@@ -95,7 +95,7 @@ static void InertSubtreesChanged(Document& document) {
document.ClearAXObjectCache(); document.ClearAXObjectCache();
} }
inline HTMLDialogElement::HTMLDialogElement(Document& document) HTMLDialogElement::HTMLDialogElement(Document& document)
: HTMLElement(kDialogTag, document), : HTMLElement(kDialogTag, document),
centering_mode_(kNotCentered), centering_mode_(kNotCentered),
centered_position_(0), centered_position_(0),
......
...@@ -28,7 +28,7 @@ namespace blink { ...@@ -28,7 +28,7 @@ namespace blink {
using namespace html_names; using namespace html_names;
inline HTMLDirectoryElement::HTMLDirectoryElement(Document& document) HTMLDirectoryElement::HTMLDirectoryElement(Document& document)
: HTMLElement(kDirTag, document) {} : HTMLElement(kDirTag, document) {}
DEFINE_NODE_FACTORY(HTMLDirectoryElement) DEFINE_NODE_FACTORY(HTMLDirectoryElement)
......
...@@ -28,7 +28,7 @@ namespace blink { ...@@ -28,7 +28,7 @@ namespace blink {
using namespace html_names; using namespace html_names;
inline HTMLDListElement::HTMLDListElement(Document& document) HTMLDListElement::HTMLDListElement(Document& document)
: HTMLElement(kDlTag, document) {} : HTMLElement(kDlTag, document) {}
DEFINE_NODE_FACTORY(HTMLDListElement) DEFINE_NODE_FACTORY(HTMLDListElement)
......
...@@ -42,8 +42,8 @@ namespace blink { ...@@ -42,8 +42,8 @@ namespace blink {
using namespace html_names; using namespace html_names;
inline HTMLEmbedElement::HTMLEmbedElement(Document& document, HTMLEmbedElement::HTMLEmbedElement(Document& document,
const CreateElementFlags flags) const CreateElementFlags flags)
: HTMLPlugInElement(kEmbedTag, : HTMLPlugInElement(kEmbedTag,
document, document,
flags, flags,
......
...@@ -41,7 +41,7 @@ namespace blink { ...@@ -41,7 +41,7 @@ namespace blink {
using namespace html_names; using namespace html_names;
inline HTMLFrameSetElement::HTMLFrameSetElement(Document& document) HTMLFrameSetElement::HTMLFrameSetElement(Document& document)
: HTMLElement(kFramesetTag, document), : HTMLElement(kFramesetTag, document),
border_(6), border_(6),
border_set_(false), border_set_(false),
......
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
namespace blink { namespace blink {
inline HTMLHeadingElement::HTMLHeadingElement(const QualifiedName& tag_name, HTMLHeadingElement::HTMLHeadingElement(const QualifiedName& tag_name,
Document& document) Document& document)
: HTMLElement(tag_name, document) {} : HTMLElement(tag_name, document) {}
DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(HTMLHeadingElement) DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(HTMLHeadingElement)
......
...@@ -35,7 +35,7 @@ namespace blink { ...@@ -35,7 +35,7 @@ namespace blink {
using namespace html_names; using namespace html_names;
inline HTMLMapElement::HTMLMapElement(Document& document) HTMLMapElement::HTMLMapElement(Document& document)
: HTMLElement(kMapTag, document) { : HTMLElement(kMapTag, document) {
UseCounter::Count(document, WebFeature::kMapElement); UseCounter::Count(document, WebFeature::kMapElement);
} }
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
namespace blink { namespace blink {
inline HTMLMarqueeElement::HTMLMarqueeElement(Document& document) HTMLMarqueeElement::HTMLMarqueeElement(Document& document)
: HTMLElement(html_names::kMarqueeTag, document) { : HTMLElement(html_names::kMarqueeTag, document) {
UseCounter::Count(document, WebFeature::kHTMLMarqueeElement); UseCounter::Count(document, WebFeature::kHTMLMarqueeElement);
} }
......
...@@ -28,7 +28,7 @@ namespace blink { ...@@ -28,7 +28,7 @@ namespace blink {
using namespace html_names; using namespace html_names;
inline HTMLMenuElement::HTMLMenuElement(Document& document) HTMLMenuElement::HTMLMenuElement(Document& document)
: HTMLElement(kMenuTag, document) {} : HTMLElement(kMenuTag, document) {}
DEFINE_NODE_FACTORY(HTMLMenuElement) DEFINE_NODE_FACTORY(HTMLMenuElement)
......
...@@ -28,8 +28,8 @@ namespace blink { ...@@ -28,8 +28,8 @@ namespace blink {
using namespace html_names; using namespace html_names;
inline HTMLModElement::HTMLModElement(const QualifiedName& tag_name, HTMLModElement::HTMLModElement(const QualifiedName& tag_name,
Document& document) Document& document)
: HTMLElement(tag_name, document) {} : HTMLElement(tag_name, document) {}
DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(HTMLModElement) DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(HTMLModElement)
......
...@@ -39,7 +39,7 @@ namespace blink { ...@@ -39,7 +39,7 @@ namespace blink {
using namespace html_names; using namespace html_names;
inline HTMLNoEmbedElement::HTMLNoEmbedElement(Document& document) HTMLNoEmbedElement::HTMLNoEmbedElement(Document& document)
: HTMLElement(kNoembedTag, document) {} : HTMLElement(kNoembedTag, document) {}
DEFINE_NODE_FACTORY(HTMLNoEmbedElement) DEFINE_NODE_FACTORY(HTMLNoEmbedElement)
......
...@@ -39,7 +39,7 @@ namespace blink { ...@@ -39,7 +39,7 @@ namespace blink {
using namespace html_names; using namespace html_names;
inline HTMLNoScriptElement::HTMLNoScriptElement(Document& document) HTMLNoScriptElement::HTMLNoScriptElement(Document& document)
: HTMLElement(kNoscriptTag, document) {} : HTMLElement(kNoscriptTag, document) {}
DEFINE_NODE_FACTORY(HTMLNoScriptElement) DEFINE_NODE_FACTORY(HTMLNoScriptElement)
......
...@@ -48,8 +48,8 @@ namespace blink { ...@@ -48,8 +48,8 @@ namespace blink {
using namespace html_names; using namespace html_names;
inline HTMLObjectElement::HTMLObjectElement(Document& document, HTMLObjectElement::HTMLObjectElement(Document& document,
const CreateElementFlags flags) const CreateElementFlags flags)
: HTMLPlugInElement(kObjectTag, : HTMLPlugInElement(kObjectTag,
document, document,
flags, flags,
......
...@@ -34,7 +34,7 @@ namespace blink { ...@@ -34,7 +34,7 @@ namespace blink {
using namespace html_names; using namespace html_names;
inline HTMLOListElement::HTMLOListElement(Document& document) HTMLOListElement::HTMLOListElement(Document& document)
: HTMLElement(kOlTag, document), : HTMLElement(kOlTag, document),
start_(0xBADBEEF), start_(0xBADBEEF),
item_count_(0), item_count_(0),
......
...@@ -30,7 +30,7 @@ namespace blink { ...@@ -30,7 +30,7 @@ namespace blink {
using namespace html_names; using namespace html_names;
inline HTMLParamElement::HTMLParamElement(Document& document) HTMLParamElement::HTMLParamElement(Document& document)
: HTMLElement(kParamTag, document) {} : HTMLElement(kParamTag, document) {}
DEFINE_NODE_FACTORY(HTMLParamElement) DEFINE_NODE_FACTORY(HTMLParamElement)
......
...@@ -15,7 +15,7 @@ namespace blink { ...@@ -15,7 +15,7 @@ namespace blink {
using namespace html_names; using namespace html_names;
inline HTMLPictureElement::HTMLPictureElement(Document& document) HTMLPictureElement::HTMLPictureElement(Document& document)
: HTMLElement(kPictureTag, document) {} : HTMLElement(kPictureTag, document) {}
DEFINE_NODE_FACTORY(HTMLPictureElement) DEFINE_NODE_FACTORY(HTMLPictureElement)
......
...@@ -31,8 +31,8 @@ namespace blink { ...@@ -31,8 +31,8 @@ namespace blink {
using namespace html_names; using namespace html_names;
inline HTMLPreElement::HTMLPreElement(const QualifiedName& tag_name, HTMLPreElement::HTMLPreElement(const QualifiedName& tag_name,
Document& document) Document& document)
: HTMLElement(tag_name, document) {} : HTMLElement(tag_name, document) {}
DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(HTMLPreElement) DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(HTMLPreElement)
......
...@@ -29,8 +29,8 @@ namespace blink { ...@@ -29,8 +29,8 @@ namespace blink {
using namespace html_names; using namespace html_names;
inline HTMLQuoteElement::HTMLQuoteElement(const QualifiedName& tag_name, HTMLQuoteElement::HTMLQuoteElement(const QualifiedName& tag_name,
Document& document) Document& document)
: HTMLElement(tag_name, document) { : HTMLElement(tag_name, document) {
DCHECK(HasTagName(kQTag) || HasTagName(kBlockquoteTag)); DCHECK(HasTagName(kQTag) || HasTagName(kBlockquoteTag));
} }
......
...@@ -11,7 +11,7 @@ namespace blink { ...@@ -11,7 +11,7 @@ namespace blink {
using namespace html_names; using namespace html_names;
inline HTMLRTElement::HTMLRTElement(Document& document) HTMLRTElement::HTMLRTElement(Document& document)
: HTMLElement(kRtTag, document) {} : HTMLElement(kRtTag, document) {}
DEFINE_NODE_FACTORY(HTMLRTElement) DEFINE_NODE_FACTORY(HTMLRTElement)
......
...@@ -11,7 +11,7 @@ namespace blink { ...@@ -11,7 +11,7 @@ namespace blink {
using namespace html_names; using namespace html_names;
inline HTMLRubyElement::HTMLRubyElement(Document& document) HTMLRubyElement::HTMLRubyElement(Document& document)
: HTMLElement(kRubyTag, document) {} : HTMLElement(kRubyTag, document) {}
DEFINE_NODE_FACTORY(HTMLRubyElement) DEFINE_NODE_FACTORY(HTMLRubyElement)
......
...@@ -40,7 +40,7 @@ namespace blink { ...@@ -40,7 +40,7 @@ namespace blink {
class Document; class Document;
inline HTMLShadowElement::HTMLShadowElement(Document& document) HTMLShadowElement::HTMLShadowElement(Document& document)
: V0InsertionPoint(html_names::kShadowTag, document) { : V0InsertionPoint(html_names::kShadowTag, document) {
UseCounter::Count(document, WebFeature::kHTMLShadowElement); UseCounter::Count(document, WebFeature::kHTMLShadowElement);
} }
......
...@@ -75,7 +75,7 @@ HTMLSlotElement* HTMLSlotElement::CreateUserAgentCustomAssignSlot( ...@@ -75,7 +75,7 @@ HTMLSlotElement* HTMLSlotElement::CreateUserAgentCustomAssignSlot(
return slot; return slot;
} }
inline HTMLSlotElement::HTMLSlotElement(Document& document) HTMLSlotElement::HTMLSlotElement(Document& document)
: HTMLElement(kSlotTag, document) { : HTMLElement(kSlotTag, document) {
UseCounter::Count(document, WebFeature::kHTMLSlotElement); UseCounter::Count(document, WebFeature::kHTMLSlotElement);
SetHasCustomStyleCallbacks(); SetHasCustomStyleCallbacks();
......
...@@ -37,8 +37,8 @@ namespace blink { ...@@ -37,8 +37,8 @@ namespace blink {
using namespace html_names; using namespace html_names;
inline HTMLTableColElement::HTMLTableColElement(const QualifiedName& tag_name, HTMLTableColElement::HTMLTableColElement(const QualifiedName& tag_name,
Document& document) Document& document)
: HTMLTablePartElement(tag_name, document), span_(kDefaultColSpan) {} : HTMLTablePartElement(tag_name, document), span_(kDefaultColSpan) {}
DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(HTMLTableColElement) DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(HTMLTableColElement)
......
...@@ -39,7 +39,7 @@ namespace blink { ...@@ -39,7 +39,7 @@ namespace blink {
using namespace html_names; using namespace html_names;
inline HTMLTemplateElement::HTMLTemplateElement(Document& document) HTMLTemplateElement::HTMLTemplateElement(Document& document)
: HTMLElement(kTemplateTag, document) { : HTMLElement(kTemplateTag, document) {
UseCounter::Count(document, WebFeature::kHTMLTemplateElement); UseCounter::Count(document, WebFeature::kHTMLTemplateElement);
} }
......
...@@ -37,7 +37,7 @@ namespace blink { ...@@ -37,7 +37,7 @@ namespace blink {
using namespace html_names; using namespace html_names;
inline HTMLWBRElement::HTMLWBRElement(Document& document) HTMLWBRElement::HTMLWBRElement(Document& document)
: HTMLElement(kWbrTag, document) {} : HTMLElement(kWbrTag, document) {}
DEFINE_NODE_FACTORY(HTMLWBRElement) DEFINE_NODE_FACTORY(HTMLWBRElement)
......
...@@ -78,7 +78,7 @@ enum VideoPersistenceControlsType { ...@@ -78,7 +78,7 @@ enum VideoPersistenceControlsType {
} // anonymous namespace } // anonymous namespace
inline HTMLVideoElement::HTMLVideoElement(Document& document) HTMLVideoElement::HTMLVideoElement(Document& document)
: HTMLMediaElement(kVideoTag, document), : HTMLMediaElement(kVideoTag, document),
remoting_interstitial_(nullptr), remoting_interstitial_(nullptr),
picture_in_picture_interstitial_(nullptr), picture_in_picture_interstitial_(nullptr),
......
...@@ -48,7 +48,7 @@ static String UrlForLoggingTrack(const KURL& url) { ...@@ -48,7 +48,7 @@ static String UrlForLoggingTrack(const KURL& url) {
return url.GetString().Substring(0, kMaximumURLLengthForLogging) + "..."; return url.GetString().Substring(0, kMaximumURLLengthForLogging) + "...";
} }
inline HTMLTrackElement::HTMLTrackElement(Document& document) HTMLTrackElement::HTMLTrackElement(Document& document)
: HTMLElement(kTrackTag, document), : HTMLElement(kTrackTag, document),
load_timer_(document.GetTaskRunner(TaskType::kNetworking), load_timer_(document.GetTaskRunner(TaskType::kNetworking),
this, this,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment