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

Side by Side Diff: Source/core/dom/Element.cpp

Issue 309593004: Un-inline Element's constructor to avoid bloating (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Element.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
8 * (C) 2007 Eric Seidel (eric@webkit.org) 8 * (C) 2007 Eric Seidel (eric@webkit.org)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 return it->get(); 157 return it->get();
158 } 158 }
159 return 0; 159 return 0;
160 } 160 }
161 161
162 PassRefPtrWillBeRawPtr<Element> Element::create(const QualifiedName& tagName, Do cument* document) 162 PassRefPtrWillBeRawPtr<Element> Element::create(const QualifiedName& tagName, Do cument* document)
163 { 163 {
164 return adoptRefWillBeRefCountedGarbageCollected(new Element(tagName, documen t, CreateElement)); 164 return adoptRefWillBeRefCountedGarbageCollected(new Element(tagName, documen t, CreateElement));
165 } 165 }
166 166
167 Element::Element(const QualifiedName& tagName, Document* document, ConstructionT ype type)
168 : ContainerNode(document, type)
169 , m_tagName(tagName)
170 {
171 ScriptWrappable::init(this);
172 }
173
167 Element::~Element() 174 Element::~Element()
168 { 175 {
169 ASSERT(needsAttach()); 176 ASSERT(needsAttach());
170 177
171 #if !ENABLE(OILPAN) 178 #if !ENABLE(OILPAN)
172 if (hasRareData()) 179 if (hasRareData())
173 elementRareData()->clearShadow(); 180 elementRareData()->clearShadow();
174 181
175 if (isCustomElement()) 182 if (isCustomElement())
176 CustomElement::wasDestroyed(this); 183 CustomElement::wasDestroyed(this);
(...skipping 3124 matching lines...) Expand 10 before | Expand all | Expand 10 after
3301 3308
3302 void Element::trace(Visitor* visitor) 3309 void Element::trace(Visitor* visitor)
3303 { 3310 {
3304 if (hasRareData()) 3311 if (hasRareData())
3305 visitor->trace(elementRareData()); 3312 visitor->trace(elementRareData());
3306 3313
3307 ContainerNode::trace(visitor); 3314 ContainerNode::trace(visitor);
3308 } 3315 }
3309 3316
3310 } // namespace WebCore 3317 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/Element.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698