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

Unified Diff: Source/core/xml/XSLStyleSheet.h

Issue 25519002: Adding ASSERT for RuntimeEnabled feature XSLT (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review comments addressed. Created 7 years, 2 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/xml/XSLImportRule.h ('k') | Source/core/xml/XSLTExtensions.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xml/XSLStyleSheet.h
diff --git a/Source/core/xml/XSLStyleSheet.h b/Source/core/xml/XSLStyleSheet.h
index 8b49376abb742c5ef5f02474e7d91285cda3200f..84717958c2212ae4dccc61b512b7732ba4c7c9e8 100644
--- a/Source/core/xml/XSLStyleSheet.h
+++ b/Source/core/xml/XSLStyleSheet.h
@@ -23,12 +23,14 @@
#ifndef XSLStyleSheet_h
#define XSLStyleSheet_h
-#include <libxml/tree.h>
-#include <libxslt/transform.h>
+#include "RuntimeEnabledFeatures.h"
#include "core/css/StyleSheet.h"
#include "core/dom/ProcessingInstruction.h"
#include "wtf/PassRefPtr.h"
+#include <libxml/tree.h>
+#include <libxslt/transform.h>
+
namespace WebCore {
class ResourceFetcher;
@@ -38,14 +40,17 @@ class XSLStyleSheet : public StyleSheet {
public:
static PassRefPtr<XSLStyleSheet> create(XSLImportRule* parentImport, const String& originalURL, const KURL& finalURL)
{
+ ASSERT(RuntimeEnabledFeatures::xsltEnabled());
return adoptRef(new XSLStyleSheet(parentImport, originalURL, finalURL));
}
static PassRefPtr<XSLStyleSheet> create(ProcessingInstruction* parentNode, const String& originalURL, const KURL& finalURL)
{
+ ASSERT(RuntimeEnabledFeatures::xsltEnabled());
return adoptRef(new XSLStyleSheet(parentNode, originalURL, finalURL, false));
}
static PassRefPtr<XSLStyleSheet> createEmbedded(ProcessingInstruction* parentNode, const KURL& finalURL)
{
+ ASSERT(RuntimeEnabledFeatures::xsltEnabled());
return adoptRef(new XSLStyleSheet(parentNode, finalURL.string(), finalURL, true));
}
@@ -53,6 +58,7 @@ public:
// XSLTProcessor ensures that the stylesheet doesn't outlive its parent, in part by not exposing it to JavaScript.
static PassRefPtr<XSLStyleSheet> createForXSLTProcessor(Node* parentNode, const String& originalURL, const KURL& finalURL)
{
+ ASSERT(RuntimeEnabledFeatures::xsltEnabled());
return adoptRef(new XSLStyleSheet(parentNode, originalURL, finalURL, false));
}
« no previous file with comments | « Source/core/xml/XSLImportRule.h ('k') | Source/core/xml/XSLTExtensions.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698