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

Unified Diff: public/web/WebFrame.h

Issue 1132133009: Plumb whether or not a frame is in shadow DOM to the embedder. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address review comments Created 5 years, 7 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
« no previous file with comments | « Source/web/tests/WebViewTest.cpp ('k') | public/web/WebFrameClient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/web/WebFrame.h
diff --git a/public/web/WebFrame.h b/public/web/WebFrame.h
index 428ce87d677c8aba18b861b0e3e8573970126e33..f43e83601d011dc08a36a9e62232b35d555a28a6 100644
--- a/public/web/WebFrame.h
+++ b/public/web/WebFrame.h
@@ -42,6 +42,7 @@
#include "public/platform/WebReferrerPolicy.h"
#include "public/platform/WebURL.h"
#include "public/platform/WebURLRequest.h"
+#include "public/web/WebTreeScopeType.h"
struct NPObject;
@@ -677,6 +678,9 @@ public:
#if BLINK_IMPLEMENTATION
static WebFrame* fromFrame(Frame*);
+
+ bool inShadowTree() const { return m_scope == WebTreeScopeType::Shadow; }
+
#if ENABLE(OILPAN)
static void traceFrames(Visitor*, WebFrame*);
static void traceFrames(InlinedGlobalMarkingVisitor, WebFrame*);
@@ -686,7 +690,7 @@ public:
#endif
protected:
- WebFrame();
+ explicit WebFrame(WebTreeScopeType);
virtual ~WebFrame();
// Sets the parent WITHOUT fulling adding it to the frame tree.
@@ -716,6 +720,8 @@ private:
#endif
#endif
+ const WebTreeScopeType m_scope;
+
WebFrame* m_parent;
WebFrame* m_previousSibling;
WebFrame* m_nextSibling;
« no previous file with comments | « Source/web/tests/WebViewTest.cpp ('k') | public/web/WebFrameClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698