OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef StyleRuleNamespace_h | 5 #ifndef StyleRuleNamespace_h |
6 #define StyleRuleNamespace_h | 6 #define StyleRuleNamespace_h |
7 | 7 |
8 #include "core/css/StyleRule.h" | 8 #include "core/css/StyleRule.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
11 | 11 |
12 // This class is never actually stored anywhere currently, but only used for | 12 // This class is never actually stored anywhere currently, but only used for |
13 // the parser to pass to a stylesheet | 13 // the parser to pass to a stylesheet |
14 class StyleRuleNamespace final : public StyleRuleBase { | 14 class StyleRuleNamespace final : public StyleRuleBase { |
15 USING_FAST_MALLOC_WILL_BE_REMOVED(StyleRuleNamespace); | 15 USING_FAST_MALLOC_WILL_BE_REMOVED(StyleRuleNamespace); |
16 public: | 16 public: |
17 static PassRefPtrWillBeRawPtr<StyleRuleNamespace> create(AtomicString prefix
, AtomicString uri) | 17 static PassRefPtrWillBeRawPtr<StyleRuleNamespace> create(AtomicString prefix
, AtomicString uri) |
18 { | 18 { |
19 return adoptRefWillBeNoop(new StyleRuleNamespace(prefix, uri)); | 19 return adoptRefWillBeNoop(new StyleRuleNamespace(prefix, uri)); |
20 } | 20 } |
21 | 21 |
22 AtomicString prefix() const { return m_prefix; } | 22 AtomicString prefix() const { return m_prefix; } |
23 AtomicString uri() const { return m_uri; } | 23 AtomicString uri() const { return m_uri; } |
24 | 24 |
| 25 void purgeMemory() { } |
| 26 |
25 DEFINE_INLINE_TRACE_AFTER_DISPATCH() { StyleRuleBase::traceAfterDispatch(vis
itor); } | 27 DEFINE_INLINE_TRACE_AFTER_DISPATCH() { StyleRuleBase::traceAfterDispatch(vis
itor); } |
26 | 28 |
27 private: | 29 private: |
28 StyleRuleNamespace(AtomicString prefix, AtomicString uri) | 30 StyleRuleNamespace(AtomicString prefix, AtomicString uri) |
29 : StyleRuleBase(Namespace) | 31 : StyleRuleBase(Namespace) |
30 , m_prefix(prefix) | 32 , m_prefix(prefix) |
31 , m_uri(uri) | 33 , m_uri(uri) |
32 { } | 34 { } |
33 | 35 |
34 AtomicString m_prefix; | 36 AtomicString m_prefix; |
35 AtomicString m_uri; | 37 AtomicString m_uri; |
36 }; | 38 }; |
37 | 39 |
38 DEFINE_STYLE_RULE_TYPE_CASTS(Namespace); | 40 DEFINE_STYLE_RULE_TYPE_CASTS(Namespace); |
39 | 41 |
40 } // namespace blink | 42 } // namespace blink |
41 | 43 |
42 #endif // StyleRuleNamespace_h | 44 #endif // StyleRuleNamespace_h |
OLD | NEW |