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

Unified Diff: third_party/WebKit/Source/core/dom/Element.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/Element.cpp
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp
index 210306d7686e42846e3dcf10033eee127f2baccd..e47ef9dbc4536b03607176a4a53d144e90d78722 100644
--- a/third_party/WebKit/Source/core/dom/Element.cpp
+++ b/third_party/WebKit/Source/core/dom/Element.cpp
@@ -1915,7 +1915,7 @@ PassRefPtrWillBeRawPtr<ShadowRoot> Element::createShadowRoot(const ScriptState*
exceptionState.throwDOMException(InvalidStateError, "Shadow root cannot be created on a host which already hosts this type of shadow tree.");
return nullptr;
}
- return createShadowRootInternal(ShadowRootType::OpenByDefault, exceptionState);
+ return createShadowRootInternal(ShadowRootType::V0, exceptionState);
}
PassRefPtrWillBeRawPtr<ShadowRoot> Element::attachShadow(const ScriptState* scriptState, const ShadowRootInit& shadowRootInitDict, ExceptionState& exceptionState)
@@ -1929,7 +1929,7 @@ PassRefPtrWillBeRawPtr<ShadowRoot> Element::attachShadow(const ScriptState* scri
return nullptr;
}
- ShadowRootType type = ShadowRootType::OpenByDefault;
+ ShadowRootType type = ShadowRootType::V0;
if (shadowRootInitDict.hasMode())
type = shadowRootInitDict.mode() == "open" ? ShadowRootType::Open : ShadowRootType::Closed;
@@ -1982,7 +1982,7 @@ ShadowRoot* Element::openShadowRoot() const
ShadowRoot* root = shadowRoot();
if (!root)
return nullptr;
- return root->type() == ShadowRootType::OpenByDefault || root->type() == ShadowRootType::Open ? root : nullptr;
+ return root->type() == ShadowRootType::V0 || root->type() == ShadowRootType::Open ? root : nullptr;
}
ShadowRoot* Element::closedShadowRoot() const

Powered by Google App Engine
This is Rietveld 408576698