OLD | NEW |
1 #include "Filter.h" | 1 #include "Filter.h" |
2 #include "CommentFilter.h" | 2 #include "CommentFilter.h" |
3 #include "InvalidFilter.h" | 3 #include "InvalidFilter.h" |
4 #include "RegExpFilter.h" | 4 #include "RegExpFilter.h" |
5 #include "BlockingFilter.h" | 5 #include "BlockingFilter.h" |
6 #include "WhitelistFilter.h" | 6 #include "WhitelistFilter.h" |
7 #include "ElemHideBase.h" | 7 #include "ElemHideBase.h" |
8 #include "ElemHideFilter.h" | 8 #include "ElemHideFilter.h" |
9 #include "ElemHideException.h" | 9 #include "ElemHideException.h" |
10 #include "ElemHideEmulationFilter.h" | 10 #include "ElemHideEmulationFilter.h" |
11 #include "StringMap.h" | 11 #include "../StringMap.h" |
12 | 12 |
13 namespace | 13 namespace |
14 { | 14 { |
15 StringMap<Filter*> knownFilters(8192); | 15 StringMap<Filter*> knownFilters(8192); |
16 | 16 |
17 void NormalizeWhitespace(DependentString& text) | 17 void NormalizeWhitespace(DependentString& text) |
18 { | 18 { |
19 String::size_type start = 0; | 19 String::size_type start = 0; |
20 String::size_type end = text.length(); | 20 String::size_type end = text.length(); |
21 | 21 |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 | 135 |
136 // This is a hack: we looked up the entry using text but create it using | 136 // This is a hack: we looked up the entry using text but create it using |
137 // filter->mText. This works because both are equal at this point. However, | 137 // filter->mText. This works because both are equal at this point. However, |
138 // text refers to a temporary buffer which will go away. | 138 // text refers to a temporary buffer which will go away. |
139 enter_context("Adding to known filters"); | 139 enter_context("Adding to known filters"); |
140 knownFilter.assign(filter->mText, filter.get()); | 140 knownFilter.assign(filter->mText, filter.get()); |
141 exit_context(); | 141 exit_context(); |
142 | 142 |
143 return filter.release(); | 143 return filter.release(); |
144 } | 144 } |
OLD | NEW |