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

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

Issue 2170383002: CustomElements: adopt node (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge conflict resolution Created 4 years, 4 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) 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 25 matching lines...) Expand all
36 #include "core/observer/ResizeObserver.h" 36 #include "core/observer/ResizeObserver.h"
37 #include "core/style/ComputedStyle.h" 37 #include "core/style/ComputedStyle.h"
38 38
39 namespace blink { 39 namespace blink {
40 40
41 struct SameSizeAsElementRareData : NodeRareData { 41 struct SameSizeAsElementRareData : NodeRareData {
42 short indices[1]; 42 short indices[1];
43 LayoutSize sizeForResizing; 43 LayoutSize sizeForResizing;
44 IntSize scrollOffset; 44 IntSize scrollOffset;
45 void* pointers[10]; 45 void* pointers[10];
46 Member<void*> persistentMember[4]; 46 Member<void*> persistentMember[5];
47 }; 47 };
48 48
49 CSSStyleDeclaration& ElementRareData::ensureInlineCSSStyleDeclaration(Element* o wnerElement) 49 CSSStyleDeclaration& ElementRareData::ensureInlineCSSStyleDeclaration(Element* o wnerElement)
50 { 50 {
51 if (!m_cssomWrapper) 51 if (!m_cssomWrapper)
52 m_cssomWrapper = new InlineCSSStyleDeclaration(ownerElement); 52 m_cssomWrapper = new InlineCSSStyleDeclaration(ownerElement);
53 return *m_cssomWrapper; 53 return *m_cssomWrapper;
54 } 54 }
55 55
56 InlineStylePropertyMap& ElementRareData::ensureInlineStylePropertyMap(Element* o wnerElement) 56 InlineStylePropertyMap& ElementRareData::ensureInlineStylePropertyMap(Element* o wnerElement)
(...skipping 22 matching lines...) Expand all
79 { 79 {
80 visitor->trace(m_dataset); 80 visitor->trace(m_dataset);
81 visitor->trace(m_classList); 81 visitor->trace(m_classList);
82 visitor->trace(m_shadow); 82 visitor->trace(m_shadow);
83 visitor->trace(m_attributeMap); 83 visitor->trace(m_attributeMap);
84 visitor->trace(m_attrNodeList); 84 visitor->trace(m_attrNodeList);
85 visitor->trace(m_elementAnimations); 85 visitor->trace(m_elementAnimations);
86 visitor->trace(m_cssomWrapper); 86 visitor->trace(m_cssomWrapper);
87 visitor->trace(m_cssomMapWrapper); 87 visitor->trace(m_cssomMapWrapper);
88 visitor->trace(m_pseudoElementData); 88 visitor->trace(m_pseudoElementData);
89 visitor->trace(m_v0CustomElementDefinition);
89 visitor->trace(m_customElementDefinition); 90 visitor->trace(m_customElementDefinition);
90 visitor->trace(m_intersectionObserverData); 91 visitor->trace(m_intersectionObserverData);
91 visitor->trace(m_resizeObserverData); 92 visitor->trace(m_resizeObserverData);
92 NodeRareData::traceAfterDispatch(visitor); 93 NodeRareData::traceAfterDispatch(visitor);
93 } 94 }
94 95
95 DEFINE_TRACE_WRAPPERS_AFTER_DISPATCH(ElementRareData) 96 DEFINE_TRACE_WRAPPERS_AFTER_DISPATCH(ElementRareData)
96 { 97 {
97 if (m_attrNodeList.get()) { 98 if (m_attrNodeList.get()) {
98 for (auto& attr : *m_attrNodeList) { 99 for (auto& attr : *m_attrNodeList) {
99 visitor->traceWrappers(attr); 100 visitor->traceWrappers(attr);
100 } 101 }
101 } 102 }
102 visitor->traceWrappers(m_shadow); 103 visitor->traceWrappers(m_shadow);
103 visitor->traceWrappers(m_attributeMap); 104 visitor->traceWrappers(m_attributeMap);
104 visitor->traceWrappers(m_dataset); 105 visitor->traceWrappers(m_dataset);
105 visitor->traceWrappers(m_classList); 106 visitor->traceWrappers(m_classList);
106 visitor->traceWrappers(m_intersectionObserverData); 107 visitor->traceWrappers(m_intersectionObserverData);
107 NodeRareData::traceWrappersAfterDispatch(visitor); 108 NodeRareData::traceWrappersAfterDispatch(visitor);
108 } 109 }
109 110
110 static_assert(sizeof(ElementRareData) == sizeof(SameSizeAsElementRareData), "Ele mentRareData should stay small"); 111 static_assert(sizeof(ElementRareData) == sizeof(SameSizeAsElementRareData), "Ele mentRareData should stay small");
111 112
112 } // namespace blink 113 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/ElementRareData.h ('k') | third_party/WebKit/Source/core/dom/TreeScopeAdopter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698