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

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

Issue 1455943002: [Oilpan] Prepare full definition of classes before using Member (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 void* pointers[2]; 43 void* pointers[2];
44 }; 44 };
45 45
46 static_assert(sizeof(ElementData) == sizeof(SameSizeAsElementData), "ElementData should stay small"); 46 static_assert(sizeof(ElementData) == sizeof(SameSizeAsElementData), "ElementData should stay small");
47 47
48 static size_t sizeForShareableElementDataWithAttributeCount(unsigned count) 48 static size_t sizeForShareableElementDataWithAttributeCount(unsigned count)
49 { 49 {
50 return sizeof(ShareableElementData) + sizeof(Attribute) * count; 50 return sizeof(ShareableElementData) + sizeof(Attribute) * count;
51 } 51 }
52 52
53 const StylePropertySet* ElementData::inlineStyle() const
54 {
55 return m_inlineStyle.get();
56 }
57
58 const StylePropertySet* ElementData::presentationAttributeStyle() const
59 {
60 if (!m_isUnique)
61 return nullptr;
62 return toUniqueElementData(this)->m_presentationAttributeStyle.get();
63 }
64
53 ElementData::ElementData() 65 ElementData::ElementData()
54 : m_isUnique(true) 66 : m_isUnique(true)
55 , m_arraySize(0) 67 , m_arraySize(0)
56 , m_presentationAttributeStyleIsDirty(false) 68 , m_presentationAttributeStyleIsDirty(false)
57 , m_styleAttributeIsDirty(false) 69 , m_styleAttributeIsDirty(false)
58 , m_animatedSVGAttributesAreDirty(false) 70 , m_animatedSVGAttributesAreDirty(false)
59 { 71 {
60 } 72 }
61 73
62 ElementData::ElementData(unsigned arraySize) 74 ElementData::ElementData(unsigned arraySize)
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 return adoptRefWillBeNoop(new (slot) ShareableElementData(*this)); 224 return adoptRefWillBeNoop(new (slot) ShareableElementData(*this));
213 } 225 }
214 226
215 DEFINE_TRACE_AFTER_DISPATCH(UniqueElementData) 227 DEFINE_TRACE_AFTER_DISPATCH(UniqueElementData)
216 { 228 {
217 visitor->trace(m_presentationAttributeStyle); 229 visitor->trace(m_presentationAttributeStyle);
218 ElementData::traceAfterDispatch(visitor); 230 ElementData::traceAfterDispatch(visitor);
219 } 231 }
220 232
221 } // namespace blink 233 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698