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

Side by Side Diff: Source/core/dom/shadow/ShadowRoot.cpp

Issue 1317143005: [WIP] do something :-) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « Source/core/dom/QualifiedName.cpp ('k') | Source/core/html/parser/CompactHTMLToken.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) 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
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
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 }
OLDNEW
« no previous file with comments | « Source/core/dom/QualifiedName.cpp ('k') | Source/core/html/parser/CompactHTMLToken.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698