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

Side by Side Diff: third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp

Issue 2485373003: Drop finalization for ElementShadows. (Closed)
Patch Set: rebased Created 4 years 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/shadow/ElementShadow.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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Neither the name of Google Inc. nor the names of its 10 * * Neither the name of Google Inc. nor the names of its
(...skipping 27 matching lines...) Expand all
38 38
39 ElementShadow* ElementShadow::create() { 39 ElementShadow* ElementShadow::create() {
40 return new ElementShadow(); 40 return new ElementShadow();
41 } 41 }
42 42
43 ElementShadow::ElementShadow() 43 ElementShadow::ElementShadow()
44 : m_elementShadowV0(this, nullptr), 44 : m_elementShadowV0(this, nullptr),
45 m_shadowRoot(this, nullptr), 45 m_shadowRoot(this, nullptr),
46 m_needsDistributionRecalc(false) {} 46 m_needsDistributionRecalc(false) {}
47 47
48 ElementShadow::~ElementShadow() {}
49
50 ShadowRoot& ElementShadow::youngestShadowRoot() const { 48 ShadowRoot& ElementShadow::youngestShadowRoot() const {
51 ShadowRoot* current = m_shadowRoot; 49 ShadowRoot* current = m_shadowRoot;
52 DCHECK(current); 50 DCHECK(current);
53 while (current->youngerShadowRoot()) 51 while (current->youngerShadowRoot())
54 current = current->youngerShadowRoot(); 52 current = current->youngerShadowRoot();
55 return *current; 53 return *current;
56 } 54 }
57 55
58 ShadowRoot& ElementShadow::addShadowRoot(Element& shadowHost, 56 ShadowRoot& ElementShadow::addShadowRoot(Element& shadowHost,
59 ShadowRootType type) { 57 ShadowRootType type) {
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 visitor->trace(m_elementShadowV0); 168 visitor->trace(m_elementShadowV0);
171 visitor->trace(m_shadowRoot); 169 visitor->trace(m_shadowRoot);
172 } 170 }
173 171
174 DEFINE_TRACE_WRAPPERS(ElementShadow) { 172 DEFINE_TRACE_WRAPPERS(ElementShadow) {
175 visitor->traceWrappers(m_elementShadowV0); 173 visitor->traceWrappers(m_elementShadowV0);
176 visitor->traceWrappers(m_shadowRoot); 174 visitor->traceWrappers(m_shadowRoot);
177 } 175 }
178 176
179 } // namespace blink 177 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/shadow/ElementShadow.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698