LEFT | RIGHT |
1 #ifndef ADBLOCK_PLUS_CSS_PROPERTY_FILTER_H | 1 #pragma once |
2 #define ADBLOCK_PLUS_CSS_PROPERTY_FILTER_H | |
3 | 2 |
4 #include <cstddef> | 3 #include <cstddef> |
5 | 4 |
6 #include "Filter.h" | 5 #include "Filter.h" |
7 #include "ElemHideBase.h" | 6 #include "ElemHideBase.h" |
8 | 7 |
9 struct CSSPropertyFilterData | 8 struct CSSPropertyFilterData |
10 { | 9 { |
11 String::size_type mPrefixEnd; | 10 String::size_type mPrefixEnd; |
12 String::size_type mRegexpStart; | 11 String::size_type mRegexpStart; |
(...skipping 14 matching lines...) Expand all Loading... |
27 const DependentString GetSelectorSuffix(const String& text) const | 26 const DependentString GetSelectorSuffix(const String& text) const |
28 { | 27 { |
29 return DependentString(text, mSuffixStart); | 28 return DependentString(text, mSuffixStart); |
30 } | 29 } |
31 }; | 30 }; |
32 | 31 |
33 struct ElemHideData : ElemHideBaseData, CSSPropertyFilterData | 32 struct ElemHideData : ElemHideBaseData, CSSPropertyFilterData |
34 { | 33 { |
35 }; | 34 }; |
36 | 35 |
37 class CSSPropertyFilter: public ElemHideBase, protected CSSPropertyFilterData | 36 class CSSPropertyFilter: public ElemHideBase |
38 { | 37 { |
| 38 protected: |
| 39 CSSPropertyFilterData mPropertyData; |
39 public: | 40 public: |
40 CSSPropertyFilter(const String& text, const ElemHideData& data); | 41 explicit CSSPropertyFilter(const String& text, const ElemHideData& data); |
41 Type GetType() const; | |
42 EMSCRIPTEN_KEEPALIVE OwnedString GetRegExpString() const; | 42 EMSCRIPTEN_KEEPALIVE OwnedString GetRegExpString() const; |
43 EMSCRIPTEN_KEEPALIVE const DependentString GetSelectorPrefix() const | 43 EMSCRIPTEN_KEEPALIVE const DependentString GetSelectorPrefix() const |
44 { | 44 { |
45 return CSSPropertyFilterData::GetSelectorPrefix(mText, mSelectorStart); | 45 return mPropertyData.GetSelectorPrefix(mText, mData.mSelectorStart); |
46 } | 46 } |
47 EMSCRIPTEN_KEEPALIVE const DependentString GetSelectorSuffix() const | 47 EMSCRIPTEN_KEEPALIVE const DependentString GetSelectorSuffix() const |
48 { | 48 { |
49 return CSSPropertyFilterData::GetSelectorSuffix(mText); | 49 return mPropertyData.GetSelectorSuffix(mText); |
50 } | 50 } |
51 }; | 51 }; |
52 | |
53 #endif | |
LEFT | RIGHT |