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

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

Issue 23516012: Rename StyleSheetCollections to StyleEngine. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/StyleSheetCollections.cpp ('k') | Source/core/html/HTMLLinkElement.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 13 matching lines...) Expand all
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */ 25 */
26 26
27 #include "config.h" 27 #include "config.h"
28 #include "core/dom/shadow/ShadowRoot.h" 28 #include "core/dom/shadow/ShadowRoot.h"
29 29
30 #include "bindings/v8/ExceptionMessages.h" 30 #include "bindings/v8/ExceptionMessages.h"
31 #include "bindings/v8/ExceptionState.h" 31 #include "bindings/v8/ExceptionState.h"
32 #include "core/css/resolver/StyleResolver.h" 32 #include "core/css/resolver/StyleResolver.h"
33 #include "core/dom/ElementTraversal.h" 33 #include "core/dom/ElementTraversal.h"
34 #include "core/dom/StyleSheetCollections.h" 34 #include "core/dom/StyleEngine.h"
35 #include "core/dom/Text.h" 35 #include "core/dom/Text.h"
36 #include "core/dom/shadow/ElementShadow.h" 36 #include "core/dom/shadow/ElementShadow.h"
37 #include "core/dom/shadow/InsertionPoint.h" 37 #include "core/dom/shadow/InsertionPoint.h"
38 #include "core/dom/shadow/ShadowRootRareData.h" 38 #include "core/dom/shadow/ShadowRootRareData.h"
39 #include "core/editing/markup.h" 39 #include "core/editing/markup.h"
40 #include "core/platform/HistogramSupport.h" 40 #include "core/platform/HistogramSupport.h"
41 41
42 namespace WebCore { 42 namespace WebCore {
43 43
44 struct SameSizeAsShadowRoot : public DocumentFragment, public TreeScope, public DoublyLinkedListNode<ShadowRoot> { 44 struct SameSizeAsShadowRoot : public DocumentFragment, public TreeScope, public DoublyLinkedListNode<ShadowRoot> {
(...skipping 28 matching lines...) Expand all
73 ShadowRootUsageOriginType usageType = document->url().protocolIsInHTTPFa mily() ? ShadowRootUsageOriginWeb : ShadowRootUsageOriginNotWeb; 73 ShadowRootUsageOriginType usageType = document->url().protocolIsInHTTPFa mily() ? ShadowRootUsageOriginWeb : ShadowRootUsageOriginNotWeb;
74 HistogramSupport::histogramEnumeration("WebCore.ShadowRoot.constructor", usageType, ShadowRootUsageOriginMax); 74 HistogramSupport::histogramEnumeration("WebCore.ShadowRoot.constructor", usageType, ShadowRootUsageOriginMax);
75 } 75 }
76 } 76 }
77 77
78 ShadowRoot::~ShadowRoot() 78 ShadowRoot::~ShadowRoot()
79 { 79 {
80 ASSERT(!m_prev); 80 ASSERT(!m_prev);
81 ASSERT(!m_next); 81 ASSERT(!m_next);
82 82
83 documentInternal()->styleSheetCollections()->didRemoveShadowRoot(this); 83 documentInternal()->styleEngine()->didRemoveShadowRoot(this);
84 84
85 // We cannot let ContainerNode destructor call willBeDeletedFrom() 85 // We cannot let ContainerNode destructor call willBeDeletedFrom()
86 // for this ShadowRoot instance because TreeScope destructor 86 // for this ShadowRoot instance because TreeScope destructor
87 // clears Node::m_treeScope thus ContainerNode is no longer able 87 // clears Node::m_treeScope thus ContainerNode is no longer able
88 // to access it Document reference after that. 88 // to access it Document reference after that.
89 willBeDeletedFrom(documentInternal()); 89 willBeDeletedFrom(documentInternal());
90 90
91 // We must remove all of our children first before the TreeScope destructor 91 // We must remove all of our children first before the TreeScope destructor
92 // runs so we don't go through TreeScopeAdopter for each child with a 92 // runs so we don't go through TreeScopeAdopter for each child with a
93 // destructed tree scope in each descendant. 93 // destructed tree scope in each descendant.
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 if (element->isInsertionPoint()) 405 if (element->isInsertionPoint())
406 insertionPoints.append(toInsertionPoint(element)); 406 insertionPoints.append(toInsertionPoint(element));
407 } 407 }
408 408
409 ensureShadowRootRareData()->setChildInsertionPoints(insertionPoints); 409 ensureShadowRootRareData()->setChildInsertionPoints(insertionPoints);
410 410
411 return m_shadowRootRareData->childInsertionPoints(); 411 return m_shadowRootRareData->childInsertionPoints();
412 } 412 }
413 413
414 } 414 }
OLDNEW
« no previous file with comments | « Source/core/dom/StyleSheetCollections.cpp ('k') | Source/core/html/HTMLLinkElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698