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

Unified Diff: third_party/WebKit/Source/core/dom/shadow/ShadowRoot.h

Issue 1841353002: Implement ShadowRoot.mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a comment and refactor the layout test Created 4 years, 9 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/shadow/ShadowRoot.h
diff --git a/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.h b/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.h
index cf17ea363e54f0f07374f9bb32d0c8975b42d9c6..6633d33e9897149fa074453d1b79f473160b7d58 100644
--- a/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.h
+++ b/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.h
@@ -79,6 +79,8 @@ public:
ShadowRoot* olderShadowRootForBindings() const;
+ String mode() const { return (type() == ShadowRootType::V0 || type() == ShadowRootType::Open) ? "open" : "closed"; };
+
bool isOpenOrV0() const { return type() == ShadowRootType::V0 || type() == ShadowRootType::Open; }
bool isV1() const { return type() == ShadowRootType::Open || type() == ShadowRootType::Closed; }

Powered by Google App Engine
This is Rietveld 408576698