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

Unified Diff: Source/core/dom/Document.h

Issue 159853004: Ensure that every Document has a single, distinct template content ownerDocument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Suppress expected w3c test failures Created 6 years, 10 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/core/dom/ContainerNode.cpp ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.h
diff --git a/Source/core/dom/Document.h b/Source/core/dom/Document.h
index 4fa870bdcf8ccd59138f293e85766194fe2c40c7..05429d735f9985fd2cde4d38e1f87beaeb1f4342 100644
--- a/Source/core/dom/Document.h
+++ b/Source/core/dom/Document.h
@@ -1014,9 +1014,9 @@ public:
const Vector<RefPtr<Element> >& topLayerElements() const { return m_topLayerElements; }
HTMLDialogElement* activeModalDialog() const;
- const Document* templateDocument() const;
+ // A non-null m_templateDocumentHost implies that |this| was created by ensureTemplateDocument().
+ bool isTemplateDocument() const { return !!m_templateDocumentHost; }
Document& ensureTemplateDocument();
- void setTemplateDocumentHost(Document* templateDocumentHost) { m_templateDocumentHost = templateDocumentHost; }
Document* templateDocumentHost() { return m_templateDocumentHost; }
void didAssociateFormControl(Element*);
@@ -1360,15 +1360,6 @@ inline void Document::notifyRemovePendingSheetIfNeeded()
didRemoveAllPendingStylesheet();
}
-inline const Document* Document::templateDocument() const
-{
- // If DOCUMENT does not have a browsing context, Let TEMPLATE CONTENTS OWNER be DOCUMENT and abort these steps.
- if (!m_frame)
- return this;
-
- return m_templateDocument.get();
-}
-
inline bool Document::shouldOverrideLegacyDescription(ViewportDescription::Type origin)
{
// The different (legacy) meta tags have different priorities based on the type
« no previous file with comments | « Source/core/dom/ContainerNode.cpp ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698