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

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

Issue 265793017: Oilpan: move node/element rare data objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased + EventHandler.cpp oilpan compile fix Created 6 years, 7 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
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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 160
161 PassRefPtr<Element> Element::create(const QualifiedName& tagName, Document* docu ment) 161 PassRefPtr<Element> Element::create(const QualifiedName& tagName, Document* docu ment)
162 { 162 {
163 return adoptRef(new Element(tagName, document, CreateElement)); 163 return adoptRef(new Element(tagName, document, CreateElement));
164 } 164 }
165 165
166 Element::~Element() 166 Element::~Element()
167 { 167 {
168 ASSERT(needsAttach()); 168 ASSERT(needsAttach());
169 169
170 #if !ENABLE(OILPAN)
170 if (hasRareData()) 171 if (hasRareData())
171 elementRareData()->clearShadow(); 172 elementRareData()->clearShadow();
haraken 2014/05/04 01:46:24 I agree that you cannot access ElementRareData in
172 173 #endif
173 if (hasActiveAnimations())
174 activeAnimations()->dispose();
175 174
176 if (isCustomElement()) 175 if (isCustomElement())
177 CustomElement::wasDestroyed(this); 176 CustomElement::wasDestroyed(this);
178 177
179 if (hasSyntheticAttrChildNodes()) 178 if (hasSyntheticAttrChildNodes())
180 detachAllAttrNodesFromElement(); 179 detachAllAttrNodesFromElement();
181 180
182 #if !ENABLE(OILPAN) 181 #if !ENABLE(OILPAN)
183 // With Oilpan, either the Element has been removed from the Document 182 // With Oilpan, either the Element has been removed from the Document
184 // or the Document is dead as well. If the Element has been removed from 183 // or the Document is dead as well. If the Element has been removed from
(...skipping 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1423 1422
1424 // attach() will perform the below steps for us when inside recalcStyle. 1423 // attach() will perform the below steps for us when inside recalcStyle.
1425 if (!document().inStyleRecalc()) { 1424 if (!document().inStyleRecalc()) {
1426 data->resetStyleState(); 1425 data->resetStyleState();
1427 data->clearComputedStyle(); 1426 data->clearComputedStyle();
1428 data->clearRestyleFlags(); 1427 data->clearRestyleFlags();
1429 } 1428 }
1430 1429
1431 if (ActiveAnimations* activeAnimations = data->activeAnimations()) { 1430 if (ActiveAnimations* activeAnimations = data->activeAnimations()) {
1432 if (context.performingReattach) { 1431 if (context.performingReattach) {
1433 // FIXME: We call detach from withing style recalc, so compositi ngState is not up to date. 1432 // FIXME: We call detach from within style recalc, so compositin gState is not up to date.
1434 // https://code.google.com/p/chromium/issues/detail?id=339847 1433 // https://code.google.com/p/chromium/issues/detail?id=339847
1435 DisableCompositingQueryAsserts disabler; 1434 DisableCompositingQueryAsserts disabler;
1436 1435
1437 // FIXME: restart compositor animations rather than pull back to the main thread 1436 // FIXME: restart compositor animations rather than pull back to the main thread
1438 activeAnimations->cancelAnimationOnCompositor(); 1437 activeAnimations->cancelAnimationOnCompositor();
1439 } else { 1438 } else {
1440 activeAnimations->cssAnimations().cancel(); 1439 activeAnimations->cssAnimations().cancel();
1441 activeAnimations->setAnimationStyleChange(false); 1440 activeAnimations->setAnimationStyleChange(false);
1442 } 1441 }
1443 } 1442 }
(...skipping 1843 matching lines...) Expand 10 before | Expand all | Expand 10 after
3287 || isHTMLObjectElement(*this) 3286 || isHTMLObjectElement(*this)
3288 || isHTMLAppletElement(*this) 3287 || isHTMLAppletElement(*this)
3289 || isHTMLCanvasElement(*this)) 3288 || isHTMLCanvasElement(*this))
3290 return false; 3289 return false;
3291 if (FullscreenElementStack::isActiveFullScreenElement(this)) 3290 if (FullscreenElementStack::isActiveFullScreenElement(this))
3292 return false; 3291 return false;
3293 return true; 3292 return true;
3294 } 3293 }
3295 3294
3296 } // namespace WebCore 3295 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698