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

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

Issue 23851003: Have StyleSheetCollections constructor take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Have StyleSheetCollection constructor take a Document reference as well 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') | no next file » | 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 { 165 {
166 ASSERT_WITH_SECURITY_IMPLICATION(!treeScope || (treeScope->rootNode() && tre eScope->rootNode()->isShadowRoot())); 166 ASSERT_WITH_SECURITY_IMPLICATION(!treeScope || (treeScope->rootNode() && tre eScope->rootNode()->isShadowRoot()));
167 return static_cast<const ShadowRoot*>(treeScope); 167 return static_cast<const ShadowRoot*>(treeScope);
168 } 168 }
169 169
170 inline ShadowRoot* toShadowRoot(TreeScope* treeScope) 170 inline ShadowRoot* toShadowRoot(TreeScope* treeScope)
171 { 171 {
172 return const_cast<ShadowRoot*>(toShadowRoot(static_cast<const TreeScope*>(tr eeScope))); 172 return const_cast<ShadowRoot*>(toShadowRoot(static_cast<const TreeScope*>(tr eeScope)));
173 } 173 }
174 174
175 inline ShadowRoot& toShadowRoot(TreeScope& treeScope)
176 {
177 ASSERT_WITH_SECURITY_IMPLICATION(treeScope.rootNode() && treeScope.rootNode( )->isShadowRoot());
178 return static_cast<ShadowRoot&>(treeScope);
179 }
180
175 } // namespace 181 } // namespace
176 182
177 #endif 183 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/StyleSheetCollections.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698