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

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

Issue 315173002: Revert of Remove scoped styles. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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/StyleSheetScopingNodeList.cpp ('k') | Source/core/dom/shadow/ShadowRoot.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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 bool isYoungest() const { return !youngerShadowRoot(); } 77 bool isYoungest() const { return !youngerShadowRoot(); }
78 bool isOldest() const { return !olderShadowRoot(); } 78 bool isOldest() const { return !olderShadowRoot(); }
79 bool isOldestAuthorShadowRoot() const; 79 bool isOldestAuthorShadowRoot() const;
80 80
81 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; 81 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE;
82 82
83 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; 83 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
84 virtual void removedFrom(ContainerNode*) OVERRIDE; 84 virtual void removedFrom(ContainerNode*) OVERRIDE;
85 85
86 void registerScopedHTMLStyleChild(); 86 virtual void registerScopedHTMLStyleChild() OVERRIDE;
87 void unregisterScopedHTMLStyleChild(); 87 virtual void unregisterScopedHTMLStyleChild() OVERRIDE;
88 88
89 bool containsShadowElements() const; 89 bool containsShadowElements() const;
90 bool containsContentElements() const; 90 bool containsContentElements() const;
91 bool containsInsertionPoints() const { return containsShadowElements() || co ntainsContentElements(); } 91 bool containsInsertionPoints() const { return containsShadowElements() || co ntainsContentElements(); }
92 bool containsShadowRoots() const; 92 bool containsShadowRoots() const;
93 93
94 unsigned descendantShadowElementCount() const; 94 unsigned descendantShadowElementCount() const;
95 95
96 // For Internals, don't use this. 96 // For Internals, don't use this.
97 unsigned childShadowRootCount() const; 97 unsigned childShadowRootCount() const;
98 unsigned numberOfStyles() const { return m_numberOfStyles; }
99 98
100 HTMLShadowElement* shadowInsertionPointOfYoungerShadowRoot() const; 99 HTMLShadowElement* shadowInsertionPointOfYoungerShadowRoot() const;
101 void setShadowInsertionPointOfYoungerShadowRoot(PassRefPtrWillBeRawPtr<HTMLS hadowElement>); 100 void setShadowInsertionPointOfYoungerShadowRoot(PassRefPtrWillBeRawPtr<HTMLS hadowElement>);
102 101
103 void didAddInsertionPoint(InsertionPoint*); 102 void didAddInsertionPoint(InsertionPoint*);
104 void didRemoveInsertionPoint(InsertionPoint*); 103 void didRemoveInsertionPoint(InsertionPoint*);
105 const WillBeHeapVector<RefPtrWillBeMember<InsertionPoint> >& descendantInser tionPoints(); 104 const WillBeHeapVector<RefPtrWillBeMember<InsertionPoint> >& descendantInser tionPoints();
106 105
107 ShadowRootType type() const { return static_cast<ShadowRootType>(m_type); } 106 ShadowRootType type() const { return static_cast<ShadowRootType>(m_type); }
108 107
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 { 159 {
161 return adjustedFocusedElement(); 160 return adjustedFocusedElement();
162 } 161 }
163 162
164 DEFINE_NODE_TYPE_CASTS(ShadowRoot, isShadowRoot()); 163 DEFINE_NODE_TYPE_CASTS(ShadowRoot, isShadowRoot());
165 DEFINE_TYPE_CASTS(ShadowRoot, TreeScope, treeScope, treeScope->rootNode().isShad owRoot(), treeScope.rootNode().isShadowRoot()); 164 DEFINE_TYPE_CASTS(ShadowRoot, TreeScope, treeScope, treeScope->rootNode().isShad owRoot(), treeScope.rootNode().isShadowRoot());
166 165
167 } // namespace 166 } // namespace
168 167
169 #endif 168 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/StyleSheetScopingNodeList.cpp ('k') | Source/core/dom/shadow/ShadowRoot.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698