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

Side by Side Diff: third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp

Issue 1407183002: Rename ShadowRootType::OpenByDefault to ShadowRootType::V0. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@v1-attach-shadow
Patch Set: Created 5 years, 2 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 #if !ENABLE(OILPAN) 141 #if !ENABLE(OILPAN)
142 removeDetachedShadowRoots(); 142 removeDetachedShadowRoots();
143 #endif 143 #endif
144 } 144 }
145 145
146 ShadowRoot& ElementShadow::addShadowRoot(Element& shadowHost, ShadowRootType typ e) 146 ShadowRoot& ElementShadow::addShadowRoot(Element& shadowHost, ShadowRootType typ e)
147 { 147 {
148 EventDispatchForbiddenScope assertNoEventDispatch; 148 EventDispatchForbiddenScope assertNoEventDispatch;
149 ScriptForbiddenScope forbidScript; 149 ScriptForbiddenScope forbidScript;
150 150
151 if (type == ShadowRootType::OpenByDefault) { 151 if (type == ShadowRootType::V0) {
152 if (!youngestShadowRoot()) { 152 if (!youngestShadowRoot()) {
153 shadowHost.willAddFirstAuthorShadowRoot(); 153 shadowHost.willAddFirstAuthorShadowRoot();
154 } else if (youngestShadowRoot()->type() == ShadowRootType::UserAgent) { 154 } else if (youngestShadowRoot()->type() == ShadowRootType::UserAgent) {
155 shadowHost.willAddFirstAuthorShadowRoot(); 155 shadowHost.willAddFirstAuthorShadowRoot();
156 UseCounter::countDeprecation(shadowHost.document(), UseCounter::Elem entCreateShadowRootMultipleWithUserAgentShadowRoot); 156 UseCounter::countDeprecation(shadowHost.document(), UseCounter::Elem entCreateShadowRootMultipleWithUserAgentShadowRoot);
157 } else { 157 } else {
158 UseCounter::countDeprecation(shadowHost.document(), UseCounter::Elem entCreateShadowRootMultiple); 158 UseCounter::countDeprecation(shadowHost.document(), UseCounter::Elem entCreateShadowRootMultiple);
159 } 159 }
160 } else if (type == ShadowRootType::Open || type == ShadowRootType::Closed) { 160 } else if (type == ShadowRootType::Open || type == ShadowRootType::Closed) {
161 shadowHost.willAddFirstAuthorShadowRoot(); 161 shadowHost.willAddFirstAuthorShadowRoot();
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 visitor->trace(m_nodeToInsertionPoints); 382 visitor->trace(m_nodeToInsertionPoints);
383 visitor->trace(m_selectFeatures); 383 visitor->trace(m_selectFeatures);
384 // Shadow roots are linked with previous and next pointers which are traced. 384 // Shadow roots are linked with previous and next pointers which are traced.
385 // It is therefore enough to trace one of the shadow roots here and the 385 // It is therefore enough to trace one of the shadow roots here and the
386 // rest will be traced from there. 386 // rest will be traced from there.
387 visitor->trace(m_shadowRoots.head()); 387 visitor->trace(m_shadowRoots.head());
388 #endif 388 #endif
389 } 389 }
390 390
391 } // namespace 391 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698