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

Unified Diff: third_party/WebKit/Source/core/xml/DocumentXSLT.cpp

Issue 2617103002: Use a new Supplement constructor for Supplement<Document> (Part 1) (Closed)
Patch Set: temp Created 3 years, 11 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/xml/DocumentXSLT.cpp
diff --git a/third_party/WebKit/Source/core/xml/DocumentXSLT.cpp b/third_party/WebKit/Source/core/xml/DocumentXSLT.cpp
index b9b3f5e59293106ac76263130acf93da91f409bc..855c181339e4ef53cdb8a8ac2ce253cca3af39a0 100644
--- a/third_party/WebKit/Source/core/xml/DocumentXSLT.cpp
+++ b/third_party/WebKit/Source/core/xml/DocumentXSLT.cpp
@@ -84,7 +84,8 @@ class DOMContentLoadedListener final
Member<ProcessingInstruction> m_processingInstruction;
};
-DocumentXSLT::DocumentXSLT() : m_transformSourceDocument(nullptr) {}
+DocumentXSLT::DocumentXSLT(Document& document)
+ : Supplement<Document>(document), m_transformSourceDocument(nullptr) {}
void DocumentXSLT::applyXSLTransform(Document& document,
ProcessingInstruction* pi) {
@@ -179,11 +180,11 @@ bool DocumentXSLT::hasTransformSourceDocument(Document& document) {
Supplement<Document>::from(document, supplementName()));
}
-DocumentXSLT& DocumentXSLT::from(Supplementable<Document>& document) {
+DocumentXSLT& DocumentXSLT::from(Document& document) {
DocumentXSLT* supplement = static_cast<DocumentXSLT*>(
Supplement<Document>::from(document, supplementName()));
if (!supplement) {
- supplement = new DocumentXSLT;
+ supplement = new DocumentXSLT(document);
Supplement<Document>::provideTo(document, supplementName(), supplement);
}
return *supplement;

Powered by Google App Engine
This is Rietveld 408576698