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

Side by Side Diff: Source/core/xml/XSLImportRule.h

Issue 25519002: Adding ASSERT for RuntimeEnabled feature XSLT (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * This file is part of the XSL implementation. 2 * This file is part of the XSL implementation.
3 * 3 *
4 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
11 * This library is distributed in the hope that it will be useful, 11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details. 14 * Library General Public License for more details.
15 * 15 *
16 * You should have received a copy of the GNU Library General Public License 16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to 17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA. 19 * Boston, MA 02110-1301, USA.
20 * 20 *
21 */ 21 */
22 22
23 #ifndef XSLImportRule_h 23 #ifndef XSLImportRule_h
24 #define XSLImportRule_h 24 #define XSLImportRule_h
25 25
26 #include "RuntimeEnabledFeatures.h"
26 #include "core/fetch/ResourcePtr.h" 27 #include "core/fetch/ResourcePtr.h"
27 #include "core/fetch/StyleSheetResourceClient.h" 28 #include "core/fetch/StyleSheetResourceClient.h"
28 #include "core/xml/XSLStyleSheet.h" 29 #include "core/xml/XSLStyleSheet.h"
29 #include "wtf/PassOwnPtr.h" 30 #include "wtf/PassOwnPtr.h"
30 31
31 namespace WebCore { 32 namespace WebCore {
32 33
33 class XSLStyleSheetResource; 34 class XSLStyleSheetResource;
34 35
35 class XSLImportRule : private StyleSheetResourceClient { 36 class XSLImportRule : private StyleSheetResourceClient {
36 WTF_MAKE_FAST_ALLOCATED; 37 WTF_MAKE_FAST_ALLOCATED;
37 public: 38 public:
38 static PassOwnPtr<XSLImportRule> create(XSLStyleSheet* parentSheet, const St ring& href) 39 static PassOwnPtr<XSLImportRule> create(XSLStyleSheet* parentSheet, const St ring& href)
39 { 40 {
41 ASSERT(RuntimeEnabledFeatures::xsltEnabled());
40 return adoptPtr(new XSLImportRule(parentSheet, href)); 42 return adoptPtr(new XSLImportRule(parentSheet, href));
41 } 43 }
42 44
43 virtual ~XSLImportRule(); 45 virtual ~XSLImportRule();
44 46
45 const String& href() const { return m_strHref; } 47 const String& href() const { return m_strHref; }
46 XSLStyleSheet* styleSheet() const { return m_styleSheet.get(); } 48 XSLStyleSheet* styleSheet() const { return m_styleSheet.get(); }
47 49
48 XSLStyleSheet* parentStyleSheet() const { return m_parentStyleSheet; } 50 XSLStyleSheet* parentStyleSheet() const { return m_parentStyleSheet; }
49 void setParentStyleSheet(XSLStyleSheet* styleSheet) { m_parentStyleSheet = s tyleSheet; } 51 void setParentStyleSheet(XSLStyleSheet* styleSheet) { m_parentStyleSheet = s tyleSheet; }
50 52
51 bool isLoading(); 53 bool isLoading();
52 void loadSheet(); 54 void loadSheet();
53 55
54 private: 56 private:
55 XSLImportRule(XSLStyleSheet* parentSheet, const String& href); 57 XSLImportRule(XSLStyleSheet* parentSheet, const String& href);
56 58
57 virtual void setXSLStyleSheet(const String& href, const KURL& baseURL, const String& sheet); 59 virtual void setXSLStyleSheet(const String& href, const KURL& baseURL, const String& sheet);
58 60
59 XSLStyleSheet* m_parentStyleSheet; 61 XSLStyleSheet* m_parentStyleSheet;
60 String m_strHref; 62 String m_strHref;
61 RefPtr<XSLStyleSheet> m_styleSheet; 63 RefPtr<XSLStyleSheet> m_styleSheet;
62 ResourcePtr<XSLStyleSheetResource> m_resource; 64 ResourcePtr<XSLStyleSheetResource> m_resource;
63 bool m_loading; 65 bool m_loading;
64 }; 66 };
65 67
66 } // namespace WebCore 68 } // namespace WebCore
67 69
68 #endif // XSLImportRule_h 70 #endif // XSLImportRule_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698