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

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.h

Issue 1869773004: Move shadowCascadeOrder to Document from StyleEngine (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove ASSERT and insert DCHECK_NE Created 4 years, 8 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
9 * Copyright (C) 2011 Google Inc. All rights reserved. 9 * Copyright (C) 2011 Google Inc. All rights reserved.
10 * 10 *
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 DefaultDocumentClass = 0, 202 DefaultDocumentClass = 0,
203 HTMLDocumentClass = 1, 203 HTMLDocumentClass = 1,
204 XHTMLDocumentClass = 1 << 1, 204 XHTMLDocumentClass = 1 << 1,
205 ImageDocumentClass = 1 << 2, 205 ImageDocumentClass = 1 << 2,
206 PluginDocumentClass = 1 << 3, 206 PluginDocumentClass = 1 << 3,
207 MediaDocumentClass = 1 << 4, 207 MediaDocumentClass = 1 << 4,
208 SVGDocumentClass = 1 << 5, 208 SVGDocumentClass = 1 << 5,
209 XMLDocumentClass = 1 << 6, 209 XMLDocumentClass = 1 << 6,
210 }; 210 };
211 211
212 enum ShadowCascadeOrder {
213 ShadowCascadeNone,
214 ShadowCascadeV0,
215 ShadowCascadeV1
216 };
217
212 using DocumentClassFlags = unsigned char; 218 using DocumentClassFlags = unsigned char;
213 219
214 class CORE_EXPORT Document : public ContainerNode, public TreeScope, public Secu rityContext, public ExecutionContext, public Supplementable<Document>, public Do cumentLifecycleNotifier { 220 class CORE_EXPORT Document : public ContainerNode, public TreeScope, public Secu rityContext, public ExecutionContext, public Supplementable<Document>, public Do cumentLifecycleNotifier {
215 DEFINE_WRAPPERTYPEINFO(); 221 DEFINE_WRAPPERTYPEINFO();
216 USING_GARBAGE_COLLECTED_MIXIN(Document); 222 USING_GARBAGE_COLLECTED_MIXIN(Document);
217 public: 223 public:
218 static RawPtr<Document> create(const DocumentInit& initializer = DocumentIni t()) 224 static RawPtr<Document> create(const DocumentInit& initializer = DocumentIni t())
219 { 225 {
220 return new Document(initializer); 226 return new Document(initializer);
221 } 227 }
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after
1051 int nodeCount() const { return m_nodeCount; } 1057 int nodeCount() const { return m_nodeCount; }
1052 1058
1053 using WeakDocumentSet = HeapHashSet<WeakMember<Document>>; 1059 using WeakDocumentSet = HeapHashSet<WeakMember<Document>>;
1054 static WeakDocumentSet& liveDocumentSet(); 1060 static WeakDocumentSet& liveDocumentSet();
1055 1061
1056 WebTaskRunner* loadingTaskRunner() const; 1062 WebTaskRunner* loadingTaskRunner() const;
1057 WebTaskRunner* timerTaskRunner() const; 1063 WebTaskRunner* timerTaskRunner() const;
1058 1064
1059 void enforceStrictMixedContentChecking(); 1065 void enforceStrictMixedContentChecking();
1060 1066
1067 bool mayContainV0Shadow() const { return m_mayContainV0Shadow; }
1068
1069 ShadowCascadeOrder shadowCascadeOrder() const { return m_shadowCascadeOrder; }
1070 void setShadowCascadeOrder(ShadowCascadeOrder);
1071
1061 protected: 1072 protected:
1062 Document(const DocumentInit&, DocumentClassFlags = DefaultDocumentClass); 1073 Document(const DocumentInit&, DocumentClassFlags = DefaultDocumentClass);
1063 1074
1064 void didUpdateSecurityOrigin() final; 1075 void didUpdateSecurityOrigin() final;
1065 1076
1066 void clearXMLVersion() { m_xmlVersion = String(); } 1077 void clearXMLVersion() { m_xmlVersion = String(); }
1067 1078
1068 #if !ENABLE(OILPAN) 1079 #if !ENABLE(OILPAN)
1069 void dispose() override; 1080 void dispose() override;
1070 #endif 1081 #endif
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
1112 1123
1113 void childrenChanged(const ChildrenChange&) override; 1124 void childrenChanged(const ChildrenChange&) override;
1114 1125
1115 String nodeName() const final; 1126 String nodeName() const final;
1116 NodeType getNodeType() const final; 1127 NodeType getNodeType() const final;
1117 bool childTypeAllowed(NodeType) const final; 1128 bool childTypeAllowed(NodeType) const final;
1118 RawPtr<Node> cloneNode(bool deep) final; 1129 RawPtr<Node> cloneNode(bool deep) final;
1119 void cloneDataFromDocument(const Document&); 1130 void cloneDataFromDocument(const Document&);
1120 bool isSecureContextImpl(String* errorMessage, const SecureContextCheck priv iligeContextCheck) const; 1131 bool isSecureContextImpl(String* errorMessage, const SecureContextCheck priv iligeContextCheck) const;
1121 1132
1133 ShadowCascadeOrder m_shadowCascadeOrder = ShadowCascadeNone;
1134
1122 #if !ENABLE(OILPAN) 1135 #if !ENABLE(OILPAN)
1123 void refExecutionContext() final { ref(); } 1136 void refExecutionContext() final { ref(); }
1124 void derefExecutionContext() final { deref(); } 1137 void derefExecutionContext() final { deref(); }
1125 #endif 1138 #endif
1126 1139
1127 const KURL& virtualURL() const final; // Same as url(), but needed for Execu tionContext to implement it without a performance loss for direct calls. 1140 const KURL& virtualURL() const final; // Same as url(), but needed for Execu tionContext to implement it without a performance loss for direct calls.
1128 KURL virtualCompleteURL(const String&) const final; // Same as completeURL() for the same reason as above. 1141 KURL virtualCompleteURL(const String&) const final; // Same as completeURL() for the same reason as above.
1129 1142
1130 void reportBlockedScriptExecutionToInspector(const String& directiveText) fi nal; 1143 void reportBlockedScriptExecutionToInspector(const String& directiveText) fi nal;
1131 1144
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1388 OriginsUsingFeatures::Value m_originsUsingFeaturesValue; 1401 OriginsUsingFeatures::Value m_originsUsingFeaturesValue;
1389 1402
1390 ClientHintsPreferences m_clientHintsPreferences; 1403 ClientHintsPreferences m_clientHintsPreferences;
1391 1404
1392 Member<CanvasFontCache> m_canvasFontCache; 1405 Member<CanvasFontCache> m_canvasFontCache;
1393 1406
1394 Member<IntersectionObserverController> m_intersectionObserverController; 1407 Member<IntersectionObserverController> m_intersectionObserverController;
1395 Member<NodeIntersectionObserverData> m_intersectionObserverData; 1408 Member<NodeIntersectionObserverData> m_intersectionObserverData;
1396 1409
1397 int m_nodeCount; 1410 int m_nodeCount;
1411
1412 bool m_mayContainV0Shadow = false;
1398 }; 1413 };
1399 1414
1400 extern template class CORE_EXTERN_TEMPLATE_EXPORT Supplement<Document>; 1415 extern template class CORE_EXTERN_TEMPLATE_EXPORT Supplement<Document>;
1401 1416
1402 inline bool Document::shouldOverrideLegacyDescription(ViewportDescription::Type origin) 1417 inline bool Document::shouldOverrideLegacyDescription(ViewportDescription::Type origin)
1403 { 1418 {
1404 // The different (legacy) meta tags have different priorities based on the t ype 1419 // The different (legacy) meta tags have different priorities based on the t ype
1405 // regardless of which order they appear in the DOM. The priority is given b y the 1420 // regardless of which order they appear in the DOM. The priority is given b y the
1406 // ViewportDescription::Type enum. 1421 // ViewportDescription::Type enum.
1407 return origin >= m_legacyViewportDescription.type; 1422 return origin >= m_legacyViewportDescription.type;
(...skipping 29 matching lines...) Expand all
1437 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); 1452 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true);
1438 1453
1439 } // namespace blink 1454 } // namespace blink
1440 1455
1441 #ifndef NDEBUG 1456 #ifndef NDEBUG
1442 // Outside the WebCore namespace for ease of invocation from gdb. 1457 // Outside the WebCore namespace for ease of invocation from gdb.
1443 CORE_EXPORT void showLiveDocumentInstances(); 1458 CORE_EXPORT void showLiveDocumentInstances();
1444 #endif 1459 #endif
1445 1460
1446 #endif // Document_h 1461 #endif // Document_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp ('k') | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698