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

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

Issue 2485373003: Drop finalization for ElementShadows. (Closed)
Patch Set: rebased Created 4 years, 1 month 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 | « no previous file | third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp » ('j') | 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 20 matching lines...) Expand all
31 #include "bindings/core/v8/TraceWrapperMember.h" 31 #include "bindings/core/v8/TraceWrapperMember.h"
32 #include "core/CoreExport.h" 32 #include "core/CoreExport.h"
33 #include "core/dom/shadow/ShadowRoot.h" 33 #include "core/dom/shadow/ShadowRoot.h"
34 #include "platform/heap/Handle.h" 34 #include "platform/heap/Handle.h"
35 #include "wtf/Noncopyable.h" 35 #include "wtf/Noncopyable.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 class ElementShadowV0; 39 class ElementShadowV0;
40 40
41 class CORE_EXPORT ElementShadow final 41 class CORE_EXPORT ElementShadow final : public GarbageCollected<ElementShadow>,
42 : public GarbageCollectedFinalized<ElementShadow>, 42 public TraceWrapperBase {
43 public TraceWrapperBase {
44 WTF_MAKE_NONCOPYABLE(ElementShadow); 43 WTF_MAKE_NONCOPYABLE(ElementShadow);
45 44
46 public: 45 public:
47 static ElementShadow* create(); 46 static ElementShadow* create();
48 ~ElementShadow();
49 47
50 Element& host() const { 48 Element& host() const {
51 DCHECK(m_shadowRoot); 49 DCHECK(m_shadowRoot);
52 return m_shadowRoot->host(); 50 return m_shadowRoot->host();
53 } 51 }
54 52
55 // TODO(hayato): Remove youngestShadowRoot() and oldestShadowRoot() from 53 // TODO(hayato): Remove youngestShadowRoot() and oldestShadowRoot() from
56 // ElementShadow 54 // ElementShadow
57 ShadowRoot& youngestShadowRoot() const; 55 ShadowRoot& youngestShadowRoot() const;
58 ShadowRoot& oldestShadowRoot() const { 56 ShadowRoot& oldestShadowRoot() const {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 114
117 inline void ElementShadow::distributeIfNeeded() { 115 inline void ElementShadow::distributeIfNeeded() {
118 if (m_needsDistributionRecalc) 116 if (m_needsDistributionRecalc)
119 distribute(); 117 distribute();
120 m_needsDistributionRecalc = false; 118 m_needsDistributionRecalc = false;
121 } 119 }
122 120
123 } // namespace blink 121 } // namespace blink
124 122
125 #endif 123 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698