| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 22 matching lines...) Expand all Loading... |
| 33 #include "core/css/resolver/StyleResolverParentScope.h" | 33 #include "core/css/resolver/StyleResolverParentScope.h" |
| 34 #include "core/dom/ElementTraversal.h" | 34 #include "core/dom/ElementTraversal.h" |
| 35 #include "core/dom/StyleEngine.h" | 35 #include "core/dom/StyleEngine.h" |
| 36 #include "core/dom/Text.h" | 36 #include "core/dom/Text.h" |
| 37 #include "core/dom/shadow/ElementShadow.h" | 37 #include "core/dom/shadow/ElementShadow.h" |
| 38 #include "core/dom/shadow/InsertionPoint.h" | 38 #include "core/dom/shadow/InsertionPoint.h" |
| 39 #include "core/dom/shadow/ShadowRootRareData.h" | 39 #include "core/dom/shadow/ShadowRootRareData.h" |
| 40 #include "core/editing/serializers/Serialization.h" | 40 #include "core/editing/serializers/Serialization.h" |
| 41 #include "core/html/HTMLShadowElement.h" | 41 #include "core/html/HTMLShadowElement.h" |
| 42 #include "public/platform/Platform.h" | 42 #include "public/platform/Platform.h" |
| 43 #include "wtf/SizeAssertions.h" |
| 43 | 44 |
| 44 namespace blink { | 45 namespace blink { |
| 45 | 46 |
| 46 struct SameSizeAsShadowRoot : public DocumentFragment, public TreeScope, public
DoublyLinkedListNode<ShadowRoot> { | 47 ASSERT_SIZE(ShadowRoot, 104, 200); |
| 47 #if ENABLE(OILPAN) | |
| 48 char emptyClassFieldsDueToGCMixinMarker[1]; | |
| 49 #endif | |
| 50 void* pointers[3]; | |
| 51 unsigned countersAndFlags[1]; | |
| 52 }; | |
| 53 | |
| 54 static_assert(sizeof(ShadowRoot) == sizeof(SameSizeAsShadowRoot), "ShadowRoot sh
ould stay small"); | |
| 55 | 48 |
| 56 ShadowRoot::ShadowRoot(Document& document, ShadowRootType type) | 49 ShadowRoot::ShadowRoot(Document& document, ShadowRootType type) |
| 57 : DocumentFragment(0, CreateShadowRoot) | 50 : DocumentFragment(0, CreateShadowRoot) |
| 58 , TreeScope(*this, document) | 51 , TreeScope(*this, document) |
| 59 , m_prev(nullptr) | 52 , m_prev(nullptr) |
| 60 , m_next(nullptr) | 53 , m_next(nullptr) |
| 61 , m_numberOfStyles(0) | 54 , m_numberOfStyles(0) |
| 62 , m_type(static_cast<unsigned>(type)) | 55 , m_type(static_cast<unsigned>(type)) |
| 63 , m_registeredWithParentShadowRoot(false) | 56 , m_registeredWithParentShadowRoot(false) |
| 64 , m_descendantInsertionPointsIsValid(false) | 57 , m_descendantInsertionPointsIsValid(false) |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 DEFINE_TRACE(ShadowRoot) | 319 DEFINE_TRACE(ShadowRoot) |
| 327 { | 320 { |
| 328 visitor->trace(m_prev); | 321 visitor->trace(m_prev); |
| 329 visitor->trace(m_next); | 322 visitor->trace(m_next); |
| 330 visitor->trace(m_shadowRootRareData); | 323 visitor->trace(m_shadowRootRareData); |
| 331 TreeScope::trace(visitor); | 324 TreeScope::trace(visitor); |
| 332 DocumentFragment::trace(visitor); | 325 DocumentFragment::trace(visitor); |
| 333 } | 326 } |
| 334 | 327 |
| 335 } | 328 } |
| OLD | NEW |